diff --git a/package.json b/package.json index 90118db8..85c6753b 100644 --- a/package.json +++ b/package.json @@ -31,7 +31,6 @@ "@types/node": "^18.19.34", "@types/semver": "^7.5.8", "@types/shelljs": "^0.8.15", - "@types/weak-napi": "^2.0.3", "@types/which": "^2.0.2", "benchmark": "^2.1.4", "chai": "^4.4.1", @@ -54,7 +53,6 @@ "ts-node": "~10.9.2", "typedoc": "^0.25.13", "typescript": "~4.9.5", - "weak-napi": "^2.0.2", "which": "^3.0.1" }, "pnpm": { @@ -95,9 +93,10 @@ "build.native.debug": "cross-env CMAKE_BUILD_TYPE=Debug node-gyp configure --debug -- -f compile_commands_json && cross-env CMAKE_BUILD_TYPE=Debug node-gyp build --debug", "build": "run-s build.js build.native", "build.debug": "run-s build.js build.native.debug", - "test": "run-s build && mocha --exit", - "test.skip_gc_tests": "run-s build.debug && cross-env SKIP_GC_TESTS=true mocha --exit", - "test.electron.main": "run-s build && electron-mocha", + "test.deps": "cd test && pnpm install && cd ..", + "test": "run-s test.deps build && mocha --exit", + "test.skip_gc_tests": "run-s test.deps build.debug && cross-env SKIP_GC_TESTS=true mocha --exit", + "test.electron.main": "run-s test.deps build && electron-mocha", "format": "prettier --write .", "test.electron.renderer": "run-s build && electron-mocha --renderer", "lint.clang-format": "clang-format -i -style=file ./src/*.cc ./src/*.h ./src/util/*.h", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 4a1b04d8..590fd51d 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -115,9 +115,6 @@ importers: typescript: specifier: ~4.9.5 version: 4.9.5 - weak-napi: - specifier: ^2.0.2 - version: 2.0.2 which: specifier: ^3.0.1 version: 3.0.1 @@ -1741,12 +1738,6 @@ packages: resolution: {integrity: sha512-g0QYk1dZBxGwk+Ngc+ltRH2IBp2f7zBkBMBJZCDerh6EhlhSR6+9irMCuT/09zD6qkarHUSn529sK/yL4S27mg==} engines: {node: '>= 0.4'} - get-symbol-from-current-process-h@1.0.2: - resolution: {integrity: sha512-syloC6fsCt62ELLrr1VKBM1ggOpMdetX9hTrdW77UQdcApPHLmf7CI7OKcN1c9kYuNxKcDe4iJ4FY9sX3aw2xw==} - - get-uv-event-loop-napi-h@1.0.6: - resolution: {integrity: sha512-t5c9VNR84nRoF+eLiz6wFrEp1SE2Acg0wS+Ysa2zF0eROes+LzOfuTaVHxGy8AbS8rq7FHEJzjnCZo1BupwdJg==} - gh-pages@4.0.0: resolution: {integrity: sha512-p8S0T3aGJc68MtwOcZusul5qPSNZCalap3NWbhRUZYu1YOdp+EjZ+4kPmRM8h3NNRdqw00yuevRjlkuSzCn7iQ==} engines: {node: '>=10'} @@ -2525,17 +2516,10 @@ packages: node-addon-api@1.7.2: resolution: {integrity: sha512-ibPK3iA+vaY1eEjESkQkM0BbCqFOaZMiXRTtdB0u7b4djtY6JnsjvPdUHVMg6xQt3B8fpTTWHI9A+ADjM9frzg==} - node-addon-api@3.2.1: - resolution: {integrity: sha512-mmcei9JghVNDYydghQmeDX8KoAm0FAiYyIcUt/N4nhyAipB17pllZQDOJD2fotxABnt4Mdz+dKTO7eftLg4d0A==} - node-addon-api@7.1.0: resolution: {integrity: sha512-mNcltoe1R8o7STTegSOHdnJNN7s5EUvhoS7ShnTHDyOSd+8H+UdWODq6qSv67PjC8Zc5JRT8+oLAMCr0SIXw7g==} engines: {node: ^16 || ^18 || >= 20} - node-gyp-build@4.5.0: - resolution: {integrity: sha512-2iGbaQBV+ITgCz76ZEjmhUKAKVf7xfY1sRl4UiKQspfZMH2h06SyhNsnSVy50cwkFQDGLyif6m/6uFXHkOZ6rg==} - hasBin: true - node-gyp@10.0.1: resolution: {integrity: sha512-gg3/bHehQfZivQVfqIyy8wTdSymF9yTyP4CJifK73imyNMU8AIGQE2pUa7dNWfmMeG9cDVF2eehiRMv0LC1iAg==} engines: {node: ^16.14.0 || >=18.0.0} @@ -3174,9 +3158,6 @@ packages: resolution: {integrity: sha512-7PGFlmtwsEADb0WYyvCMa1t+yke6daIG4Wirafur5kcf+MhUnPms1UeR0CKQdTZD81yESwMHbtn+TR+dMviakQ==} engines: {node: '>= 0.4'} - setimmediate-napi@1.0.6: - resolution: {integrity: sha512-sdNXN15Av1jPXuSal4Mk4tEAKn0+8lfF9Z50/negaQMrAIO9c1qM0eiCh8fT6gctp0RiCObk+6/Xfn5RMGdZoA==} - shebang-command@1.2.0: resolution: {integrity: sha512-EV3L1+UQWGor21OmnvojK36mhg+TyIKDh3iFBKBohr5xeXIhNBcx8oWdgkTEEQ+BEFFYdLRuqMfd5L84N1V5Vg==} engines: {node: '>=0.10.0'} @@ -3659,9 +3640,6 @@ packages: vscode-uri@3.0.6: resolution: {integrity: sha512-fmL7V1eiDBFRRnu+gfRWTzyPpNIHJTc4mWnFkwBUmO9U3KPgJAmTx7oxi2bl/Rh6HLdU7+4C9wlj0k2E4AdKFQ==} - weak-napi@2.0.2: - resolution: {integrity: sha512-LcOSVFrghtVXf4QH+DLIy8iPiCktV7lVbqRDYP+bDPpLzC41RCHQPMyQOnPpWO41Ie4CmnDxS+mbL72r5xFMMQ==} - which-boxed-primitive@1.0.2: resolution: {integrity: sha512-bwZdv0AKLpplFY2KZRX6TvyuN7ojjr7lwkg6ml0roIy9YeuSr7JS372qlNW18UQYzgYK9ziGcerWqZOmEn9VNg==} @@ -5887,12 +5865,6 @@ snapshots: es-errors: 1.3.0 get-intrinsic: 1.2.4 - get-symbol-from-current-process-h@1.0.2: {} - - get-uv-event-loop-napi-h@1.0.6: - dependencies: - get-symbol-from-current-process-h: 1.0.2 - gh-pages@4.0.0: dependencies: async: 2.6.4 @@ -6738,12 +6710,8 @@ snapshots: node-addon-api@1.7.2: {} - node-addon-api@3.2.1: {} - node-addon-api@7.1.0: {} - node-gyp-build@4.5.0: {} - node-gyp@10.0.1: dependencies: env-paths: 2.2.1 @@ -7419,11 +7387,6 @@ snapshots: functions-have-names: 1.2.3 has-property-descriptors: 1.0.2 - setimmediate-napi@1.0.6: - dependencies: - get-symbol-from-current-process-h: 1.0.2 - get-uv-event-loop-napi-h: 1.0.6 - shebang-command@1.2.0: dependencies: shebang-regex: 1.0.0 @@ -7967,12 +7930,6 @@ snapshots: vscode-uri@3.0.6: {} - weak-napi@2.0.2: - dependencies: - node-addon-api: 3.2.1 - node-gyp-build: 4.5.0 - setimmediate-napi: 1.0.6 - which-boxed-primitive@1.0.2: dependencies: is-bigint: 1.0.4 diff --git a/test/package.json b/test/package.json new file mode 100644 index 00000000..dd32cba0 --- /dev/null +++ b/test/package.json @@ -0,0 +1,6 @@ +{ + "devDependencies": { + "@types/weak-napi": "^2.0.3", + "weak-napi": "^2.0.2" + } +} diff --git a/test/pnpm-lock.yaml b/test/pnpm-lock.yaml new file mode 100644 index 00000000..cb54e0d3 --- /dev/null +++ b/test/pnpm-lock.yaml @@ -0,0 +1,79 @@ +lockfileVersion: '9.0' + +settings: + autoInstallPeers: true + excludeLinksFromLockfile: false + +importers: + + .: + devDependencies: + '@types/weak-napi': + specifier: ^2.0.3 + version: 2.0.3 + weak-napi: + specifier: ^2.0.2 + version: 2.0.2 + +packages: + + '@types/node@20.14.2': + resolution: {integrity: sha512-xyu6WAMVwv6AKFLB+e/7ySZVr/0zLCzOa7rSpq6jNwpqOrUbcACDWC+53d4n2QHOnDou0fbIsg8wZu/sxrnI4Q==} + + '@types/weak-napi@2.0.3': + resolution: {integrity: sha512-hNh8wxRTaQC8gLT6BKkG5Kokwp4hEyWw4RshGTLwa1K4S1o6kX7G0bJ85kKr+2fK3fuF8HZuz1+Dy8YtICZDqg==} + + get-symbol-from-current-process-h@1.0.2: + resolution: {integrity: sha512-syloC6fsCt62ELLrr1VKBM1ggOpMdetX9hTrdW77UQdcApPHLmf7CI7OKcN1c9kYuNxKcDe4iJ4FY9sX3aw2xw==} + + get-uv-event-loop-napi-h@1.0.6: + resolution: {integrity: sha512-t5c9VNR84nRoF+eLiz6wFrEp1SE2Acg0wS+Ysa2zF0eROes+LzOfuTaVHxGy8AbS8rq7FHEJzjnCZo1BupwdJg==} + + node-addon-api@3.2.1: + resolution: {integrity: sha512-mmcei9JghVNDYydghQmeDX8KoAm0FAiYyIcUt/N4nhyAipB17pllZQDOJD2fotxABnt4Mdz+dKTO7eftLg4d0A==} + + node-gyp-build@4.8.1: + resolution: {integrity: sha512-OSs33Z9yWr148JZcbZd5WiAXhh/n9z8TxQcdMhIOlpN9AhWpLfvVFO73+m77bBABQMaY9XSvIa+qk0jlI7Gcaw==} + hasBin: true + + setimmediate-napi@1.0.6: + resolution: {integrity: sha512-sdNXN15Av1jPXuSal4Mk4tEAKn0+8lfF9Z50/negaQMrAIO9c1qM0eiCh8fT6gctp0RiCObk+6/Xfn5RMGdZoA==} + + undici-types@5.26.5: + resolution: {integrity: sha512-JlCMO+ehdEIKqlFxk6IfVoAUVmgz7cU7zD/h9XZ0qzeosSHmUJVOzSQvvYSYWXkFXC+IfLKSIffhv0sVZup6pA==} + + weak-napi@2.0.2: + resolution: {integrity: sha512-LcOSVFrghtVXf4QH+DLIy8iPiCktV7lVbqRDYP+bDPpLzC41RCHQPMyQOnPpWO41Ie4CmnDxS+mbL72r5xFMMQ==} + +snapshots: + + '@types/node@20.14.2': + dependencies: + undici-types: 5.26.5 + + '@types/weak-napi@2.0.3': + dependencies: + '@types/node': 20.14.2 + + get-symbol-from-current-process-h@1.0.2: {} + + get-uv-event-loop-napi-h@1.0.6: + dependencies: + get-symbol-from-current-process-h: 1.0.2 + + node-addon-api@3.2.1: {} + + node-gyp-build@4.8.1: {} + + setimmediate-napi@1.0.6: + dependencies: + get-symbol-from-current-process-h: 1.0.2 + get-uv-event-loop-napi-h: 1.0.6 + + undici-types@5.26.5: {} + + weak-napi@2.0.2: + dependencies: + node-addon-api: 3.2.1 + node-gyp-build: 4.8.1 + setimmediate-napi: 1.0.6