Enhancement: Add support for configurable Node.js binary mirror sources#22043
Merged
tarunramsinghani merged 20 commits intomasterfrom Apr 24, 2026
Merged
Enhancement: Add support for configurable Node.js binary mirror sources#22043tarunramsinghani merged 20 commits intomasterfrom
tarunramsinghani merged 20 commits intomasterfrom
Conversation
Expanded the task to allow using custom Node.js binary mirror sources via the "nodejsMirror" input. Updated relevant localization resources and adjusted installation logic to utilize the specified mirror.
…idation in UseNodeV1 task
Co-authored-by: tarunramsinghani <2929463+tarunramsinghani@users.noreply.github.com>
|
Azure Pipelines: 3 pipeline(s) require an authorized user to comment /azp run to run. |
Copilot created this pull request from a session on behalf of
tarunramsinghani
April 23, 2026 07:47
View session
tarunramsinghani
approved these changes
Apr 23, 2026
Collaborator
|
/azp run |
|
Azure Pipelines: Successfully started running 3 pipeline(s). |
1 similar comment
|
Azure Pipelines: Successfully started running 3 pipeline(s). |
3 tasks
rishabhmalikMS
approved these changes
Apr 23, 2026
Contributor
|
@tarunramsinghani sorry, it's my first contribuition to this repo, so I see that I'm not added as repo contributor, is it expected? |
Contributor
@rishabhmalikMS or @tarunramsinghani just for understanding the contribuite flow here. :) |
Collaborator
|
@uychagas, The contributor permissions are limited to repo. For any contributions please continue to use forked repo. Thanks. |
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.
Context
This PR brings in the changes from issue #21267, which requested the ability to use a custom Node.js download mirror in the UseNodeV1 task — useful for restricted networks, private artifact caches, or alternative mirrors.
The commits were originally authored in fork-based PR #21960 by @uychagas. This PR migrates the full commit history into an in-repository branch so that review and merge can proceed in-repo while preserving original author attribution.
Task Name
UseNodeV1
Description
Adds a new advanced input
nodejsMirrorto the UseNodeV1 task:nodejsMirror(string, advanced, defaulthttps://nodejs.org/dist): specifies an alternative base URL for Node.js binaries and the version index.index.jsonversion resolution request and the binary download URL are now constructed usingnodejsMirrorinstead of the hardcodedhttps://nodejs.org/dist.InvalidNodejsMirror).resources.resjson) updated with the new input label/help text and the new error message key.task.jsonandtask.loc.jsonupdated with the new input definition and version bump to 1.273.0.Backward compatibility is fully preserved: when
nodejsMirroris not set, the default value (https://nodejs.org/dist) is used, so existing pipelines are unaffected.Risk Assessment (Medium)
nodejsMirror.Change Behind Feature Flag (Yes)
Controlled via the new
nodejsMirrortask input. Default behavior is unchanged; the custom-mirror code path is opt-in and requires an explicit non-default value.Tech Design / Approach
normalizeMirrorUrlhelper ininstaller.tsvalidates and normalises the mirror URL (ensures trailing slash, rejects invalid URLs).queryLatestMatchandacquireNodeeach receivenodejsMirroras a parameter instead of relying on a hardcoded constant, keeping the change minimal and auditable.typed-rest-clientandazure-pipelines-tool-libare used as before.Documentation Changes Required (Yes)
Task documentation should be updated to describe the new
nodejsMirrorinput:dist-like layout with anindex.jsonand versioned archives).Unit Tests Added or Updated (Yes)
Tasks/UseNodeV1/Tests/L0CustomMirror.tsvalidates that both theindex.jsonrequest and the binary download use the custom mirror URL.Tasks/UseNodeV1/Tests/L0.tsupdated with a new test caseUses custom nodejsMirror for index.json and download.Additional Testing Performed
No additional manual or integration testing performed as part of this migration PR. CI test results should be relied upon.
Logging Added/Updated (No)
No new log statements added.
Telemetry Added/Updated (No)
No telemetry changes included.
Rollback Scenario and Process (Yes)
Revert this PR to restore the prior behavior (default upstream mirror only). Pipelines that had set
nodejsMirrorwould need to remove that input after reverting.Dependency Impact Assessed and Regression Tested (No)
No new or updated dependencies. The
package-lock.jsonchanges reflect a dependency tree normalisation only (no version changes to direct dependencies).Checklist