fix(compiler): restore babel modules the prune wrongly removed - #3690
Conversation
Three of the stubs in the last release are reachable after all.
`@babel/generator`'s flow printer is required by the class printer for its
variance helper, and owns the `TypeParameterDeclaration` printer. Stubbing it
did not throw; it silently mangled unrelated output, dropping the parentheses
around an arrow IIFE so `(() => {})()` printed as `}()`, which then fails to
parse downstream.
The flow and jsx node definitions have to stay because
`helper-create-class-features-plugin` builds a visitor keyed on `JSXIdentifier`,
and `@babel/traverse` rejects a visitor for a type it does not know.
The remaining prunes are unaffected: 2084 KB to 1662 KB for node, 1966 KB to
1545 KB for the browser.
🦋 Changeset detectedLatest commit: ff704d2 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⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (2)
WalkthroughThe compiler bundling script updates documentation for empty Babel module stubs and removes the Flow generator from the shown dead-module mapping while retaining the JSX generator stub. A new changeset schedules a patch release for 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Comment |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #3690 +/- ##
=======================================
Coverage 90.35% 90.35%
=======================================
Files 414 414
Lines 19737 19737
Branches 3609 3609
=======================================
Hits 17834 17834
Misses 1366 1366
Partials 537 537 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
Three of the modules stubbed in 5.41.13 are reachable after all, and building markojs.com against it fails.
@babel/generator's flow printer.generators/classes.jsrequires it for its variance helper, and it owns theTypeParameterDeclarationandTypeParameterInstantiationprinters. Stubbing it did not throw — it silently mangled unrelated output, dropping the parentheses around an arrow IIFE so(() => { ... })()printed as}(), which then fails to parse downstream.The flow and jsx node definitions.
helper-create-class-features-pluginbuildsgetScopeInformationVisitorwith aJSXIdentifierkey, and@babel/traversethrows for a visitor on a type it does not know:You gave us a visitor for the node type JSXIdentifier but it's not a valid type.The other prunes stand. Sizes land at 2084 KB → 1662 KB for node and 1966 KB → 1545 KB for the browser, against 1626/1509 in the bad release.
Verified by building markojs.com against the fixed compiler, and by diffing compiled output for templates covering reactive state, TypeScript with parameter properties, imports, control flow and
<await>in bothhtmlanddom— byte-identical to pre-prune. Suite is 10302 passing.The suite did not catch either fault, which is the real gap: it never exercised a
.markofile whose compiled output contains an arrow IIFE, and theJSXIdentifiervisitor is only constructed on thestripTypespath. Worth adding a fixture for both.