Skip to content

Commit 31d9f9b

Browse files
committed
chore: Add type: "module" to package.json
This means that .js files will by default be interpreted as ESM rather than CJS—which is correct, since almost all our source files are in fact ES modules using import. This allows removal of test/webdriverio/test/package.json, which was preventing npm scripts (e.g. "npm test") from working properly in that directory. A few config files that do in fact use require() are renamed to .cjs to ensure they are correctly interpreted.
1 parent 422dc28 commit 31d9f9b

File tree

6 files changed

+1
-3
lines changed

6 files changed

+1
-3
lines changed
File renamed without changes.

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@
2121
"wdio:clean": "cd test/webdriverio/test && rm -rf dist",
2222
"wdio:run": "npm run wdio:build && cd test/webdriverio/test && npx mocha dist"
2323
},
24+
"type": "module",
2425
"main": "./dist/index.js",
2526
"module": "./src/index.js",
2627
"unpkg": "./dist/index.js",
File renamed without changes.

test/webdriverio/test/package.json

Lines changed: 0 additions & 3 deletions
This file was deleted.
File renamed without changes.
File renamed without changes.

0 commit comments

Comments
 (0)