Skip to content

[Node 24][V3] Migrate Deprecated Node URL APIs to WHATWG Standard (@W-20777230@)#3652

Merged
adamraya merged 12 commits intodevelopfrom
W-20777230-node-24-v3-url
Feb 11, 2026
Merged

[Node 24][V3] Migrate Deprecated Node URL APIs to WHATWG Standard (@W-20777230@)#3652
adamraya merged 12 commits intodevelopfrom
W-20777230-node-24-v3-url

Conversation

@adamraya
Copy link
Contributor

@adamraya adamraya commented Feb 10, 2026

Description

Migrates all usages of Node.js legacy URL APIs url.parse() and url.format() to the modern WHATWG URL standard to eliminate deprecation warnings when running on Node.js 24.

The PR also removes npm 8 , since npm 8 shipped as the default package manager with Node 16 and we don't support Node 16 in PWA Kit v3, since is no longer supported by MRT, from engine constraints and CI matrix, and adds Node 24 support.

Types of Changes

  • Bug fix (non-breaking change that fixes an issue)
  • New feature (non-breaking change that adds functionality)
  • Documentation update
  • Breaking change (could cause existing functionality to not work as expected)
  • Other changes (non-breaking changes that does not fit any of the above)

Breaking changes include:

  • Removing a public function or component or prop
  • Adding a required argument to a function
  • Changing the data type of a function parameter or return value
  • Adding a new peer dependency to package.json

Changes

  • Replaced URL.parse(req.url) with new URL(req.url, 'http://localhost') and URL.format(parsed) with WHATWG URL constructor.
  • Added tests
  • Updated engines.node to include ^24.0.0 across all package.json` files
  • Updated CI matrix to include node 24 and npm 11

How to Test-Drive This PR

  • Verify all unit tests for the runtime package pass: cd packages/pwa-kit-runtime && npm test
  • Run on Node 24 and confirm no url.parse/url.format deprecation warnings appear in the console
  • Run on Node 20 and confirm backward compatibility all tests pass, no functional differences

Checklists

General

  • Changes are covered by test cases
  • CHANGELOG.md updated with a short description of changes (not required for documentation updates)

Accessibility Compliance

You must check off all items in one of the follow two lists:

  • There are no changes to UI

or...

Localization

  • Changes include a UI text update in the Retail React App (which requires translation)

@cc-prodsec
Copy link
Collaborator

cc-prodsec commented Feb 10, 2026

Snyk checks have passed. No issues have been found so far.

Status Scanner Critical High Medium Low Total (0)
Open Source Security 0 0 0 0 0 issues
Licenses 0 0 0 0 0 issues

💻 Catch issues earlier using the plugins for VS Code, JetBrains IDEs, Visual Studio, and Eclipse.

@adamraya adamraya marked this pull request as ready for review February 10, 2026 23:03
@adamraya adamraya requested a review from a team as a code owner February 10, 2026 23:03
bendvc
bendvc previously approved these changes Feb 10, 2026
alexvuong
alexvuong previously approved these changes Feb 10, 2026
Copy link
Contributor

@alexvuong alexvuong left a comment

Choose a reason for hiding this comment

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

Small comment, non blocker. LGTM

@adamraya adamraya dismissed stale reviews from alexvuong and bendvc via a349b66 February 10, 2026 23:26
@adamraya adamraya merged commit 9ee3f5d into develop Feb 11, 2026
42 checks passed
@adamraya adamraya deleted the W-20777230-node-24-v3-url branch February 11, 2026 23:03
kevinxh added a commit that referenced this pull request Feb 13, 2026
The merge conflict resolution used --theirs (release branch) for
package-lock files, which lost develop-only changes like Node 24
engine support from #3652. Restore lock files from develop and
re-run npm install to pick up version bumps.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
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.

4 participants