Skip to content

Conversation

@colincasey
Copy link
Contributor

@colincasey colincasey commented Oct 29, 2025

Updates the Node.js version resolver with the following features:

  • detect when a wide version range is in use
  • limit the resolved version to the latest LTS unless a higher version is explicitly requested
  • output the resolved data as JSON so that it's easier to understand

This allows the buildpack to output:

  • a warning if a wide version range is used
  • a warning if the LTS version limit had to be enforced

W-20075501

Updates the Node.js version resolver with the following features:
- detect when a wide version range is in use
- limit the resolved version to the latest LTS unless a higher version is explicitly requested
- output the resolved data as JSON so that it's easier to understand
This is a sanity check since rebuilding the binary after making changes is a manual process. This will ensure that the binary can't be updated if there are failing tests.
The install process is updated to:
- read the new JSON output from the Node.js version resolver binary
- emit a warning if a wide version range is used
- emit a warning if the LTS version limit had to be enforced
@colincasey colincasey self-assigned this Oct 29, 2025
@colincasey colincasey requested a review from a team as a code owner October 29, 2025 19:36
Copy link
Contributor

@schneems schneems left a comment

Choose a reason for hiding this comment

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

Made some suggestions, see comments.

@colincasey
Copy link
Contributor Author

@schneems addressed your feedback and added a NODEJS_ALLOW_WIDE_RANGE=true opt-out to disable the downgrading behavior.

* main:
  Prepare release v320 (#1517)
  Update default Node.js version to 24.x (#1510)
  Bump the github-actions group with 2 updates (#1513)
  Bump actions/checkout from 5 to 6 (#1514)
  Bump the rust-dependencies group in /resolve-version with 2 updates (#1515)
  Use buildpack banner from `heroku/buildpacks` (#1516)
  Prepare release v319 (#1512)
  Update Inventory for heroku/nodejs-engine (#1511)

# Conflicts:
#	lib/binaries.sh
@colincasey colincasey enabled auto-merge (squash) December 9, 2025 18:46
@colincasey colincasey merged commit 54c32b8 into main Dec 9, 2025
10 checks passed
@colincasey colincasey deleted the limit_node_version_range branch December 9, 2025 19:18
@heroku-linguist heroku-linguist bot mentioned this pull request Dec 9, 2025
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.

2 participants