Skip to content

Add a workflow that rolls Node.js security releases out to every JS repo - #130

Closed
NicolasBonet wants to merge 3 commits into
mainfrom
nicolasbonet-bump-node-workflow
Closed

NicolasBonet wants to merge 3 commits into
mainfrom
nicolasbonet-bump-node-workflow

Conversation

@NicolasBonet

@NicolasBonet NicolasBonet commented Nov 5, 2026 •

Copy link
Copy Markdown
Contributor

Details

Rolling out a Node.js security release takes a pull request in about 30 repos, and we only notice a release when someone brings it up. Most of those repos are moving to float on their major line (linked PRs below), so CI and builds pick up patch releases on their own, but App and Mobile-Expensify keep exact pins, and sometimes we need every repo to require a fixed release.

The new bumpNode.yml workflow checks every hour for a recent Node.js security release on a line the repos in config/nodeBump.json use, and opens a tracking issue in Expensify/Expensify for it. Running it by hand with that issue's URL and VERSION=26.13.1,24.22.3 rolls the releases out everywhere in one run: repos that pin an exact version move to them, and repos that float require them as their minimum. Commits are signed by GitHub and credit whoever ran the workflow as a co-author, so each pull request needs one independent approval. The README covers the inputs and details.

Related Issues

For https://github.com/Expensify/Expensify/issues/696498

Manual Tests

Added unit tests for the release logic, the file bumping (exact pins, minimums, package-lock.json, checkRuntimeVersions.sh, .nvmrc formats, the reformatting guard), the config validation, and the issue and pull request text.

Ran on my machine:

  1. npx tsx --test on the new test files: 48 passed.
  2. npx eslint scripts tests and npx oxfmt --check: no new problems. tests/claudeReviewToolkit.test.ts fails locally on main too, because my node_modules lacks yaml.
  3. scripts/actionlint.sh, scripts/validateImmutableActionRefs.sh, and the workflow JSON schema check: all passed.
  4. GH_TOKEN=$(gh auth token) npx tsx scripts/openNodeBumpPullRequests.ts --issue-url https://github.com/Expensify/Expensify/issues/696498 --version 26.13.0,24.22.2 --dry-run against all 29 repos in the config: every sparse clone worked, and each repo showed the expected diff (for example App 26.12.1 → 26.13.0 in .nvmrc, package.json and package-lock.json, and Web-Expensify 26.12.1 → 26.13.0 in .nvmrc and checkRuntimeVersions.sh).
  5. npm run bump-node -- --repo-dir <clone> on the float branches of Web-Secure and GitHub-Actions: with --version 26.13.0,24.22.2 it only raises minimumNodeVersion in Web-Secure and engines.node in GitHub-Actions. A dry run of the workflow script with the same --version on App, Web-Secure and expensify-common moved each to the release on its line.

Not tested yet: a real run that creates branches, commits and pull requests with the OSBotify app token. After merging, I'll start with a dry run from the Actions tab, then a real run limited to one repo with REPOS.

Linked PRs

https://github.com/Expensify/Salt/pull/17539 makes the build boxes install the version in .nvmrc with nvm. Once it is deployed, holdForBuildBoxes can be removed from the config.

Repos moving to float on their major line, which this workflow treats as "raise minimums only when asked":

Opens a tracking issue when Node.js publishes a security release on a line our repos use, and opens the pull requests that bump repos pinning an exact release, or raise the minimums of repos that float on their major line.
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 5, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-05T16:57:28.052911Z af73559 PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: af73559f5d

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

},
npm: (version) => version,
});
return minimums.sort(NodeReleaseUtils.compareVersions).at(-1) ?? null;

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Check all minimums before declaring a floating repo up to date

When a floating repo has different minimums across its version files, choosing the highest minimum can skip files that still need the security bump. For example, with .nvmrc set to 26, checkRuntimeVersions.sh requiring 26.13.1, and a workspace's package.json requiring >=26.12.1, running with RAISE_MINIMUMS reports “Already requires Node.js 26.13.1 or newer” and leaves the workspace's older requirement unchanged. This is reproducible with the supplied release fixtures. Determine whether any applicable minimum is below the target before skipping, so an already-updated file does not prevent the remaining minimums from being raised.

Useful? React with 👍 / 👎.

@NicolasBonet
NicolasBonet marked this pull request as draft November 5, 2026 16:59
…se per line

One run with VERSION=26.13.1,24.22.3 now rolls a security release out to every repo: exact pins move to it and repos that float require it as their minimum. Drops the RAISE_MINIMUMS input.
Without VERSION the workflow only moved exact pins to the newest release, which made two behaviours to explain. Forcing an upgrade is now always a deliberate choice of release.
@NicolasBonet

Copy link
Copy Markdown
Contributor Author

Closing for now: we haven't decided how to handle Node.js updates yet. See https://github.com/Expensify/Expensify/issues/696498

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant