Repository navigation
chore: require 7-day package release age - #2127
Conversation
Prompt To Fix All With AIFix the following 1 code review issue. Work through them one at a time, proposing concise fixes.
---
### Issue 1 of 1
.npmrc:3
**`minimumReleaseAgeExclude` not honoured by npm**
`pnpm-workspace.yaml` defines a `minimumReleaseAgeExclude` list (e.g. `@posthog/quill`, `@anthropic-ai/claude-agent-sdk`, `@agentclientprotocol/sdk`, `@posthog/quill-tokens`) so those packages can bypass the age gate. npm's implementation of `minimumReleaseAge` (added in CLI v11) does not yet support an exclusion list, so any developer running `npm install` directly will hit the 7-day block for those packages even though they are intentionally excluded under pnpm. This could break CI jobs or local installs that invoke npm instead of pnpm.
Reviews (1): Last reviewed commit: "chore: require 7-day package release age" | Re-trigger Greptile |
Prompt To Fix All With AIFix the following 1 code review issue. Work through them one at a time, proposing concise fixes.
---
### Issue 1 of 1
pnpm-workspace.yaml:9
**npm guardrail missing from `.npmrc`**
The PR description states "add a matching npm minimum release age guardrail," but `.npmrc` only contains `node-linker=hoisted` and `shamefully-hoist=true` — no `minimumReleaseAge` entry was added. Any install performed with plain `npm` (e.g. some CI steps or contributors not using pnpm) will not be subject to the 7-day age gate, leaving the guardrail incomplete for those paths.
Reviews (2): Last reviewed commit: "fix: remove npm release age override" | Re-trigger Greptile |
| - protobufjs | ||
|
|
||
| minimumReleaseAge: 1440 | ||
| minimumReleaseAge: 10080 |
There was a problem hiding this comment.
npm guardrail missing from
.npmrc
The PR description states "add a matching npm minimum release age guardrail," but .npmrc only contains node-linker=hoisted and shamefully-hoist=true — no minimumReleaseAge entry was added. Any install performed with plain npm (e.g. some CI steps or contributors not using pnpm) will not be subject to the 7-day age gate, leaving the guardrail incomplete for those paths.
Prompt To Fix With AI
This is a comment left during a code review.
Path: pnpm-workspace.yaml
Line: 9
Comment:
**npm guardrail missing from `.npmrc`**
The PR description states "add a matching npm minimum release age guardrail," but `.npmrc` only contains `node-linker=hoisted` and `shamefully-hoist=true` — no `minimumReleaseAge` entry was added. Any install performed with plain `npm` (e.g. some CI steps or contributors not using pnpm) will not be subject to the 7-day age gate, leaving the guardrail incomplete for those paths.
How can I resolve this? If you propose a fix, please make it concise.There was a problem hiding this comment.
Added a preinstall guard in package.json that fails plain npm install and requires pnpm install instead. That closes the npm bypass path without reintroducing an npm minimumReleaseAge setting that cannot honor minimumReleaseAgeExclude.
Prompt To Fix All With AIFix the following 1 code review issue. Work through them one at a time, proposing concise fixes.
---
### Issue 1 of 1
scripts/enforce-pnpm.mjs:1-14
**`--ignore-scripts` bypasses this guard**
`npm install --ignore-scripts` (or `npm ci --ignore-scripts`) skips all lifecycle hooks, including `preinstall`, so the check never runs and a plain npm install silently proceeds without the 7-day age gate. Since the goal is to close the npm bypass path entirely, CI configs or contributors that habitually pass `--ignore-scripts` will still circumvent the policy.
Reviews (3): Last reviewed commit: "fix: require pnpm installs" | Re-trigger Greptile |
|
Re: the |
Summary
pnpm installso npm cannot bypass the workspace age policy or its exclusionsTesting