Skip to content

Conversation

@salmanmkc
Copy link
Contributor

@salmanmkc salmanmkc commented Dec 10, 2025

Summary

Removes the abandoned @azure/ms-rest-js dependency from @actions/cache to fix the punycode deprecation warning on Node.js 24+.

Problem

Using @actions/cache triggers the following deprecation warning on Node.js 24:

(node:2110) [DEP0040] DeprecationWarning: The punycode module is deprecated. Please use a userland alternative instead.

Root cause: @azure/ms-rest-jsnode-fetch@v2whatwg-urltr46punycode

Solution

Replace @azure/ms-rest-js with @azure/core-rest-pipeline which:

  • Is actively maintained by Azure
  • Does not depend on node-fetch@v2
  • Exports the same TransferProgressEvent type we need

Changes

  • package.json: Replace @azure/ms-rest-js with @azure/core-rest-pipeline
  • src/internal/downloadUtils.ts: Update import
  • src/internal/uploadUtils.ts: Update import
  • tests/uploadUtils.test.ts: Update import

Testing

  • All 116 existing tests pass
  • TypeScript compiles successfully
  • Verified no punycode deprecation warning when loading the package

Related Issues

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.
@salmanmkc salmanmkc requested a review from a team as a code owner December 10, 2025 11:24
Copilot AI review requested due to automatic review settings December 10, 2025 11:24
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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-js with @azure/core-rest-pipeline in dependencies
  • Updates all TransferProgressEvent imports 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.

@salmanmkc salmanmkc merged commit bdddd87 into main Dec 10, 2025
23 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants