Add owner-aware Stable and Preview updates with explicit consent, verified release plans, protected process handoff and bounded service recovery. Keep configuration and conversations separate from program rollback. Include the compact About controls, Windows long-path support, native package recovery checks and optional macOS Dock lifecycle integration. Preserve documented guidance for installations owned by other managers. This code integration does not publish packages, enable signing or advance the public update channel. Co-authored-by: chengyongru <61816729+chengyongru@users.noreply.github.com>
19 lines
965 B
TypeScript
19 lines
965 B
TypeScript
import { execFileSync, spawnSync } from "node:child_process";
|
|
import { expect, it } from "vitest";
|
|
|
|
const root = process.cwd();
|
|
const bunError = spawnSync("bun", ["--version"], { timeout: 10_000 }).error;
|
|
const bunAvailable = !(bunError && "code" in bunError && bunError.code === "ENOENT");
|
|
|
|
it.skipIf(!bunAvailable)("Bun loads React runtime code for the packaged Vite SSR build", () => {
|
|
// Type-only aliases previously made Bun execute @types/react/index.d.ts.
|
|
// npm-only development can skip this; native-package CI installs pinned Bun.
|
|
const html = execFileSync("bun", ["--eval", `
|
|
import { createElement } from "react";
|
|
import { renderToStaticMarkup } from "react-dom/server";
|
|
import { jsx } from "react/jsx-runtime";
|
|
console.log(renderToStaticMarkup(createElement("div", null, jsx("span", {children: "ready"}))));
|
|
`], { cwd: root, encoding: "utf8", timeout: 10_000 });
|
|
expect(html.trim()).toBe("<div><span>ready</span></div>");
|
|
});
|