mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-06 12:30:44 +00:00
fix: exclude qa extensions from npm package
This commit is contained in:
@@ -22,13 +22,8 @@ import {
|
||||
} from "../scripts/openclaw-npm-release-check.ts";
|
||||
import { PACKAGE_DIST_INVENTORY_RELATIVE_PATH } from "../src/infra/package-dist-inventory.ts";
|
||||
|
||||
const LEGACY_UPDATE_COMPAT_PACKED_PATHS = [
|
||||
"dist/extensions/qa-channel/runtime-api.js",
|
||||
"dist/extensions/qa-lab/runtime-api.js",
|
||||
] as const;
|
||||
const REQUIRED_PACKED_PATHS = [
|
||||
PACKAGE_DIST_INVENTORY_RELATIVE_PATH,
|
||||
...LEGACY_UPDATE_COMPAT_PACKED_PATHS,
|
||||
...WORKSPACE_TEMPLATE_PACK_PATHS,
|
||||
] as const;
|
||||
|
||||
@@ -344,6 +339,8 @@ describe("collectForbiddenPackedPathErrors", () => {
|
||||
]),
|
||||
).toEqual([
|
||||
'npm package must not include private QA channel artifact "dist/extensions/qa-channel/package.json".',
|
||||
'npm package must not include private QA channel artifact "dist/extensions/qa-channel/runtime-api.js".',
|
||||
'npm package must not include private QA lab artifact "dist/extensions/qa-lab/runtime-api.js".',
|
||||
'npm package must not include private QA lab artifact "dist/extensions/qa-lab/src/cli.js".',
|
||||
'npm package must not include private QA lab type artifact "dist/plugin-sdk/extensions/qa-lab/cli.d.ts".',
|
||||
'npm package must not include private QA runtime chunk "dist/qa-runtime-B9LDtssJ.js".',
|
||||
@@ -351,13 +348,16 @@ describe("collectForbiddenPackedPathErrors", () => {
|
||||
]);
|
||||
});
|
||||
|
||||
it("allows legacy update verifier QA runtime sidecars", () => {
|
||||
it("rejects legacy update verifier QA runtime sidecars", () => {
|
||||
expect(
|
||||
collectForbiddenPackedPathErrors([
|
||||
"dist/extensions/qa-channel/runtime-api.js",
|
||||
"dist/extensions/qa-lab/runtime-api.js",
|
||||
]),
|
||||
).toEqual([]);
|
||||
).toEqual([
|
||||
'npm package must not include private QA channel artifact "dist/extensions/qa-channel/runtime-api.js".',
|
||||
'npm package must not include private QA lab artifact "dist/extensions/qa-lab/runtime-api.js".',
|
||||
]);
|
||||
});
|
||||
|
||||
it("rejects root dist chunks that still reference the private qa lab", () => {
|
||||
|
||||
@@ -308,10 +308,11 @@ describe("collectForbiddenPackPaths", () => {
|
||||
]);
|
||||
});
|
||||
|
||||
it("blocks private qa lab and suite paths from npm pack output", () => {
|
||||
it("blocks private qa channel, qa lab, and suite paths from npm pack output", () => {
|
||||
expect(
|
||||
collectForbiddenPackPaths([
|
||||
"dist/index.js",
|
||||
"dist/extensions/qa-channel/runtime-api.js",
|
||||
"dist/extensions/qa-lab/runtime-api.js",
|
||||
"dist/plugin-sdk/extensions/qa-lab/cli.d.ts",
|
||||
"dist/plugin-sdk/qa-lab.js",
|
||||
@@ -320,6 +321,8 @@ describe("collectForbiddenPackPaths", () => {
|
||||
"qa/scenarios/index.md",
|
||||
]),
|
||||
).toEqual([
|
||||
"dist/extensions/qa-channel/runtime-api.js",
|
||||
"dist/extensions/qa-lab/runtime-api.js",
|
||||
"dist/plugin-sdk/extensions/qa-lab/cli.d.ts",
|
||||
"dist/plugin-sdk/qa-lab.js",
|
||||
"dist/plugin-sdk/qa-runtime.js",
|
||||
@@ -408,8 +411,6 @@ describe("collectMissingPackPaths", () => {
|
||||
"dist/index.js",
|
||||
"dist/entry.js",
|
||||
"dist/control-ui/index.html",
|
||||
"dist/extensions/qa-channel/runtime-api.js",
|
||||
"dist/extensions/qa-lab/runtime-api.js",
|
||||
"dist/extensions/acpx/mcp-proxy.mjs",
|
||||
bundledDistPluginFile("diffs", "assets/viewer-runtime.js"),
|
||||
...requiredBundledPluginPackPaths,
|
||||
|
||||
Reference in New Issue
Block a user