onnxruntime/js/node/package.json
Yulong Wang 53c771f215
[js/common] add unit tests for onnxruntime-common (#16812)
### Description
"onnxruntime-common" starts to get more and more complicated, so it's a
good idea to add unit tests for it.

Includes the following changes:
- move `mocha` from each subfolder (js/web/, js/node/) to root (js/), so
that it will be installed once and all subfolder can use.
- add folder `test` in js/common/ as root folder for ort-common tests.
- add sub folder `type-tests`. this folder contains a few typescript
source code, which are excluded from the tsconfig.json. they are not
compiled by default. instead, file `type-tests.ts` calls typescript
compiler (tsc) to check for the files under this folder whether the
compilation result is as expected. If tsc compiles a file successfully
when a failure is expected, this is considered an failed test.
- add sub folder `unit-tests`. files under this folder will be compiled
by default. we use default mode of mocha (using `describe()` and `it()`)
to setup test groups and cases.
- update eslint rules accordingly.
2023-07-25 14:37:41 -07:00

52 lines
1.4 KiB
JSON

{
"license": "MIT",
"name": "onnxruntime-node",
"repository": {
"url": "https://github.com/Microsoft/onnxruntime.git",
"type": "git"
},
"author": "fs-eire",
"binary": {
"module_path": "./bin",
"host": "https://onnxruntimetestdata.blob.core.windows.net/onnxruntime-node-prebuild/",
"napi_versions": [
3
]
},
"version": "1.16.0",
"dependencies": {
"onnxruntime-common": "file:../common"
},
"scripts": {
"buildr": "tsc && node ./script/build --config=RelWithDebInfo",
"prepare": "tsc --build script test .",
"rebuild": "tsc && node ./script/build --rebuild",
"rebuildd": "tsc && node ./script/build --rebuild --config=Debug",
"buildd": "tsc && node ./script/build --config=Debug",
"build": "tsc && node ./script/build",
"test": "tsc --build ../scripts && node ../scripts/prepare-onnx-node-tests && mocha ./test/test-main",
"prepack": "node ./script/prepack",
"rebuildr": "tsc && node ./script/build --rebuild --config=RelWithDebInfo"
},
"keywords": [
"ONNX",
"ONNXRuntime",
"ONNX Runtime"
],
"devDependencies": {
"@types/minimist": "^1.2.2",
"cmake-js": "^7.2.1",
"jsonc": "^2.0.0",
"minimist": "^1.2.8",
"node-addon-api": "^6.0.0",
"onnx-proto": "^8.0.1"
},
"main": "dist/index.js",
"os": [
"win32",
"darwin",
"linux"
],
"types": "dist/index.d.ts",
"description": "ONNXRuntime Node.js binding"
}