mirror of
https://github.com/getpaseo/paseo.git
synced 2026-09-14 20:36:44 +08:00
9e90b86afa
* fix(desktop): restore macOS app updates Electron 41's Squirrel helper can leave the update handoff dormant on current macOS, so Paseo quits cleanly but relaunches the old bundle. Electron 44 wakes ShipIt through its XPC service. Include updater lifecycle events and ShipIt state in app diagnostics so future handoff failures identify the current version, target version, cache paths, and installer output. * fix(desktop): harden updater diagnostics Keep each ShipIt file's evidence available when another read fails, carry the service-selected version into updater lifecycle logs, and make clean workspace installs resolve the Electron runtime used by desktop tests. * refactor(desktop): name updater install options * refactor(desktop): name updater log payloads * refactor(desktop): name clipboard payload * fix(desktop): surface updater lookup failures * test(desktop): await guest focus transition * fix(desktop): guard macOS update compatibility * test(release): validate desktop manifests before publish * test(desktop): await populated daemon pid file
32 lines
1.4 KiB
JavaScript
32 lines
1.4 KiB
JavaScript
import assert from "node:assert/strict";
|
|
import { mkdtempSync, readFileSync, rmSync, writeFileSync } from "node:fs";
|
|
import { tmpdir } from "node:os";
|
|
import path from "node:path";
|
|
import { test } from "vitest";
|
|
import { mergeMacManifest } from "./merge-mac-manifest.mjs";
|
|
|
|
test("preserves unknown fields while merging files by url", () => {
|
|
const dir = mkdtempSync(path.join(tmpdir(), "paseo-merge-mac-manifest-"));
|
|
try {
|
|
const arm64Path = path.join(dir, "arm64.yml");
|
|
const x64Path = path.join(dir, "x64.yml");
|
|
const outputPath = path.join(dir, "latest-mac.yml");
|
|
writeFileSync(
|
|
arm64Path,
|
|
"version: 1.2.3\nfiles:\n - url: app-arm64.zip\n sha512: arm\nstagingPercentage: 25\npath: app-arm64.zip\nsha512: arm\nreleaseDate: '2026-04-28T00:00:00.000Z'\n",
|
|
);
|
|
writeFileSync(
|
|
x64Path,
|
|
"version: 1.2.3\nfiles:\n - url: app-x64.zip\n sha512: x64\nstagingPercentage: 50\npath: app-x64.zip\nsha512: x64\nreleaseDate: '2026-04-29T00:00:00.000Z'\n",
|
|
);
|
|
mergeMacManifest(arm64Path, x64Path, outputPath);
|
|
const output = readFileSync(outputPath, "utf8");
|
|
assert.match(output, /stagingPercentage: 25/);
|
|
assert.match(output, /minimumSystemVersion: 22\.0\.0/);
|
|
assert.match(output, /url: app-arm64\.zip/);
|
|
assert.match(output, /url: app-x64\.zip/);
|
|
} finally {
|
|
rmSync(dir, { force: true, recursive: true });
|
|
}
|
|
});
|