{"_id":"@badisi/agadoo","_rev":"7-2946150f6f069e73695cec2dce1c2284","name":"@badisi/agadoo","dist-tags":{"latest":"4.0.5"},"versions":{"4.0.0":{"name":"@badisi/agadoo","version":"4.0.0","keywords":["agadoo","rollup","analyzer","checker","tree-shaking","tree-shakeable","esm"],"author":{"name":"Badisi"},"license":"MIT","_id":"@badisi/agadoo@4.0.0","maintainers":[{"name":"badisi","email":"badisi84@gmail.com"}],"homepage":"https://github.com/Badisi/agadoo","bugs":{"url":"https://github.com/Badisi/agadoo/issues"},"bin":{"bagadoo":"bin/bagadoo"},"dist":{"shasum":"41f033830b5a1fc4afc293315eddfdb94d32b0a0","tarball":"https://registry.npmjs.org/@badisi/agadoo/-/agadoo-4.0.0.tgz","fileCount":7,"integrity":"sha512-FDFAg6DdqwFmkVSK3xZeogzinJyT1EmNed3JOd13lUNjXTJDE2CA4RObGoB84orCfvi+lcCAC71Zvutzx5NGOg==","signatures":[{"sig":"MEQCIHu3lUmMLCgwySW/EEYik3nP8ooJ51tdjhQGURP/rVApAiBsSlAJJaUBNTYWh8DmU+tjMW6sYS09hmK5jehpK6O9gg==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":13429},"main":"./index.mjs","type":"module","module":"./index.mjs","engines":{"node":">= 20.12.0"},"exports":{".":{"types":"./index.d.mts","default":"./index.mjs"},"./package.json":"./package.json"},"gitHead":"0f164c871fd9b87b37496417c95bdb48d7951491","_npmUser":{"name":"badisi","email":"badisi84@gmail.com"},"repository":{"url":"git+https://github.com/Badisi/agadoo.git","type":"git"},"_npmVersion":"12.0.1","description":"Check whether a package is tree-shakeable.","directories":{},"sideEffects":false,"_nodeVersion":"24.18.0","allowScripts":{"esbuild":true,"fsevents":true},"dependencies":{"rollup":"^4.62.2","@rollup/plugin-virtual":"^3.0.2"},"_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/agadoo_4.0.0_1784549178169_0.31043326800021265","host":"s3://npm-registry-packages-npm-production"}},"4.0.1":{"name":"@badisi/agadoo","version":"4.0.1","keywords":["agadoo","rollup","analyzer","checker","tree-shaking","tree-shakeable","esm"],"author":{"name":"Badisi"},"license":"MIT","_id":"@badisi/agadoo@4.0.1","maintainers":[{"name":"badisi","email":"badisi84@gmail.com"}],"homepage":"https://github.com/Badisi/agadoo","bugs":{"url":"https://github.com/Badisi/agadoo/issues"},"bin":{"bagadoo":"bin/bagadoo"},"dist":{"shasum":"d848f972d0f8eaa37bfd78f74f5b51556769823e","tarball":"https://registry.npmjs.org/@badisi/agadoo/-/agadoo-4.0.1.tgz","fileCount":7,"integrity":"sha512-mnpeSwavtACEmOPYUKLzNq1Zi2HDySA/IlH88H5qh4IU05xDaa9gPsL3Js6NydcaR/LmD4ZgLimEQO/Utd301A==","signatures":[{"sig":"MEQCIHPXvG7N6bbFQX/if+Qi7WRLBOxo8K2ypnh0fDc2Zil3AiAv6nt6FgiNvToAKgJKcbndnjuM2iajuwE6Im0elOvBFQ==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@badisi%2fagadoo@4.0.1","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":14319},"main":"./index.mjs","type":"module","module":"./index.mjs","engines":{"node":">= 20.12.0"},"exports":{".":{"types":"./index.d.mts","default":"./index.mjs"},"./package.json":"./package.json"},"gitHead":"1d0fbdbf3701ecaeb3f3a169b17d9ec7857a318e","_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"oidc:cc618583-203e-42af-8d65-362a2a3d2e12"}},"repository":{"url":"git+https://github.com/Badisi/agadoo.git","type":"git"},"_npmVersion":"12.0.1","description":"Check whether a package is tree-shakeable.","directories":{},"sideEffects":false,"_nodeVersion":"24.18.0","allowScripts":{"esbuild":true,"fsevents":true},"dependencies":{"rollup":"^4.62.2","@rollup/plugin-virtual":"^3.0.2"},"_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/agadoo_4.0.1_1784722725743_0.3167411317399429","host":"s3://npm-registry-packages-npm-production"}},"4.0.2":{"name":"@badisi/agadoo","version":"4.0.2","keywords":["agadoo","rollup","analyzer","checker","tree-shaking","tree-shakeable","esm"],"author":{"name":"Badisi"},"license":"MIT","_id":"@badisi/agadoo@4.0.2","maintainers":[{"name":"badisi","email":"badisi84@gmail.com"}],"homepage":"https://github.com/Badisi/agadoo","bugs":{"url":"https://github.com/Badisi/agadoo/issues"},"bin":{"bagadoo":"bin/bagadoo"},"dist":{"shasum":"6fc94f19c1602a98d85e81924c57464261e6d182","tarball":"https://registry.npmjs.org/@badisi/agadoo/-/agadoo-4.0.2.tgz","fileCount":7,"integrity":"sha512-MP04NeVk7XanugFwDu6OcKwnd577/RqTtyKbXsUqC4exAUyi2s+4aSF0E9A9v97AnCne/MjP7s9XJ+RKIJPA1Q==","signatures":[{"sig":"MEQCIFI8iLhSBtPZK24hmm2qog2nU6SGh7nQZeyE+OdzXQMVAiBaTdVbqzYwXxFCSbyl5r++ZCb2uYiyPOzjdUCZas4uFw==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@badisi%2fagadoo@4.0.2","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":19812},"main":"./index.mjs","type":"module","module":"./index.mjs","engines":{"node":">= 20.12.0"},"exports":{".":{"types":"./index.d.mts","default":"./index.mjs"},"./package.json":"./package.json"},"gitHead":"2406ed4cc6c1d4195ff14b6f5d9cff9dac2cf1ab","_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"oidc:cc618583-203e-42af-8d65-362a2a3d2e12"}},"repository":{"url":"git+https://github.com/Badisi/agadoo.git","type":"git"},"_npmVersion":"12.0.1","description":"Check whether a package is tree-shakeable.","directories":{},"sideEffects":false,"_nodeVersion":"24.18.0","allowScripts":{"esbuild":true,"fsevents":true},"dependencies":{"rollup":"^4.62.3","@rollup/plugin-virtual":"^3.0.2","@jridgewell/sourcemap-codec":"^1.5.5"},"_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/agadoo_4.0.2_1785098292563_0.29661804350242216","host":"s3://npm-registry-packages-npm-production"}},"4.0.3":{"name":"@badisi/agadoo","version":"4.0.3","keywords":["agadoo","rollup","analyzer","checker","tree-shaking","tree-shakeable","esm"],"author":{"name":"Badisi"},"license":"MIT","_id":"@badisi/agadoo@4.0.3","maintainers":[{"name":"badisi","email":"badisi84@gmail.com"}],"homepage":"https://github.com/Badisi/agadoo","bugs":{"url":"https://github.com/Badisi/agadoo/issues"},"bin":{"bagadoo":"bin/bagadoo"},"dist":{"shasum":"97952b03f648244e8c1ea12929002582c8678f6c","tarball":"https://registry.npmjs.org/@badisi/agadoo/-/agadoo-4.0.3.tgz","fileCount":7,"integrity":"sha512-WRUSNdLd99DtMffaJTGALtHOtgN8Mzc9/Kb8WXgpxRrS7uFMCcVshcvYy09QGLLEPcdS18yIYlrO43sKBOLxNQ==","signatures":[{"sig":"MEYCIQDi522xGZLzlq2PO+bkdSicZqoqdYv0i2bwUdpE/QRQegIhAO8D26020hNRBXYIJvXzQdv6d1KQUgwRA30mLwgaZ2tR","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@badisi%2fagadoo@4.0.3","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":19812},"main":"./index.mjs","type":"module","module":"./index.mjs","engines":{"node":">= 20.12.0"},"exports":{".":{"types":"./index.d.mts","default":"./index.mjs"},"./package.json":"./package.json"},"gitHead":"15ba9c9345357793777cab49e290bc7530955b55","_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"oidc:cc618583-203e-42af-8d65-362a2a3d2e12"}},"repository":{"url":"git+https://github.com/Badisi/agadoo.git","type":"git"},"_npmVersion":"12.0.2","description":"Check whether a package is tree-shakeable.","directories":{},"sideEffects":false,"_nodeVersion":"24.18.0","allowScripts":{"esbuild":true,"fsevents":true},"dependencies":{"rollup":"^4.62.4","@rollup/plugin-virtual":"^3.0.2","@jridgewell/sourcemap-codec":"^1.5.5"},"_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/agadoo_4.0.3_1785966595477_0.7041653259810357","host":"s3://npm-registry-packages-npm-production"}},"4.0.4":{"name":"@badisi/agadoo","version":"4.0.4","keywords":["agadoo","rollup","analyzer","checker","tree-shaking","tree-shakeable","esm"],"author":{"name":"Badisi"},"license":"MIT","_id":"@badisi/agadoo@4.0.4","maintainers":[{"name":"badisi","email":"badisi84@gmail.com"}],"homepage":"https://github.com/Badisi/agadoo","bugs":{"url":"https://github.com/Badisi/agadoo/issues"},"bin":{"bagadoo":"bin/bagadoo"},"dist":{"shasum":"0db4c3d774aceae83088b5a7d7385948453f0999","tarball":"https://registry.npmjs.org/@badisi/agadoo/-/agadoo-4.0.4.tgz","fileCount":7,"integrity":"sha512-jrDs7VaNQT+2OW8NR1D+3+/enu/qwzpp8zHO4HF99Zb5gJc+rtKj4Qdu+kjsVWJ7sVxp57C8tOKkM61Ak7RoGg==","signatures":[{"sig":"MEQCIBB/vTi99G6Mhb3mO8q91wztYp5tazXBVYCR7u5zFGdVAiBJYeTTr3gb4vZ1bqdRC+v65Ol8Fm7hyARrI/sHgbQy8Q==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"},{"sig":"MEUCIBXoRFz0ategrfUwQgs/0tQek7+zEYq7CVgAjYrmXW4ZAiEA+69emrbbJGYfKEHrRe4c0caLEKLoAWvu/kUgaYezXh0=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@badisi%2fagadoo@4.0.4","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":19844},"main":"./index.mjs","type":"module","module":"./index.mjs","engines":{"node":">= 20.12.0"},"exports":{".":{"types":"./index.d.mts","default":"./index.mjs"},"./package.json":"./package.json"},"gitHead":"dedc9fdacfd55d9ccc3f6348910ac00412be0121","_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"oidc:cc618583-203e-42af-8d65-362a2a3d2e12"}},"deprecated":"Critical bug fixed in newer versions. Please upgrade.","repository":{"url":"git+https://github.com/Badisi/agadoo.git","type":"git"},"_npmVersion":"12.0.2","description":"Check whether a package is tree-shakeable.","directories":{},"sideEffects":false,"_nodeVersion":"24.20.0","allowScripts":{"esbuild":true,"fsevents":true},"dependencies":{"rollup":"^4.63.3","@rollup/plugin-virtual":"^3.0.2","@jridgewell/sourcemap-codec":"^1.6.0"},"_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/agadoo_4.0.4_1789676878929_0.2828343814192573","host":"s3://npm-registry-packages-npm-production"}},"4.0.5":{"_id":"@badisi/agadoo@4.0.5","bin":{"bagadoo":"bin/bagadoo"},"bugs":{"url":"https://github.com/Badisi/agadoo/issues"},"dist":{"shasum":"3ebc2fcd1d4ab1932cc6bb76ee03362591da0a8d","tarball":"https://registry.npmjs.org/@badisi/agadoo/-/agadoo-4.0.5.tgz","fileCount":7,"integrity":"sha512-icECfecpTMZEbOT+f7iOvLEJSogL7KMWyABLvK1pLDxxt8Tnb017x5NuogFbXIm7iVgjpE/xLr4mgbiuZwMbFw==","signatures":[{"sig":"MEQCIDZLshr7YJv73FLDQe0QXH68OX7uwiCrrdOlv/Lq1NGiAiBlaRTcbJ9UF+19E+jWihfZ9Tx45me/5pdCPa3hqReLAw==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"},{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIFLksECyr5pWu3SK4R5IRzXWhRmLzqzVSZryq2GNs3a9AiEAjoEMg6X43SjRACdVopaaNjv0ydQeAySjH+Qk4V80/XI="}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@badisi%2fagadoo@4.0.5","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":19844},"main":"./index.mjs","name":"@badisi/agadoo","type":"module","author":{"name":"Badisi"},"module":"./index.mjs","engines":{"node":">= 20.12.0"},"exports":{".":{"types":"./index.d.mts","default":"./index.mjs"},"./package.json":"./package.json"},"gitHead":"36a07f5a4c42a1e89f8fd4c2a20efc69f2c34174","license":"MIT","version":"4.0.5","_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"oidc:cc618583-203e-42af-8d65-362a2a3d2e12"}},"homepage":"https://github.com/Badisi/agadoo","keywords":["agadoo","rollup","analyzer","checker","tree-shaking","tree-shakeable","esm"],"repository":{"url":"git+https://github.com/Badisi/agadoo.git","type":"git"},"_npmVersion":"12.0.2","description":"Check whether a package is tree-shakeable.","directories":{},"maintainers":[{"name":"badisi","email":"badisi84@gmail.com"}],"sideEffects":false,"_nodeVersion":"24.20.0","allowScripts":{"esbuild":true,"fsevents":true},"dependencies":{"rollup":"^4.63.3","@rollup/plugin-virtual":"^3.0.2","@jridgewell/sourcemap-codec":"^1.6.0"},"_hasShrinkwrap":false,"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/agadoo_4.0.5_1789718519726_0.7888101895547499"}}},"time":{"created":"2026-07-20T12:06:16.847Z","modified":"2026-09-18T08:02:00.168Z","4.0.0":"2026-07-20T12:06:18.444Z","4.0.1":"2026-07-22T12:18:45.876Z","4.0.2":"2026-07-26T20:38:12.700Z","4.0.3":"2026-08-05T21:49:55.708Z","4.0.4":"2026-09-17T20:27:59.001Z","4.0.5":"2026-09-18T08:01:59.817Z"},"bugs":{"url":"https://github.com/Badisi/agadoo/issues"},"author":{"name":"Badisi"},"license":"MIT","homepage":"https://github.com/Badisi/agadoo","keywords":["agadoo","rollup","analyzer","checker","tree-shaking","tree-shakeable","esm"],"repository":{"url":"git+https://github.com/Badisi/agadoo.git","type":"git"},"description":"Check whether a package is tree-shakeable.","maintainers":[{"name":"badisi","email":"badisi84@gmail.com"}],"readme":"<h1 align=\"center\">\n    @badisi/agadoo\n</h1>\n\n<p align=\"center\">\n    🍃 <i>Check whether a package is tree-shakeable.</i><br/>\n</p>\n\n<p align=\"center\">\n    <a href=\"https://www.npmjs.com/package/@badisi/agadoo\">\n        <img src=\"https://img.shields.io/npm/v/@badisi/agadoo.svg?color=blue&logo=npm\" alt=\"npm version\" /></a>\n    <a href=\"https://npmcharts.com/compare/@badisi/agadoo?minimal=true\">\n        <img src=\"https://img.shields.io/npm/dw/@badisi/agadoo.svg?color=7986CB&logo=npm\" alt=\"npm donwloads\" /></a>\n    <a href=\"https://github.com/Badisi/agadoo/blob/main/LICENSE\">\n        <img src=\"https://img.shields.io/npm/l/@badisi/agadoo.svg?color=ff69b4\" alt=\"license\" /></a>\n</p>\n\n<p align=\"center\">\n    <a href=\"https://github.com/Badisi/agadoo/actions/workflows/ci_tests.yml\">\n        <img src=\"https://img.shields.io/github/actions/workflow/status/badisi/agadoo/ci_tests.yml?logo=github\" alt=\"build status\" /></a>\n    <a href=\"https://github.com/Badisi/agadoo/blob/main/CONTRIBUTING.md#-submitting-a-pull-request-pr\">\n        <img src=\"https://img.shields.io/badge/PRs-welcome-brightgreen.svg\" alt=\"PRs welcome\" /></a>\n</p>\n\n<hr/>\n\n#### Tree-shaking\n\n> It is a form of `dead-code elimination` that optimizes your production bundle size by removing unused code.\n>\n> With the advent of JavaScript modules (import and export), it is now possible to build libraries that are `tree-shakeable`. This means that a user of your library can import just the bits they need, without burdening their users with all the code they are *not* using. Modern bundlers use static analysis to track your export dependency graph, automatically pruning the \"dead leaves\" (unused exports) so that only active code ships to the browser.\n\n<hr/>\n\n\n## Getting started\n\nThis tool checks whether your JavaScript library is `tree-shakeable` by analyzing it with [Rollup](https://rollupjs.org).\n\n> [!NOTE]\n> This project is a revamp of the original [agadoo](https://github.com/Rich-Harris/agadoo) by [Rich Harris](https://github.com/Rich-Harris).\n\n\n## Installation\n\n```sh\nnpm install -g @badisi/agadoo\n```\n\n```sh\nyarn add @badisi/agadoo\n```\n\n\n## Usage\n\n```sh\nbagadoo [path] [options]\n\n# or without installation, using `npx` directly:\nnpx @badisi/agadoo [path] [options]\n```\n\n\n#### Arguments\n\n| Argument | Description |\n| :--- | :--- |\n| `path` | Path to an entry file or package directory.</br>*Defaults to reading the `module` or `main` field from `package.json` in the current directory*. |\n\n\n#### Options\n\n| Option | Description |\n| :--- | :--- |\n| `-c, --config <file>` | Path to a Rollup config file for custom plugins, externals, etc. |\n| `-v, --version` | Print version. |\n| `-h, --help` | Show help message. |\n\n\n#### Examples\n\n* **Check the package in the current directory:**\n\n```sh\nbagadoo\n```\n\n* **Check a specific file:**\n\n```sh\nbagadoo dist/my-library.js\n```\n\n* **Check a package directory:**\n\n```sh\nbagadoo packages/my-lib\n```\n\n* **Use a custom Rollup config file to handle plugins or mark external dependencies:**\n\n```sh\nbagadoo --config rollup.config.js\n```\n\n* **Add it to your `prepublishOnly` script to prevent publishing if tree-shaking fails:**\n\n```json\n{\n  \"scripts\": {\n    \"prepublishOnly\": \"bagadoo\"\n  }\n}\n```\n\n\n## API\n\nYou can also use agadoo programmatically:\n\n```ts\nimport { check } from '@badisi/agadoo';\n\nconst result = await check('./dist/my-library.js');\nconsole.log(result.isShaken); // true or false\n```\n\nPass custom Rollup options:\n\n```ts\nimport { check } from '@badisi/agadoo';\n\nconst result = await check('./dist/my-library.js', {\n  external: ['some-external-dep'],\n  plugins: [myPlugin()]\n});\n```\n\n\n## Help! my library isn't tree-shakeable\n\nIf tree-shaking fails, it means `Rollup` found side-effects in your code.\n\nHere are common guidelines:\n\n* Avoid transpilers like `Babel` and `Bublé` (if you're using TypeScript, target a modern JS version)\n* Export plain functions — don't create instances of things on initial evaluation\n* The output will show the code that remains after tree-shaking to help you diagnose the issue\n\nIf your library needs custom Rollup plugins (e.g., to handle non-standard file types), use the `--config` option.\n\n\n## Development\n\nSee the [developer docs][developer].\n\n\n## Contributing\n\n#### > Want to Help ?\n\nWant to file a bug, contribute some code or improve documentation ? Excellent!\n\nBut please read up first on the guidelines for [contributing][contributing], and learn about submission process, coding rules and more.\n\n#### > Code of Conduct\n\nPlease read and follow the [Code of Conduct][codeofconduct] and help us keep this project open and inclusive.\n\n\n\n[developer]: https://github.com/Badisi/agadoo/blob/main/DEVELOPER.md\n[contributing]: https://github.com/Badisi/agadoo/blob/main/CONTRIBUTING.md\n[codeofconduct]: https://github.com/Badisi/agadoo/blob/main/CODE_OF_CONDUCT.md\n","readmeFilename":"README.md"}