{"versions":{"0.3.1":{"name":"@akryum/tinypool","version":"0.3.1","description":"A minimal and tiny Node.js Worker Thread Pool implementation, a fork of piscina, but with fewer features","type":"module","main":"./dist/esm/index.js","module":"./dist/esm/index.js","types":"./dist/index.d.ts","publishConfig":{"access":"public"},"scripts":{"test:ci":"node --experimental-vm-modules node_modules/jest/bin/jest.js --no-coverage --runInBand","test:dev":"node --experimental-vm-modules --trace-warnings node_modules/jest/bin/jest.js --watch --no-coverage","dev":"tsup --watch","build":"tsup","publish":"clean-publish","prepare":"husky install"},"repository":{"type":"git","url":"git+https://github.com/aslemammad/tinypool.git"},"keywords":["fast","worker threads","thread pool"],"license":"MIT","devDependencies":{"@swc/core":"^1.2.120","@swc/jest":"^0.2.15","@types/concat-stream":"^1.6.1","@types/jest":"^27.0.3","@types/node":"^15.0.1","@typescript-eslint/eslint-plugin":"^4.22.0","@typescript-eslint/parser":"^4.22.0","abort-controller":"^3.0.0","c8":"^7.10.0","clean-publish":"^3.4.4","concat-stream":"^2.0.0","esbuild":"^0.14.5","esbuild-register":"^3.2.1","eventemitter-asyncresource":"^1.0.0","gen-esm-wrapper":"^1.1.1","husky":"^7.0.4","jest":"^27.4.5","nano-staged":"^0.5.0","prettier":"^2.5.1","regenerator-runtime":"^0.13.9","snazzy":"^9.0.0","tsup":"^5.11.6","typescript":"4.3.x","vite":"^2.7.3"},"bugs":{"url":"https://github.com/aslemammad/tinypool/issues"},"homepage":"https://github.com/aslemammad/tinypool#readme","engines":{"node":">=14.0.0"},"jest":{"rootDir":".","moduleNameMapper":{"^tinypool$":"<rootDir>/dist/esm/index.js"},"modulePathIgnorePatterns":["dist"],"extensionsToTreatAsEsm":[".ts"],"testRegex":"test.(js|ts|tsx)$","coverageDirectory":"./coverage/","collectCoverage":true,"coverageReporters":["json","html","text","text-summary"],"collectCoverageFrom":["src/**/*.{js,ts,tsx}","tests/**/*.{js,ts,tsx}"],"transform":{"^.+\\.(t|j)sx?$":"@swc/jest"}},"gitHead":"82aa1142013b4eea97087ff0396a6c5b832234c0","_id":"@akryum/tinypool@0.3.1","_nodeVersion":"16.19.0","_npmVersion":"8.19.3","dist":{"integrity":"sha512-nznEC1ZA/m3hQDEnrGQ4c5gkaa9pcaVnw4LFJyzBAaR7E3nfiAPEHS3otnSafpZouVnoKeITl5D+2LsnwlnK8g==","shasum":"a14b3d51a400e7c0ab4c7e2b1c2e2fa0386aea87","tarball":"http://123.232.10.234:8212/nexus/content/groups/npm-public/@akryum/tinypool/-/tinypool-0.3.1.tgz","fileCount":8,"unpackedSize":44099,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCLU/J/cVNoQGWNUSmw31D7++ZfGdGYI5OVK+1EBL9lLAIgLl8b8wI5xkyzgzMX3jBKwPC6PuNqJptMiosX/scralg="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJj7sosACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmqHMw//ZaE15Z3BEqiGtmPoxpd1jhmQhjiH890NRB/qAo/MdJ7iLC8I\r\na8A44ifJ0+RPbfrr6Y7AHPkf6AI80C2LLoOmzJaRuC8L7dMcWxxRHAeYNETA\r\n7Qs/DIagENDiubmb68cbJ7nR5HMChhS5XYAOKfKck0cf6jRWrEZpY6Pt6qYm\r\ntTMZNORLZjOBDjpBfjPi2D3L54p3jeV4Plselvswklno4iKpjdIEo76JQ17W\r\n6cT4tR04Rg8X3fAcnvUG7RfhgWW56GCacQ6lbKcB9OAjIz76l9Jo3ySuoNeW\r\n6ttwMPZqRmnCO9oJCZpvnBCT05EYVYsqAi7ZndHmycGkPKIodUHj42qWtdfB\r\nOaLGrsZ+FXmecdG99oHiusVNokxO5xwCPMzfccqUbJU7mFkBmlWLg/o08Mgy\r\nCDIqAScb6RUEV2gqMHjcVzHv5OQq7IbjCh4enqLy/sivOSfqa+qRYmgY/G9+\r\ncJcFgubDlUNaxG1xQCxYKEgzxcH8WJuE4AQ3rlpp3P8P/tAZXmqjxwqv70Ge\r\nUNu4S0GyXPOPf92/TJcCCYFe/wgJuG+ej12V1kSzhK++EzlX3wymVpYxkMF4\r\ned66DB2nF/z9PzAakI7fufF4JzbiOaFCWLD/wiqp6+rJsL46kJRCscdxcVdG\r\nPh0Cw5kpVmbD7hdBrPfWNgzfyRdbGgnia7c=\r\n=qyMK\r\n-----END PGP SIGNATURE-----\r\n","size":12121},"_npmUser":{"name":"anonymous","email":"guillaume.b.chau@gmail.com"},"directories":{},"maintainers":[{"name":"anonymous","email":"guillaume.b.chau@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/tinypool_0.3.1_1676593708413_0.13010616796201924"},"_hasShrinkwrap":false,"_cnpmcore_publish_time":"2023-02-17T00:28:28.667Z","publish_time":1676593708667,"contributors":[]}},"dist-tags":{"latest":"0.3.1"},"name":"@akryum/tinypool","time":{"created":"2023-02-17T00:36:07.443Z","modified":"2023-02-17T00:36:07.711Z","0.3.1":"2023-02-17T00:28:28.667Z"},"readme":"# Tinypool - the node.js worker pool 🧵\n\n> Piscina: A fast, efficient Node.js Worker Thread Pool implementation\n\nTinypool is a fork of piscina. What we try to achieve in this library, is to eliminate some dependencies and features that our target users don't need (currently, our main user will be Vitest). Tinypool's install size (38KB) can then be smaller than Piscina's install size (6MB). If you need features like [utilization](https://github.com/piscinajs/piscina#property-utilization-readonly) or [NAPI](https://github.com/piscinajs/piscina#thread-priority-on-linux-systems), [Piscina](https://github.com/piscinajs/piscina) is a better choice for you. We think that Piscina is an amazing library, and we may try to upstream some of the dependencies optimization in this fork.\n\n- ✅ Smaller install size, 38KB\n- ✅ Minimal\n- ✅ No dependencies\n- ✅ Physical cores instead of Logical cores with [physical-cpu-count](https://www.npmjs.com/package/physical-cpu-count)\n- ❌ No utilization\n- ❌ No NAPI\n\n- Written in TypeScript, and ESM support only. For Node.js 14.x and higher.\n\n_In case you need more tiny libraries like tinypool or tinyspy, please consider submitting an [RFC](https://github.com/tinylibs/rfcs)_\n\n## Example\n\nIn `main.js`:\n\n```js\nimport Tinypool from 'tinypool'\n\nconst pool = new Tinypool({\n  filename: new URL('./worker.js', import.meta.url).href,\n})\n\nconst result = await pool.run({ a: 4, b: 6 })\nconsole.log(result) // Prints 10\n```\n\nIn `worker.js`:\n\n```js\nexport default ({ a, b }) => {\n  return a + b\n}\n```\n\n## API\n\nWe have a similar API to Piscina, so for more information, you can read Piscina's detailed [documentation](https://github.com/piscinajs/piscina#piscina---the-nodejs-worker-pool) and apply the same techniques here.\n\n###### Additional Options\n\n- `isolateWorkers`: Default to `false`. Always starts with a fresh worker when running tasks to isolate the environment.\n- `workerId`: Each worker now has an id ( <= `maxThreads`) that can be imported\n  from `tinypool` in the worker itself (or `process.__tinypool_state__.workerId`)\n\n## Authors\n\n| <a href=\"https://github.com/Aslemammad\"> <img width='150' src=\"https://avatars.githubusercontent.com/u/37929992?v=4\" /><br> Mohammad Bagher </a> |\n| ------------------------------------------------------------------------------------------------------------------------------------------------ |\n\n## Credits\n\n[The Vitest team](https://vitest.dev/) for giving me the chance of creating and maintaing this project for vitest.\n\n[Piscina](https://github.com/piscinajs/piscina), because Tinypool is not more than a friendly fork of piscina.","users":{}}