fix: pin production runtime in applications
This commit is contained in:
@@ -62,6 +62,31 @@ test("0.2.18 migration adds helpers to existing apps and is idempotent", () => {
|
||||
}
|
||||
});
|
||||
|
||||
test("0.2.70 migration pins the production runtime directly in runnable apps", () => {
|
||||
const root = mkdtempSync(join(tmpdir(), "wrnexus-update-"));
|
||||
mkdirSync(join(root, "app", "pages"), { recursive: true });
|
||||
writeFileSync(
|
||||
join(root, "package.json"),
|
||||
JSON.stringify({
|
||||
name: "existing-app",
|
||||
dependencies: { "@wrnexus/core": "^0.2.69" },
|
||||
wrnexus: { version: "0.2.69" },
|
||||
}),
|
||||
);
|
||||
|
||||
try {
|
||||
updateApp(root, "0.2.70", false);
|
||||
updateApp(root, "0.2.70", false);
|
||||
const pkg = JSON.parse(readFileSync(join(root, "package.json"), "utf8"));
|
||||
expect(pkg.dependencies["@wrnexus/dev-server"]).toBe("^0.2.70");
|
||||
expect(
|
||||
Object.keys(pkg.dependencies).filter((name) => name === "@wrnexus/dev-server"),
|
||||
).toHaveLength(1);
|
||||
} finally {
|
||||
rmSync(root, { recursive: true, force: true });
|
||||
}
|
||||
});
|
||||
|
||||
test("0.2.19 migration adds VS Code formatting defaults without overwriting settings", () => {
|
||||
const root = mkdtempSync(join(tmpdir(), "wrnexus-update-"));
|
||||
mkdirSync(join(root, "app", "pages"), { recursive: true });
|
||||
|
||||
Reference in New Issue
Block a user