Implementation:Microsoft Onnxruntime JsPackageLock
| Knowledge Sources | |
|---|---|
| Domains | JavaScript, Dependencies, Configuration |
| Last Updated | 2026-02-10 04:00 GMT |
Overview
The npm lockfile (lockfileVersion 2) for the ONNX Runtime JavaScript workspace, pinning exact versions and integrity hashes for all development dependencies.
Description
The `package-lock.json` file is the npm lockfile for the `js/` workspace of ONNX Runtime. It uses lockfile version 2 format and pins the exact resolved versions, registry URLs, and integrity hashes (SHA-512) for all transitive dependencies. The workspace is licensed under MIT.
Key development dependencies include:
- Linting and formatting:
- `eslint` ^9.38.0 with plugins: `@typescript-eslint/eslint-plugin` ^8.46.2, `eslint-plugin-header` ^3.1.1, `eslint-plugin-import` ^2.32.0, `eslint-plugin-jsdoc` ^61.1.9, `eslint-plugin-prefer-arrow` ^1.2.3, `eslint-plugin-unicorn` ^62.0.0 - `@eslint/compat` ^1.4.0, `@eslint/eslintrc` ^3.3.1, `@eslint/js` ^9.38.0 - `eslint-config-prettier` ^9.1.0, `prettier` ^3.3.3
- Build tooling:
- `esbuild` ^0.25.0 with `esbuild-plugin-polyfill-node` ^0.3.0 - `typescript` ^5.2.2 - `terser` ^5.37.0
- Testing:
- `mocha` ^11.0.1 - `dir-compare` ^4.2.0
- Type definitions:
- `@types/fs-extra` ^11.0.4, `@types/global-agent` ^2.1.3, `@types/mocha` ^10.0.2, `@types/node` ^20.10.0, `@types/npmlog` ^4.1.4
- Utilities:
- `fs-extra` ^11.2.0, `global-agent` ^3.0, `globals` ^16.4.0, `jszip` ^3.10.1, `npmlog` ^7.0.1
The file also includes platform-specific optional dependencies for esbuild (e.g., `@esbuild/aix-ppc64`, `@esbuild/linux-x64`, etc.).
Usage
This lockfile ensures reproducible builds by pinning exact dependency versions. It is automatically maintained by npm and should be committed to version control. Run `npm ci` in the `js/` directory to install dependencies matching this lockfile exactly.
Code Reference
Source Location
- Repository: Microsoft_Onnxruntime
- File: js/package-lock.json
- Lines: 1-9968
Signature
{
"name": "js",
"lockfileVersion": 2,
"requires": true,
"packages": {
"": {
"name": "js",
"license": "MIT",
"devDependencies": {
"@eslint/compat": "^1.4.0",
"@typescript-eslint/eslint-plugin": "^8.46.2",
"esbuild": "^0.25.0",
"eslint": "^9.38.0",
"mocha": "^11.0.1",
"prettier": "^3.3.3",
"typescript": "^5.2.2"
}
}
}
}
Import
// Install dependencies:
// cd js && npm ci
I/O Contract
| Category | Key Packages | Description |
|---|---|---|
| Linting | eslint, @typescript-eslint, eslint-plugin-* | Code quality enforcement |
| Build | esbuild, typescript, terser | Compilation and bundling |
| Testing | mocha, dir-compare | Test framework and utilities |
| Types | @types/node, @types/mocha, @types/fs-extra | TypeScript type definitions |
| Utilities | fs-extra, jszip, npmlog, globals | Build and packaging utilities |
Usage Examples
// Install exact versions from lockfile:
// cd js && npm ci
// Update lockfile after changing package.json:
// cd js && npm install
// Key version constraints:
// TypeScript: ^5.2.2
// ESLint: ^9.38.0
// esbuild: ^0.25.0
// mocha: ^11.0.1