Skip to content

normalize HMR upgrade path comparison#5678

Draft
UlisesGascon wants to merge 2 commits into
webpack:mainfrom
UlisesGascon:fix/hmr-path-normalization
Draft

normalize HMR upgrade path comparison#5678
UlisesGascon wants to merge 2 commits into
webpack:mainfrom
UlisesGascon:fix/hmr-path-normalization

Conversation

@UlisesGascon
Copy link
Copy Markdown
Member

No description provided.

…e configured path

Adds trailing slash, case variations, percent-encoded path, and
leading double slash to the existing HMR/proxy isolation tests so
that all URL shapes recognized as the HMR upgrade are treated
consistently.
Tighten the HMR-vs-proxy upgrade dispatch so URL variants of the
configured HMR path are consistently recognized as the HMR socket:

  - lowercase comparison (case-insensitive)
  - decode percent-encoding before comparison
  - strip trailing slashes
  - collapse leading multiple slashes so //foo is treated as /foo
    instead of being parsed as a scheme-relative URL
  - wrap URL parsing in try/catch so a malformed req.url does not
    raise an uncaught exception
@codecov
Copy link
Copy Markdown

codecov Bot commented May 26, 2026

Codecov Report

❌ Patch coverage is 86.66667% with 2 lines in your changes missing coverage. Please review.
✅ Project coverage is 83.60%. Comparing base (93e8996) to head (50c2572).

Files with missing lines Patch % Lines
lib/Server.js 86.66% 2 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #5678      +/-   ##
==========================================
- Coverage   83.60%   83.60%   -0.01%     
==========================================
  Files          13       13              
  Lines        2086     2098      +12     
  Branches      773      778       +5     
==========================================
+ Hits         1744     1754      +10     
- Misses        306      308       +2     
  Partials       36       36              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@alexander-akait
Copy link
Copy Markdown
Member

/cc @bjohansebas can you take a look, thanks

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.

2 participants