Skip to content

chore: consume dist/index.json when resolving versions - #2598

Merged
MikeMcC399 merged 1 commit into
nodejs:mainfrom
MattIPv4:consume-index-json
Aug 7, 2026
Merged

chore: consume dist/index.json when resolving versions#2598
MikeMcC399 merged 1 commit into
nodejs:mainfrom
MattIPv4:consume-index-json

Conversation

@MattIPv4

@MattIPv4 MattIPv4 commented Aug 6, 2026

Copy link
Copy Markdown
Member

Description

Resolves #2514 by switching the logic for resolving the full version to index.json instead of parsing the HTML index.

Motivation and Context

cc nodejs/release-cloudflare-worker#131

Testing Details

./update.sh runs and outputs the expected versions still.

Example Output(if appropriate)

N/A

Types of changes

  • Documentation
  • Version change (Update, remove or add more Node.js versions)
  • Variant change (Update, remove or add more variants, or versions of variants)
  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Other (none of the above)

Checklist

  • My code follows the code style of this project.
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • I have read the CONTRIBUTING.md document.
  • All new and existing tests passed.

Comment thread update.sh

@MikeMcC399 MikeMcC399 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I ran it against a branch with the latest Node.js 26.7.0 removed, and ./update.sh 26 added it correctly.

@nschonni nschonni left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Did a quick test with curl -sSL --compressed "https://nodejs.org/dist/index.json" | jq -r '[.[] | select(.version | startswith("v24."))] | first | .version | ltrimstr("v")'.
Did something similar with the JS rewrite branches

@MattIPv4

MattIPv4 commented Aug 6, 2026

Copy link
Copy Markdown
Member Author

I don't have write access here, so will leave this with y'all to land 🙏

@MikeMcC399

Copy link
Copy Markdown
Contributor

I tested it also in my fork, both on the current state and rewinding to Node.js 26.6.0 and it worked fine.

Thank you for your support @MattIPv4 👍🏻

@MikeMcC399

MikeMcC399 commented Aug 7, 2026

Copy link
Copy Markdown
Contributor

I've added two PRs due to the additional requirement to have jq installed. the additional error messages if jq wasn't already installed.

#2599
#2600

This isn't an issue in GitHub runners. It just needs an additional step for contributors if they don't already have jq installed.

The error message without jq installed is quite messy:

$ ./update.sh
Updating version 22...
Updating version 24...
./update.sh: line 118: jq: command not found
./update.sh: line 118: jq: command not found
./update.sh: line 118: jq: command not found
./update.sh: line 118: jq: command not found
./update.sh: line 118: jq: command not found
./update.sh: line 118: jq: command not found
./update.sh: line 118: jq: command not found
./update.sh: line 118: jq: command not found
./update.sh: line 118: jq: command not found
Updating version 26...
./update.sh: line 118: jq: command not found
./update.sh: line 118: jq: command not found
./update.sh: line 118: jq: command not found
./update.sh: line 118: jq: command not found
./update.sh: line 118: jq: command not found
./update.sh: line 118: jq: command not found
./update.sh: line 118: jq: command not found
./update.sh: line 118: jq: command not found
./update.sh: line 118: jq: command not found
./update.sh: line 118: jq: command not found
./update.sh: line 118: jq: command not found
./update.sh: line 118: jq: command not found
./update.sh: line 118: jq: command not found
./update.sh: line 118: jq: command not found
./update.sh: line 118: jq: command not found
curl: (23) Failure writing output to destination
curl: (23) Failure writing output to destination
curl: (23) Failure writing output to destination
curl: (23) Failure writing output to destination
curl: (23) Failure writing output to destination
curl: (23) Failure writing output to destination
curl: (23) Failure writing output to destination
curl: (23) Failure writing output to destination
curl: (23) Failure writing output to destination
curl: (23) Failure writing output to destination
curl: (23) Failure writing output to destination
curl: (23) Failure writing output to destination
curl: (23) Failcuurrel :w r(i2t3i)n gF aoiultupruet  wtroi tdiensgt ionuattpiuotn
to destination
curl: (23) Failure writing output to destination
curl: (23) Failure writing output to destination
curl: (23) Failure writing outpcuutr lt:o  destination
(23) Failure writing output to destination
curl: (23) Failure writing output to destination
ccuurrll::  ((2233))  FFaaiilluurree  wwrriittiinngg  oouuttppuutt  ttoo  ddeessttiinnaattiioonn

curl: (c2u3r)l :F a(i2l3u)r eF awirliutrien gw roiuttipnugt  otuot pduets ttion adteisotni
nation
curl: (23) Failure writing output to destination

@MattIPv4

MattIPv4 commented Aug 7, 2026

Copy link
Copy Markdown
Member Author

I've added two PRs due to the additional requirement to have jq installed.

#2599

#2600

Ah, ty! I had assumed jq was safe to use as it was already used elsewhere in the script.

@MikeMcC399

MikeMcC399 commented Aug 7, 2026

Copy link
Copy Markdown
Contributor

@MattIPv4

Ah, ty! I had assumed jq was safe to use as it was already used elsewhere in the script.

I've put the text right in the related PRs. My assumption that jq was new was incorrect. The additional usage just made the error messages a lot more intensive!

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

update.sh fails if https://nodejs.org/dist index incomplete

3 participants