{"_id":"@alloc/tree-kill","_rev":"2-0a52f716ac2c6383f303856a77e765db","name":"@alloc/tree-kill","dist-tags":{"latest":"1.4.0"},"versions":{"1.3.0":{"name":"@alloc/tree-kill","version":"1.3.0","license":"MIT","_id":"@alloc/tree-kill@1.3.0","maintainers":[{"name":"aleclarson","email":"alec.stanford.larson@gmail.com"}],"dist":{"shasum":"61ff06fb812db9f066b3d1b1930d89a1aa359591","tarball":"https://registry.npmjs.org/@alloc/tree-kill/-/tree-kill-1.3.0.tgz","fileCount":7,"integrity":"sha512-wdPpDSDybejh30+s7x4QX5TUQzYVkoxjk+Gi45YSE7+3xO99bYNBXugzNowMI77CVjuQ35xERd5bDmAAIA8Ysw==","signatures":[{"sig":"MEUCIDUkWBRQwfKNi3fGiY5dbvy7Cqc3T6efnsU2OsFhP1ZeAiEA79hQFFcslfMU0Y/SX8+7FF5BHKYYf/7m9TYz/Hzvjbw=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":11364},"type":"module","_from":"file:alloc-tree-kill-1.3.0.tgz","exports":{".":{"types":"./dist/index.d.mts","import":"./dist/index.mjs"}},"scripts":{"fmt":"oxfmt","lint":"oxlint","test":"vitest run","build":"tsdown","typecheck":"tsgo --noEmit"},"_npmUser":{"name":"aleclarson","email":"alec.stanford.larson@gmail.com"},"_resolved":"/private/var/folders/4l/lb2f5pj1221bm7d89gh08fx80000gn/T/4a7eee3884092c1fdc57d9bca4b1c117/alloc-tree-kill-1.3.0.tgz","_integrity":"sha512-wdPpDSDybejh30+s7x4QX5TUQzYVkoxjk+Gi45YSE7+3xO99bYNBXugzNowMI77CVjuQ35xERd5bDmAAIA8Ysw==","_npmVersion":"10.9.4","description":"`@alloc/tree-kill` kills a spawned process and its descendants across macOS, Linux, and Windows.","directories":{},"_nodeVersion":"22.22.0","_hasShrinkwrap":false,"devDependencies":{"oxfmt":"^0.43.0","oxlint":"^1.58.0","tsdown":"^0.21.7","vitest":"^4.1.2","@types/node":"^25.5.2","@typescript/native-preview":"7.0.0-dev.20260406.1"},"_npmOperationalInternal":{"tmp":"tmp/tree-kill_1.3.0_1775517045961_0.6238866217409096","host":"s3://npm-registry-packages-npm-production"}},"1.4.0":{"name":"@alloc/tree-kill","version":"1.4.0","license":"MIT","type":"module","exports":{".":{"types":"./dist/index.d.mts","import":"./dist/index.mjs"}},"devDependencies":{"@types/node":"^25.5.2","@typescript/native-preview":"7.0.0-dev.20260406.1","oxfmt":"^0.43.0","oxlint":"^1.58.0","tsdown":"^0.21.7","vitest":"^4.1.2"},"scripts":{"build":"tsdown","lint":"oxlint","fmt":"oxfmt","typecheck":"tsgo --noEmit","test":"vitest run"},"_id":"@alloc/tree-kill@1.4.0","description":"`@alloc/tree-kill` kills a spawned process and its descendants across macOS, Linux, and Windows.","_integrity":"sha512-WepxX3WKDBkak2M67SjhojNygg8G00DS2PIkm0iZP/kYBpYmAA3og62f4kq4aBLy8PnFaQMYblSpMkByO40vGw==","_resolved":"/private/var/folders/4l/lb2f5pj1221bm7d89gh08fx80000gn/T/e19ab97ec7e4f51b26640f440f92d9bb/alloc-tree-kill-1.4.0.tgz","_from":"file:alloc-tree-kill-1.4.0.tgz","_nodeVersion":"22.22.0","_npmVersion":"10.9.4","dist":{"integrity":"sha512-WepxX3WKDBkak2M67SjhojNygg8G00DS2PIkm0iZP/kYBpYmAA3og62f4kq4aBLy8PnFaQMYblSpMkByO40vGw==","shasum":"c57cfc07f895af5e46a93fc228dd673b55fbb1d2","tarball":"https://registry.npmjs.org/@alloc/tree-kill/-/tree-kill-1.4.0.tgz","fileCount":7,"unpackedSize":14634,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEQCIEC04Oc4eaqaKI6dQ62gCHibMzZctgF3Hk3xYHI2eP8PAiAse8MxRs1RcitdJuzrME6c9/jZk1ECtFUa1n8z8hOhxw=="}]},"_npmUser":{"name":"aleclarson","email":"alec.stanford.larson@gmail.com"},"directories":{},"maintainers":[{"name":"aleclarson","email":"alec.stanford.larson@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/tree-kill_1.4.0_1775539004669_0.19169202834802546"},"_hasShrinkwrap":false}},"time":{"created":"2026-04-06T23:10:45.766Z","modified":"2026-04-07T05:16:44.921Z","1.3.0":"2026-04-06T23:10:46.130Z","1.4.0":"2026-04-07T05:16:44.807Z"},"license":"MIT","description":"`@alloc/tree-kill` kills a spawned process and its descendants across macOS, Linux, and Windows.","maintainers":[{"name":"aleclarson","email":"alec.stanford.larson@gmail.com"}],"readme":"# @alloc/tree-kill\n\n## Purpose\n\n`@alloc/tree-kill` kills a spawned process and its descendants across macOS,\nLinux, and Windows.\n\nIt is a rewrite of the original\n[`tree-kill`](https://www.npmjs.com/package/tree-kill) package that preserves\nthe same OS-specific traversal strategy but changes the public API to a\n`ProcessLike` interface with separate async and sync entrypoints instead of a\nraw `pid` plus callback.\n\n## Installation\n\n```sh\npnpm add @alloc/tree-kill\n```\n\n## Quick Example\n\n```ts\nimport { spawn } from \"node:child_process\";\nimport treeKill from \"@alloc/tree-kill\";\n\nconst child = spawn(process.execPath, [\"-e\", \"setInterval(() => {}, 1000)\"], {\n  stdio: \"ignore\",\n});\n\nawait treeKill(child, \"SIGTERM\");\n```\n\n## Exit-Time Fallback\n\nUse the synchronous export only in shutdown paths where async work cannot be\nawaited reliably, such as `process.on(\"exit\")`:\n\n```ts\nimport { spawn } from \"node:child_process\";\nimport treeKill, { treeKillSync } from \"@alloc/tree-kill\";\n\nconst child = spawn(process.execPath, [\"-e\", \"setInterval(() => {}, 1000)\"], {\n  stdio: \"ignore\",\n});\n\nawait treeKill(child, \"SIGTERM\");\n\nprocess.on(\"exit\", () => {\n  treeKillSync(child, \"SIGTERM\");\n});\n```\n\n## Documentation Map\n\n- Conceptual behavior, platform notes, and rewrite boundaries:\n  [docs/context.md](./docs/context.md)\n- Runnable repository example: [examples/basic-usage.ts](./examples/basic-usage.ts)\n- Exact exported signatures: run `pnpm build` and inspect `dist/index.d.mts`\n","readmeFilename":"README.md"}