Repository navigation
Conversation
🦋 Changeset detectedLatest commit: 4e3015b The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
|
|
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info
WalkthroughModule path parsing now recognizes both forward and backslash separators. A new test checks that a Windows drive-qualified module name is reported as Priority: ⬇️ Low Merge Risk: ⚪ Minimal · up to
|
What
Modules whose names use Windows path separators are silently dropped from the report.
Folder.addModule()(src/tree/Folder.js:79-83) then returns without a warning, so the module ismissing from the treemap and the JSON report, and
statSize(src/analyzer.js:546) is under-counted.The same happens to inner modules of a concatenated module (
src/tree/ConcatenatedModule.js:80-84).Reachable in practice: webpack writes an absolute path into
module.namewhen the module lives on adifferent drive than the project (
webpack/lib/util/identifier.js,absoluteToRequest()returns theabsolute path when
path.win32.relative()still produces one). A real webpack 5 build with the projecton
D:and a module onC:produced 140 bytes of modules butstatSize = 102, withcross.jsabsentfrom the report.
The change
One expression,
slice(1)semantics unchanged, and identical results for every name that only uses/(the existing fixtures are compared before/after and are byte-identical).
A changeset (
.changeset/windows-path-module-names.md) is included, as the repository requires.Verification
test/analyzerUtils.js:1 failed, 12 passedbefore (./shared/lib/util.jsmissingfrom the parsed path array),
13 passedafter;statSize102 → 140 andcross.jsreappears;expected-chart-datafixtures produce identicalgetViewerData()output before andafter (including
with-module-concatenation-infoand the gzip column);prettier --check,tsc --noEmitclean;git apply(withcore.autocrlf=false) on a pristine tarball reproducesfiles/byte-for-byte.The new test is a pure string assertion with no
path.sepor platform constants, so it behaves the sameon the ubuntu × Node 20/22/24 CI matrix.
The puppeteer-backed suites cannot run on this machine (no Chrome); their fixtures were compared through
getViewerData()instead, as described above.Summary by CodeRabbit