Chrome DevTools for coding agents
chore: use ESM instead of CJS (#2487)
Nikolay Vitkov72d825272fe2
diff --git a/eslint.config.mjs b/eslint.config.jssimilarity index 96%rename from eslint.config.mjsrename to eslint.config.jsindex d6c32582..b6bd4ef5 100644--- a/eslint.config.mjs+++ b/eslint.config.js@@ -35,10 +35,10 @@ export default defineConfig([parserOptions: {projectService: {allowDefaultProject: [- '.prettierrc.cjs',- 'puppeteer.config.cjs',- 'eslint.config.mjs',- 'rollup.config.mjs',+ 'prettier.config.js',+ 'puppeteer.config.js',+ 'eslint.config.js',+ 'rollup.config.js',],},},diff --git a/package.json b/package.jsonindex 632eacc1..14d5ec4e 100644--- a/package.json+++ b/package.json@@ -11,7 +11,7 @@"scripts": {"cli:generate": "node scripts/generate-cli.ts","clean": "node -e \"require('fs').rmSync('build', {recursive: true, force: true})\"",- "bundle": "npm run clean && npm run build && rollup -c rollup.config.mjs && node -e \"require('fs').rmSync('build/node_modules', {recursive: true, force: true})\" && node scripts/append-lighthouse-notices.ts",+ "bundle": "npm run clean && npm run build && rollup -c rollup.config.js && node -e \"require('fs').rmSync('build/node_modules', {recursive: true, force: true})\" && node scripts/append-lighthouse-notices.ts","build": "tsc && node scripts/post-build.ts","typecheck": "tsc --noEmit","format": "eslint --cache --fix . && prettier --write --cache .",@@ -20,17 +20,17 @@"docs:generate": "node scripts/generate-docs.ts","start": "npm run build && node build/src/bin/chrome-devtools-mcp.js","start-debug": "DEBUG=mcp:* DEBUG_COLORS=false npm run build && node build/src/bin/chrome-devtools-mcp.js",- "test": "npm run build && node scripts/test.mjs --test-skip-pattern=THIRD_PARTY_NOTICES",- "test:no-build": "node scripts/test.mjs --test-skip-pattern=THIRD_PARTY_NOTICES",- "test:notices": "npm run bundle && node scripts/test.mjs tests/third_party_notices.test.ts",- "test:notices:no-build": "node scripts/test.mjs tests/third_party_notices.test.ts",- "test:only": "npm run build && node scripts/test.mjs --test-only",- "test:update-snapshots": "npm run build && node scripts/test.mjs --test-update-snapshots",+ "test": "npm run build && node scripts/test.js --test-skip-pattern=THIRD_PARTY_NOTICES",+ "test:no-build": "node scripts/test.js --test-skip-pattern=THIRD_PARTY_NOTICES",+ "test:notices": "npm run bundle && node scripts/test.js tests/third_party_notices.test.ts",+ "test:notices:no-build": "node scripts/test.js tests/third_party_notices.test.ts",+ "test:only": "npm run build && node scripts/test.js --test-only",+ "test:update-snapshots": "npm run build && node scripts/test.js --test-update-snapshots","prepare": "node scripts/prepare.ts","verify-server-json-version": "node scripts/verify-server-json-version.ts","update-lighthouse": "node scripts/update-lighthouse.ts","update-metrics": "node scripts/update_metrics.ts",- "verify-npm-package": "node scripts/verify-npm-package.mjs",+ "verify-npm-package": "node scripts/verify-npm-package.js","eval": "npm run build && node scripts/eval_gemini.ts","count-tokens": "node scripts/count_tokens.ts"},diff --git a/.prettierrc.cjs b/prettier.config.jssimilarity index 94%rename from .prettierrc.cjsrename to prettier.config.jsindex b1741335..f1eee8aa 100644--- a/.prettierrc.cjs+++ b/prettier.config.js@@ -7,7 +7,7 @@/*** @type {import('prettier').Config}*/-module.exports = {+export default {bracketSpacing: false,singleQuote: true,trailingComma: 'all',diff --git a/puppeteer.config.cjs b/puppeteer.config.jssimilarity index 93%rename from puppeteer.config.cjsrename to puppeteer.config.jsindex d162fc0f..194340ac 100644--- a/puppeteer.config.cjs+++ b/puppeteer.config.js@@ -7,7 +7,7 @@/*** @type {import("puppeteer").Configuration}*/-module.exports = {+export default {chrome: {skipDownload: false,},diff --git a/rollup.config.mjs b/rollup.config.jssimilarity index 100%rename from rollup.config.mjsrename to rollup.config.jsdiff --git a/scripts/test.mjs b/scripts/test.jssimilarity index 100%rename from scripts/test.mjsrename to scripts/test.jsdiff --git a/scripts/verify-npm-package.mjs b/scripts/verify-npm-package.jssimilarity index 100%rename from scripts/verify-npm-package.mjsrename to scripts/verify-npm-package.js