fix: add min-release-age to distributed package directories#13476
fix: add min-release-age to distributed package directories#13476
Conversation
npm only reads the project .npmrc from the nearest directory containing a package.json. The root .npmrc with min-release-age=3 was silently ignored when running npm install in packages/framework-dist/ and packages/sf-core-installer/, allowing transitive dependencies published less than 3 days ago to be resolved during shrinkwrap generation. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
✅ Snyk checks have passed. No issues have been found so far.
💻 Catch issues earlier using the plugins for VS Code, JetBrains IDEs, Visual Studio, and Eclipse. |
📝 WalkthroughWalkthroughAdded Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes Possibly related PRs
Suggested reviewers
Poem
🚥 Pre-merge checks | ✅ 3✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In `@packages/sf-core-installer/.npmrc`:
- Line 1: The .npmrc uses min-release-age=3 which requires npm >= 11.10.0;
update the project metadata and CI to reflect that requirement by adding or
updating the engines field in package.json (and any documentation/README) to
"npm": ">=11.10.0", and ensure CI/tooling (workflow matrix, lockfile checks,
bootstrap scripts) install/enforce npm 11.10.0+; alternatively, remove or
comment the min-release-age setting if you must remain compatible with older npm
versions—look for references to min-release-age and package.json engines to
apply the change.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: defaults
Review profile: CHILL
Plan: Pro
Run ID: bdd825e9-81a1-487d-a950-7da577e8b96e
📒 Files selected for processing (2)
packages/framework-dist/.npmrcpackages/sf-core-installer/.npmrc
GitHub Actions runners cache different Node.js patch versions depending on the runner image. With node-version: 24.x, some runners resolved to 24.14.0 (npm 11.9.0) while others got 24.14.1 (npm 11.11.0). npm 11.9.0 does not support min-release-age and warns "Unknown project config". Setting check-latest: true forces setup-node to always download the latest 24.x release instead of relying on the runner cache. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
|
@cursor review |
Summary
min-release-age=3topackages/framework-dist/.npmrcandpackages/sf-core-installer/.npmrc— the root.npmrcwas silently ignored because npm reads project config from the nearestpackage.jsondirectorycheck-latest: trueto allsetup-nodesteps across CI and release workflows — some runners had npm 11.9.0 (nomin-release-agesupport) while others had 11.11.0, depending on cached Node.js versionsTest plan
npm config listfrom both package directories now showsbeforedatenpm installwith the.npmrcresolves older transitive dep versions (respects 3-day cooldown).npmrcis excluded fromnpm packandnpm publishtarballsUnknown project configwarnings🤖 Generated with Claude Code
Summary by CodeRabbit
Note
Low Risk
Low risk: workflow config and per-package npm config changes only; main impact is potentially different dependency resolution/CI behavior due to newer npm and a 3-day release cooldown.
Overview
Ensures CI/release jobs consistently use the latest available
24.xNode.js by addingcheck-latest: trueto allactions/setup-nodesteps, reducing variance from cached runner toolchains.Adds per-directory
.npmrcfiles topackages/framework-distandpackages/sf-core-installersettingmin-release-age=3, so installs from those package roots enforce a 3-day cooldown on newly published dependencies.Written by Cursor Bugbot for commit 086285b. This will update automatically on new commits. Configure here.