{"_id":"pnpm-policy","_rev":"8-1b0876c6eb96c4e81ad88dc7dc13f2a7","name":"pnpm-policy","dist-tags":{"latest":"0.6.1"},"versions":{"0.2.0":{"name":"pnpm-policy","version":"0.2.0","keywords":["pnpm","security","supply-chain","minimumReleaseAge","allowBuilds","npm","maintainer","workspace","monorepo","policy"],"author":"Constructive <developers@constructive.io>","license":"MIT","_id":"pnpm-policy@0.2.0","maintainers":[{"name":"pyramation","email":"pyramation@gmail.com"}],"homepage":"https://github.com/constructive-io/dev-utils","bugs":{"url":"https://github.com/constructive-io/dev-utils/issues"},"bin":{"pnpm-policy":"cli.js"},"dist":{"shasum":"0ba2c8c72147407e4dd806d5a1873a3fd1470fe0","tarball":"https://registry.npmjs.org/pnpm-policy/-/pnpm-policy-0.2.0.tgz","fileCount":51,"integrity":"sha512-RtN3n7IUo+NbKlKFXD/d0bsaOe02A/5J6RBTDW5khGMOvL46566LjZe9ZOOYhWUrKWoI6x3CM2wGJa5zMH0Xfw==","signatures":[{"sig":"MEYCIQCTbJW6ocyO8u1TYyioI/U2dSbN3zZNxys/LTQzmku1agIhAMzDl5dH93CbPbjC7pK24skL59h3Ee23t+8bxcWa++IK","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":139505},"main":"index.js","types":"index.d.ts","module":"esm/index.js","gitHead":"4b13fed85e9656d0990a3f7cfd0af1a30e909450","scripts":{"copy":"makage assets","lint":"eslint . --fix","test":"jest","build":"makage build","clean":"makage clean","test:watch":"jest --watch","prepublishOnly":"npm run build"},"_npmUser":{"name":"pyramation","email":"pyramation@gmail.com"},"repository":{"url":"https://github.com/constructive-io/dev-utils","type":"git"},"_npmVersion":"lerna/8.2.4/node@v22.13.1+arm64 (darwin)","description":"pnpm supply-chain policy for npm maintainers — derive minimumReleaseAge exemptions and build permissions from what you publish","directories":{},"_nodeVersion":"22.13.1","dependencies":{"yaml":"^2.8.4","yamlize":"0.12.0"},"publishConfig":{"access":"public","directory":"dist"},"_hasShrinkwrap":false,"devDependencies":{"makage":"0.1.10"},"_npmOperationalInternal":{"tmp":"tmp/pnpm-policy_0.2.0_1785901317340_0.2764562444818006","host":"s3://npm-registry-packages-npm-production"}},"0.2.1":{"name":"pnpm-policy","version":"0.2.1","keywords":["pnpm","security","supply-chain","minimumReleaseAge","allowBuilds","npm","maintainer","workspace","monorepo","policy"],"author":"Constructive <developers@constructive.io>","license":"MIT","_id":"pnpm-policy@0.2.1","maintainers":[{"name":"pyramation","email":"pyramation@gmail.com"}],"homepage":"https://github.com/constructive-io/dev-utils","bugs":{"url":"https://github.com/constructive-io/dev-utils/issues"},"bin":{"pnpm-policy":"cli.js"},"dist":{"shasum":"15fcdd833b76902fb11a7378b5397a031f050d32","tarball":"https://registry.npmjs.org/pnpm-policy/-/pnpm-policy-0.2.1.tgz","fileCount":51,"integrity":"sha512-2KWLQLCdXZYT3tOxjyG1upr2yY2hnk81fyvyDVI/1hzqkR6F9h+eQ5eIOv09GV2gUtLiH/t54yfeuQU+VTYkQw==","signatures":[{"sig":"MEYCIQDe3n/TcUL8UtD89MfkGbOnc3BBatgRB8iljbBLuLq0GwIhAKwqJgFVcEfJK3bojXWHFR7pqxmeS6Dx6k8TGk/FaXdW","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":140241},"main":"index.js","types":"index.d.ts","module":"esm/index.js","gitHead":"474247f44d723e2bdd1791489e2bef5d0ec69634","scripts":{"copy":"makage assets","lint":"eslint . --fix","test":"jest","build":"makage build","clean":"makage clean","test:watch":"jest --watch","prepublishOnly":"npm run build"},"_npmUser":{"name":"pyramation","email":"pyramation@gmail.com"},"repository":{"url":"https://github.com/constructive-io/dev-utils","type":"git"},"_npmVersion":"lerna/8.2.4/node@v22.13.1+arm64 (darwin)","description":"pnpm supply-chain policy for npm maintainers — derive minimumReleaseAge exemptions and build permissions from what you publish","directories":{},"_nodeVersion":"22.13.1","dependencies":{"yaml":"^2.8.4","yamlize":"0.12.1"},"publishConfig":{"access":"public","directory":"dist"},"_hasShrinkwrap":false,"devDependencies":{"makage":"0.1.10"},"_npmOperationalInternal":{"tmp":"tmp/pnpm-policy_0.2.1_1785914114058_0.4084681689447933","host":"s3://npm-registry-packages-npm-production"}},"0.2.2":{"name":"pnpm-policy","version":"0.2.2","keywords":["pnpm","security","supply-chain","minimumReleaseAge","allowBuilds","npm","maintainer","workspace","monorepo","policy"],"author":"Constructive <developers@constructive.io>","license":"MIT","_id":"pnpm-policy@0.2.2","maintainers":[{"name":"pyramation","email":"pyramation@gmail.com"}],"homepage":"https://github.com/constructive-io/dev-utils","bugs":{"url":"https://github.com/constructive-io/dev-utils/issues"},"bin":{"pnpm-policy":"cli.js"},"dist":{"shasum":"af7b0697e81fd06cb8ab2c5789ec498314480379","tarball":"https://registry.npmjs.org/pnpm-policy/-/pnpm-policy-0.2.2.tgz","fileCount":51,"integrity":"sha512-Fj5/ACIZG/AGynTvhT8/7fJTf8ya3jG/Mkq/OMNVZhfTTJ1oniRTsKBHlXGF4sSecvIFqkmeHpn8CsQFwGcENA==","signatures":[{"sig":"MEQCIDoASEQe0hO680qm96w209SAHr0L1OrZJYsiaPf53PoKAiAgifiJB6A+6z+VA/Rzs12Hthkfoswjs08wXW3xObHLLw==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":141461},"main":"index.js","types":"index.d.ts","module":"esm/index.js","gitHead":"8c56e34acfbe3333077516d95a2ad24e60f66d80","scripts":{"copy":"makage assets","lint":"eslint . --fix","test":"jest","build":"makage build","clean":"makage clean","test:watch":"jest --watch","prepublishOnly":"npm run build"},"_npmUser":{"name":"pyramation","email":"pyramation@gmail.com"},"repository":{"url":"https://github.com/constructive-io/dev-utils","type":"git"},"_npmVersion":"lerna/8.2.4/node@v22.13.1+arm64 (darwin)","description":"pnpm supply-chain policy for npm maintainers — derive minimumReleaseAge exemptions and build permissions from what you publish","directories":{},"_nodeVersion":"22.13.1","dependencies":{"yaml":"^2.8.4","yamlize":"0.12.1"},"publishConfig":{"access":"public","directory":"dist"},"_hasShrinkwrap":false,"devDependencies":{"makage":"0.1.10"},"_npmOperationalInternal":{"tmp":"tmp/pnpm-policy_0.2.2_1785948143647_0.7936900509857858","host":"s3://npm-registry-packages-npm-production"}},"0.3.0":{"name":"pnpm-policy","version":"0.3.0","keywords":["pnpm","security","supply-chain","minimumReleaseAge","allowBuilds","npm","maintainer","workspace","monorepo","policy"],"author":"Constructive <developers@constructive.io>","license":"MIT","_id":"pnpm-policy@0.3.0","maintainers":[{"name":"pyramation","email":"pyramation@gmail.com"}],"homepage":"https://github.com/constructive-io/dev-utils","bugs":{"url":"https://github.com/constructive-io/dev-utils/issues"},"bin":{"pnpm-policy":"cli.js"},"dist":{"shasum":"cde3aeb5d43a781b1c772db960c311c0f0094dc5","tarball":"https://registry.npmjs.org/pnpm-policy/-/pnpm-policy-0.3.0.tgz","fileCount":51,"integrity":"sha512-qe7Dwf4h9n7DMpMUOs3XpMUH+finbIZDfdS1qtthySht6kjvkg/5ThgGoFjahFN6A5zZ97mQbqSZyVBgPC6qVg==","signatures":[{"sig":"MEYCIQDYR4RiPWvMVeK7QZw9MHq4Dec/OYlSyfuUSgZ+UBp3ewIhAIRVE64bT9yLmfXID9udjtj1+6LvzatFIlsdTx74YeEd","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":141826},"main":"index.js","types":"index.d.ts","module":"esm/index.js","gitHead":"a40381a8025aff405d23c96574555aea990b4cc9","scripts":{"copy":"makage assets","lint":"eslint . --fix","test":"jest","build":"makage build","clean":"makage clean","test:watch":"jest --watch","prepublishOnly":"npm run build"},"_npmUser":{"name":"pyramation","email":"pyramation@gmail.com"},"repository":{"url":"https://github.com/constructive-io/dev-utils","type":"git"},"_npmVersion":"lerna/8.2.4/node@v22.13.1+arm64 (darwin)","description":"pnpm supply-chain policy for npm maintainers — derive minimumReleaseAge exemptions and build permissions from what you publish","directories":{},"_nodeVersion":"22.13.1","dependencies":{"yaml":"^2.8.4","yamlize":"0.12.1"},"publishConfig":{"access":"public","directory":"dist"},"_hasShrinkwrap":false,"devDependencies":{"makage":"0.1.10"},"_npmOperationalInternal":{"tmp":"tmp/pnpm-policy_0.3.0_1785985656924_0.3390258771938457","host":"s3://npm-registry-packages-npm-production"}},"0.4.0":{"name":"pnpm-policy","version":"0.4.0","keywords":["pnpm","security","supply-chain","minimumReleaseAge","allowBuilds","npm","maintainer","workspace","monorepo","policy"],"author":"Constructive <developers@constructive.io>","license":"MIT","_id":"pnpm-policy@0.4.0","maintainers":[{"name":"pyramation","email":"pyramation@gmail.com"}],"homepage":"https://github.com/constructive-io/dev-utils","bugs":{"url":"https://github.com/constructive-io/dev-utils/issues"},"bin":{"pnpm-policy":"cli.js"},"dist":{"shasum":"24274dad5a59898654a3cd16abc5a1ac1c44eee0","tarball":"https://registry.npmjs.org/pnpm-policy/-/pnpm-policy-0.4.0.tgz","fileCount":59,"integrity":"sha512-ZtywuzjErUZ7PZzuZJ0FMSJ5wFmKRZaZT7onF6GbYB2gUkgczCtLzqy6P6s8regOi1dAXgs7PyIVrkuMPRJtNw==","signatures":[{"sig":"MEUCID9lbZZj2a4/nHAGA6gLNnu3r27ftARvKDBbg+tp+tlTAiEAzz4PjHoUVenHqF4z4iRjeTDZpIENzung9C/Z3S7jb0o=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":185083},"main":"index.js","types":"index.d.ts","module":"esm/index.js","gitHead":"070bc417e718a3bc602aa79a7aa186c3ac64cd70","scripts":{"copy":"makage assets","lint":"eslint . --fix","test":"jest","build":"makage build","clean":"makage clean","test:watch":"jest --watch","prepublishOnly":"npm run build"},"_npmUser":{"name":"pyramation","email":"pyramation@gmail.com"},"repository":{"url":"https://github.com/constructive-io/dev-utils","type":"git"},"_npmVersion":"lerna/8.2.4/node@v22.13.1+arm64 (darwin)","description":"pnpm supply-chain policy for npm maintainers — derive minimumReleaseAge exemptions and build permissions from what you publish","directories":{},"_nodeVersion":"22.13.1","dependencies":{"yaml":"^2.8.4","yamlize":"0.12.1"},"publishConfig":{"access":"public","directory":"dist"},"_hasShrinkwrap":false,"devDependencies":{"makage":"0.1.10"},"_npmOperationalInternal":{"tmp":"tmp/pnpm-policy_0.4.0_1786009317227_0.20238947614434477","host":"s3://npm-registry-packages-npm-production"}},"0.5.0":{"name":"pnpm-policy","version":"0.5.0","keywords":["pnpm","security","supply-chain","minimumReleaseAge","allowBuilds","npm","maintainer","workspace","monorepo","policy"],"author":"Constructive <developers@constructive.io>","license":"MIT","_id":"pnpm-policy@0.5.0","maintainers":[{"name":"pyramation","email":"pyramation@gmail.com"}],"homepage":"https://github.com/constructive-io/dev-utils","bugs":{"url":"https://github.com/constructive-io/dev-utils/issues"},"bin":{"pnpm-policy":"cli.js"},"dist":{"shasum":"209d48933c7dbffbb79341c62b8d91038b9620c7","tarball":"https://registry.npmjs.org/pnpm-policy/-/pnpm-policy-0.5.0.tgz","fileCount":59,"integrity":"sha512-Klp+b1UrYrPFRr7hQFKYfJOrOJv+EtZMQRm5F49nzgHC1RBcJIYSoYg37E2/OcXka548Vu12BDduc4kCk7f1iw==","signatures":[{"sig":"MEQCIAkHAjVVGkcfmp9TIWGtIjg+dR/zI71mfxUb7ohby7tKAiAFV2RnPcXzOZu7MMcb7m5YcmN2RK6o42lRH+Xwk6xzjA==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":192686},"main":"index.js","types":"index.d.ts","module":"esm/index.js","gitHead":"55adb72f8a86e71e0fe035cfd6c2a0a96e61d02d","scripts":{"copy":"makage assets","lint":"eslint . --fix","test":"jest","build":"makage build","clean":"makage clean","test:watch":"jest --watch","prepublishOnly":"npm run build"},"_npmUser":{"name":"pyramation","email":"pyramation@gmail.com"},"repository":{"url":"https://github.com/constructive-io/dev-utils","type":"git"},"_npmVersion":"lerna/8.2.4/node@v24.19.0+arm64 (darwin)","description":"pnpm supply-chain policy for npm maintainers — derive minimumReleaseAge exemptions and build permissions from what you publish","directories":{},"_nodeVersion":"24.19.0","dependencies":{"yaml":"^2.8.4","yamlize":"0.12.1"},"publishConfig":{"access":"public","directory":"dist"},"_hasShrinkwrap":false,"devDependencies":{"makage":"0.1.10"},"_npmOperationalInternal":{"tmp":"tmp/pnpm-policy_0.5.0_1788488858138_0.8719470873109569","host":"s3://npm-registry-packages-npm-production"}},"0.6.0":{"name":"pnpm-policy","version":"0.6.0","keywords":["pnpm","security","supply-chain","minimumReleaseAge","allowBuilds","npm","maintainer","workspace","monorepo","policy"],"author":"Constructive <developers@constructive.io>","license":"MIT","_id":"pnpm-policy@0.6.0","maintainers":[{"name":"pyramation","email":"pyramation@gmail.com"}],"homepage":"https://github.com/constructive-io/dev-utils","bugs":{"url":"https://github.com/constructive-io/dev-utils/issues"},"bin":{"pnpm-policy":"cli.js"},"dist":{"shasum":"e74368383a0eddc00b168d79c2a149a59aa25604","tarball":"https://registry.npmjs.org/pnpm-policy/-/pnpm-policy-0.6.0.tgz","fileCount":59,"integrity":"sha512-ZXwJr9uyQeg/B+aI2dioxxxJtvFMQGy2RZ3KemBi3EPXUNp31TzhFtCsgx30BUih3Mq96zGE1DOc2qbb++61xQ==","signatures":[{"sig":"MEQCIF1koARw5m6NlYn4dbflGNKaWsdPNhkcwX16j24uZsMAAiALSciy7uE12bwRirKYG4Jfz0Ewwc1rpwPIAi8FoUeMQg==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"},{"sig":"MEQCIGsfAlB/vypAH4tswnIvhEvJHF5IVdRUf3aCYrIKPhO1AiA/pP8nilWKdW/7LKqfGyPT71dT1rFNVRD3dMI0jIC8IA==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":196341},"main":"index.js","types":"index.d.ts","module":"esm/index.js","gitHead":"4579385cc9cadd88a7c08b66da9724123a58ff24","scripts":{"copy":"makage assets","lint":"eslint . --fix","test":"jest","build":"makage build","clean":"makage clean","test:watch":"jest --watch","prepublishOnly":"npm run build"},"_npmUser":{"name":"pyramation","email":"pyramation@gmail.com"},"repository":{"url":"https://github.com/constructive-io/dev-utils","type":"git"},"_npmVersion":"lerna/8.2.4/node@v24.19.0+arm64 (darwin)","description":"pnpm supply-chain policy for npm maintainers — derive minimumReleaseAge exemptions and build permissions from what you publish","directories":{},"_nodeVersion":"24.19.0","dependencies":{"yaml":"^2.8.4","yamlize":"0.12.1"},"publishConfig":{"access":"public","directory":"dist"},"_hasShrinkwrap":false,"devDependencies":{"makage":"0.1.10"},"_npmOperationalInternal":{"tmp":"tmp/pnpm-policy_0.6.0_1789628976553_0.5844353449134634","host":"s3://npm-registry-packages-npm-production"}},"0.6.1":{"_id":"pnpm-policy@0.6.1","bin":{"pnpm-policy":"cli.js"},"bugs":{"url":"https://github.com/constructive-io/dev-utils/issues"},"dist":{"shasum":"521916f24314f7c5a1ca0c946b0a1bad69c5654b","tarball":"https://registry.npmjs.org/pnpm-policy/-/pnpm-policy-0.6.1.tgz","fileCount":59,"integrity":"sha512-yPQR9/MQp7HUnNHBBIRj6Ed5nDs+zYW0bTlvnMckfeBtNHj3wc3M4D19adpQnuQoZUpnHqzVr22j8G0b8g/Btg==","signatures":[{"sig":"MEUCIQDjX1Ah5iihBAkkH784WYwnXvNAAek4hPS/vbdbWxmcdQIgB9aQRTtYRc9FbvxkJJdpnfuv102sFqX2pbr4pydBd4I=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"},{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCID6rM6ImkjLI76xPihjb/DSwyOo0i5UDmDKBzD/AMX8QAiEA/N+1/q8iZ7onRPTFniLwpUw06hdcgkNAjyc2J4BQqsA="}],"unpackedSize":196244},"main":"index.js","name":"pnpm-policy","_from":"file:/tmp/packs-HjyxSq/pnpm-policy-0.6.1.tgz","types":"index.d.ts","author":{"name":"Constructive","email":"developers@constructive.io"},"module":"esm/index.js","license":"MIT","scripts":{"copy":"makage assets","lint":"eslint . --fix","test":"jest","build":"makage build","clean":"makage clean","test:watch":"jest --watch"},"version":"0.6.1","_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"0270d325-c671-4e3e-a82a-dfbdfd3a1605"}},"homepage":"https://github.com/constructive-io/dev-utils","keywords":["pnpm","security","supply-chain","minimumReleaseAge","allowBuilds","npm","maintainer","workspace","monorepo","policy"],"_resolved":"/tmp/packs-HjyxSq/pnpm-policy-0.6.1.tgz","_integrity":"sha512-yPQR9/MQp7HUnNHBBIRj6Ed5nDs+zYW0bTlvnMckfeBtNHj3wc3M4D19adpQnuQoZUpnHqzVr22j8G0b8g/Btg==","repository":{"url":"git+https://github.com/constructive-io/dev-utils.git","type":"git"},"_npmVersion":"11.21.3","description":"pnpm supply-chain policy for npm maintainers — derive minimumReleaseAge exemptions and build permissions from what you publish","directories":{},"maintainers":[{"name":"pyramation","email":"pyramation@gmail.com"}],"_nodeVersion":"24.22.3","dependencies":{"yaml":"^2.8.4","yamlize":"0.12.2"},"publishConfig":{"access":"public","directory":"dist"},"_hasShrinkwrap":false,"devDependencies":{"makage":"0.1.10"},"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/pnpm-policy_0.6.1_1795409879049_0.11017766408158203"}}},"time":{"created":"2026-08-05T03:41:57.128Z","modified":"2026-11-23T04:57:59.328Z","0.2.0":"2026-08-05T03:41:57.500Z","0.2.1":"2026-08-05T07:15:14.217Z","0.2.2":"2026-08-05T16:42:23.799Z","0.3.0":"2026-08-06T03:07:37.067Z","0.4.0":"2026-08-06T09:41:57.366Z","0.5.0":"2026-09-04T02:27:38.309Z","0.6.0":"2026-09-17T07:09:36.654Z","0.6.1":"2026-11-23T04:57:59.160Z"},"bugs":{"url":"https://github.com/constructive-io/dev-utils/issues"},"author":{"name":"Constructive","email":"developers@constructive.io"},"license":"MIT","homepage":"https://github.com/constructive-io/dev-utils","keywords":["pnpm","security","supply-chain","minimumReleaseAge","allowBuilds","npm","maintainer","workspace","monorepo","policy"],"repository":{"url":"git+https://github.com/constructive-io/dev-utils.git","type":"git"},"description":"pnpm supply-chain policy for npm maintainers — derive minimumReleaseAge exemptions and build permissions from what you publish","maintainers":[{"name":"pyramation","email":"pyramation@gmail.com"}],"readme":"# pnpm-policy\n\n<p align=\"center\" width=\"100%\">\n    <img height=\"250\" src=\"https://raw.githubusercontent.com/constructive-io/constructive/refs/heads/main/assets/outline-logo.svg\" />\n</p>\n\n<p align=\"center\" width=\"100%\">\n  <a href=\"https://github.com/constructive-io/dev-utils/actions/workflows/ci.yml\">\n    <img height=\"20\" src=\"https://github.com/constructive-io/dev-utils/actions/workflows/ci.yml/badge.svg\" />\n  </a>\n  <a href=\"https://github.com/constructive-io/dev-utils/blob/main/LICENSE\">\n    <img height=\"20\" src=\"https://img.shields.io/badge/license-MIT-blue.svg\"/>\n  </a>\n  <a href=\"https://www.npmjs.com/package/pnpm-policy\"><img height=\"20\" src=\"https://img.shields.io/github/package-json/v/constructive-io/dev-utils?filename=packages%2Fpnpm-policy%2Fpackage.json\"></a>\n</p>\n\n**pnpm supply-chain policies for npm maintainers** — especially those running many pnpm workspaces and publishing many npm modules.\n\n## The maintainer's problem\n\n`minimumReleaseAge` is the single most effective supply-chain control pnpm ships: a package must have existed for N days before it can be installed, and most compromised releases are caught and yanked well inside that window. It is also the one control a package maintainer cannot turn on.\n\nYou publish `@acme/parser` at 2pm and consume it in three workspaces at 2:05pm. Even a two-day quarantine means your own release is unusable until Thursday, in every repo you own. So the cooldown gets set to `0`, and the protection that would have stopped a compromised transitive dependency is gone — not because you decided the risk was acceptable, but because the tool could not tell your packages from everyone else's.\n\n`pnpm-policy` makes that distinction. It asks npm what your maintainer accounts publish, and writes the answer into `pnpm-workspace.yaml` as an exemption list:\n\n```yaml\nminimumReleaseAge: 2880           # 2 days, for everything third-party\nminimumReleaseAgeExclude:\n  - \"@acme/*\"                     # a scope you own\n  - my-unscoped-package           # a package you publish\n```\n\nYour releases install immediately. Everything else waits.\n\nAt Constructive that is over 1100 published packages, fetched in 5 requests and under two seconds, compressing to 5 scope globs plus 85 individual names for a workspace with ~1800 resolved dependencies.\n\n## Installation\n\n```bash\nnpm install --save-dev pnpm-policy\n```\n\n## Quick start\n\n```bash\nnpx pnpm-policy init            # write a starter pnpm-policy.yaml\n# edit it: add your npm accounts under `maintainers`\nnpx pnpm-policy inventory       # ask npm what you publish → pnpm-policy.inventory.json\nnpx pnpm-policy generate        # patch the policy into pnpm-workspace.yaml\nnpx pnpm-policy check           # CI: fail if the file drifted or a waiver expired\n```\n\nCommit `pnpm-policy.yaml`, `pnpm-policy.inventory.json`, and the generated `pnpm-workspace.yaml`. Add `pnpm-policy check` to CI.\n\n## Configuration\n\n`pnpm-policy.yaml` (or `.yml`, or `.json`) at the workspace root:\n\n```yaml\n# How old a third-party release must be before it may be installed.\n# Accepts 14d / 2w / 36h / 90m, or a bare number of minutes (what pnpm stores).\nminimumReleaseAge: 2d\n\n# Transitive dependencies must resolve from the registry, not from git or a URL.\nblockExoticSubdeps: true\n\n# The npm accounts YOU publish under.\nmaintainers:\n  - your-npm-username\n  - your-ci-account\n\n# Scopes you own outright — emitted as `@scope/*`.\nscopes:\n  - \"@acme\"\n\n# First-party package names to exempt directly, without a registry query or\n# pinned inventory. Names and pnpm globs are allowed.\npackages:\n  - pgpm\n  - makage\n  - \"graphile-*\"\n\n# Written by `pnpm-policy inventory`. Commit it; review its diffs.\n# May also name an installed package that ships one, or a list of either.\ninventory: ./pnpm-policy.inventory.json\n\n# Dependencies allowed to run install scripts. The value is the reason.\nallowBuilds:\n  esbuild: native binary, downloaded at install time\n  sharp: libvips bindings\n  \"@swc/core\": native binary\n\n# Third-party escape hatches — see below.\nexceptions:\n  - package: some-lib\n    versions: ['4.17.21']\n    reason: CVE-2026-1234 fix, published hours ago\n    until: 2026-10-01\n\n# Anything else you want in the managed block, passed through verbatim.\nsettings:\n  strictDepBuilds: true\n```\n\n| Key | Type | Default | Meaning |\n| --- | --- | --- | --- |\n| `minimumReleaseAge` | duration | `2d` | Quarantine applied to everything not exempted. |\n| `blockExoticSubdeps` | boolean | `false` | Refuse transitive deps from git/URL sources. |\n| `maintainers` | string[] | `[]` | **Your own** npm accounts. See the warning below. |\n| `scopes` | string[] | `[]` | Scopes you own, emitted as globs. |\n| `packages` | string[] | `[]` | First-party names or pnpm globs to exempt directly. |\n| `inventory` | path, package, or list | – | Where the inventory comes from. A list is merged. |\n| `intersect` | boolean | `true` | Only emit names this workspace actually resolves. |\n| `allowBuilds` | map or list | `{}` | Dependencies permitted to run install scripts. |\n| `denyBuilds` | map or list | `{}` | Dependencies whose install scripts were reviewed and are not needed. |\n| `exceptions` | list | `[]` | Third-party bypasses, each with a reason. |\n| `settings` | map | `{}` | Extra pnpm settings to include in the managed block. |\n\n### `inventory` can name more than one source\n\n`inventory` takes a path, an installed package that ships one, or a list of either. A list is merged into a single inventory before the policy is resolved.\n\n```yaml\ninventory:\n  - \"@acme/pnpm-policy\"          # your accounts, published and pinned\n  - \"@acme/pnpm-policy-upstream\" # an upstream you have chosen to trust\n```\n\nThis exists so inventories that are deliberately kept apart can stay apart. Trusting an upstream account is a decision one workspace may have made and others have not, and folding that account into the inventory everyone installs would extend the exemption to every workspace by default. Keeping them as separate published packages lets each workspace opt in by listing what it actually trusts — instead of checking a flattened copy of both into the repo, where it goes stale and has to be reviewed by hand.\n\nMerging is a union: an inventory only ever says what is *exempt*, so combining two can widen the set and never narrow it. `generatedAt` reports the **oldest** of the inputs, because the merged view is only as fresh as its stalest source.\n\n`pnpm-policy inventory` writes one file. With several configured there is no single default to overwrite, so it asks for `--out`.\n\n### `maintainers` is your own identity, not a trust list\n\nEvery package published by a listed account bypasses the release-age quarantine. That is the point — waiting on your own release protects nothing — but it means the entry is a delegation of trust as wide as the account itself.\n\n**List only accounts you control.** Adding a colleague's or a vendor's account exempts everything they will ever publish, including a release made by whoever compromises their credentials. If you want to trust a specific third-party package, that is what `exceptions` is for.\n\nThe same reasoning applies to a shared publishing account: if five people can publish under it, the exemption covers all five.\n\n### `exceptions`: the urgent-fix escape hatch\n\nA security fix published an hour ago is exactly the case where a 14-day cooldown is wrong. `exceptions` lets you take one package out of quarantine without lowering it for everything:\n\n```yaml\nexceptions:\n  - package: some-lib\n    versions: ['4.17.21']         # optional: exempt only these versions\n    reason: CVE-2026-1234, no backport available\n    until: 2026-10-01             # optional: waiver expires\n```\n\n- `reason` is **required**. A bypass whose justification is not written down cannot be reviewed later.\n- `versions` pins the waiver to exact versions (pnpm matches `name@1.0.0||1.0.1`), so a *later* release of the same package still waits. A name pattern like `@acme/*` cannot be version-pinned, and `pnpm-policy` rejects the combination rather than emitting something pnpm will not match.\n- `until` makes the waiver expire: after that date `pnpm-policy check` fails, so the exception has to be renewed or removed instead of quietly becoming permanent.\n\nThe reason travels into the generated file, beside the line it explains:\n\n```yaml\nminimumReleaseAgeExclude:\n  - \"@acme/*\"\n  - some-lib@4.17.21 # CVE-2026-1234, no backport available (expires 2026-10-01)\n```\n\n### `allowBuilds`\n\nInstall scripts are arbitrary code execution at install time, so pnpm blocks them by default and needs an explicit list. Give each entry a reason:\n\n```yaml\nallowBuilds:\n  esbuild: native binary, downloaded at install time\n  core-js: polyfill postinstall\n```\n\nThat becomes pnpm's `allowBuilds` map (pnpm ≥ 10.16), with the reasons as inline comments. For older pnpm, `--builds-key onlyBuiltDependencies` emits the array form instead.\n\nUnlike the release-age exemptions, this list is **not** derived from anything: a package that runs install scripts is a deliberate trust decision, whoever published it.\n\n### `denyBuilds`\n\npnpm treats a dependency with an install script that appears in neither list as an open question: it warns, and pnpm 11 fails the install with `ERR_PNPM_IGNORED_BUILDS` until someone runs the interactive `pnpm approve-builds`. Most such scripts are fallbacks — `nx`, `@parcel/watcher` and `unrs-resolver` all ship prebuilt binaries as optional dependencies and only compile when none fits. Close the question in the policy, with the reason, instead of in a prompt:\n\n```yaml\ndenyBuilds:\n  nx: prebuilt binary ships as an optional dep\n  \"@parcel/watcher\": prebuilt binary ships as an optional dep\n```\n\nThese become `false` entries in the same `allowBuilds` map (or, with `--builds-key onlyBuiltDependencies`, an `ignoredBuiltDependencies` array). A name in both lists is an error. Do not run `pnpm approve-builds` in a workspace managed by pnpm-policy: it writes an `allowBuilds` entry that the next `generate` overwrites and that `check` reports as drift.\n\n## Understanding what you depend on\n\nDeciding what to exempt means deciding which *projects* you trust, but npm only offers accounts — and an account is as wide as everything its owner will ever publish. The person maintaining a library you want may also co-maintain something enormous you did not mean to exempt.\n\n`origins` answers the question npm does not: group the packages a workspace resolves by the repository they publish from.\n\n```bash\npnpm-policy origins                      # every resolved package, grouped by repo owner\npnpm-policy origins --from postgraphile  # only the subtree that one dependency dragged in\npnpm-policy origins --owner acme         # just that owner's packages\npnpm-policy origins --owner acme --out acme.inventory.json   # written as an inventory\n```\n\n```\n$ pnpm-policy origins --from postgraphile\nradix-ui  (29)\n<no repository metadata>  (20)\ngraphile  (15)\ngraphql  (8)\n```\n\n`--from` reads the lockfile's dependency graph and walks it, so you see what a single decision actually pulled in rather than surveying everything at once. Transitive dependencies are included, because those are the ones an exemption list forgets.\n\n`--owner ... --out ...` writes the result as an inventory, ready to pass to `inventory:`. It emits **names only** — no `maintainers`, no scope globs — because the point is a reviewed list, and a glob would re-widen it to whatever gets published into that scope next.\n\nThe repository field is self-reported, so this is a proxy for provenance, not proof of it. It answers \"which project is this package from\", not \"is this package safe\".\n\n## The inventory\n\n`pnpm-policy inventory` queries `registry.npmjs.org` for `maintainer:<account>`, paginates, and writes:\n\n```json\n{\n  \"generatedAt\": \"2026-01-01T00:00:00.000Z\",\n  \"maintainers\": [\"your-npm-username\"],\n  \"scopes\": [\"@acme\"],\n  \"packages\": [\"my-unscoped-package\", \"another-one\"]\n}\n```\n\nTwo rules govern how it compresses:\n\n**Scope globs are opt-in.** `@acme/*` also exempts a package published into `@acme` by somebody else — so a scope is only globbed when you claim it in `scopes:`. npm has no \"list a scope\" API, and its search index is incomplete enough to report zero packages for a scope that plainly has some, so the registry cannot prove exclusivity for you. `--verify-scopes` will consult the index anyway and glob scopes it finds no foreign packages in; finding one *is* proof a scope is shared, but finding none is not proof that it is yours.\n\n**Unscoped names are listed individually**, which is exact: they come from your own maintainer query.\n\n**Intersection.** By default only names this workspace actually resolves (read from `pnpm-lock.yaml`) are written out — over 1100 published packages becomes the ~85 that appear in this repo. Scope globs are never intersected: nobody else can publish into a scope you own, so the glob stays correct when a new package lands there tomorrow. Pass `--no-intersect` to emit everything. Names listed under `packages:` are explicit claims and are never intersected away. A config with no `inventory:` has no inventory names to narrow, so it needs no lockfile at all — which is what lets a freshly scaffolded workspace generate its policy before its first install.\n\nCommit the inventory and review its diffs. It is an exemption list, so a name appearing in it is a name that stops being quarantined — worth one human glance, which is also why refreshing it should open a pull request rather than run silently in an install hook.\n\n### Sharing an inventory across repos\n\nIf you run many workspaces, publish the config and inventory as a small data-only package and point `inventory:` at it:\n\n```yaml\ninventory: \"@acme/pnpm-policy/inventory.json\"\n```\n\nPin it exactly (a pnpm `configDependency` gives you version + integrity), so the exemption list cannot change under a repo without a visible bump.\n\n## Generated output\n\n`generate` **patches** `pnpm-workspace.yaml` rather than rewriting it: your `packages:`, `catalog:`, and hand-written comments survive untouched, and only the policy keys are managed. Output is deterministic, so a second run produces no diff.\n\n```yaml\npackages:\n  - packages/*\n\n# Managed by pnpm-policy — run `pnpm-policy generate` after editing pnpm-policy.yaml.\n\n# A third-party release must be 2d old before it can be installed.\n# Most malicious releases are found and yanked well inside that window.\nminimumReleaseAge: 2880\n# Exempt from the wait: 1 scope glob(s), 2 first-party package(s).\n# First-party membership comes from what your-npm-username publishes on npm — waiting on your own release protects nothing.\nminimumReleaseAgeExclude:\n  - \"@acme/*\"\n  - my-unscoped-package\n# The only dependencies permitted to run install scripts.\nallowBuilds:\n  esbuild: true # native binary, downloaded at install time\n```\n\nManaged keys are `minimumReleaseAge`, `minimumReleaseAgeExclude`, the builds key, and `blockExoticSubdeps`, plus anything under `settings`. A managed key the policy no longer sets is removed, so dropping `blockExoticSubdeps` from the config stops enforcing it rather than leaving a stale rule behind.\n\n## Drift checking in CI\n\n```yaml\n- run: npx pnpm-policy check\n```\n\n`check` fails when the workspace file no longer matches what the config would generate — someone hand-edited `minimumReleaseAge: 0`, or the inventory was refreshed without regenerating — and when a waiver's `until` date has passed. The error says which, and how to fix it.\n\n## CLI\n\n```\npnpm-policy <command> [options]\n\nCommands:\n  init                Write a starter pnpm-policy.yaml\n  inventory           Query npm for what your maintainers publish, and write the export\n  generate            Patch the policy into pnpm-workspace.yaml\n  check               Fail if the workspace file drifted or a waiver expired\n\nOptions:\n  --cwd <dir>         Workspace root (default: current directory)\n  --config <path>     Config file, or a directory holding one\n  --out <path>        inventory: where to write the export\n  --builds-key <key>  allowBuilds (default) or onlyBuiltDependencies, for pnpm < 10.16\n  --no-intersect      Emit every first-party name, not just the ones this workspace resolves\n  --verify-scopes     inventory: also glob a scope the registry shows nobody else publishing into\n  --registry <url>    inventory: registry to query (default: https://registry.npmjs.org)\n  --throttle <ms>     inventory: pause between registry requests (default: 1000)\n  --json              Print machine-readable output\n  -q, --quiet         Only print errors\n```\n\n## Library\n\nThe CLI is a thin wrapper; everything is available programmatically.\n\n```ts\nimport { buildInventory, check, generate, loadConfig, resolvePolicy } from 'pnpm-policy';\n\nconst { report, changed } = generate({ cwd: process.cwd() });\nconsole.log(`${report.scopes.length} scopes, ${report.firstPartyPackages.length} packages exempt`);\n\nconst result = check({ cwd: process.cwd() });\nif (!result.ok) process.exit(1);\n```\n\n| Export | Purpose |\n| --- | --- |\n| `loadConfig(pathOrDir)` | Find, read, and validate a policy config. |\n| `buildInventory(maintainers, options)` | Query npm and compress the result. |\n| `readInventory` / `writeInventory` | Inventory JSON I/O. |\n| `resolvePolicy({ config, inventory, resolved })` | Config + inventory → pnpm settings, with rationale. |\n| `applyPolicy(source, policy)` | Patch a policy into a `pnpm-workspace.yaml` string. |\n| `writeWorkspacePolicy` / `workspaceDrift` | Write, or diff without writing. |\n| `generate` / `check` | The two CLI commands, end to end. |\n| `readLockfilePackages(path)` | Every package name a lockfile resolves. |\n| `packagesByMaintainer(name, options)` | Paginated, throttled maintainer search. |\n| `parseDuration` / `formatDuration` | `14d` ⇄ `20160`. |\n\nRegistry calls throttle (1s between requests by default) and retry on 429 and 5xx, honouring `Retry-After` — npm's search endpoint rate-limits bursts. Pass `fetchImpl` to supply your own client.\n\n## What this does not do\n\n- It does not verify package *contents* — no signature checking, no provenance attestation. It decides who waits, not who is trustworthy.\n- It cannot prove you own a scope. See the inventory section.\n- It does not make `allowBuilds` decisions for you.\n- Exempting your own packages means a compromise of *your* npm account is not slowed down by the quarantine. Protect the account: 2FA, granular tokens, trusted publishing.\n\n## Related\n\n- [pnpm `minimumReleaseAge`](https://pnpm.io/settings#minimumreleaseage)\n- [pnpm `allowBuilds`](https://pnpm.io/settings#allowbuilds)\n- [`yamlize`](https://github.com/constructive-io/dev-utils/tree/main/packages/yamlize) — the comment-preserving YAML layer this uses\n\n---\n\n## Development\n\n### Setup\n\n1. Clone the repository:\n\n```bash\ngit clone https://github.com/constructive-io/dev-utils.git\n```\n\n2. Install dependencies:\n\n```bash\ncd dev-utils\npnpm install\npnpm build\n```\n\n3. Test the package of interest:\n\n```bash\ncd packages/<packagename>\npnpm test:watch\n```\n\n## Credits\n\n**🛠 Built by the [Constructive](https://constructive.io) team — creators of modular Postgres tooling for secure, composable backends. If you like our work, contribute on [GitHub](https://github.com/constructive-io).**\n\n## Disclaimer\n\nAS DESCRIBED IN THE LICENSES, THE SOFTWARE IS PROVIDED \"AS IS\", AT YOUR OWN RISK, AND WITHOUT WARRANTIES OF ANY KIND.\n\nNo developer or entity involved in creating this software will be liable for any claims or damages whatsoever associated with your use, inability to use, or your interaction with other users of the code, including any direct, indirect, incidental, special, exemplary, punitive or consequential damages, or loss of profits, cryptocurrencies, tokens, or anything else of value.\n","readmeFilename":"README.md"}