Skip to content

fix: add min-release-age to distributed package directories#13476

Merged
czubocha merged 2 commits intomainfrom
fix/npmrc-min-release-age-subdirs
Apr 7, 2026
Merged

fix: add min-release-age to distributed package directories#13476
czubocha merged 2 commits intomainfrom
fix/npmrc-min-release-age-subdirs

Conversation

@czubocha
Copy link
Copy Markdown
Contributor

@czubocha czubocha commented Apr 2, 2026

Summary

  • Add min-release-age=3 to packages/framework-dist/.npmrc and packages/sf-core-installer/.npmrc — the root .npmrc was silently ignored because npm reads project config from the nearest package.json directory
  • Add check-latest: true to all setup-node steps across CI and release workflows — some runners had npm 11.9.0 (no min-release-age support) while others had 11.11.0, depending on cached Node.js versions

Test plan

  • Verified npm config list from both package directories now shows before date
  • Verified npm install with the .npmrc resolves older transitive dep versions (respects 3-day cooldown)
  • Verified .npmrc is excluded from npm pack and npm publish tarballs
  • Confirmed CI logs show npm 11.9.0 on release runners with Unknown project config warnings

🤖 Generated with Claude Code

Summary by CodeRabbit

  • Chores
    • Added a minimum release-age constraint to distribution package configurations.
    • Updated CI workflows to ensure Node setup checks for the latest available runtime when preparing jobs.

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.x Node.js by adding check-latest: true to all actions/setup-node steps, reducing variance from cached runner toolchains.

Adds per-directory .npmrc files to packages/framework-dist and packages/sf-core-installer setting min-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.

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>
@Mmarzex
Copy link
Copy Markdown
Contributor

Mmarzex commented Apr 2, 2026

Snyk checks have passed. No issues have been found so far.

Status Scan Engine Critical High Medium Low Total (0)
Open Source Security 0 0 0 0 0 issues
Licenses 0 0 0 0 0 issues
Code Security 0 0 0 0 0 issues

💻 Catch issues earlier using the plugins for VS Code, JetBrains IDEs, Visual Studio, and Eclipse.

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai bot commented Apr 2, 2026

📝 Walkthrough

Walkthrough

Added min-release-age=3 to two package-level .npmrc files and enabled check-latest: true for actions/setup-node across several CI and release GitHub workflow files.

Changes

Cohort / File(s) Summary
NPM configuration
packages/framework-dist/.npmrc, packages/sf-core-installer/.npmrc
Added min-release-age=3 to both package .npmrc files.
CI & release workflows
.github/workflows/ci-engine.yml, .github/workflows/ci-framework.yml, .github/workflows/ci-python.yml, .github/workflows/release-framework.yml
Updated actions/setup-node steps to include check-latest: true alongside node-version: 24.x (no other workflow logic changes).

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Possibly related PRs

Suggested reviewers

  • Mmarzex

Poem

🐰 I hopped through configs, tidy and spry,
I added a three-day rule under npm sky.
CI checks now ask "is this the latest?" too,
Stable releases hop forward—steady and true.
Celebrate with a carrot and a package or two! 🥕📦

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly and specifically describes the main change: adding min-release-age configuration to .npmrc files in distributed package directories.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/npmrc-min-release-age-subdirs

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

📥 Commits

Reviewing files that changed from the base of the PR and between d21bb09 and 83f3df2.

📒 Files selected for processing (2)
  • packages/framework-dist/.npmrc
  • packages/sf-core-installer/.npmrc

Comment thread packages/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>
@czubocha
Copy link
Copy Markdown
Contributor Author

czubocha commented Apr 2, 2026

@cursor review

Copy link
Copy Markdown

@cursor cursor bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ Bugbot reviewed your changes and found no new issues!

Comment @cursor review or bugbot run to trigger another review on this PR

@czubocha czubocha merged commit 9884713 into main Apr 7, 2026
15 of 18 checks passed
@czubocha czubocha deleted the fix/npmrc-min-release-age-subdirs branch April 7, 2026 10:04
@github-actions github-actions bot locked and limited conversation to collaborators Apr 7, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants