deps: update undici to latest v7.x release only#62739
deps: update undici to latest v7.x release only#62739mcollina wants to merge 1 commit intonodejs:v24.x-stagingfrom
Conversation
|
Review requested:
|
tools/dep_updaters/update-undici.sh
Outdated
| }); | ||
| if (v7Releases.length === 0) throw new Error('No v7.x releases found'); | ||
| // Sort by tag_name (prefixed with 'v') in descending order to get the latest first | ||
| v7Releases.sort((a, b) => b.tag_name.localeCompare(a.tag_name)); |
There was a problem hiding this comment.
That will report e.g. v7.2.0 to be more recent than v7.10.0
6d90a9b to
1d8ad4e
Compare
|
@aduh95 good catch, fixed. |
tools/dep_updaters/update-undici.sh
Outdated
| const v7Releases = releases.filter(r => { | ||
| const tag = r.tag_name.replace(/^v/, ''); | ||
| return tag.startsWith('7.'); | ||
| }); | ||
| if (v7Releases.length === 0) throw new Error('No v7.x releases found'); | ||
| // Sort by published_at (descending) to get the most recently published first | ||
| v7Releases.sort((a, b) => new Date(b.published_at) - new Date(a.published_at)); |
There was a problem hiding this comment.
Should we switch to npm to get the last version number, from https://registry.npmjs.org/undici/seven? Would probably be less fragile
There was a problem hiding this comment.
It all comes from the same release pipeline. I didn't want to bring in semver as a dependency either.
Latest time on github seemed more final, given that the tag on npm can be changed at whim.
There was a problem hiding this comment.
It's not a dependency on semver, it's just an alternative source to get the version number.
It assumes the seven tag will be kept up-to-date on npm, but that seems like a reasonable assumption for a project we maintain ourselves. Worse that could happen is that the bot opens a PR for the wrong version, which should be easily catchable – especially given that we’ll have to run the workflow manually
Modify update-undici.sh to fetch all releases and filter to only v7.x releases, then select the latest one. This ensures we stay on the v7.x line and don't accidentally upgrade to v8 or later.
1d8ad4e to
e0c73eb
Compare
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## v24.x-staging #62739 +/- ##
=================================================
+ Coverage 90.06% 90.08% +0.01%
=================================================
Files 672 673 +1
Lines 201174 202277 +1103
Branches 39304 39571 +267
=================================================
+ Hits 181197 182217 +1020
- Misses 12240 12268 +28
- Partials 7737 7792 +55 🚀 New features to boost your workflow:
|
Modify update-undici.sh to fetch all releases and filter to only v7.x releases, then select the latest one. This ensures we stay on the v7.x line and don't accidentally upgrade to v8 or later.