fix(ci): publish workflow cannot run release-it@21 on Node 16 - #516
Open
Jayanth Reddy Bujula (jbujula) wants to merge 1 commit into
Open
fix(ci): publish workflow cannot run release-it@21 on Node 16#516Jayanth Reddy Bujula (jbujula) wants to merge 1 commit into
Jayanth Reddy Bujula (jbujula) wants to merge 1 commit into
Conversation
PR #506 upgraded release-it 17 -> 21 to clear the @octokit ReDoS advisories. release-it@21 declares: engines.node: "^22.21.0 || >=24.0.0" Publish.yml still provisions Node 16, so `npm run set-version` would fail and no package could be published. Since no released version of this package currently contains the #506 security fixes, the publish path is on the critical path and had to be unblocked. Changes: - Node 16 -> 24 in Publish.yml (satisfies the >=24.0.0 branch of the engines range; avoids the 22.21.0 minor-version floor). - Drop `npm i -g npm@8.19.4`. npm 8 does not support Node 24, and the pin is unnecessary: package-lock.json is lockfileVersion 3, which Node 24's bundled npm handles natively. Only the publish job is changed. PullRequest.yml stays on Node 16 deliberately: the test suite uses ts-node/register via gulp-mocha, and Node >=22.6 native TypeScript stripping conflicts with it (ERR_UNSUPPORTED_TYPESCRIPT_SYNTAX). The publish job never runs tests -- `npm run dist` maps to the `recompile` task only. Verified locally on Node 24.14.1: - npm ci -> exit 0 - npm run dist -> compile OK, exit 0 - release-it --version -> v21.0.1 loads - release-it --ci --dry-run -> config honored: tagName v${version}, --force, pushRepo, npm.publish=false, github.release=false, and the after:release ADO variable hook all resolve correctly. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: 6ac571cd-d84e-4b40-805a-e316a62ed292
Jayanth Reddy Bujula (jbujula)
requested review from
Brad Flood (brflood) and
heiwang
August 14, 2026 01:22
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.
Fixes a latent break in
Publish.yml. Correction to my original description: this is not release-blocking - see "Revised impact" below. I am leaving the correction visible rather than silently editing it away.Problem
#506 upgraded
release-it17 -> 21 (required to clear three moderate@octokitReDoS advisories).release-it@21declares:Publish.ymlprovisions Node 16 and runsnpm run set-version, which isnode node_modules/release-it/bin/release-it .... That combination cannot work, so this workflow would fail if it were ever triggered by anrc*tag.Revised impact (corrected)
I originally wrote that this blocked shipping the #506 security fixes. That was wrong, and I want to be precise about it:
.release-it.yamlcontains anafter:releasehook emitting##vso[task.setvariable ...], which is Azure DevOps syntax. The actual publisher is thePowerPlatform-DPX-Tools-GitHub-CLI-Wrapper-OfficialADO pipeline, not this GitHub workflow.Publish Npm Packagerun in the repo's recent run history at all, yet tagv0.1.150exists and points at5c1085e(fix(security): resolve S360/Component Governance alerts (0 high, 0 moderate) #506).2026-08-14T00:45:41ZbyDPX Tools Team, with the message:So v0.1.150 already ships both #506 and #507, and the ADO pipeline ran
release-it@21successfully - meaning ADO is on a Node version that satisfies the engines range.Publish.ymlis therefore a secondary/dormant path. This PR removes a trap for whoever next pushes anrc*tag expecting it to work, rather than unblocking anything today.Changes
Publish job only, two lines:
node-version: 16->24. Chose the>=24.0.0branch of the engines range rather than22, so there is no dependency on setup-node resolving a 22.x at or above the 22.21.0 floor.npm i -g npm@8.19.4. npm 8 does not support Node 24, and the pin is not needed:package-lock.jsonislockfileVersion: 3, which Node 24's bundled npm reads natively.Why PullRequest.yml is deliberately left on Node 16
Not an oversight. The test suite runs through
gulp-mocha->ts-node/register, and Node >= 22.6 native TypeScript stripping conflicts with it (ERR_UNSUPPORTED_TYPESCRIPT_SYNTAX). That is exactly the failure I hit locally on Node 24 while working on #506, and why CI (Node 16) was green when local was red.The publish job is safe to move because it never runs tests:
npm run distmaps torecompilealone (gulpfile.mjs:20->recompile as dist), unlikeciwhich isseries(recompile, lint, restore, test).Verification (local, Node 24.14.1)
npm cinpm run distcompilefinished, exit 0release-it --versionv21.0.1loadsrelease-it --increment patch --ci -VV --dry-runThe dry run confirms the existing
.release-it.yamlis still schema-compatible with v21 - every key is honored:i.e.
tagName: v${version},tagArgs: [--force],pushRepo, theafter:releaseADO variable hook,npm.publish: falseandgithub.release: falseall resolve as intended. (The0.0.0...0.0.1numbering is an artifact of my shallow clone having no tags; CI checks out withfetch-depth: 0.)All 6 PR checks are green.
Not addressed here
npm auditcurrently reports 4 high, all one dev-only chain:nanoid < 3.3.18->postcss->@gulp-sourcemaps/identity-map->gulp-sourcemaps. Thenanoidoverride is already^3.3.17, so the caret admits the fix;3.3.18is simply not mirrored onpackagefeedproxy.microsoft.ioyet (upstream has tagged it). The weekly job added in #507 will pick it up on the first run after the mirror syncs - no code change needed.