Skip to content

Commit 1063a70

Browse files
committed
fix: Update create-package template
Update the template used by the `create-package` script. The previous template was no longer compatible with our Yarn constraints. Here are the PRs related to these specific changes: * #4648 * #3645 * #1390 * #3668
1 parent 5b66cce commit 1063a70

File tree

1 file changed

+16
-9
lines changed

1 file changed

+16
-9
lines changed

scripts/create-package/package-template/package.json

Lines changed: 16 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -18,26 +18,33 @@
1818
"sideEffects": false,
1919
"exports": {
2020
".": {
21-
"import": "./dist/index.mjs",
22-
"require": "./dist/index.js",
23-
"types": "./dist/types/index.d.ts"
21+
"import": {
22+
"types": "./dist/index.d.mts",
23+
"default": "./dist/index.mjs"
24+
},
25+
"require": {
26+
"types": "./dist/index.d.cts",
27+
"default": "./dist/index.cjs"
28+
}
2429
},
2530
"./package.json": "./package.json"
2631
},
27-
"main": "./dist/index.js",
28-
"types": "./dist/types/index.d.ts",
32+
"main": "./dist/index.cjs",
33+
"types": "./dist/index.d.cts",
2934
"files": [
3035
"dist/"
3136
],
3237
"scripts": {
3338
"build": "ts-bridge --project tsconfig.build.json --verbose --clean --no-references",
3439
"build:docs": "typedoc",
40+
"changelog:update": "../../scripts/update-changelog.sh PACKAGE_NAME",
3541
"changelog:validate": "../../scripts/validate-changelog.sh PACKAGE_NAME",
42+
"since-latest-release": "../../scripts/since-latest-release.sh",
3643
"publish:preview": "yarn npm publish --tag preview",
37-
"test": "jest --reporters=jest-silent-reporter",
38-
"test:clean": "jest --clearCache",
39-
"test:verbose": "jest --verbose",
40-
"test:watch": "jest --watch"
44+
"test": "NODE_OPTIONS=--experimental-vm-modules jest --reporters=jest-silent-reporter",
45+
"test:clean": "NODE_OPTIONS=--experimental-vm-modules jest --clearCache",
46+
"test:verbose": "NODE_OPTIONS=--experimental-vm-modules jest --verbose",
47+
"test:watch": "NODE_OPTIONS=--experimental-vm-modules jest --watch"
4148
},
4249
"devDependencies": {
4350
"@metamask/auto-changelog": "^3.4.4",

0 commit comments

Comments
 (0)