{"_id":"@crossword-composer-ts/core","name":"@crossword-composer-ts/core","dist-tags":{"latest":"1.0.0"},"versions":{"1.0.0":{"name":"@crossword-composer-ts/core","version":"1.0.0","description":"Template project for writing node package with napi-rs","main":"index.js","repository":{"type":"git","url":"git+https://github.com/triviere19/crossword-composer.git"},"license":"MIT","browser":"browser.js","keywords":["napi-rs","NAPI","N-API","Rust","node-addon","node-addon-api"],"napi":{"binaryName":"core","targets":["x86_64-apple-darwin","x86_64-unknown-linux-gnu","x86_64-unknown-linux-musl","aarch64-unknown-linux-gnu","armv7-unknown-linux-gnueabihf","aarch64-apple-darwin","aarch64-linux-android","x86_64-unknown-freebsd","aarch64-unknown-linux-musl","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","version":"napi version","prepare":"husky"},"devDependencies":{"@emnapi/core":"^1.4.5","@emnapi/runtime":"^1.4.5","@napi-rs/cli":"^3.0.3","@oxc-node/core":"^0.0.32","@taplo/cli":"^0.7.0","@tybys/wasm-util":"^0.10.0","ava":"^6.4.1","chalk":"^5.4.1","husky":"^9.1.7","lint-staged":"^16.1.2","npm-run-all2":"^8.0.4","oxlint":"^1.8.0","prettier":"^3.6.2","tinybench":"^5.0.0","typescript":"^5.8.3"},"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.9.4","optionalDependencies":{"@crossword-composer-ts/core-darwin-x64":"1.0.0","@crossword-composer-ts/core-linux-x64-gnu":"1.0.0","@crossword-composer-ts/core-linux-x64-musl":"1.0.0","@crossword-composer-ts/core-linux-arm64-gnu":"1.0.0","@crossword-composer-ts/core-linux-arm-gnueabihf":"1.0.0","@crossword-composer-ts/core-darwin-arm64":"1.0.0","@crossword-composer-ts/core-android-arm64":"1.0.0","@crossword-composer-ts/core-freebsd-x64":"1.0.0","@crossword-composer-ts/core-linux-arm64-musl":"1.0.0","@crossword-composer-ts/core-android-arm-eabi":"1.0.0","@crossword-composer-ts/core-wasm32-wasi":"1.0.0"},"_id":"@crossword-composer-ts/core@1.0.0","gitHead":"631c2a0599b40e3eb06462c480060fe5e16729b8","types":"./index.d.ts","bugs":{"url":"https://github.com/triviere19/crossword-composer/issues"},"homepage":"https://github.com/triviere19/crossword-composer#readme","_nodeVersion":"22.19.0","_npmVersion":"10.9.3","dist":{"integrity":"sha512-t0K9sBy+4KJY/ZBfx1wZ51isB7xHbx8lTRrbCUdTLPwuqON9Wi7n51sQv2K5pjkCVqle9D3M9PPPJPi+C7Cv+g==","shasum":"2c618d96bc77d634cec8ec0535f8ff31838d7941","tarball":"https://registry.npmjs.org/@crossword-composer-ts/core/-/core-1.0.0.tgz","fileCount":6,"unpackedSize":31589,"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@crossword-composer-ts%2fcore@1.0.0","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIQC2FUVzMivQ5J1iY7bmEJZHqef6dE7kMrayMVPYOv9iQgIgIBtzMZERfyqsJIx7xnjR2Qm8+6DcHFP68uCGO4v8fxY="}]},"_npmUser":{"name":"triviere19","email":"tyriviere.dev@gmail.com"},"directories":{},"maintainers":[{"name":"triviere19","email":"tyriviere.dev@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/core_1.0.0_1758772917167_0.8934313461156176"},"_hasShrinkwrap":false}},"time":{"created":"2025-09-25T04:01:57.098Z","1.0.0":"2025-09-25T04:01:57.349Z","modified":"2025-09-25T04:01:57.800Z"},"maintainers":[{"name":"triviere19","email":"tyriviere.dev@gmail.com"}],"description":"Template project for writing node package with napi-rs","homepage":"https://github.com/triviere19/crossword-composer#readme","keywords":["napi-rs","NAPI","N-API","Rust","node-addon","node-addon-api"],"repository":{"type":"git","url":"git+https://github.com/triviere19/crossword-composer.git"},"bugs":{"url":"https://github.com/triviere19/crossword-composer/issues"},"license":"MIT","readme":"# `@crossword-composer-ts/core`\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 @crossword-composer-ts/core\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-53867f77924eca65477cff1e741c5f6c"}