Switch publish workflow to Node 24 (dry run 2: 8.0.1-alpha.1)#61
Merged
Conversation
The first dry-run (v8.0.1-alpha.0) failed because `npm install -g npm@latest` leaves a half-replaced install on GitHub runners, breaking the subsequent `npm install` with "Cannot find module 'promise-retry'". Install the newer npm into an isolated prefix and prepend that prefix to PATH instead, so the running npm is never replaced mid-flight. Version bumped to 8.0.1-alpha.1 to re-run the dry run on a fresh tag.
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #61 +/- ##
=======================================
Coverage 82.88% 82.88%
=======================================
Files 24 24
Lines 625 625
Branches 148 148
=======================================
Hits 518 518
Misses 105 105
Partials 2 2 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Node 24 bundles npm 11.x, which in current releases is >= 11.5.1 — enough for OIDC Trusted Publishing. Drops the prefix-install workaround that was in place to avoid `npm install -g npm@latest` self-replacement breakage; the simpler path is just to run on a Node whose bundled npm already supports OIDC. `Show npm version` stays so the run log makes the actual version visible.
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
The first dry run (
v8.0.1-alpha.0) failed onnpm install -g npm@latest— the self-upgrade leaves a half-replaced install on the GitHub runner (Cannot find module 'promise-retry'). An earlier commit on this branch worked around it with a prefix install; this PR replaces that with the cleaner fix: run on Node 24, whose bundled npm (11.x) already supports OIDC Trusted Publishing.Commits will squash-merge as one.
Changes
publish.yml:node-version: '24', upgrade/prefix steps removed.publish.yml: adds anpm --versionstep so the bundled version is visible in the run log (if it ever dips below 11.5.1, the publish step will fail with a clear OIDC error and we'll know to pin).package.json: bumped to8.0.1-alpha.1so a fresh tag exercises the updated workflow.Test plan
git checkout main && git pull && git tag v8.0.1-alpha.1 && git push origin v8.0.1-alpha.1.npm view @faceteer/cdk dist-tagsshowsalpha: 8.0.1-alpha.1andlatest: 8.0.0unchanged.