deps: update undici to latest v7.x release only#62739
deps: update undici to latest v7.x release only#62739aduh95 merged 1 commit intonodejs:v24.x-stagingfrom
Conversation
|
Review requested:
|
| }); | ||
| 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. |
| 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
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.10% +0.03%
=================================================
Files 672 673 +1
Lines 201174 202277 +1103
Branches 39304 39569 +265
=================================================
+ Hits 181197 182252 +1055
+ Misses 12240 12226 -14
- Partials 7737 7799 +62 🚀 New features to boost your workflow:
|
28f9225 to
59326be
Compare
|
@aduh95 PTAL |
|
No biggie, this can land and ship. |
Signed-off-by: Matteo Collina <hello@matteocollina.com>
59326be to
212d24d
Compare
|
Landed in cb67a92 |
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.