fix(cli): restore Intel macOS background removal (#2480)

This commit is contained in:
Miguel Ángel
2026-07-15 10:30:04 -04:00
committed by GitHub
parent 882c203241
commit 04954ead81
3 changed files with 46 additions and 8 deletions
@@ -0,0 +1,24 @@
import { existsSync, readFileSync } from "node:fs";
import { dirname, join } from "node:path";
import { createRequire } from "node:module";
import { fileURLToPath } from "node:url";
import { describe, expect, it } from "vitest";
const require = createRequire(import.meta.url);
describe("background-removal native dependency compatibility", () => {
it("pins onnxruntime-node to the last release with an Intel macOS binary", () => {
const packagePath = fileURLToPath(new URL("../../package.json", import.meta.url));
const packageJson = JSON.parse(readFileSync(packagePath, "utf8")) as {
dependencies?: Record<string, string>;
};
expect(packageJson.dependencies?.["onnxruntime-node"]).toBe("1.23.2");
const bindingEntry = require.resolve("onnxruntime-node");
const packageRoot = join(dirname(bindingEntry), "..");
expect(existsSync(join(packageRoot, "bin/napi-v6/darwin/x64/onnxruntime_binding.node"))).toBe(
true,
);
});
});