{"_id":"@3-/blake3","name":"@3-/blake3","dist-tags":{"latest":"1.0.10"},"versions":{"1.0.10":{"name":"@3-/blake3","version":"1.0.10","description":"native & wasm blake3 hash use rust & napi-rs","main":"index.js","repository":{"type":"git","url":"git+https://github.com/js0-dep/blake3.git"},"license":"MIT","browser":"browser.js","keywords":["napi-rs","NAPI","N-API","Rust","node-addon","node-addon-api"],"napi":{"binaryName":"blake3","targets":["x86_64-pc-windows-msvc","x86_64-apple-darwin","x86_64-unknown-linux-gnu","x86_64-unknown-linux-musl","i686-pc-windows-msvc","aarch64-apple-darwin","aarch64-linux-android","x86_64-unknown-freebsd","aarch64-unknown-linux-musl","aarch64-pc-windows-msvc","armv7-linux-androideabi","wasm32-wasip1-threads"]},"engines":{"node":">= 12.22.0 < 13 || >= 14.17.0 < 15 || >= 15.12.0 < 16 || >= 16.0.0"},"publishConfig":{"registry":"https://registry.npmjs.org/","access":"public"},"scripts":{"artifacts":"napi artifacts","bench":"node --import @oxc-node/core/register benchmark/bench.ts","build":"napi build --platform --release","build:debug":"napi build --platform","format":"run-p format:prettier format:rs format:toml","format:prettier":"prettier . -w","format:toml":"taplo format","format:rs":"cargo fmt","lint":"oxlint .","prepublishOnly":"napi prepublish -t npm","test":"ava","preversion":"napi build --platform && git add .","version":"napi version","prepare":"husky"},"devDependencies":{"@emnapi/core":"^1.5.0","@emnapi/runtime":"^1.5.0","@napi-rs/cli":"^3.2.0","@oxc-node/core":"^0.0.34","@taplo/cli":"^0.7.0","@tybys/wasm-util":"^0.10.0","ava":"^6.4.1","chalk":"^5.6.2","husky":"^9.1.7","lint-staged":"^16.1.6","npm-run-all2":"^8.0.4","oxlint":"^1.14.0","prettier":"^3.6.2","tinybench":"^5.0.1","typescript":"^5.9.2"},"lint-staged":{"*.@(js|ts|tsx)":["oxlint --fix"],"*.@(js|ts|tsx|yml|yaml|md|json)":["prettier --write"],"*.toml":["taplo format"]},"ava":{"extensions":{"ts":"module"},"timeout":"2m","workerThreads":false,"environmentVariables":{"OXC_TSCONFIG_PATH":"./__test__/tsconfig.json"},"nodeArguments":["--import","@oxc-node/core/register"]},"prettier":{"printWidth":120,"semi":false,"trailingComma":"all","singleQuote":true,"arrowParens":"always"},"packageManager":"yarn@4.11.0","optionalDependencies":{"@3-/blake3-win32-x64-msvc":"1.0.10","@3-/blake3-darwin-x64":"1.0.10","@3-/blake3-linux-x64-gnu":"1.0.10","@3-/blake3-linux-x64-musl":"1.0.10","@3-/blake3-win32-ia32-msvc":"1.0.10","@3-/blake3-darwin-arm64":"1.0.10","@3-/blake3-android-arm64":"1.0.10","@3-/blake3-freebsd-x64":"1.0.10","@3-/blake3-linux-arm64-musl":"1.0.10","@3-/blake3-win32-arm64-msvc":"1.0.10","@3-/blake3-android-arm-eabi":"1.0.10","@3-/blake3-wasm32-wasi":"1.0.10"},"gitHead":"1fc0c1b0695a28c748ca302d7b66dd77a8c486b4","types":"./index.d.ts","_id":"@3-/blake3@1.0.10","bugs":{"url":"https://github.com/js0-dep/blake3/issues"},"homepage":"https://github.com/js0-dep/blake3#readme","_nodeVersion":"24.11.0","_npmVersion":"11.6.1","dist":{"integrity":"sha512-+oZ6p/tZpav6bhyBPzuIlNDJvcq9P723f4goQ9GVpIhVaS5v6nrd8pYoNhMbhN+VY145DVcHqYO+dsoBqOwhcA==","shasum":"faee62561ca29722f2807c610ca977fd0f9f8bec","tarball":"https://registry.npmjs.org/@3-/blake3/-/blake3-1.0.10.tgz","fileCount":6,"unpackedSize":31016,"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@3-%2fblake3@1.0.10","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIQDwIWTvrj5dYjNd1eDUV1aSAaEShl+q+F/OjZ+zdT7BuAIgRy9u9KivYG7yYa1lFrggFDW6lZeeS50O09BtGzmg7fY="}]},"_npmUser":{"name":"i18n-now","email":"i18n.site@gmail.com"},"directories":{},"maintainers":[{"name":"i18n-now","email":"i18n.site@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/blake3_1.0.10_1763113049487_0.6036774541931909"},"_hasShrinkwrap":false}},"time":{"created":"2025-11-14T09:37:29.387Z","1.0.10":"2025-11-14T09:37:29.702Z","modified":"2025-11-14T09:37:30.212Z"},"maintainers":[{"name":"i18n-now","email":"i18n.site@gmail.com"}],"description":"native & wasm blake3 hash use rust & napi-rs","homepage":"https://github.com/js0-dep/blake3#readme","keywords":["napi-rs","NAPI","N-API","Rust","node-addon","node-addon-api"],"repository":{"type":"git","url":"git+https://github.com/js0-dep/blake3.git"},"bugs":{"url":"https://github.com/js0-dep/blake3/issues"},"license":"MIT","readme":"# `@napi-rs/package-template`\n\n![https://github.com/napi-rs/package-template/actions](https://github.com/napi-rs/package-template/workflows/CI/badge.svg)\n\n> Template project for writing node packages with napi-rs.\n\n# Usage\n\n1. Click **Use this template**.\n2. **Clone** your project.\n3. Run `yarn install` to install dependencies.\n4. Run `yarn napi rename -n [@your-scope/package-name] -b [binary-name]` command under the project folder to rename your package.\n\n## Install this test package\n\n```bash\nyarn add @napi-rs/package-template\n```\n\n## Ability\n\n### Build\n\nAfter `yarn build/npm run build` command, you can see `package-template.[darwin|win32|linux].node` file in project root. This is the native addon built from [lib.rs](./src/lib.rs).\n\n### Test\n\nWith [ava](https://github.com/avajs/ava), run `yarn test/npm run test` to testing native addon. You can also switch to another testing framework if you want.\n\n### CI\n\nWith GitHub Actions, each commit and pull request will be built and tested automatically in [`node@20`, `@node22`] x [`macOS`, `Linux`, `Windows`] matrix. You will never be afraid of the native addon broken in these platforms.\n\n### Release\n\nRelease native package is very difficult in old days. Native packages may ask developers who use it to install `build toolchain` like `gcc/llvm`, `node-gyp` or something more.\n\nWith `GitHub actions`, we can easily prebuild a `binary` for major platforms. And with `N-API`, we should never be afraid of **ABI Compatible**.\n\nThe other problem is how to deliver prebuild `binary` to users. Downloading it in `postinstall` script is a common way that most packages do it right now. The problem with this solution is it introduced many other packages to download binary that has not been used by `runtime codes`. The other problem is some users may not easily download the binary from `GitHub/CDN` if they are behind a private network (But in most cases, they have a private NPM mirror).\n\nIn this package, we choose a better way to solve this problem. We release different `npm packages` for different platforms. And add it to `optionalDependencies` before releasing the `Major` package to npm.\n\n`NPM` will choose which native package should download from `registry` automatically. You can see [npm](./npm) dir for details. And you can also run `yarn add @napi-rs/package-template` to see how it works.\n\n## Develop requirements\n\n- Install the latest `Rust`\n- Install `Node.js@10+` which fully supported `Node-API`\n- Install `yarn@1.x`\n\n## Test in local\n\n- yarn\n- yarn build\n- yarn test\n\nAnd you will see:\n\n```bash\n$ ava --verbose\n\n  ✔ sync function from native code\n  ✔ sleep function from native code (201ms)\n  ─\n\n  2 tests passed\n✨  Done in 1.12s.\n```\n\n## Release package\n\nEnsure you have set your **NPM_TOKEN** in the `GitHub` project setting.\n\nIn `Settings -> Secrets`, add **NPM_TOKEN** into it.\n\nWhen you want to release the package:\n\n```bash\nnpm version [<newversion> | major | minor | patch | premajor | preminor | prepatch | prerelease [--preid=<prerelease-id>] | from-git]\n\ngit push\n```\n\nGitHub actions will do the rest job for you.\n\n> WARN: Don't run `npm publish` manually.\n","readmeFilename":"README.md","_rev":"1-6fa93293ee15f30238b926ee65c21384"}