1aa7df1c97
`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.
28 lines
599 B
JSON
28 lines
599 B
JSON
{
|
|
"name": "wickra-linux-x64-gnu",
|
|
"version": "0.1.2",
|
|
"description": "Native binding for wickra (linux x64 GNU). Installed automatically as an optional dependency of wickra on matching platforms.",
|
|
"main": "wickra.linux-x64-gnu.node",
|
|
"files": [
|
|
"wickra.linux-x64-gnu.node"
|
|
],
|
|
"license": "SEE LICENSE IN LICENSE",
|
|
"engines": {
|
|
"node": ">= 16"
|
|
},
|
|
"os": [
|
|
"linux"
|
|
],
|
|
"cpu": [
|
|
"x64"
|
|
],
|
|
"libc": [
|
|
"glibc"
|
|
],
|
|
"repository": {
|
|
"type": "git",
|
|
"url": "https://github.com/kingchenc/wickra"
|
|
},
|
|
"homepage": "https://github.com/kingchenc/wickra"
|
|
}
|