Skip to content

chore: make eval scripts cross-platform compatible (Windows)#1030

Merged
OrKoN merged 1 commit intoChromeDevTools:mainfrom
passtas:fix/eval-windows-compat
Feb 24, 2026
Merged

chore: make eval scripts cross-platform compatible (Windows)#1030
OrKoN merged 1 commit intoChromeDevTools:mainfrom
passtas:fix/eval-windows-compat

Conversation

@passtas
Copy link
Copy Markdown
Contributor

@passtas passtas commented Feb 24, 2026

Fixes #1029

Summary

  • Use pathToFileURL() from node:url for dynamic imports in eval_gemini.ts to fix ERR_UNSUPPORTED_ESM_URL_SCHEME on Windows - converts absolute paths like D:\projects\...\console_test.ts to proper file:///D:/projects/.../console_test.ts URLs that the Node.js ESM loader accepts on all platforms
  • Move CHROME_DEVTOOLS_MCP_NO_USAGE_STATISTICS=true from Unix-only shell env var prefix in package.json into eval_gemini.ts code, matching the pattern already used in scripts/test.mjs
  • Add .gitattributes with * text=auto eol=lf to enforce LF line endings on checkout - Windows contributors cloning the repo would otherwise get CRLF endings, which conflicts with the project's Prettier endOfLine: 'lf' config and causes spurious diffs or formatting failures

@google-cla
Copy link
Copy Markdown

google-cla Bot commented Feb 24, 2026

Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

View this failed invocation of the CLA check for more information.

For the most up to date status, view the checks section at the bottom of the pull request.

Use `pathToFileURL` for dynamic imports in eval_gemini.ts to fix
`ERR_UNSUPPORTED_ESM_URL_SCHEME` on Windows. Move env var from shell
syntax into script code for cross-platform compatibility. Add
.gitattributes to enforce LF line endings.
@passtas passtas force-pushed the fix/eval-windows-compat branch from 2a5d156 to a2f3850 Compare February 24, 2026 12:08
@OrKoN OrKoN changed the title fix: make eval scripts cross-platform compatible (Windows) chore: make eval scripts cross-platform compatible (Windows) Feb 24, 2026
Copy link
Copy Markdown
Collaborator

@OrKoN OrKoN left a comment

Choose a reason for hiding this comment

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

Thanks!

@OrKoN OrKoN enabled auto-merge February 24, 2026 13:12
@OrKoN OrKoN added this pull request to the merge queue Feb 24, 2026
Merged via the queue into ChromeDevTools:main with commit a106170 Feb 24, 2026
19 checks passed
wolfib pushed a commit to wolfib/chrome-devtools-mcp that referenced this pull request Mar 10, 2026
…evTools#1030)

Fixes ChromeDevTools#1029

## Summary
- Use `pathToFileURL()` from `node:url` for dynamic imports in
`eval_gemini.ts` to fix `ERR_UNSUPPORTED_ESM_URL_SCHEME` on Windows -
converts absolute paths like `D:\projects\...\console_test.ts` to proper
`file:///D:/projects/.../console_test.ts` URLs that the Node.js ESM
loader accepts on all platforms
- Move `CHROME_DEVTOOLS_MCP_NO_USAGE_STATISTICS=true` from Unix-only
shell env var prefix in `package.json` into `eval_gemini.ts` code,
matching the pattern already used in `scripts/test.mjs`
- Add `.gitattributes` with `* text=auto eol=lf` to enforce LF line
endings on checkout - Windows contributors cloning the repo would
otherwise get CRLF endings, which conflicts with the project's Prettier
`endOfLine: 'lf'` config and causes spurious diffs or formatting
failures
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.

npm run eval fails on Windows with ERR_UNSUPPORTED_ESM_URL_SCHEME

2 participants