Skip to content

fix(cli): minimist should not turn strings into numbers#39148

Open
Skn0tt wants to merge 6 commits intomicrosoft:mainfrom
Skn0tt:minimist-string-opts
Open

fix(cli): minimist should not turn strings into numbers#39148
Skn0tt wants to merge 6 commits intomicrosoft:mainfrom
Skn0tt:minimist-string-opts

Conversation

@Skn0tt
Copy link
Member

@Skn0tt Skn0tt commented Feb 5, 2026

@Skn0tt Skn0tt requested a review from dgozman February 5, 2026 13:12
@Skn0tt Skn0tt self-assigned this Feb 5, 2026
Object.entries(commands).map(([name, command]) => [name, generateCommandHelp(command)])
),
stringOptions: [...stringOptions],
booleanOptions: [...booleanOptions],
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this outputs a lot more booleanOptions than we currently have:

"stringOptions": [
    "browser",
    "config",
    "profile",
    "modifiers",
    "filename",
    "domain",
    "path",
    "body",
    "content-type",
    "remove-header"
  ],
  "booleanOptions": [
    "extension",
    "headed",
    "persistent",
    "submit",
    "clear",
    "full-page",
    "httpOnly",
    "secure",
    "skills",
    "static"
  ]

const argv = process.argv.slice(2);
const args: MinimistArgs = require('minimist')(argv, { boolean: booleanOptions });
for (const option of booleanOptions) {
const args: MinimistArgs = require('minimist')(argv, { boolean: [...help.booleanOptions, 'help', 'version'], string: [...help.stringOptions, '_'] });
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does this work with mousemove? IIRC, it has two number arguments.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

CI says no!

@github-actions

This comment has been minimized.

@github-actions

This comment has been minimized.

@Skn0tt Skn0tt requested a review from dgozman February 6, 2026 08:56
@github-actions
Copy link
Contributor

github-actions bot commented Feb 6, 2026

Test results for "MCP"

1 failed
❌ [chromium] › mcp/cli-session.spec.ts:94 › delete-data named session @mcp-windows-latest

4713 passed, 135 skipped


Merge workflow run.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

playwright-cli fill command fails when input value is numeric — throws "expected string, received number" error

2 participants