Skip to content

Commit 331a654

Browse files
committed
Tidy up the scripts
We now have basic and `:integration` flavors of the common commands `lint` and `test` as well as an `:all` flavor that will run everything. We also now ensure that the types are built before running integration tests as well as part of the packaging workflow via `prepack`.
1 parent f46a697 commit 331a654

File tree

1 file changed

+9
-6
lines changed

1 file changed

+9
-6
lines changed

package.json

+9-6
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
"CONTRIBUTING.md",
1414
"LICENSE",
1515
"README.md",
16+
"dist/**/*",
1617
"index.d.ts",
1718
"index.js",
1819
"lib/**/*.js",
@@ -26,15 +27,17 @@
2627
"yarn": ">=1.7.0"
2728
},
2829
"scripts": {
29-
"build-types": "tsc --target ES2022 --declaration --emitDeclarationOnly --allowJs --types node --outDir ./dist/types index.js",
30+
"build": "npm run build:types",
31+
"build:types": "tsc --target ES2022 --declaration --emitDeclarationOnly --allowJs --types node --outDir ./dist/types index.js",
3032
"check": "tsc",
3133
"format": "biome format . --write",
32-
"lint-biome": "biome lint .",
33-
"lint-publint": "publint",
34-
"lint": "npm run lint-biome && npm run lint-publint",
34+
"lint": "biome lint .",
35+
"lint:integration": "npm run build; publint",
36+
"lint:all": "npm run tsc; npm run lint; npm run lint:integration",
37+
"prepack": "npm run build",
3538
"test": "jest",
36-
"test-integration": "npm run build-types; for x in commonjs esm typescript; do npm --prefix integration/$x install --omit=dev && npm --prefix integration/$x test; done;",
37-
"test-all": "npm run check; npm run test; npm run test-integration"
39+
"test:integration": "npm run build; for x in commonjs esm typescript; do npm --prefix integration/$x install --omit=dev && npm --prefix integration/$x test; done;",
40+
"test:all": "npm run check; npm run test; npm run test:integration"
3841
},
3942
"optionalDependencies": {
4043
"readable-stream": ">=4.0.0"

0 commit comments

Comments
 (0)