Repository navigation
Support upgrades for each stable Node major 🌠 - #159
Merged
Merged
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #159 +/- ##
===========================================
+ Coverage 77.46% 94.38% +16.92%
===========================================
Files 20 22 +2
Lines 630 784 +154
===========================================
+ Hits 488 740 +252
+ Misses 142 44 -98 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
Use the resolved exact and loose settings so CLI flags reach engine updates. Ensure exact versions remove existing range prefixes and preserve explicit false values. Add regression coverage for CLI settings, nested fallbacks, and defaults.
AdrieanKhisbe
force-pushed
the
feature/node-upgrades-by-major
branch
from
October 30, 2026 10:45
16cfd6e to
2c89390
Compare
esa-coorp
approved these changes
Oct 30, 2026
AdrieanKhisbe
pushed a commit
that referenced
this pull request
Oct 30, 2026
Merge pull request #159 from CoorpAcademy/feature/node-upgrades-by-major ## Summary Automatic upgrades of a primary `engines.node` range starting with `>=` now prepare an independent alternative PR for each released, supported even Node major. ```text engines.node: >=22.12.0 same base commit → upgrade-node-v22.<minor> → upgrade-node-v24.<minor> → upgrade-node-v26.<minor> restore original checkout ``` - Select the latest matching release with an available exact Docker tag per major, including Current releases before LTS and excluding prereleases and EOL majors. - Raise newer-major engine minima to the selected full release. Preserve same-major Node/npm engine ranges by default; `node.preserveSameMajor` can override this. Refresh version pins and lockfiles, and activate the selected release for lock synchronization and precommit commands. - Reuse branches and PRs for patch updates. After publishing a newer minor, close older generated PRs only for the same major, scope, prefix, base, repository and author. - Restore the original checkout after each candidate, continue after failures and return an aggregate failure. Skip unchanged candidates. Explicit targets and other range operators retain the single-upgrade flow. - Fix resolved engine-formatting flags and isolate Travis YAML parser state so later alternatives receive valid CI configurations. Keep dependency-cluster upgrades independent. ## Evidence - **Before:** Automatic Node upgrades selected one release. Repeated Travis YAML updates reused parser offsets and appended later versions outside `node_js`. **After:** The E2E fixture verifies independent Node 22, 24 and 26 branches, engine minima, lockfiles, `.nvmrc`, valid Travis pins, unchanged dependency declarations and checkout restoration. The repeated-update regression test fails before the parser fix and passes after it. - `npm run lint`: passes with three existing TODO/FIXME warnings. - `npm run test:unit`: 98 tests pass on Node 22, covering selection, formatting, configuration, branch isolation, rollback and mocked GitHub publication. - `npm run test:integration`: passes under Node 22, 24 and 26. The suite also covers `preserveSameMajor: false`, auto-bump, no-op and explicit-target behavior. - Integration runs use the real CLI, npm and Git, with a fake nvm function; they do not install the candidate runtimes or publish real GitHub PRs. - Coverage: all 192 changed source lines are covered (100% patch coverage). Overall line coverage is 94.38%, branch coverage is 81.37%, and function coverage is 95.03%. Tests cover CLI setup and routing, publication failures, reviewer assignment, failed-commit cleanup and PR ownership safeguards.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Automatic upgrades of a primary
engines.noderange starting with>=now prepare an independent alternative PR for each released, supported even Node major.node.preserveSameMajorcan override this. Refresh version pins and lockfiles, and activate the selected release for lock synchronization and precommit commands.Evidence
Before: Automatic Node upgrades selected one release. Repeated Travis YAML updates reused parser offsets and appended later versions outside
node_js.After: The E2E fixture verifies independent Node 22, 24 and 26 branches, engine minima, lockfiles,
.nvmrc, valid Travis pins, unchanged dependency declarations and checkout restoration. The repeated-update regression test fails before the parser fix and passes after it.npm run lint: passes with three existing TODO/FIXME warnings.npm run test:unit: 98 tests pass on Node 22, covering selection, formatting, configuration, branch isolation, rollback and mocked GitHub publication.npm run test:integration: passes under Node 22, 24 and 26. The suite also coverspreserveSameMajor: false, auto-bump, no-op and explicit-target behavior.Integration runs use the real CLI, npm and Git, with a fake nvm function; they do not install the candidate runtimes or publish real GitHub PRs.
Coverage: all 192 changed source lines are covered (100% patch coverage). Overall line coverage is 94.38%, branch coverage is 81.37%, and function coverage is 95.03%. Tests cover CLI setup and routing, publication failures, reviewer assignment, failed-commit cleanup and PR ownership safeguards.