mirror of
https://github.com/apache/superset.git
synced 2026-07-02 21:05:36 +00:00
Compare commits
2 Commits
codex/fix-
...
chore/babe
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
85fef51c3a | ||
|
|
e763ef86fd |
@@ -55,9 +55,9 @@ repos:
|
||||
exclude: ^helm/superset/templates/
|
||||
- id: debug-statements
|
||||
- id: end-of-file-fixer
|
||||
exclude: .*/lerna\.json$|^docs/static/img/logos/
|
||||
exclude: .*/lerna\.json$|^docs/static/img/logos/|^superset-frontend/patches/
|
||||
- id: trailing-whitespace
|
||||
exclude: ^.*\.(snap)
|
||||
exclude: ^.*\.(snap)|^superset-frontend/patches/
|
||||
args: ["--markdown-linebreak-ext=md"]
|
||||
- repo: local
|
||||
hooks:
|
||||
|
||||
@@ -80,6 +80,9 @@ erd.svg
|
||||
intro_header.txt
|
||||
TODO.md
|
||||
|
||||
# patch-package patches (unified diffs cannot carry license headers)
|
||||
.*\.patch
|
||||
|
||||
# for LLMs
|
||||
llm-context.md
|
||||
llms.txt
|
||||
|
||||
@@ -22,44 +22,41 @@ module.exports = {
|
||||
sourceMaps: true,
|
||||
sourceType: 'module',
|
||||
retainLines: true,
|
||||
// Babel 8 removed the `loose`/`spec` options from preset-env and plugins in
|
||||
// favor of granular compiler assumptions. These mirror the previous loose
|
||||
// behavior. See https://babeljs.io/assumptions
|
||||
assumptions: {
|
||||
setPublicClassFields: true,
|
||||
privateFieldsAsProperties: true,
|
||||
noDocumentAll: true,
|
||||
},
|
||||
presets: [
|
||||
[
|
||||
'@babel/preset-env',
|
||||
{
|
||||
useBuiltIns: 'usage',
|
||||
corejs: 3,
|
||||
loose: true,
|
||||
modules: false,
|
||||
shippedProposals: true,
|
||||
targets: packageConfig.browserslist,
|
||||
},
|
||||
],
|
||||
[
|
||||
'@babel/preset-react',
|
||||
{
|
||||
development: process.env.BABEL_ENV === 'development',
|
||||
runtime: 'automatic',
|
||||
},
|
||||
],
|
||||
'@babel/preset-typescript',
|
||||
// preset-react is scoped to .jsx/.tsx via `overrides` below. In Babel 8 its
|
||||
// JSX syntax plugin would otherwise apply to .ts files and make TypeScript
|
||||
// generic arrows (e.g. `<T = unknown>(x: T) => x`) parse as JSX.
|
||||
['@babel/preset-typescript', { onlyRemoveTypeImports: false }],
|
||||
],
|
||||
plugins: [
|
||||
'lodash',
|
||||
'@babel/plugin-syntax-dynamic-import',
|
||||
// Babel 8 removed preset-env's `useBuiltIns`/`corejs`; core-js polyfill
|
||||
// injection is now handled directly by babel-plugin-polyfill-corejs3.
|
||||
['babel-plugin-polyfill-corejs3', { method: 'usage-global' }],
|
||||
'@babel/plugin-transform-export-namespace-from',
|
||||
['@babel/plugin-transform-class-properties', { loose: true }],
|
||||
'@babel/plugin-transform-class-static-block',
|
||||
['@babel/plugin-transform-optional-chaining', { loose: true }],
|
||||
['@babel/plugin-transform-private-methods', { loose: true }],
|
||||
['@babel/plugin-transform-nullish-coalescing-operator', { loose: true }],
|
||||
// The class-properties/class-static-block/optional-chaining/private-methods/
|
||||
// nullish-coalescing transforms are bundled into preset-env in Babel 8 and
|
||||
// ordered correctly after preset-typescript; their loose behavior is now
|
||||
// covered by the top-level `assumptions`.
|
||||
['@babel/plugin-transform-runtime', { corejs: 3 }],
|
||||
[
|
||||
'@emotion/babel-plugin',
|
||||
{
|
||||
autoLabel: 'dev-only',
|
||||
labelFormat: '[local]',
|
||||
},
|
||||
],
|
||||
// @emotion/babel-plugin is scoped to .jsx/.tsx via `overrides` below: it
|
||||
// enables JSX syntax (for the `css` prop), which on .ts files would make
|
||||
// TypeScript generic arrows parse as JSX.
|
||||
],
|
||||
env: {
|
||||
// Setup a different config for tests as they run in node instead of a browser
|
||||
@@ -68,26 +65,23 @@ module.exports = {
|
||||
[
|
||||
'@babel/preset-env',
|
||||
{
|
||||
useBuiltIns: 'usage',
|
||||
corejs: 3,
|
||||
loose: true,
|
||||
shippedProposals: true,
|
||||
modules: 'auto',
|
||||
// Let preset-env handle the CommonJS transform so it runs after
|
||||
// preset-typescript strips type-only imports/exports. A standalone
|
||||
// transform-modules-commonjs plugin would run first (Babel 8 orders
|
||||
// plugins before presets) and rewrite type-only re-exports into
|
||||
// requires before they can be elided.
|
||||
modules: 'commonjs',
|
||||
targets: { node: 'current' },
|
||||
},
|
||||
],
|
||||
[
|
||||
'@babel/preset-react',
|
||||
{
|
||||
development: process.env.BABEL_ENV === 'development',
|
||||
runtime: 'automatic',
|
||||
},
|
||||
],
|
||||
'@babel/preset-typescript',
|
||||
// preset-react is applied via the top-level `overrides` (scoped to
|
||||
// .jsx/.tsx), which also apply in this env.
|
||||
['@babel/preset-typescript', { onlyRemoveTypeImports: false }],
|
||||
],
|
||||
plugins: [
|
||||
['babel-plugin-polyfill-corejs3', { method: 'usage-global' }],
|
||||
'babel-plugin-dynamic-import-node',
|
||||
'@babel/plugin-transform-modules-commonjs',
|
||||
'@babel/plugin-transform-export-namespace-from',
|
||||
],
|
||||
},
|
||||
@@ -127,5 +121,29 @@ module.exports = {
|
||||
test: './plugins/plugin-chart-handlebars/node_modules/just-handlebars-helpers/*',
|
||||
sourceType: 'unambiguous',
|
||||
},
|
||||
{
|
||||
// Apply JSX-dependent transforms (preset-react and @emotion/babel-plugin)
|
||||
// only to files that can contain JSX. Both enable the JSX syntax plugin,
|
||||
// which on .ts files would make TypeScript generic arrows parse as JSX.
|
||||
test: /\.(jsx|tsx)$/,
|
||||
presets: [
|
||||
[
|
||||
'@babel/preset-react',
|
||||
{
|
||||
development: process.env.BABEL_ENV === 'development',
|
||||
runtime: 'automatic',
|
||||
},
|
||||
],
|
||||
],
|
||||
plugins: [
|
||||
[
|
||||
'@emotion/babel-plugin',
|
||||
{
|
||||
autoLabel: 'dev-only',
|
||||
labelFormat: '[local]',
|
||||
},
|
||||
],
|
||||
],
|
||||
},
|
||||
],
|
||||
};
|
||||
|
||||
9360
superset-frontend/package-lock.json
generated
9360
superset-frontend/package-lock.json
generated
File diff suppressed because it is too large
Load Diff
@@ -76,6 +76,7 @@
|
||||
"playwright:debug": "playwright test --debug",
|
||||
"playwright:report": "playwright show-report",
|
||||
"docs:screenshots": "playwright test --config=playwright/generators/playwright.config.ts docs/",
|
||||
"postinstall": "patch-package",
|
||||
"prettier": "npm run _prettier -- --write",
|
||||
"prettier-check": "npm run _prettier -- --check",
|
||||
"prod": "npm run build",
|
||||
@@ -242,22 +243,20 @@
|
||||
"yargs": "^18.0.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@babel/cli": "^7.29.7",
|
||||
"@babel/compat-data": "^7.28.4",
|
||||
"@babel/core": "^7.29.7",
|
||||
"@babel/eslint-parser": "^7.29.7",
|
||||
"@babel/node": "^7.29.7",
|
||||
"@babel/plugin-syntax-dynamic-import": "^7.8.3",
|
||||
"@babel/plugin-transform-export-namespace-from": "^7.29.7",
|
||||
"@babel/plugin-transform-modules-commonjs": "^7.29.7",
|
||||
"@babel/plugin-transform-runtime": "^7.29.7",
|
||||
"@babel/preset-env": "^7.29.7",
|
||||
"@babel/preset-react": "^7.29.7",
|
||||
"@babel/preset-typescript": "^7.29.7",
|
||||
"@babel/register": "^7.29.7",
|
||||
"@babel/runtime": "^7.29.7",
|
||||
"@babel/runtime-corejs3": "^7.29.7",
|
||||
"@babel/types": "^7.29.7",
|
||||
"@babel/cli": "^8.0.1",
|
||||
"@babel/compat-data": "^8.0.0",
|
||||
"@babel/core": "^8.0.1",
|
||||
"@babel/eslint-parser": "^8.0.1",
|
||||
"@babel/node": "^8.0.1",
|
||||
"@babel/plugin-transform-export-namespace-from": "^8.0.1",
|
||||
"@babel/plugin-transform-runtime": "^8.0.1",
|
||||
"@babel/preset-env": "^8.0.2",
|
||||
"@babel/preset-react": "^8.0.1",
|
||||
"@babel/preset-typescript": "^8.0.1",
|
||||
"@babel/register": "^8.0.1",
|
||||
"@babel/runtime": "^8.0.0",
|
||||
"@babel/runtime-corejs3": "^8.0.0",
|
||||
"@babel/types": "^8.0.0",
|
||||
"@emotion/babel-plugin": "^11.13.5",
|
||||
"@emotion/jest": "^11.14.2",
|
||||
"@formatjs/intl-durationformat": "^0.10.15",
|
||||
@@ -302,7 +301,7 @@
|
||||
"babel-loader": "^10.1.1",
|
||||
"babel-plugin-dynamic-import-node": "^2.3.3",
|
||||
"babel-plugin-jsx-remove-data-test-id": "^3.0.0",
|
||||
"babel-plugin-lodash": "^3.3.4",
|
||||
"babel-plugin-polyfill-corejs3": "^1.0.0",
|
||||
"baseline-browser-mapping": "^2.10.38",
|
||||
"cheerio": "1.2.0",
|
||||
"concurrently": "^10.0.3",
|
||||
@@ -344,6 +343,7 @@
|
||||
"mini-css-extract-plugin": "^2.10.2",
|
||||
"open-cli": "^9.0.0",
|
||||
"oxlint": "^1.70.0",
|
||||
"patch-package": "^8.0.1",
|
||||
"po2json": "^0.4.5",
|
||||
"prettier": "3.8.4",
|
||||
"prettier-plugin-packagejson": "^3.0.2",
|
||||
@@ -427,6 +427,57 @@
|
||||
},
|
||||
"eslint-plugin-jest-dom": {
|
||||
"eslint": "$eslint"
|
||||
},
|
||||
"babel-plugin-jsx-remove-data-test-id": {
|
||||
"@babel/core": "$@babel/core"
|
||||
},
|
||||
"ts-jest": {
|
||||
"@babel/core": "$@babel/core"
|
||||
},
|
||||
"@babel/plugin-syntax-async-generators": {
|
||||
"@babel/core": "$@babel/core"
|
||||
},
|
||||
"@babel/plugin-syntax-bigint": {
|
||||
"@babel/core": "$@babel/core"
|
||||
},
|
||||
"@babel/plugin-syntax-class-properties": {
|
||||
"@babel/core": "$@babel/core"
|
||||
},
|
||||
"@babel/plugin-syntax-class-static-block": {
|
||||
"@babel/core": "$@babel/core"
|
||||
},
|
||||
"@babel/plugin-syntax-import-attributes": {
|
||||
"@babel/core": "$@babel/core"
|
||||
},
|
||||
"@babel/plugin-syntax-import-meta": {
|
||||
"@babel/core": "$@babel/core"
|
||||
},
|
||||
"@babel/plugin-syntax-json-strings": {
|
||||
"@babel/core": "$@babel/core"
|
||||
},
|
||||
"@babel/plugin-syntax-logical-assignment-operators": {
|
||||
"@babel/core": "$@babel/core"
|
||||
},
|
||||
"@babel/plugin-syntax-nullish-coalescing-operator": {
|
||||
"@babel/core": "$@babel/core"
|
||||
},
|
||||
"@babel/plugin-syntax-numeric-separator": {
|
||||
"@babel/core": "$@babel/core"
|
||||
},
|
||||
"@babel/plugin-syntax-object-rest-spread": {
|
||||
"@babel/core": "$@babel/core"
|
||||
},
|
||||
"@babel/plugin-syntax-optional-catch-binding": {
|
||||
"@babel/core": "$@babel/core"
|
||||
},
|
||||
"@babel/plugin-syntax-optional-chaining": {
|
||||
"@babel/core": "$@babel/core"
|
||||
},
|
||||
"@babel/plugin-syntax-private-property-in-object": {
|
||||
"@babel/core": "$@babel/core"
|
||||
},
|
||||
"@babel/plugin-syntax-top-level-await": {
|
||||
"@babel/core": "$@babel/core"
|
||||
}
|
||||
},
|
||||
"readme": "ERROR: No README data found!",
|
||||
|
||||
@@ -81,11 +81,11 @@
|
||||
"author": "Apache Software Foundation",
|
||||
"license": "Apache-2.0",
|
||||
"devDependencies": {
|
||||
"@babel/cli": "^7.29.7",
|
||||
"@babel/core": "^7.29.7",
|
||||
"@babel/preset-env": "^7.29.7",
|
||||
"@babel/preset-react": "^7.29.7",
|
||||
"@babel/preset-typescript": "^7.29.7",
|
||||
"@babel/cli": "^8.0.1",
|
||||
"@babel/core": "^8.0.1",
|
||||
"@babel/preset-env": "^8.0.2",
|
||||
"@babel/preset-react": "^8.0.1",
|
||||
"@babel/preset-typescript": "^8.0.1",
|
||||
"typescript": "^5.0.0",
|
||||
"@emotion/styled": "^11.14.1",
|
||||
"@types/lodash": "^4.17.24",
|
||||
|
||||
@@ -26,7 +26,7 @@
|
||||
"dependencies": {
|
||||
"@ant-design/icons": "^6.2.5",
|
||||
"@apache-superset/core": "*",
|
||||
"@babel/runtime": "^7.29.7",
|
||||
"@babel/runtime": "^8.0.0",
|
||||
"@braintree/sanitize-url": "^7.1.2",
|
||||
"@types/json-bigint": "^1.0.4",
|
||||
"@visx/responsive": "^4.0.0",
|
||||
|
||||
@@ -0,0 +1,26 @@
|
||||
diff --git a/node_modules/@emotion/babel-plugin/dist/emotion-babel-plugin.cjs.js b/node_modules/@emotion/babel-plugin/dist/emotion-babel-plugin.cjs.js
|
||||
index c97c6b4..3837543 100644
|
||||
--- a/node_modules/@emotion/babel-plugin/dist/emotion-babel-plugin.cjs.js
|
||||
+++ b/node_modules/@emotion/babel-plugin/dist/emotion-babel-plugin.cjs.js
|
||||
@@ -1083,7 +1083,7 @@ annotateAsPure?: boolean
|
||||
|
||||
if (node) {
|
||||
path.replaceWith(node);
|
||||
- path.hoist();
|
||||
+ if (typeof path.hoist === "function") path.hoist();
|
||||
} else if (annotateAsPure && path.isCallExpression()) {
|
||||
path.addComment('leading', '#__PURE__');
|
||||
}
|
||||
diff --git a/node_modules/@emotion/babel-plugin/dist/emotion-babel-plugin.esm.js b/node_modules/@emotion/babel-plugin/dist/emotion-babel-plugin.esm.js
|
||||
index fbe8ce1..b6f43d8 100644
|
||||
--- a/node_modules/@emotion/babel-plugin/dist/emotion-babel-plugin.esm.js
|
||||
+++ b/node_modules/@emotion/babel-plugin/dist/emotion-babel-plugin.esm.js
|
||||
@@ -1070,7 +1070,7 @@ annotateAsPure?: boolean
|
||||
|
||||
if (node) {
|
||||
path.replaceWith(node);
|
||||
- path.hoist();
|
||||
+ if (typeof path.hoist === "function") path.hoist();
|
||||
} else if (annotateAsPure && path.isCallExpression()) {
|
||||
path.addComment('leading', '#__PURE__');
|
||||
}
|
||||
@@ -37,7 +37,7 @@
|
||||
"react-dom": "^18.3.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@babel/types": "^7.29.7",
|
||||
"@babel/types": "^8.0.0",
|
||||
"@types/jest": "^30.0.0",
|
||||
"jest": "^30.4.2"
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user