Skip to content

Commit

Permalink
[core] Remove legacy bundle
Browse files Browse the repository at this point in the history
  • Loading branch information
flaviendelangle committed Feb 20, 2024
1 parent 6179f3f commit 37c6cf7
Show file tree
Hide file tree
Showing 16 changed files with 9 additions and 40 deletions.
6 changes: 0 additions & 6 deletions babel.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -155,12 +155,6 @@ module.exports = function getBabelConfig(api) {
],
],
},
legacy: {
plugins: [
// IE11 support
'@babel/plugin-transform-object-assign',
],
},
test: {
sourceMaps: 'both',
plugins: [
Expand Down
2 changes: 0 additions & 2 deletions docs/babel.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,6 @@ module.exports = function getBabelConfig(api) {
],
plugins: [
...baseConfig.plugins,
// for IE 11 support
'@babel/plugin-transform-object-assign',
'babel-plugin-preval',
[
'babel-plugin-module-resolver',
Expand Down
1 change: 0 additions & 1 deletion docs/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@
},
"dependencies": {
"@babel/core": "^7.23.9",
"@babel/plugin-transform-object-assign": "^7.23.3",
"@babel/runtime-corejs2": "^7.23.9",
"@docsearch/react": "^3.5.2",
"@emotion/cache": "^11.11.0",
Expand Down
1 change: 0 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,6 @@
"@babel/plugin-proposal-object-rest-spread": "^7.20.7",
"@babel/plugin-proposal-private-methods": "^7.18.6",
"@babel/plugin-proposal-private-property-in-object": "^7.21.11",
"@babel/plugin-transform-object-assign": "^7.23.3",
"@babel/plugin-transform-react-constant-elements": "^7.23.3",
"@babel/plugin-transform-runtime": "^7.23.9",
"@babel/preset-env": "^7.23.9",
Expand Down
3 changes: 1 addition & 2 deletions packages/x-charts/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,7 @@
],
"scripts": {
"typescript": "tsc -p tsconfig.json",
"build": "yarn build:legacy && yarn build:modern && yarn build:node && yarn build:stable && yarn build:types && yarn build:copy-files ",
"build:legacy": "node ../../scripts/build.mjs legacy",
"build": "yarn build:modern && yarn build:node && yarn build:stable && yarn build:types && yarn build:copy-files ",
"build:modern": "node ../../scripts/build.mjs modern",
"build:node": "node ../../scripts/build.mjs node",
"build:stable": "node ../../scripts/build.mjs stable",
Expand Down
3 changes: 1 addition & 2 deletions packages/x-data-grid-generator/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,7 @@
],
"scripts": {
"typescript": "tsc -p tsconfig.json",
"build": "yarn build:legacy && yarn build:modern && yarn build:node && yarn build:stable && yarn build:types && yarn build:copy-files ",
"build:legacy": "node ../../scripts/build.mjs legacy",
"build": "yarn build:modern && yarn build:node && yarn build:stable && yarn build:types && yarn build:copy-files ",
"build:modern": "node ../../scripts/build.mjs modern",
"build:node": "node ../../scripts/build.mjs node",
"build:stable": "node ../../scripts/build.mjs stable",
Expand Down
3 changes: 1 addition & 2 deletions packages/x-data-grid-premium/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,7 @@
],
"scripts": {
"typescript": "tsc -p tsconfig.json",
"build": "yarn build:legacy && yarn build:modern && yarn build:node && yarn build:stable && yarn build:types && yarn build:copy-files ",
"build:legacy": "node ../../scripts/build.mjs legacy",
"build": "yarn build:modern && yarn build:node && yarn build:stable && yarn build:types && yarn build:copy-files ",
"build:modern": "node ../../scripts/build.mjs modern",
"build:node": "node ../../scripts/build.mjs node",
"build:stable": "node ../../scripts/build.mjs stable",
Expand Down
3 changes: 1 addition & 2 deletions packages/x-data-grid-pro/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,7 @@
],
"scripts": {
"typescript": "tsc -p tsconfig.json",
"build": "yarn build:legacy && yarn build:modern && yarn build:node && yarn build:stable && yarn build:types && yarn build:copy-files ",
"build:legacy": "node ../../scripts/build.mjs legacy",
"build": "yarn build:modern && yarn build:node && yarn build:stable && yarn build:types && yarn build:copy-files ",
"build:modern": "node ../../scripts/build.mjs modern",
"build:node": "node ../../scripts/build.mjs node",
"build:stable": "node ../../scripts/build.mjs stable",
Expand Down
3 changes: 1 addition & 2 deletions packages/x-data-grid/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,7 @@
],
"scripts": {
"typescript": "tsc -p tsconfig.json",
"build": "yarn build:legacy && yarn build:modern && yarn build:node && yarn build:stable && yarn build:types && yarn build:copy-files ",
"build:legacy": "node ../../scripts/build.mjs legacy",
"build": "yarn build:modern && yarn build:node && yarn build:stable && yarn build:types && yarn build:copy-files ",
"build:modern": "node ../../scripts/build.mjs modern",
"build:node": "node ../../scripts/build.mjs node",
"build:stable": "node ../../scripts/build.mjs stable",
Expand Down
3 changes: 1 addition & 2 deletions packages/x-date-pickers-pro/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,7 @@
],
"scripts": {
"typescript": "tsc -p tsconfig.json",
"build": "yarn build:legacy && yarn build:modern && yarn build:node && yarn build:stable && yarn build:types && yarn build:copy-files ",
"build:legacy": "node ../../scripts/build.mjs legacy",
"build": "yarn build:modern && yarn build:node && yarn build:stable && yarn build:types && yarn build:copy-files ",
"build:modern": "node ../../scripts/build.mjs modern",
"build:node": "node ../../scripts/build.mjs node",
"build:stable": "node ../../scripts/build.mjs stable",
Expand Down
3 changes: 1 addition & 2 deletions packages/x-date-pickers/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,7 @@
],
"scripts": {
"typescript": "tsc -p tsconfig.json",
"build": "yarn build:legacy && yarn build:modern && yarn build:node && yarn build:stable && yarn build:types && yarn build:copy-files ",
"build:legacy": "node ../../scripts/build.mjs legacy",
"build": "yarn build:modern && yarn build:node && yarn build:stable && yarn build:types && yarn build:copy-files ",
"build:modern": "node ../../scripts/build.mjs modern",
"build:node": "node ../../scripts/build.mjs node",
"build:stable": "node ../../scripts/build.mjs stable",
Expand Down
4 changes: 1 addition & 3 deletions packages/x-license/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@
"homepage": "https://mui.com/x/introduction/licensing/",
"sideEffects": [
"./utils/licenseInfo.js",
"./legacy/utils/licenseInfo.js",
"./modern/utils/licenseInfo.js",
"./node/utils/licenseInfo.js"
],
Expand All @@ -20,8 +19,7 @@
},
"scripts": {
"typescript": "tsc -p tsconfig.json",
"build": "yarn build:legacy && yarn build:modern && yarn build:node && yarn build:stable && yarn build:types && yarn build:copy-files ",
"build:legacy": "node ../../scripts/build.mjs legacy",
"build": "yarn build:modern && yarn build:node && yarn build:stable && yarn build:types && yarn build:copy-files ",
"build:modern": "node ../../scripts/build.mjs modern",
"build:node": "node ../../scripts/build.mjs node",
"build:stable": "node ../../scripts/build.mjs stable",
Expand Down
3 changes: 1 addition & 2 deletions packages/x-tree-view/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,7 @@
],
"scripts": {
"typescript": "tsc -p tsconfig.json",
"build": "yarn build:legacy && yarn build:modern && yarn build:node && yarn build:stable && yarn build:types && yarn build:copy-files ",
"build:legacy": "node ../../scripts/build.mjs legacy",
"build": "yarn build:modern && yarn build:node && yarn build:stable && yarn build:types && yarn build:copy-files ",
"build:modern": "node ../../scripts/build.mjs modern",
"build:node": "node ../../scripts/build.mjs node",
"build:stable": "node ../../scripts/build.mjs stable",
Expand Down
3 changes: 0 additions & 3 deletions scripts/build.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,6 @@ import { getWorkspaceRoot } from './utils.mjs';
const exec = promisify(childProcess.exec);

const validBundles = [
// legacy build using ES6 modules
'legacy',
// modern build with a rolling target using ES6 modules
'modern',
// build for node using commonJS modules
Expand Down Expand Up @@ -67,7 +65,6 @@ async function run(argv) {
node: topLevelPathImportsCanBePackages ? './node' : './',
modern: './modern',
stable: topLevelPathImportsCanBePackages ? './' : './esm',
legacy: './legacy',
}[bundle],
);

Expand Down
1 change: 0 additions & 1 deletion scripts/copyFiles.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@ async function addLicense(packageData) {
await Promise.all(
[
'./index.js',
'./legacy/index.js',
'./modern/index.js',
'./node/index.js',
'./umd/material-ui.development.js',
Expand Down
7 changes: 0 additions & 7 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -916,13 +916,6 @@
"@babel/helper-plugin-utils" "^7.22.5"
"@babel/plugin-syntax-numeric-separator" "^7.10.4"

"@babel/plugin-transform-object-assign@^7.23.3":
version "7.23.3"
resolved "https://registry.yarnpkg.com/@babel/plugin-transform-object-assign/-/plugin-transform-object-assign-7.23.3.tgz#64177e8cf943460c7f0e1c410277546804f59625"
integrity sha512-TPJ6O7gVC2rlQH2hvQGRH273G1xdoloCj9Pc07Q7JbIZYDi+Sv5gaE2fu+r5E7qK4zyt6vj0FbZaZTRU5C3OMA==
dependencies:
"@babel/helper-plugin-utils" "^7.22.5"

"@babel/plugin-transform-object-rest-spread@^7.23.4":
version "7.23.4"
resolved "https://registry.yarnpkg.com/@babel/plugin-transform-object-rest-spread/-/plugin-transform-object-rest-spread-7.23.4.tgz#2b9c2d26bf62710460bdc0d1730d4f1048361b83"
Expand Down

0 comments on commit 37c6cf7

Please sign in to comment.