diff --git a/.changeset/afraid-snails-smash.md b/.changeset/afraid-snails-smash.md new file mode 100644 index 00000000..736053ba --- /dev/null +++ b/.changeset/afraid-snails-smash.md @@ -0,0 +1,5 @@ +--- +"@nodesecure/scanner": patch +--- + +Fix an issue with the monorepo build command. Now each workspace build script is executed in CI and before publishing. diff --git a/package.json b/package.json index 6276df56..ebe55411 100644 --- a/package.json +++ b/package.json @@ -1,11 +1,11 @@ { "workspaces": [ + "workspaces/contact", "workspaces/scanner", "workspaces/tarball", "workspaces/mama", "workspaces/tree-walker", "workspaces/conformance", - "workspaces/contact", "workspaces/npm-types", "workspaces/i18n", "workspaces/rc", @@ -16,7 +16,7 @@ "workspaces/gitlab" ], "scripts": { - "build": "tsc --build", + "build": "npm run build --ws --if-present", "test": "npm run test --ws --if-present", "test-types": "npm run test-types --ws --if-present", "lint": "eslint workspaces", diff --git a/workspaces/flags/package.json b/workspaces/flags/package.json index 83714b5b..e009a373 100644 --- a/workspaces/flags/package.json +++ b/workspaces/flags/package.json @@ -3,7 +3,7 @@ "version": "3.0.3", "description": "NodeSecure security flags", "scripts": { - "build": "tsc & cp -R ./src/flags ./dist/flags", + "build": "tsc -b & cp -R ./src/flags ./dist/flags", "prepublishOnly": "npm run build", "test-only": "tsx --test \"./test/**/*.spec.ts\"", "test-types": "attw --pack . --profile esm-only", diff --git a/workspaces/fs-walk/package.json b/workspaces/fs-walk/package.json index f82506de..c8bb4a9c 100644 --- a/workspaces/fs-walk/package.json +++ b/workspaces/fs-walk/package.json @@ -9,7 +9,7 @@ "node": ">=20.0.0" }, "scripts": { - "build": "tsc", + "build": "tsc -b", "prepublishOnly": "npm run build", "test-only": "tsx --test \"./test/**/*.spec.ts\"", "test-types": "attw --pack . --profile esm-only", diff --git a/workspaces/github/package.json b/workspaces/github/package.json index 2ea0eedb..0ef5fb20 100644 --- a/workspaces/github/package.json +++ b/workspaces/github/package.json @@ -6,7 +6,7 @@ "exports": "./dist/index.js", "types": "./dist/index.d.ts", "scripts": { - "build": "tsc", + "build": "tsc -b", "prepublishOnly": "npm run build", "test-only": "tsx --test \"./test/**/*.spec.ts\"", "test-types": "attw --pack . --profile esm-only", diff --git a/workspaces/gitlab/package.json b/workspaces/gitlab/package.json index 8d56f95f..f3f17256 100644 --- a/workspaces/gitlab/package.json +++ b/workspaces/gitlab/package.json @@ -6,7 +6,7 @@ "types": "./dist/index.d.ts", "type": "module", "scripts": { - "build": "tsc", + "build": "tsc -b", "prepublishOnly": "npm run build", "test-only": "tsx --test \"./test/**/*.spec.ts\"", "test-types": "attw --pack . --profile esm-only", diff --git a/workspaces/i18n/package.json b/workspaces/i18n/package.json index e5eb9fe9..58983a58 100644 --- a/workspaces/i18n/package.json +++ b/workspaces/i18n/package.json @@ -5,7 +5,7 @@ "main": "./dist/index.js", "types": "./dist/index.d.ts", "scripts": { - "build": "tsc", + "build": "tsc -b", "prepublishOnly": "npm run build", "test-only": "tsx --test ./test/**/*.spec.ts", "test-types": "attw --pack . --profile esm-only", diff --git a/workspaces/rc/package.json b/workspaces/rc/package.json index d50a33d3..c9dd7a6f 100644 --- a/workspaces/rc/package.json +++ b/workspaces/rc/package.json @@ -9,7 +9,7 @@ "node": ">=20" }, "scripts": { - "build": "tsc", + "build": "tsc -b", "prepublishOnly": "npm run build", "test-only": "tsx --test ./test/**/*.spec.ts", "test-types": "npm run build && tsd && attw --pack . --profile esm-only", diff --git a/workspaces/scanner/package.json b/workspaces/scanner/package.json index 072caf99..d9002e2d 100644 --- a/workspaces/scanner/package.json +++ b/workspaces/scanner/package.json @@ -9,7 +9,7 @@ "node": ">=20" }, "scripts": { - "build": "tsc -b & cp -R ./src/data ./dist/data", + "build": "tsc -b && cp -R ./src/data ./dist/data", "lint": "eslint src test", "prepublishOnly": "npm run build && pkg-ok", "test": "c8 -r html npm run test-only && npm run test-types", diff --git a/workspaces/tarball/package.json b/workspaces/tarball/package.json index 59718e5f..6a359da7 100644 --- a/workspaces/tarball/package.json +++ b/workspaces/tarball/package.json @@ -15,7 +15,7 @@ "./package.json": "./package.json" }, "scripts": { - "build": "tsc", + "build": "tsc -b", "prepublishOnly": "npm run build", "test-only": "tsx --test ./test/**/*.spec.ts", "test-types": "attw --pack . --profile esm-only", diff --git a/workspaces/utils/package.json b/workspaces/utils/package.json index 4488aef4..e7394692 100644 --- a/workspaces/utils/package.json +++ b/workspaces/utils/package.json @@ -9,7 +9,7 @@ "node": ">=20.0.0" }, "scripts": { - "build": "tsc", + "build": "tsc -b", "prepublishOnly": "npm run build", "test-only": "tsx --test \"./test/**/*.spec.ts\"", "test-types": "attw --pack . --profile esm-only",