Skip to content

Commit 04954ea

Browse files
fix(cli): restore Intel macOS background removal (#2480)
1 parent 882c203 commit 04954ea

3 files changed

Lines changed: 46 additions & 8 deletions

File tree

‎bun.lock‎

Lines changed: 21 additions & 7 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

‎packages/cli/package.json‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@
3838
"fontkit": "^2.0.4",
3939
"giget": "^3.2.0",
4040
"hono": "^4.0.0",
41-
"onnxruntime-node": "^1.20.0",
41+
"onnxruntime-node": "1.23.2",
4242
"open": "^10.0.0",
4343
"postcss": "^8.5.8",
4444
"prettier": "^3.8.1",
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
import { existsSync, readFileSync } from "node:fs";
2+
import { dirname, join } from "node:path";
3+
import { createRequire } from "node:module";
4+
import { fileURLToPath } from "node:url";
5+
import { describe, expect, it } from "vitest";
6+
7+
const require = createRequire(import.meta.url);
8+
9+
describe("background-removal native dependency compatibility", () => {
10+
it("pins onnxruntime-node to the last release with an Intel macOS binary", () => {
11+
const packagePath = fileURLToPath(new URL("../../package.json", import.meta.url));
12+
const packageJson = JSON.parse(readFileSync(packagePath, "utf8")) as {
13+
dependencies?: Record<string, string>;
14+
};
15+
16+
expect(packageJson.dependencies?.["onnxruntime-node"]).toBe("1.23.2");
17+
18+
const bindingEntry = require.resolve("onnxruntime-node");
19+
const packageRoot = join(dirname(bindingEntry), "..");
20+
expect(existsSync(join(packageRoot, "bin/napi-v6/darwin/x64/onnxruntime_binding.node"))).toBe(
21+
true,
22+
);
23+
});
24+
});

0 commit comments

Comments
 (0)