mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-06 17:50:45 +00:00
fix: run packed bundled postinstall in release check
(cherry picked from commit e57e54e591)
This commit is contained in:
@@ -14,6 +14,7 @@ import {
|
||||
collectForbiddenPackPaths,
|
||||
collectMissingPackPaths,
|
||||
collectPackUnpackedSizeErrors,
|
||||
createPackedBundledPluginPostinstallEnv,
|
||||
packageNameFromSpecifier,
|
||||
} from "../scripts/release-check.ts";
|
||||
import { PACKAGE_DIST_INVENTORY_RELATIVE_PATH } from "../src/infra/package-dist-inventory.ts";
|
||||
@@ -463,3 +464,13 @@ describe("collectPackUnpackedSizeErrors", () => {
|
||||
]);
|
||||
});
|
||||
});
|
||||
|
||||
describe("createPackedBundledPluginPostinstallEnv", () => {
|
||||
it("enables eager bundled dependency repair for packed channel entry smoke", () => {
|
||||
expect(createPackedBundledPluginPostinstallEnv({ PATH: "/usr/bin" })).toEqual({
|
||||
PATH: "/usr/bin",
|
||||
OPENCLAW_DISABLE_BUNDLED_ENTRY_SOURCE_FALLBACK: "1",
|
||||
OPENCLAW_EAGER_BUNDLED_PLUGIN_DEPS: "1",
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
@@ -5,6 +5,7 @@ import {
|
||||
createBundledRuntimeDependencyInstallArgs,
|
||||
createBundledRuntimeDependencyInstallEnv,
|
||||
createNestedNpmInstallEnv,
|
||||
isDirectPostinstallInvocation,
|
||||
pruneInstalledPackageDist,
|
||||
discoverBundledPluginRuntimeDeps,
|
||||
pruneBundledPluginSourceNodeModules,
|
||||
@@ -82,6 +83,20 @@ describe("bundled plugin postinstall", () => {
|
||||
});
|
||||
}
|
||||
|
||||
it("recognizes direct invocation through symlinked temp prefixes", () => {
|
||||
const realpathSync = vi.fn((value: string) =>
|
||||
value.replace(/^\/var\/folders\//u, "/private/var/folders/"),
|
||||
);
|
||||
|
||||
expect(
|
||||
isDirectPostinstallInvocation({
|
||||
entryPath: "/var/folders/tmp/openclaw/scripts/postinstall-bundled-plugins.mjs",
|
||||
modulePath: "/private/var/folders/tmp/openclaw/scripts/postinstall-bundled-plugins.mjs",
|
||||
realpathSync,
|
||||
}),
|
||||
).toBe(true);
|
||||
});
|
||||
|
||||
async function writeDiscordDaveyOptionalDependencyFixture(
|
||||
extensionsDir: string,
|
||||
packageRoot: string,
|
||||
|
||||
Reference in New Issue
Block a user