@@ -10,6 +10,7 @@ import {
|
10 | 10 | getActiveBundledRuntimeDepsInstallCount, |
11 | 11 | waitForBundledRuntimeDepsInstallIdle, |
12 | 12 | } from "./bundled-runtime-deps-activity.js"; |
| 13 | +import { assertBundledRuntimeDepsInstalled } from "./bundled-runtime-deps-materialization.js"; |
13 | 14 | import { |
14 | 15 | __testing as bundledRuntimeDepsTesting, |
15 | 16 | createBundledRuntimeDependencyAliasMap, |
@@ -1291,6 +1292,20 @@ describe("scanBundledPluginRuntimeDeps config policy", () => {
|
1291 | 1292 | expect(result.conflicts).toEqual([]); |
1292 | 1293 | }); |
1293 | 1294 | |
| 1295 | +it("accepts staged runtime deps whose package main relies on Node extension resolution", () => { |
| 1296 | +const installRoot = makeTempDir(); |
| 1297 | +const packageDir = path.join(installRoot, "node_modules", "jszip"); |
| 1298 | +fs.mkdirSync(path.join(packageDir, "lib"), { recursive: true }); |
| 1299 | +fs.writeFileSync( |
| 1300 | +path.join(packageDir, "package.json"), |
| 1301 | +JSON.stringify({ name: "jszip", version: "3.10.1", main: "./lib/index" }), |
| 1302 | +"utf8", |
| 1303 | +); |
| 1304 | +fs.writeFileSync(path.join(packageDir, "lib", "index.js"), "export default {};\n", "utf8"); |
| 1305 | + |
| 1306 | +expect(() => assertBundledRuntimeDepsInstalled(installRoot, ["jszip@^3.10.1"])).not.toThrow(); |
| 1307 | +}); |
| 1308 | + |
1294 | 1309 | it("reports staged package-level runtime deps as missing when the version is stale", () => { |
1295 | 1310 | const packageRoot = setupPolicyPackageRoot(); |
1296 | 1311 | const env = { OPENCLAW_PLUGIN_STAGE_DIR: makeTempDir() }; |
|