mirror of
https://github.com/openclaw/openclaw.git
synced 2026-08-12 21:53:00 -06:00
fix(tooling): fail deadcode report on scan errors (#122847)
This commit is contained in:
committed by
GitHub
parent
adf8e254ab
commit
75332a2671
+1
-1
@@ -1551,7 +1551,7 @@
|
|||||||
"deadcode:exports": "node --import tsx scripts/check-deadcode-exports.mts",
|
"deadcode:exports": "node --import tsx scripts/check-deadcode-exports.mts",
|
||||||
"deadcode:full": "pnpm --config.minimum-release-age=0 dlx --package knip@6.8.0 knip --config config/knip.config.ts --production --no-progress --reporter compact --no-config-hints --exclude duplicates && pnpm --config.minimum-release-age=0 dlx --package knip@6.8.0 knip --config config/knip.all-exports.config.ts --no-progress --reporter compact --no-config-hints --exports --exclude duplicates",
|
"deadcode:full": "pnpm --config.minimum-release-age=0 dlx --package knip@6.8.0 knip --config config/knip.config.ts --production --no-progress --reporter compact --no-config-hints --exclude duplicates && pnpm --config.minimum-release-age=0 dlx --package knip@6.8.0 knip --config config/knip.all-exports.config.ts --no-progress --reporter compact --no-config-hints --exports --exclude duplicates",
|
||||||
"deadcode:knip": "pnpm --config.minimum-release-age=0 dlx --package knip@6.8.0 knip --config config/knip.config.ts --production --no-progress --reporter compact --files --dependencies",
|
"deadcode:knip": "pnpm --config.minimum-release-age=0 dlx --package knip@6.8.0 knip --config config/knip.config.ts --production --no-progress --reporter compact --files --dependencies",
|
||||||
"deadcode:report": "pnpm deadcode:full; pnpm deadcode:exports",
|
"deadcode:report": "pnpm deadcode:full && pnpm deadcode:exports",
|
||||||
"deadcode:unused-files": "node --import tsx scripts/check-deadcode-unused-files.mts",
|
"deadcode:unused-files": "node --import tsx scripts/check-deadcode-unused-files.mts",
|
||||||
"deps:root-ownership": "node --import tsx scripts/root-dependency-ownership-audit.mts",
|
"deps:root-ownership": "node --import tsx scripts/root-dependency-ownership-audit.mts",
|
||||||
"deps:root-ownership:check": "node --import tsx scripts/root-dependency-ownership-audit.mts --check",
|
"deps:root-ownership:check": "node --import tsx scripts/root-dependency-ownership-audit.mts --check",
|
||||||
|
|||||||
@@ -152,6 +152,12 @@ describe("package scripts", () => {
|
|||||||
);
|
);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
it("runs dead-code reports fail-fast", () => {
|
||||||
|
expect(readPackageJson().scripts["deadcode:report"]).toBe(
|
||||||
|
"pnpm deadcode:full && pnpm deadcode:exports",
|
||||||
|
);
|
||||||
|
});
|
||||||
|
|
||||||
it("runs runtime postbuild before plugin SDK strict export checks", () => {
|
it("runs runtime postbuild before plugin SDK strict export checks", () => {
|
||||||
expect(readPackageJson().scripts["build:plugin-sdk:strict-smoke"]).toBe(
|
expect(readPackageJson().scripts["build:plugin-sdk:strict-smoke"]).toBe(
|
||||||
"node --import tsx scripts/tsdown-build.mts && node scripts/runtime-postbuild.mjs && node --import tsx scripts/run-with-env.mts OPENCLAW_PLUGIN_SDK_CANONICAL_DTS=1 -- node --import tsx scripts/write-plugin-sdk-entry-dts.ts && node --import tsx scripts/check-plugin-sdk-exports.mts",
|
"node --import tsx scripts/tsdown-build.mts && node scripts/runtime-postbuild.mjs && node --import tsx scripts/run-with-env.mts OPENCLAW_PLUGIN_SDK_CANONICAL_DTS=1 -- node --import tsx scripts/write-plugin-sdk-entry-dts.ts && node --import tsx scripts/check-plugin-sdk-exports.mts",
|
||||||
|
|||||||
Reference in New Issue
Block a user