{"_id":"childprocess","_rev":"11-196a44b468cc31a1305127c2c0aba408","name":"childprocess","description":"Wrap `child_process` module to support Multiple Process Code Coverage with istanbul.","dist-tags":{"latest":"2.0.2"},"versions":{"1.0.0":{"name":"childprocess","version":"1.0.0","description":"Wrap `child_process` module to support Multiple Process Code Coverage with istanbul.","main":"index.js","files":["index.js"],"scripts":{"cover":"istanbul cover --include-all-sources --report none --print none node_modules/.bin/_mocha -- --check-leaks -t 5000 test/*.test.js","lint":"eslint index.js fixtures test","test":"npm run clean && npm run lint && npm run cover && istanbul report json lcov html text","autod":"autod -w --prefix '~'","cnpm":"npm install --registry=https://registry.npm.taobao.org","clean":"rm -rf coverage"},"dependencies":{},"devDependencies":{"autod":"*","eslint":"1","istanbul":"*","mm":"^1.3.0","mocha":"*"},"homepage":"https://github.com/node-modules/childprocess","repository":{"type":"git","url":"git://github.com/node-modules/childprocess.git","web":"https://github.com/node-modules/childprocess"},"bugs":{"url":"https://github.com/node-modules/childprocess/issues","email":"m@fengmk2.com"},"keywords":["childprocess","child_process","multiple_process","istanbul","coverage","cov","codecov"],"engines":{"iojs":">=1.0.0"},"author":{"name":"fengmk2","email":"m@fengmk2.com","url":"http://fengmk2.com"},"license":"MIT","contributors":[{"name":"fengmk2","email":"m@fengmk2.com","url":"https://fengmk2.com"}],"gitHead":"38f19075fb4292585ae242e6b5796b11f49c0186","_id":"childprocess@1.0.0","_shasum":"9a74e07e3ff32724795f4d4d6f6083d28b74203f","_from":".","_npmVersion":"2.13.2","_nodeVersion":"2.5.3","_npmUser":{"name":"fengmk2","email":"fengmk2@gmail.com"},"maintainers":[{"name":"fengmk2","email":"fengmk2@gmail.com"}],"dist":{"shasum":"9a74e07e3ff32724795f4d4d6f6083d28b74203f","tarball":"https://registry.npmjs.org/childprocess/-/childprocess-1.0.0.tgz","integrity":"sha512-tgKuPwP2YbCWwVK5FwRV/hA94X5YJvAFJAgx2MGMITgRyE/bnffEoStoCAc50eKHgOF1TtlJzQKfTsRcfc6NuA==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIHi2j7/hp+Y0C3Y3iw/KFfUps8w8FM6EkxtftnAQeO/YAiEAvPzCVVx2lV0OVA3Jm7tgqymgGPQKD/4R9uq6DV2Dv9E="}]}},"1.0.1":{"name":"childprocess","version":"1.0.1","description":"Wrap `child_process` module to support Multiple Process Code Coverage with istanbul.","main":"index.js","files":["index.js"],"scripts":{"cover":"istanbul cover --include-all-sources --report none --print none node_modules/.bin/_mocha -- --check-leaks -t 5000 test/*.test.js","lint":"eslint index.js fixtures test","test":"npm run clean && npm run lint && npm run cover && istanbul report json lcov html text","autod":"autod -w --prefix '~'","cnpm":"npm install --registry=https://registry.npm.taobao.org","clean":"rm -rf coverage"},"dependencies":{},"devDependencies":{"autod":"*","eslint":"1","istanbul":"*","mm":"^1.3.0","mocha":"*"},"homepage":"https://github.com/node-modules/childprocess","repository":{"type":"git","url":"git://github.com/node-modules/childprocess.git","web":"https://github.com/node-modules/childprocess"},"bugs":{"url":"https://github.com/node-modules/childprocess/issues","email":"m@fengmk2.com"},"keywords":["childprocess","child_process","multiple_process","istanbul","coverage","cov","codecov"],"engines":{"iojs":">=1.0.0"},"author":{"name":"fengmk2","email":"m@fengmk2.com","url":"http://fengmk2.com"},"license":"MIT","contributors":[{"name":"fengmk2","email":"m@fengmk2.com","url":"https://fengmk2.com"}],"gitHead":"366ece617053f2d22bc38e85a13a9b07b6c37382","_id":"childprocess@1.0.1","_shasum":"2c494594276c6c45ce7721138469d6a6fc2fadb1","_from":".","_npmVersion":"2.13.2","_nodeVersion":"2.5.3","_npmUser":{"name":"fengmk2","email":"fengmk2@gmail.com"},"maintainers":[{"name":"fengmk2","email":"fengmk2@gmail.com"}],"dist":{"shasum":"2c494594276c6c45ce7721138469d6a6fc2fadb1","tarball":"https://registry.npmjs.org/childprocess/-/childprocess-1.0.1.tgz","integrity":"sha512-MWVdMP1EAAyvEOO+xLBzB1sOTN0/CC7e1nH2522bvtglzUasrbkgMsWe0yqmc+5zrBXiPuo1zWwyweFMD9SE8g==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQC5uuztToZAUSTa4VGXP/mFrMn50dQB/mHVFV//Jkn4vgIhALV6D9wg/DvXnFMEpqMz5cmEd133eGE2M3tLhbZUrLRa"}]}},"1.0.2":{"name":"childprocess","version":"1.0.2","description":"Wrap `child_process` module to support Multiple Process Code Coverage with istanbul.","main":"index.js","files":["index.js"],"scripts":{"cover":"istanbul cover --include-all-sources --report none --print none node_modules/.bin/_mocha -- --check-leaks -t 5000 test/*.test.js","lint":"eslint index.js fixtures test","test":"npm run clean && npm run lint && npm run cover && istanbul report json lcov html text","autod":"autod -w --prefix '~'","cnpm":"npm install --registry=https://registry.npm.taobao.org","clean":"rm -rf coverage"},"dependencies":{},"devDependencies":{"autod":"*","eslint":"1","istanbul":"*","mm":"^1.3.0","mocha":"*"},"homepage":"https://github.com/node-modules/childprocess","repository":{"type":"git","url":"git://github.com/node-modules/childprocess.git","web":"https://github.com/node-modules/childprocess"},"bugs":{"url":"https://github.com/node-modules/childprocess/issues","email":"m@fengmk2.com"},"keywords":["childprocess","child_process","multiple_process","istanbul","coverage","cov","codecov"],"engines":{"node":">=0.12.0"},"author":{"name":"fengmk2","email":"m@fengmk2.com","url":"http://fengmk2.com"},"license":"MIT","contributors":[{"name":"fengmk2","email":"m@fengmk2.com","url":"https://fengmk2.com"}],"gitHead":"df28adf0a60667736a3e9358ae8c782a013724fc","_id":"childprocess@1.0.2","_shasum":"3057909f8a78d9b8d7c5cde4ae4eb329a6cf55bd","_from":".","_npmVersion":"2.11.3","_nodeVersion":"0.12.7","_npmUser":{"name":"fengmk2","email":"fengmk2@gmail.com"},"maintainers":[{"name":"fengmk2","email":"fengmk2@gmail.com"}],"dist":{"shasum":"3057909f8a78d9b8d7c5cde4ae4eb329a6cf55bd","tarball":"https://registry.npmjs.org/childprocess/-/childprocess-1.0.2.tgz","integrity":"sha512-B/M5vk8Cx2ogr42maKJfwANYHbqkNjk80HqhpizuBMvqeK0/QB30fVlmAKiuk3dvkaEN3VJC4TJ5iEmyJdHNsQ==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDtg/Xms4lXQhYZ1vjvLkguko1nh3rFj8v75FxgWObMlAIhAO3t5x956u3WGqt6cz8jZMzHkkLEtVAE6vsCgVmaoMtx"}]}},"1.0.3":{"name":"childprocess","version":"1.0.3","description":"Wrap `child_process` module to support Multiple Process Code Coverage with istanbul.","main":"index.js","files":["index.js"],"scripts":{"cover":"istanbul cover --include-all-sources --report none --print none _mocha -- --check-leaks -t 5000 test/*.test.js","lint":"eslint index.js fixtures test","test":"npm run clean && npm run lint && npm run cover && istanbul report json lcov html text","autod":"autod -w --prefix '~'","clean":"rm -rf coverage"},"dependencies":{},"devDependencies":{"autod":"*","eslint":"1","istanbul":"*","mm":"^1.3.0","mocha":"*","pedding":"^1.0.0"},"homepage":"https://github.com/node-modules/childprocess","repository":{"type":"git","url":"git://github.com/node-modules/childprocess.git","web":"https://github.com/node-modules/childprocess"},"bugs":{"url":"https://github.com/node-modules/childprocess/issues","email":"m@fengmk2.com"},"keywords":["childprocess","child_process","multiple_process","istanbul","coverage","cov","codecov"],"engines":{"node":">=0.12.0"},"author":{"name":"fengmk2","email":"m@fengmk2.com","url":"http://fengmk2.com"},"license":"MIT","contributors":[{"name":"fengmk2","email":"m@fengmk2.com","url":"https://fengmk2.com"}],"gitHead":"76f076ae737c588d869e4e212c12fbfa8ab65a05","_id":"childprocess@1.0.3","_shasum":"f0467073ac4118c9b70e121fa7f52002b6f42e34","_from":".","_npmVersion":"2.14.7","_nodeVersion":"4.2.1","_npmUser":{"name":"fengmk2","email":"fengmk2@gmail.com"},"maintainers":[{"name":"fengmk2","email":"fengmk2@gmail.com"}],"dist":{"shasum":"f0467073ac4118c9b70e121fa7f52002b6f42e34","tarball":"https://registry.npmjs.org/childprocess/-/childprocess-1.0.3.tgz","integrity":"sha512-kYIjFGzwl6kGbqKQ4qxf88yWSLGyb3Y7Bp5uPcSDyDEwk8ICwztP30llUFNnPCtGSQwUiPF2AxWEVnNfgON45w==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDSZKCNBmdCrmt7q+nOffjpAUGlHxXpU2VFJA0yKNPKYwIgWQWFtbnHBrISdG1sXr4Irrb3jBdICnMmzlfo/TagfFg="}]}},"2.0.0":{"name":"childprocess","version":"2.0.0","description":"Wrap `child_process` module to support Multiple Process Code Coverage with istanbul.","main":"index.js","files":["index.js"],"scripts":{"cover":"istanbul cover --include-all-sources --report none --print none _mocha -- --check-leaks -t 50000 test/*.test.js","lint":"eslint index.js fixtures test","test":"npm run clean && npm run lint && npm run cover && istanbul report --root coverage json lcov html text","autod":"autod -w --prefix '~'","clean":"rm -rf coverage"},"dependencies":{},"devDependencies":{"autod":"*","coffee":"~1.3.1","eslint":"1","istanbul":"*","mm":"^1.3.0","mocha":"*","pedding":"^1.0.0","spy":"~0.1.3"},"homepage":"https://github.com/node-modules/childprocess","repository":{"type":"git","url":"git://github.com/node-modules/childprocess.git","web":"https://github.com/node-modules/childprocess"},"bugs":{"url":"https://github.com/node-modules/childprocess/issues","email":"m@fengmk2.com"},"keywords":["childprocess","child_process","multiple_process","istanbul","coverage","cov","codecov"],"engines":{"node":">=0.12.0"},"author":{"name":"fengmk2","email":"m@fengmk2.com","url":"http://fengmk2.com"},"license":"MIT","contributors":[{"name":"fengmk2","email":"m@fengmk2.com","url":"https://fengmk2.com"}],"gitHead":"1037fd12fe0e1f02252a28c49ffb721395df5860","_id":"childprocess@2.0.0","_shasum":"0f844e12954c550472fed9e092130ec75e2996bc","_from":".","_npmVersion":"2.14.7","_nodeVersion":"4.2.1","_npmUser":{"name":"fengmk2","email":"fengmk2@gmail.com"},"maintainers":[{"name":"fengmk2","email":"fengmk2@gmail.com"}],"dist":{"shasum":"0f844e12954c550472fed9e092130ec75e2996bc","tarball":"https://registry.npmjs.org/childprocess/-/childprocess-2.0.0.tgz","integrity":"sha512-d84siBFOx9IMEV1cZ7nESfVFvfId7xoA+SdSWHt6sNKg3rCLoNo9wq7CCOvbWm4n4tvWi9oqX4qv1L3azckQjQ==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDZENeDScEAEG893ILGCPo5muem6XzVILsKBOP2KbXuhAIhAKcPrxKAk8B6AgDsBEaLTpG8va92AmkCSJQob3vyH8z3"}]}},"2.0.1":{"name":"childprocess","version":"2.0.1","description":"Wrap `child_process` module to support Multiple Process Code Coverage with istanbul.","main":"index.js","files":["index.js"],"scripts":{"cover":"istanbul cover --include-all-sources --report none --print none node_modules/mocha/bin/_mocha -- --check-leaks -t 50000 test/*.test.js","lint":"eslint index.js fixtures test","test":"npm run clean && npm run lint && npm run cover && istanbul report --root coverage json lcov html text","autod":"autod -w --prefix '~'","clean":"rm -rf coverage"},"dependencies":{"utility":"~1.6.0"},"devDependencies":{"autod":"*","coffee":"1","eslint":"1","istanbul":"*","mm":"1","mocha":"*","pedding":"1","spy":"~0.1.3"},"homepage":"https://github.com/node-modules/childprocess","repository":{"type":"git","url":"git://github.com/node-modules/childprocess.git","web":"https://github.com/node-modules/childprocess"},"bugs":{"url":"https://github.com/node-modules/childprocess/issues","email":"m@fengmk2.com"},"keywords":["childprocess","child_process","multiple_process","istanbul","coverage","cov","codecov"],"engines":{"node":">=0.12.0"},"author":{"name":"fengmk2","email":"m@fengmk2.com","url":"http://fengmk2.com"},"license":"MIT","contributors":[{"name":"fengmk2","email":"m@fengmk2.com","url":"https://fengmk2.com"}],"gitHead":"327d0082c796626d4ecd62cb0bf6f5532bc3dd46","_id":"childprocess@2.0.1","_shasum":"2f4cdbbb3b23b46c77001fae75d7cde79a27e0ac","_from":".","_npmVersion":"2.14.12","_nodeVersion":"4.3.1","_npmUser":{"name":"fengmk2","email":"fengmk2@gmail.com"},"maintainers":[{"name":"fengmk2","email":"fengmk2@gmail.com"},{"name":"popomore","email":"sakura9515@gmail.com"}],"dist":{"shasum":"2f4cdbbb3b23b46c77001fae75d7cde79a27e0ac","tarball":"https://registry.npmjs.org/childprocess/-/childprocess-2.0.1.tgz","integrity":"sha512-zLidTOClV99PdVKR80TsJxUY7Ws1M6BeMPxPK7+BFpVP5GxDiZtEitDRfyoRARjoif3C5d9tLJQvT8fGYB9Nvg==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCICLBL5JaRVlu2dtjj9PDTfL7CMjBOzlYzFamBqn4R3g4AiEArjVlaBcn9FWGVmCABPNi0kYG6Ni5S4LTd3Ag4O+y7HM="}]},"_npmOperationalInternal":{"host":"packages-5-east.internal.npmjs.com","tmp":"tmp/childprocess-2.0.1.tgz_1456340523857_0.22626287559978664"}},"2.0.2":{"name":"childprocess","version":"2.0.2","description":"Wrap `child_process` module to support Multiple Process Code Coverage with istanbul.","main":"index.js","files":["index.js"],"scripts":{"cover":"istanbul cover --include-all-sources --report none --print none node_modules/mocha/bin/_mocha -- --check-leaks -t 50000 test/*.test.js","lint":"eslint index.js fixtures test","test":"npm run clean && npm run lint && npm run cover && istanbul report --root coverage json lcov html text","autod":"autod -w --prefix '~'","clean":"rm -rf coverage"},"dependencies":{"utility":"~1.6.0"},"devDependencies":{"autod":"*","coffee":"1","eslint":"1","istanbul":"*","mm":"1","mocha":"*","pedding":"1","spy":"~0.1.3"},"homepage":"https://github.com/node-modules/childprocess","repository":{"type":"git","url":"git://github.com/node-modules/childprocess.git","web":"https://github.com/node-modules/childprocess"},"bugs":{"url":"https://github.com/node-modules/childprocess/issues","email":"m@fengmk2.com"},"keywords":["childprocess","child_process","multiple_process","istanbul","coverage","cov","codecov"],"engines":{"node":">=0.12.0"},"author":{"name":"fengmk2","email":"m@fengmk2.com","url":"http://fengmk2.com"},"license":"MIT","contributors":[{"name":"fengmk2","email":"m@fengmk2.com","url":"https://fengmk2.com"}],"gitHead":"caed1ee042849f4aeb3b41f68b5186fe8b3a4cdc","_id":"childprocess@2.0.2","_shasum":"3d684929748b1e13e8521cf619bde5440de85eb4","_from":".","_npmVersion":"2.15.5","_nodeVersion":"4.4.5","_npmUser":{"name":"fengmk2","email":"fengmk2@gmail.com"},"maintainers":[{"name":"fengmk2","email":"fengmk2@gmail.com"},{"name":"popomore","email":"sakura9515@gmail.com"}],"dist":{"shasum":"3d684929748b1e13e8521cf619bde5440de85eb4","tarball":"https://registry.npmjs.org/childprocess/-/childprocess-2.0.2.tgz","integrity":"sha512-ONqPBsbg+0c+s3p7HfOVm4zN3MnkfsDelUC8geQ1uH796Z4A/ArGLAaSp2HPRa+0qDPCJLz1Tw0d0vRa0ZITuw==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIGAHMirFoVureRb+Ty0p7gak9MzOqA3v8eOHwO3kpp+oAiEA785NCpoEGM1o6gQHtoC6dHpXPOuybgYfIwsIpoAiVSY="}]},"_npmOperationalInternal":{"host":"packages-12-west.internal.npmjs.com","tmp":"tmp/childprocess-2.0.2.tgz_1466432913360_0.9550363379530609"}}},"readme":"childprocess\n=======\n\n[![NPM version][npm-image]][npm-url]\n[![build status][travis-image]][travis-url]\n[![appveyor build status][appveyor-image]][appveyor-url]\n[![Test coverage][cov-image]][cov-url]\n[![David deps][david-image]][david-url]\n[![npm download][download-image]][download-url]\n\n[npm-image]: https://img.shields.io/npm/v/childprocess.svg?style=flat-square\n[npm-url]: https://npmjs.org/package/childprocess\n[travis-image]: https://img.shields.io/travis/node-modules/childprocess.svg?style=flat-square\n[travis-url]: https://travis-ci.org/node-modules/childprocess\n[appveyor-image]: https://ci.appveyor.com/api/projects/status/aeh1v06b88nb7ok9?svg=true\n[appveyor-url]: https://ci.appveyor.com/project/fengmk2/childprocess\n[cov-image]: https://codecov.io/github/node-modules/childprocess/coverage.svg?branch=master\n[cov-url]: https://codecov.io/github/node-modules/childprocess?branch=master\n[david-image]: https://img.shields.io/david/node-modules/childprocess.svg?style=flat-square\n[david-url]: https://david-dm.org/node-modules/childprocess\n[download-image]: https://img.shields.io/npm/dm/childprocess.svg?style=flat-square\n[download-url]: https://npmjs.org/package/childprocess\n\nInject script into multiple process when using `child_process.fork`.\n\nOne of the use case is [Multiple Process Code Coverage](https://github.com/gotwarlost/istanbul#multiple-process-usage) with [istanbul].\n\n- [cluster code coverage with istanbul](http://fengmk2.com/blog/2015/cluster-coverage/README.html)\n\n## Install\n\n```bash\n$ npm i childprocess\n```\n\n## Usage\n\n```js\nrequire('childprocess').inject(function(modulePath, args, opt) {\n  const execFile = 'path/to/istanbul';\n  const cwd = opt.cwd && process.cwd();\n  const execArgs = [\n    'cover',\n    '--root', cwd,\n    '--dir', path.join(cwd, './coverage'),\n    '--report', 'none',\n    '--print', 'none',\n    '--include-pid',\n    modulePath,\n    '--',\n  ].concat(args);\n  return [execFile, execArgs, opt];\n});\nrequire('child_process').fork();\n```\n\n## APIs\n\n## inject(cb) / inject(filepath)\n\nInject script when using `child_process.fork`.\n\nThe inject script is a function that running in sandbox in every process. that mean you can't use the variable out of the function.\n\nThe function should return an array that contains 3 arguments same as fork.\n\n```js\nchildprocess.inject(function(modulePath, args, opt) {\n  return [modulePath, args, opt];\n});\n```\n\n### reset()\n\nUse `child_process.fork` without injected script.\n\n## License\n\n[MIT](LICENSE)\n\n[istanbul]: https://github.com/gotwarlost/istanbul\n","maintainers":[{"name":"fengmk2","email":"fengmk2@gmail.com"},{"name":"popomore","email":"sakura9515@gmail.com"}],"time":{"modified":"2022-06-13T05:57:50.519Z","created":"2015-08-30T09:52:24.516Z","1.0.0":"2015-08-30T09:52:24.516Z","1.0.1":"2015-09-01T08:35:00.293Z","1.0.2":"2015-09-01T08:51:20.133Z","1.0.3":"2015-10-29T01:57:33.674Z","2.0.0":"2015-10-31T01:57:31.190Z","2.0.1":"2016-02-24T19:02:05.237Z","2.0.2":"2016-06-20T14:28:35.510Z"},"homepage":"https://github.com/node-modules/childprocess","keywords":["childprocess","child_process","multiple_process","istanbul","coverage","cov","codecov"],"repository":{"type":"git","url":"git://github.com/node-modules/childprocess.git","web":"https://github.com/node-modules/childprocess"},"contributors":[{"name":"fengmk2","email":"m@fengmk2.com","url":"https://fengmk2.com"}],"author":{"name":"fengmk2","email":"m@fengmk2.com","url":"http://fengmk2.com"},"bugs":{"url":"https://github.com/node-modules/childprocess/issues","email":"m@fengmk2.com"},"license":"MIT","readmeFilename":"README.md","users":{"tujiaw":true}}