fix: harden windows npm runtime path

This commit is contained in:
Peter Steinberger
2026-03-12 22:03:10 +00:00
parent 92191fcd68
commit 86a3149b2e
7 changed files with 81 additions and 8 deletions

View File

@@ -3,6 +3,7 @@ import {
collectAppcastSparkleVersionErrors,
collectBundledExtensionManifestErrors,
collectBundledExtensionRootDependencyGapErrors,
collectForbiddenPackPaths,
} from "../scripts/release-check.ts";
function makeItem(shortVersion: string, sparkleVersion: string): string {
@@ -150,3 +151,15 @@ describe("collectBundledExtensionManifestErrors", () => {
]);
});
});
describe("collectForbiddenPackPaths", () => {
it("flags nested node_modules leaking into npm pack output", () => {
expect(
collectForbiddenPackPaths([
"dist/index.js",
"extensions/tlon/node_modules/.bin/tlon",
"node_modules/.bin/openclaw",
]),
).toEqual(["extensions/tlon/node_modules/.bin/tlon", "node_modules/.bin/openclaw"]);
});
});