Skip to content

Commit 4369f64

Browse files
committed
build: install weak-napi only for the tests
1 parent 26bea83 commit 4369f64

File tree

4 files changed

+89
-48
lines changed

4 files changed

+89
-48
lines changed

package.json

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,6 @@
3131
"@types/node": "^18.19.34",
3232
"@types/semver": "^7.5.8",
3333
"@types/shelljs": "^0.8.15",
34-
"@types/weak-napi": "^2.0.3",
3534
"@types/which": "^2.0.2",
3635
"benchmark": "^2.1.4",
3736
"chai": "^4.4.1",
@@ -54,7 +53,6 @@
5453
"ts-node": "~10.9.2",
5554
"typedoc": "^0.25.13",
5655
"typescript": "~4.9.5",
57-
"weak-napi": "^2.0.2",
5856
"which": "^3.0.1"
5957
},
6058
"pnpm": {
@@ -95,9 +93,10 @@
9593
"build.native.debug": "node-gyp configure --debug && node-gyp configure --debug -- -f compile_commands_json && cross-env CMAKE_BUILD_TYPE=Debug node-gyp build --debug",
9694
"build": "run-s build.js build.native",
9795
"build.debug": "run-s build.js build.native.debug",
98-
"test": "run-s build && mocha --exit",
99-
"test.skip_gc_tests": "run-s build.debug && cross-env SKIP_GC_TESTS=true mocha --exit",
100-
"test.electron.main": "run-s build && electron-mocha",
96+
"test.deps": "cd test && pnpm install && cd ..",
97+
"test": "run-s test.deps build && mocha --exit",
98+
"test.skip_gc_tests": "run-s test.deps build.debug && cross-env SKIP_GC_TESTS=true mocha --exit",
99+
"test.electron.main": "run-s test.deps build && electron-mocha",
101100
"format": "prettier --write .",
102101
"test.electron.renderer": "run-s build && electron-mocha --renderer",
103102
"lint.clang-format": "clang-format -i -style=file ./src/*.cc ./src/*.h ./src/util/*.h",

pnpm-lock.yaml

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

test/package.json

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
{
2+
"devDependencies": {
3+
"@types/weak-napi": "^2.0.3",
4+
"weak-napi": "^2.0.2"
5+
}
6+
}

test/pnpm-lock.yaml

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

0 commit comments

Comments
 (0)