mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-06 17:20:45 +00:00
fix(release): keep legacy update QA sidecars
This commit is contained in:
@@ -17,6 +17,14 @@ import { BUNDLED_RUNTIME_SIDECAR_PATHS } from "../src/plugins/runtime-sidecar-pa
|
||||
const PUBLISHED_BUNDLED_RUNTIME_SIDECAR_PATHS = BUNDLED_RUNTIME_SIDECAR_PATHS.filter(
|
||||
(relativePath) => listBundledPluginPackArtifacts().includes(relativePath),
|
||||
);
|
||||
const LEGACY_UPDATE_COMPAT_RUNTIME_SIDECAR_PATHS = [
|
||||
"dist/extensions/qa-channel/runtime-api.js",
|
||||
"dist/extensions/qa-lab/runtime-api.js",
|
||||
] as const;
|
||||
const REQUIRED_INSTALLED_RUNTIME_SIDECAR_PATHS = [
|
||||
...PUBLISHED_BUNDLED_RUNTIME_SIDECAR_PATHS,
|
||||
...LEGACY_UPDATE_COMPAT_RUNTIME_SIDECAR_PATHS,
|
||||
] as const;
|
||||
|
||||
describe("buildPublishedInstallScenarios", () => {
|
||||
it("uses a single fresh scenario for plain stable releases", () => {
|
||||
@@ -75,20 +83,14 @@ describe("collectInstalledPackageErrors", () => {
|
||||
);
|
||||
expect(errors).toEqual(
|
||||
expect.arrayContaining(
|
||||
PUBLISHED_BUNDLED_RUNTIME_SIDECAR_PATHS.map(
|
||||
REQUIRED_INSTALLED_RUNTIME_SIDECAR_PATHS.map(
|
||||
(relativePath) =>
|
||||
`installed package is missing required bundled runtime sidecar: ${relativePath}`,
|
||||
),
|
||||
),
|
||||
);
|
||||
expect(errors).not.toEqual(
|
||||
expect.arrayContaining([
|
||||
"installed package is missing required bundled runtime sidecar: dist/extensions/qa-channel/runtime-api.js",
|
||||
"installed package is missing required bundled runtime sidecar: dist/extensions/qa-lab/runtime-api.js",
|
||||
]),
|
||||
);
|
||||
expect(errors.length).toBeGreaterThanOrEqual(
|
||||
1 + PUBLISHED_BUNDLED_RUNTIME_SIDECAR_PATHS.length,
|
||||
1 + REQUIRED_INSTALLED_RUNTIME_SIDECAR_PATHS.length,
|
||||
);
|
||||
});
|
||||
});
|
||||
|
||||
@@ -16,6 +16,11 @@ import {
|
||||
utcCalendarDayDistance,
|
||||
} from "../scripts/openclaw-npm-release-check.ts";
|
||||
|
||||
const LEGACY_UPDATE_COMPAT_PACKED_PATHS = [
|
||||
"dist/extensions/qa-channel/runtime-api.js",
|
||||
"dist/extensions/qa-lab/runtime-api.js",
|
||||
] as const;
|
||||
|
||||
describe("parseReleaseVersion", () => {
|
||||
it("parses stable CalVer releases", () => {
|
||||
expect(parseReleaseVersion("2026.3.10")).toMatchObject({
|
||||
@@ -281,6 +286,10 @@ describe("parseNpmPackJsonOutput", () => {
|
||||
describe("collectControlUiPackErrors", () => {
|
||||
it("rejects packs that ship the dashboard HTML without the asset payload", () => {
|
||||
expect(collectControlUiPackErrors(["dist/control-ui/index.html"])).toEqual([
|
||||
...LEGACY_UPDATE_COMPAT_PACKED_PATHS.map(
|
||||
(requiredPath) =>
|
||||
`npm package is missing required path "${requiredPath}". Ensure UI assets are built and included before publish.`,
|
||||
),
|
||||
...WORKSPACE_TEMPLATE_PACK_PATHS.map(
|
||||
(requiredPath) =>
|
||||
`npm package is missing required path "${requiredPath}". Ensure UI assets are built and included before publish.`,
|
||||
@@ -293,6 +302,7 @@ describe("collectControlUiPackErrors", () => {
|
||||
expect(
|
||||
collectControlUiPackErrors([
|
||||
"dist/control-ui/index.html",
|
||||
...LEGACY_UPDATE_COMPAT_PACKED_PATHS,
|
||||
...WORKSPACE_TEMPLATE_PACK_PATHS,
|
||||
"dist/control-ui/assets/index-Bu8rSoJV.js",
|
||||
"dist/control-ui/assets/index-BK0yXA_h.css",
|
||||
@@ -325,11 +335,18 @@ 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".',
|
||||
]);
|
||||
});
|
||||
|
||||
it("allows the legacy update verifier QA runtime sidecars", () => {
|
||||
expect(
|
||||
collectForbiddenPackedPathErrors([
|
||||
"dist/extensions/qa-channel/runtime-api.js",
|
||||
"dist/extensions/qa-lab/runtime-api.js",
|
||||
]),
|
||||
).toEqual([]);
|
||||
});
|
||||
});
|
||||
|
||||
describe("collectReleaseTagErrors", () => {
|
||||
|
||||
Reference in New Issue
Block a user