fix(cache): replace @azure/ms-rest-js with @azure/core-rest-pipeline#2197
Merged
fix(cache): replace @azure/ms-rest-js with @azure/core-rest-pipeline#2197
Conversation
Remove abandoned @azure/ms-rest-js dependency which pulls in node-fetch@v2, causing punycode deprecation warnings on Node.js 24+. The TransferProgressEvent type is now imported from @azure/core-rest-pipeline instead.
Contributor
There was a problem hiding this comment.
Pull request overview
This PR modernizes the @actions/cache package by replacing the deprecated @azure/ms-rest-js dependency with @azure/core-rest-pipeline to eliminate the punycode deprecation warning on Node.js 24+. The abandoned @azure/ms-rest-js package had a transitive dependency chain leading to the deprecated punycode module through node-fetch@v2.
- Replaces
@azure/ms-rest-jswith@azure/core-rest-pipelinein dependencies - Updates all
TransferProgressEventimports across source and test files - Removes obsolete transitive dependencies from the lock file
Reviewed changes
Copilot reviewed 4 out of 5 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| packages/cache/package.json | Replaces @azure/ms-rest-js dependency with @azure/core-rest-pipeline ^1.22.0 |
| packages/cache/package-lock.json | Updates dependency resolution, removes obsolete packages (node-fetch v2, form-data, etc.), and adds @azure/core-rest-pipeline 1.22.2 |
| packages/cache/src/internal/uploadUtils.ts | Updates TransferProgressEvent import to use @azure/core-rest-pipeline |
| packages/cache/src/internal/downloadUtils.ts | Updates TransferProgressEvent import to use @azure/core-rest-pipeline |
| packages/cache/tests/uploadUtils.test.ts | Updates TransferProgressEvent import to use @azure/core-rest-pipeline in tests |
Files not reviewed (1)
- packages/cache/package-lock.json: Language not supported
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Link-
approved these changes
Dec 10, 2025
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
Removes the abandoned
@azure/ms-rest-jsdependency from@actions/cacheto fix the punycode deprecation warning on Node.js 24+.Problem
Using
@actions/cachetriggers the following deprecation warning on Node.js 24:Root cause:
@azure/ms-rest-js→node-fetch@v2→whatwg-url→tr46→punycodeSolution
Replace
@azure/ms-rest-jswith@azure/core-rest-pipelinewhich:node-fetch@v2TransferProgressEventtype we needChanges
@azure/ms-rest-jswith@azure/core-rest-pipelineTesting
Related Issues
punycodemodule is deprecated setup-node#1364node-fetch@v2dependency triggers "DeprecationWarning: Thepunycodemodule is deprecated" Azure/ms-rest-js#491