{"_id":"exit-compat","_rev":"6-cd1c946fa0ca70bca356cc6cd80573c3","name":"exit-compat","dist-tags":{"latest":"1.0.5"},"versions":{"1.0.0":{"name":"exit-compat","version":"1.0.0","keywords":["exit","process","stdio","stdout","stderr","drain","flush"],"author":{"url":"https://github.com/kmalakoff","name":"Kevin Malakoff","email":"kmalakoff@gmail.com"},"license":"MIT","_id":"exit-compat@1.0.0","maintainers":[{"name":"kmalakoff","email":"kmalakoff@gmail.com"}],"homepage":"https://github.com/kmalakoff/exit-compat","bugs":{"url":"https://github.com/kmalakoff/exit-compat/issues"},"dist":{"shasum":"71dbecb8d7d3d88e10120640b5110b67d64c3e67","tarball":"https://registry.npmjs.org/exit-compat/-/exit-compat-1.0.0.tgz","fileCount":12,"integrity":"sha512-pt/jsxX8iiDsEJrMdFPlSst7q529DiLefG4s6dM48y5dP1j2kksaam1MnueIasaD2/IuX+j7CUc/BjPFXBs+iA==","signatures":[{"sig":"MEQCIBE3Q1/Pj0lpbDgoeTeH1j/rmRB64/GfePd1rxJ75alfAiB0W8qHfRytCJAHKwbhGHkPX5lPqKQUyIL0wHpfxzvwVw==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":11584},"main":"dist/cjs/index.js","type":"module","types":"dist/cjs/index.d.ts","source":"src/index.ts","engines":{"node":">=0.8"},"exports":{".":{"import":"./dist/esm/index.js","require":"./dist/cjs/index.js"},"./package.json":"./package.json"},"gitHead":"157a679b1a60d3c54e48bd246606bb15765c1519","scripts":{"test":"tsds test:node --no-timeouts","build":"tsds build","format":"tsds format","version":"tsds version","test:engines":"nvu engines tsds test:node --no-timeouts","prepublishOnly":"tsds validate"},"_npmUser":{"name":"kmalakoff","email":"kmalakoff@gmail.com"},"repository":{"url":"git+ssh://git@github.com/kmalakoff/exit-compat.git","type":"git"},"_npmVersion":"11.6.2","description":"A replacement for process.exit that ensures stdio are fully drained before exiting","directories":{},"_nodeVersion":"24.11.1","_hasShrinkwrap":false,"devDependencies":{"@types/node":"^25.0.0","tsds-config":"^0.2.0","@types/mocha":"^10.0.10","ts-dev-stack":"^1.21.2","node-version-use":"^2.0.0"},"_npmOperationalInternal":{"tmp":"tmp/exit-compat_1.0.0_1765471028601_0.16639128761567634","host":"s3://npm-registry-packages-npm-production"}},"1.0.1":{"name":"exit-compat","version":"1.0.1","keywords":["exit","process","stdio","stdout","stderr","drain","flush"],"author":{"url":"https://github.com/kmalakoff","name":"Kevin Malakoff","email":"kmalakoff@gmail.com"},"license":"MIT","_id":"exit-compat@1.0.1","maintainers":[{"name":"kmalakoff","email":"kmalakoff@gmail.com"}],"homepage":"https://github.com/kmalakoff/exit-compat","bugs":{"url":"https://github.com/kmalakoff/exit-compat/issues"},"dist":{"shasum":"ba45a32b86130e95f7e2a06986b7ae3cb2b09b67","tarball":"https://registry.npmjs.org/exit-compat/-/exit-compat-1.0.1.tgz","fileCount":12,"integrity":"sha512-KZQ8etyxubm4dEhUs65JAjHiiuQZMvQUtp1TozmmjcOXvga0jJ4slvun6tm2TREwCiTC3KRPaqpT9BhiAbpXEA==","signatures":[{"sig":"MEUCIQDqlaWR7r1qLr6Me0tWoDzOgjacog0R3YfdHa3RGR8bcQIgOP0ZZWY+GwiSLd+O4X2q2d8IoVk4KLGMFy8mDTxnOqU=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":11590},"main":"dist/cjs/index.js","type":"module","types":"dist/cjs/index.d.ts","source":"src/index.ts","engines":{"node":">=0.8"},"exports":{".":{"import":"./dist/esm/index.js","require":"./dist/cjs/index.js"},"./package.json":"./package.json"},"gitHead":"d58d5a19ce197ef3d6231ae9f26a66dd59c76963","scripts":{"test":"tsds test:node --no-timeouts","build":"tsds build","format":"tsds format","version":"tsds version","test:engines":"nvu engines tsds test:node --no-timeouts","prepublishOnly":"tsds validate"},"_npmUser":{"name":"kmalakoff","email":"kmalakoff@gmail.com"},"repository":{"url":"git+ssh://git@github.com/kmalakoff/exit-compat.git","type":"git"},"_npmVersion":"11.6.2","description":"A replacement for process.exit that ensures stdio are fully drained before exiting","directories":{},"_nodeVersion":"24.12.0","_hasShrinkwrap":false,"devDependencies":{"@types/node":"^25.0.1","tsds-config":"^0.2.0","@types/mocha":"^10.0.10","ts-dev-stack":"^1.21.3","node-version-use":"^2.1.5"},"_npmOperationalInternal":{"tmp":"tmp/exit-compat_1.0.1_1765569363255_0.7486842731651902","host":"s3://npm-registry-packages-npm-production"}},"1.0.2":{"name":"exit-compat","version":"1.0.2","keywords":["exit","process","stdio","stdout","stderr","drain","flush"],"author":{"url":"https://github.com/kmalakoff","name":"Kevin Malakoff","email":"kmalakoff@gmail.com"},"license":"MIT","_id":"exit-compat@1.0.2","maintainers":[{"name":"kmalakoff","email":"kmalakoff@gmail.com"}],"homepage":"https://github.com/kmalakoff/exit-compat","bugs":{"url":"https://github.com/kmalakoff/exit-compat/issues"},"dist":{"shasum":"857b1c26aa904cc1787f12328c4c0f07fb00222c","tarball":"https://registry.npmjs.org/exit-compat/-/exit-compat-1.0.2.tgz","fileCount":12,"integrity":"sha512-f7iRzF031FQo4oYR0kAn0j9c1kp39d5IIuRCCePgYQvBpslWaH6qaf3m8b05NncIwdUMCUI7NQ3vtLHkeo9v3w==","signatures":[{"sig":"MEUCIA6Q1LMCey/yysOYozo45eyEgQCf2kNQT/BQPGJlKS5gAiEA2xipu8P2AOeMy5XpQ+EdcZAY+tS5Fv8ubrNIjgg1wjc=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":11590},"main":"dist/cjs/index.js","type":"module","types":"dist/cjs/index.d.ts","source":"src/index.ts","engines":{"node":">=0.8"},"exports":{".":{"import":"./dist/esm/index.js","require":"./dist/cjs/index.js"},"./package.json":"./package.json"},"gitHead":"f0eab16b876cdb43049d93b9e27a755f848a2a32","scripts":{"test":"tsds test:node --no-timeouts","build":"tsds build","format":"tsds format","version":"tsds version","test:engines":"nvu engines tsds test:node --no-timeouts","prepublishOnly":"tsds validate"},"_npmUser":{"name":"kmalakoff","email":"kmalakoff@gmail.com"},"repository":{"url":"git+ssh://git@github.com/kmalakoff/exit-compat.git","type":"git"},"_npmVersion":"11.6.2","description":"A replacement for process.exit that ensures stdio are fully drained before exiting","directories":{},"_nodeVersion":"24.12.0","_hasShrinkwrap":false,"devDependencies":{"@types/node":"^25.0.1","tsds-config":"^0.2.1","@types/mocha":"^10.0.10","ts-dev-stack":"^1.21.3","node-version-use":"^2.1.5"},"_npmOperationalInternal":{"tmp":"tmp/exit-compat_1.0.2_1765572645818_0.08748287266970833","host":"s3://npm-registry-packages-npm-production"}},"1.0.3":{"name":"exit-compat","version":"1.0.3","keywords":["exit","process","stdio","stdout","stderr","drain","flush"],"author":{"url":"https://github.com/kmalakoff","name":"Kevin Malakoff","email":"kmalakoff@gmail.com"},"license":"MIT","_id":"exit-compat@1.0.3","maintainers":[{"name":"kmalakoff","email":"kmalakoff@gmail.com"}],"homepage":"https://github.com/kmalakoff/exit-compat","bugs":{"url":"https://github.com/kmalakoff/exit-compat/issues"},"dist":{"shasum":"1b4645f20a02154f658f51823b2de7661dc8e835","tarball":"https://registry.npmjs.org/exit-compat/-/exit-compat-1.0.3.tgz","fileCount":12,"integrity":"sha512-nRFEvbzNKLNAOaJ7Z3YLMPbcTrKmr3dxB+N6e6gAM1N4caz3Z5C4GWag8odxWo5gai1NsMjeio3wd41ojVdMsw==","signatures":[{"sig":"MEUCIGBPPLvfARtra54c13CpS2Vv2eMFelPxvNDEfYmQGiNgAiEAtg6W/Hohj5TpaXg0qv0s2wpJeQtFVtU1DocHsmYt7ls=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":11590},"main":"dist/cjs/index.js","type":"module","types":"dist/cjs/index.d.ts","source":"src/index.ts","engines":{"node":">=0.8"},"exports":{".":{"import":"./dist/esm/index.js","require":"./dist/cjs/index.js"},"./package.json":"./package.json"},"gitHead":"c3498f75469ea76da5a447cb073a36764064cc2c","scripts":{"test":"tsds test:node --no-timeouts","build":"tsds build","format":"tsds format","version":"tsds version","test:engines":"nvu engines tsds test:node --no-timeouts","prepublishOnly":"tsds validate"},"_npmUser":{"name":"kmalakoff","email":"kmalakoff@gmail.com"},"repository":{"url":"git+ssh://git@github.com/kmalakoff/exit-compat.git","type":"git"},"_npmVersion":"11.6.2","description":"A replacement for process.exit that ensures stdio are fully drained before exiting","directories":{},"_nodeVersion":"24.12.0","_hasShrinkwrap":false,"devDependencies":{"@types/node":"^25.0.1","tsds-config":"^0.2.1","@types/mocha":"^10.0.10","ts-dev-stack":"^1.21.3","node-version-use":"^2.1.5"},"_npmOperationalInternal":{"tmp":"tmp/exit-compat_1.0.3_1765574777221_0.32355102754156717","host":"s3://npm-registry-packages-npm-production"}},"1.0.4":{"name":"exit-compat","version":"1.0.4","keywords":["exit","process","stdio","stdout","stderr","drain","flush"],"author":{"url":"https://github.com/kmalakoff","name":"Kevin Malakoff","email":"kmalakoff@gmail.com"},"license":"MIT","_id":"exit-compat@1.0.4","maintainers":[{"name":"kmalakoff","email":"kmalakoff@gmail.com"}],"homepage":"https://github.com/kmalakoff/exit-compat","bugs":{"url":"https://github.com/kmalakoff/exit-compat/issues"},"dist":{"shasum":"9e3f6264b64df7aac966e53b8032778ee6aa59cf","tarball":"https://registry.npmjs.org/exit-compat/-/exit-compat-1.0.4.tgz","fileCount":12,"integrity":"sha512-qJ5j//PcSr4+F5YdxO2pV1XESJ15H39/iKCIaPz+falm7jB/yGJW93r2dOVa9UHv9SeLKqdY5U+l9pciFNml7g==","signatures":[{"sig":"MEYCIQCKw/qZb6g8yvlRfJp4GQHA81/upXREYFsZTMZVG35LSQIhAOC6PdLH7VT2Xn8PFZX/VUazqw4vBqq57mm9o06POx/U","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":11876},"main":"dist/cjs/index.js","type":"module","types":"dist/cjs/index.d.ts","source":"src/index.ts","engines":{"node":">=0.8"},"exports":{".":{"import":"./dist/esm/index.js","require":"./dist/cjs/index.js"},"./package.json":"./package.json"},"gitHead":"77a4b15d90562e9566fb59f2d0739f06a5a5a17f","scripts":{"test":"tsds test:node --no-timeouts","build":"tsds build","format":"tsds format","version":"tsds version","test:engines":"nvu engines tsds test:node --no-timeouts","prepublishOnly":"tsds validate"},"_npmUser":{"name":"kmalakoff","email":"kmalakoff@gmail.com"},"repository":{"url":"git+ssh://git@github.com/kmalakoff/exit-compat.git","type":"git"},"_npmVersion":"11.6.2","description":"A replacement for process.exit that ensures stdio are fully drained before exiting","directories":{},"_nodeVersion":"24.12.0","_hasShrinkwrap":false,"devDependencies":{"@types/node":"^25.0.1","tsds-config":"^0.2.1","@types/mocha":"^10.0.10","ts-dev-stack":"^1.21.3","node-version-use":"^2.1.6"},"_npmOperationalInternal":{"tmp":"tmp/exit-compat_1.0.4_1765634229192_0.04246589183591265","host":"s3://npm-registry-packages-npm-production"}},"1.0.5":{"name":"exit-compat","version":"1.0.5","description":"A replacement for process.exit that ensures stdio are fully drained before exiting","keywords":["exit","process","stdio","stdout","stderr","drain","flush"],"homepage":"https://github.com/kmalakoff/exit-compat","repository":{"type":"git","url":"git+ssh://git@github.com/kmalakoff/exit-compat.git"},"license":"MIT","author":{"name":"Kevin Malakoff","email":"kmalakoff@gmail.com","url":"https://github.com/kmalakoff"},"type":"module","exports":{".":{"import":"./dist/esm/index.js","require":"./dist/cjs/index.js"},"./package.json":"./package.json"},"main":"dist/cjs/index.js","source":"src/index.ts","types":"dist/cjs/index.d.ts","scripts":{"build":"tsds build","format":"tsds format","prepublishOnly":"tsds validate","test":"tsds test:node --no-timeouts","test:engines":"nvu engines tsds test:node --no-timeouts","version":"tsds version"},"devDependencies":{"@types/mocha":"*","@types/node":"*","node-version-use":"*","ts-dev-stack":"*","tsds-config":"*"},"engines":{"node":">=0.8"},"gitHead":"fce3f094116ae994b3eceb51c2a0dbb1d0d01f1f","_id":"exit-compat@1.0.5","bugs":{"url":"https://github.com/kmalakoff/exit-compat/issues"},"_nodeVersion":"24.16.0","_npmVersion":"11.13.0","dist":{"integrity":"sha512-NC40s361jjMeSfQpm3fOEBo7HXPnf5kAnWVFhOGQeOh/Daqxq4E/xZuISZYdrd4Y7MV3h9/IjQ1Wd1OfOcWHAQ==","shasum":"e5da120e624d84422fd0b1d40c9b10ca3e67fa87","tarball":"https://registry.npmjs.org/exit-compat/-/exit-compat-1.0.5.tgz","fileCount":12,"unpackedSize":11805,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIGMPmKQZvNg58UhvrTFXD/rFikrvytouqbir51uWUdW4AiEAvHJ6L42r93o0kJ011zmr9OkCgg0c8/gISVhQV2rhLC8="}]},"_npmUser":{"name":"kmalakoff","email":"kmalakoff@gmail.com"},"directories":{},"maintainers":[{"name":"kmalakoff","email":"kmalakoff@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/exit-compat_1.0.5_1779811086752_0.8213005380301321"},"_hasShrinkwrap":false}},"time":{"created":"2025-12-11T16:37:08.600Z","modified":"2026-05-26T15:58:07.026Z","1.0.0":"2025-12-11T16:37:08.752Z","1.0.1":"2025-12-12T19:56:03.386Z","1.0.2":"2025-12-12T20:50:46.003Z","1.0.3":"2025-12-12T21:26:17.363Z","1.0.4":"2025-12-13T13:57:09.341Z","1.0.5":"2026-05-26T15:58:06.894Z"},"bugs":{"url":"https://github.com/kmalakoff/exit-compat/issues"},"author":{"name":"Kevin Malakoff","email":"kmalakoff@gmail.com","url":"https://github.com/kmalakoff"},"license":"MIT","homepage":"https://github.com/kmalakoff/exit-compat","keywords":["exit","process","stdio","stdout","stderr","drain","flush"],"repository":{"type":"git","url":"git+ssh://git@github.com/kmalakoff/exit-compat.git"},"description":"A replacement for process.exit that ensures stdio are fully drained before exiting","maintainers":[{"name":"kmalakoff","email":"kmalakoff@gmail.com"}],"readme":"## exit-compat\n\nA replacement for `process.exit()` that ensures stdio streams are fully drained before exiting.\n\nThis is needed for Node 0.8-0.10 compatibility where `process.exit()` could truncate stdout/stderr output because streams hadn't finished flushing. Modern Node.js versions handle this automatically.\n\n### Installation\n\n```bash\nnpm install exit-compat\n```\n\n### Usage\n\n```javascript\nvar exit = require('exit-compat');\n\nconsole.log('This will be fully written before exit');\nexit(0);\n```\n\n### API\n\n#### exit(exitCode)\n\n- `exitCode` (number): The exit code to pass to `process.exit()`\n\nThe function waits for `process.stdout` and `process.stderr` to drain before calling `process.exit()`.\n\n### Why?\n\nOn Node 0.8-0.10, calling `process.exit()` immediately could truncate stdout/stderr output. This was fixed in Node 0.11.8+, but this package provides a consistent solution across all Node versions.\n\n### Credits\n\nBased on the [exit](https://github.com/cowboy/node-exit) package by \"Cowboy\" Ben Alman.\n","readmeFilename":"README.md"}