mirror of
https://github.com/apache/superset.git
synced 2026-07-20 21:55:46 +00:00
Upgrades all @babel/* packages from 7.x to 8.0.x in one coordinated change,
replacing the ~17 individual Dependabot PRs (Babel 8 must be adopted atomically
because @babel/core and its plugins/presets share peer ranges).
Includes the workarounds the surrounding ecosystem still requires for Babel 8:
- babel.config.js migrated for Babel 8 removals:
- loose/spec options -> `assumptions` (setPublicClassFields,
privateFieldsAsProperties, noDocumentAll)
- preset-env `useBuiltIns`/`corejs` -> babel-plugin-polyfill-corejs3
- dropped @babel/plugin-syntax-dynamic-import (removed in v8) and the
standalone class/optional-chaining/nullish transforms (now in preset-env)
- preset-typescript `onlyRemoveTypeImports: false` to keep eliding
value-syntax type-only imports (the v8 default flipped to true)
- preset-react and @emotion/babel-plugin scoped to .jsx/.tsx via `overrides`
so their JSX syntax plugin no longer makes TS generic arrows in .ts files
parse as JSX
- test env uses preset-env `modules: 'commonjs'` instead of the standalone
transform-modules-commonjs plugin (plugin/preset ordering changed in v8)
- Removed babel-plugin-lodash: it calls the removed `path.hoist`/
`isModuleDeclaration` APIs and is unmaintained (bundle-size note in the PR).
- patch-package introduced (postinstall) to patch @emotion/babel-plugin, whose
latest release still calls the removed NodePath#hoist. Remove once Emotion
ships Babel 8 support.
- package.json `overrides` relax @babel/core peer ranges for ts-jest and the
@babel/plugin-syntax-* no-op packages (via babel-preset-current-node-syntax)
that have not yet declared Babel 8 compatibility.
Validated with `npm ci`, the production webpack build, and the Jest unit suite.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
1.1 KiB
1.1 KiB