Skip to content

Commit e88d0e3

Browse files
committed
fix ci and tfjs dependency
1 parent 4b060db commit e88d0e3

File tree

12 files changed

+3997
-8
lines changed

12 files changed

+3997
-8
lines changed

.github/workflows/deploy.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,11 +41,13 @@ jobs:
4141
with:
4242
node-version: 24
4343
cache: npm # or pnpm / yarn
44+
cache-dependency-path: docs/package-lock.json
4445
- name: Setup Pages
4546
uses: actions/configure-pages@v4
4647
- name: Install dependencies
4748
run: npm ci # or pnpm install / yarn install / bun install
4849
- name: Build with VitePress
50+
working-directory: ./docs
4951
run: npm run docs:build # or pnpm docs:build / yarn docs:build / bun run docs:build
5052
- name: Upload artifact
5153
uses: actions/upload-pages-artifact@v3

docs/package-lock.json

Lines changed: 34 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

docs/package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
},
1111
"dependencies": {
1212
"bidicalc-engine": "file:../engine",
13+
"neverthrow": "^8.2.0",
1314
"ts-pattern": "^5.9.0"
1415
}
1516
}

engine/cells/computeModel.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ import {
88
constructTfModel,
99
composeTfModel,
1010
} from "../dnsolver/semanticsTfModel.ts";
11-
import * as tf from "@tensorflow/tfjs-core";
11+
import * as tf from "@tensorflow/tfjs";
1212

1313
// NSF MODEL
1414
import * as nsf from "not-so-float";

engine/cells/tests/processUserInput.test.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ import { describe, it } from "node:test";
22
import assert from "node:assert";
33

44
import * as tf from "@tensorflow/tfjs";
5+
import "@tensorflow/tfjs-backend-cpu";
56

67
import { Lookup } from "../../dnsolver/semanticsTfModel.ts";
78
import { neverLookup, lookupError } from "../../dnsolver/semanticsTfModel.ts";

engine/dnsolver/externalFunctionsTfModel.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import * as tf from "@tensorflow/tfjs-core";
1+
import * as tf from "@tensorflow/tfjs";
22

33
type TfFunc = (...args: tf.Tensor[]) => tf.Tensor;
44

engine/dnsolver/semanticsTfModel.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ import {
77
import { BidiError, SyntaxError, UnknownFunction, ArityError } from "../core/errors.ts";
88

99
import * as ohm from "ohm-js";
10-
import * as tf from "@tensorflow/tfjs-core";
10+
import * as tf from "@tensorflow/tfjs";
1111

1212
import { Result, ok, err } from "neverthrow";
1313

engine/dnsolver/tests/semanticsTfModel.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import { describe, it } from "node:test";
22
import assert from "node:assert";
33

4-
import * as tf from "@tensorflow/tfjs-core";
4+
import * as tf from "@tensorflow/tfjs";
55
import "@tensorflow/tfjs-backend-cpu";
66

77
import { validGrammar } from "../../grammar/tests/grammarTestCases.ts";

engine/dnsolver/tests/tfModelCompose.test.ts

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,6 @@
11
import { describe, it } from "node:test";
22
import assert from "node:assert";
33

4-
import * as tf from "@tensorflow/tfjs-core";
5-
import "@tensorflow/tfjs-backend-cpu";
6-
74
import {
85
constructTfModel,
96
TfModel,

engine/mainsolver/tests/mainSolverBackwards.test.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
import { describe, it } from "node:test";
22
import assert from "node:assert";
33

4+
import "@tensorflow/tfjs-backend-cpu";
5+
46
import {
57
expectSolve,
68
expectExactSolve,

0 commit comments

Comments
 (0)