Files
wickra/bindings/node/package.json
T
kingchenc 1aa7df1c97 fix(node): commit npm/<platform>/ templates + optionalDependencies
`napi create-npm-dir` failed in CI with both invocations we tried:
positional arg form (`-t <triple> .`) was rejected as extraneous,
and the no-arg form crashed with "path must be a string, received
undefined". The fix used by every napi-rs reference project: commit
the four platform package.json templates directly under
bindings/node/npm/<target>/ instead of generating them at publish time.

- bindings/node/npm/{linux-x64-gnu,darwin-x64,darwin-arm64,win32-x64-msvc}/
  each contain a static package.json with the correct os / cpu / libc
  filters so npm only installs the right binary per platform.
- Main package.json gains optionalDependencies referencing all four
  platform packages by version, so `npm install wickra` pulls the
  matching binary on each user's machine.
- Release workflow drops the broken `create-npm-dir` loop. The
  `napi artifacts` step now just copies the .node files from the
  build artefacts into the existing npm/ directories before publish.

Bump every version to 0.1.2; cargo / pypi / wickra-wasm jobs are
idempotent so they accept the 0.1.1 they already published while still
emitting the new 0.1.2.
2026-05-21 21:16:33 +02:00

66 lines
1.5 KiB
JSON

{
"name": "wickra",
"version": "0.1.2",
"description": "Streaming-first technical indicators: incremental, fast, install-free. Node bindings powered by Rust.",
"author": "kingchenc <kingchencp@gmail.com>",
"main": "index.js",
"types": "index.d.ts",
"license": "SEE LICENSE IN LICENSE",
"keywords": [
"trading",
"indicators",
"technical-analysis",
"ta-lib",
"finance",
"streaming",
"rust"
],
"repository": {
"type": "git",
"url": "https://github.com/kingchenc/wickra"
},
"bugs": {
"url": "https://github.com/kingchenc/wickra/issues"
},
"homepage": "https://github.com/kingchenc/wickra",
"files": [
"index.js",
"index.d.ts",
"npm",
"*.node"
],
"napi": {
"name": "wickra",
"triples": {
"defaults": false,
"additional": [
"x86_64-unknown-linux-gnu",
"x86_64-apple-darwin",
"aarch64-apple-darwin",
"x86_64-pc-windows-msvc"
]
}
},
"engines": {
"node": ">= 16"
},
"optionalDependencies": {
"wickra-linux-x64-gnu": "0.1.2",
"wickra-darwin-x64": "0.1.2",
"wickra-darwin-arm64": "0.1.2",
"wickra-win32-x64-msvc": "0.1.2"
},
"scripts": {
"build": "napi build --platform --release",
"build:debug": "napi build --platform",
"artifacts": "napi artifacts",
"prepublishOnly": "napi prepublish -t npm",
"universal": "napi universal",
"version": "napi version",
"test": "node --test __tests__/"
},
"devDependencies": {
"@napi-rs/cli": "^2.18.0"
}
}