mirror of
https://github.com/diegosouzapw/OmniRoute.git
synced 2026-08-19 21:52:21 +03:00
Merge release/v3.8.50 (9081b571) into fix/qdrant-health-badge
This commit is contained in:
@@ -15,8 +15,7 @@ test("@huggingface/transformers is a regular dependency so npm ci never skips it
|
||||
// pin dragged onnxruntime-node@1.21.0 whose NAN build no longer compiles), which
|
||||
// broke `npm ci`/`next build` with "Can't resolve @huggingface/transformers"
|
||||
// (lazy import in src/lib/memory/embedding/transformersLocal.ts). As a regular
|
||||
// dep with onnxruntime-node@~1.24.3 (the version @huggingface/transformers
|
||||
// requires, napi prebuilds, no node-gyp) it stays
|
||||
// dep with onnxruntime-node@~1.24.3 (napi prebuilds, no node-gyp) it stays
|
||||
// installable and the memory embedding path requires() cleanly.
|
||||
const pkg = readJson<{
|
||||
dependencies?: Record<string, string>;
|
||||
@@ -45,14 +44,7 @@ test("transformers + onnxruntime-node are regular dependencies (not optional)",
|
||||
assert.equal(pkg.optionalDependencies?.["onnxruntime-node"], undefined);
|
||||
|
||||
const lock = readJson<{
|
||||
packages: Record<
|
||||
string,
|
||||
{
|
||||
optional?: boolean;
|
||||
dependencies?: Record<string, string>;
|
||||
optionalDependencies?: Record<string, string>;
|
||||
}
|
||||
>;
|
||||
packages: Record<string, { optional?: boolean; dependencies?: Record<string, string>; optionalDependencies?: Record<string, string> }>;
|
||||
}>("package-lock.json");
|
||||
|
||||
assert.equal(
|
||||
@@ -62,16 +54,7 @@ test("transformers + onnxruntime-node are regular dependencies (not optional)",
|
||||
);
|
||||
// Optional flag is only written `true` for genuinely optional packages;
|
||||
// regular deps leave it absent/null. Assert each is NOT optional.
|
||||
assert.ok(
|
||||
!lock.packages["node_modules/@huggingface/transformers"]?.optional,
|
||||
"transformers must not be marked optional in the lockfile"
|
||||
);
|
||||
assert.ok(
|
||||
!lock.packages["node_modules/onnxruntime-node"]?.optional,
|
||||
"onnxruntime-node must not be marked optional in the lockfile"
|
||||
);
|
||||
assert.ok(
|
||||
!lock.packages["node_modules/onnxruntime-common"]?.optional,
|
||||
"onnxruntime-common must not be marked optional in the lockfile"
|
||||
);
|
||||
assert.ok(!lock.packages["node_modules/@huggingface/transformers"]?.optional, "transformers must not be marked optional in the lockfile");
|
||||
assert.ok(!lock.packages["node_modules/onnxruntime-node"]?.optional, "onnxruntime-node must not be marked optional in the lockfile");
|
||||
assert.ok(!lock.packages["node_modules/onnxruntime-common"]?.optional, "onnxruntime-common must not be marked optional in the lockfile");
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user