diff --git a/code/frameworks/nextjs/package.json b/code/frameworks/nextjs/package.json index a9142100cf8d..394a6fbb502f 100644 --- a/code/frameworks/nextjs/package.json +++ b/code/frameworks/nextjs/package.json @@ -80,13 +80,13 @@ }, "dependencies": { "@babel/core": "^7.22.9", - "@babel/plugin-proposal-class-properties": "^7.18.6", - "@babel/plugin-proposal-export-namespace-from": "^7.18.9", - "@babel/plugin-proposal-numeric-separator": "^7.18.6", - "@babel/plugin-proposal-object-rest-spread": "^7.20.7", "@babel/plugin-syntax-bigint": "^7.8.3", "@babel/plugin-syntax-dynamic-import": "^7.8.3", "@babel/plugin-syntax-import-assertions": "^7.22.5", + "@babel/plugin-transform-class-properties": "^7.22.5", + "@babel/plugin-transform-export-namespace-from": "^7.22.11", + "@babel/plugin-transform-numeric-separator": "^7.22.11", + "@babel/plugin-transform-object-rest-spread": "^7.22.15", "@babel/plugin-transform-runtime": "^7.22.9", "@babel/preset-env": "^7.22.9", "@babel/preset-react": "^7.22.5", diff --git a/code/frameworks/nextjs/src/babel/preset.ts b/code/frameworks/nextjs/src/babel/preset.ts index 08a6c18e4312..46dddd1d1659 100644 --- a/code/frameworks/nextjs/src/babel/preset.ts +++ b/code/frameworks/nextjs/src/babel/preset.ts @@ -142,9 +142,9 @@ export default (api: any, options: NextBabelPresetOptions = {}): BabelPreset => require('@babel/plugin-syntax-dynamic-import'), require('@babel/plugin-syntax-import-assertions'), require('./plugins/react-loadable-plugin'), - [require('@babel/plugin-proposal-class-properties'), options['class-properties'] || {}], + [require('@babel/plugin-transform-class-properties'), options['class-properties'] || {}], [ - require('@babel/plugin-proposal-object-rest-spread'), + require('@babel/plugin-transform-object-rest-spread'), { useBuiltIns: true, }, @@ -172,8 +172,8 @@ export default (api: any, options: NextBabelPresetOptions = {}): BabelPreset => isServer && require('@babel/plugin-syntax-bigint'), // Always compile numeric separator because the resulting number is // smaller. - require('@babel/plugin-proposal-numeric-separator'), - require('@babel/plugin-proposal-export-namespace-from'), + require('@babel/plugin-transform-numeric-separator'), + require('@babel/plugin-transform-export-namespace-from'), ].filter(Boolean), }; }; diff --git a/code/lib/docs-tools/src/argTypes/convert/convert.test.ts b/code/lib/docs-tools/src/argTypes/convert/convert.test.ts index 5b7b15ec6c63..51ad20482478 100644 --- a/code/lib/docs-tools/src/argTypes/convert/convert.test.ts +++ b/code/lib/docs-tools/src/argTypes/convert/convert.test.ts @@ -812,7 +812,7 @@ const transformToModule = (inputCode: string) => { const annotateWithDocgen = (inputCode: string, filename: string) => { const options = { presets: ['@babel/typescript', '@babel/react'], - plugins: ['babel-plugin-react-docgen', '@babel/plugin-proposal-class-properties'], + plugins: ['babel-plugin-react-docgen', '@babel/plugin-transform-class-properties'], babelrc: false, filename, }; diff --git a/code/renderers/react/src/docs/extractArgTypes.test.ts b/code/renderers/react/src/docs/extractArgTypes.test.ts index 31ea19fd754c..f96a8722e9d9 100644 --- a/code/renderers/react/src/docs/extractArgTypes.test.ts +++ b/code/renderers/react/src/docs/extractArgTypes.test.ts @@ -37,7 +37,7 @@ const transformToModule = (inputCode: string) => { const annotateWithDocgen = (inputPath: string) => { const options = { presets: ['@babel/typescript', '@babel/react'], - plugins: ['babel-plugin-react-docgen', '@babel/plugin-proposal-class-properties'], + plugins: ['babel-plugin-react-docgen', '@babel/plugin-transform-class-properties'], babelrc: false, }; const { code } = transformFileSync(inputPath, options) || {}; diff --git a/code/yarn.lock b/code/yarn.lock index a9ad7bd0ce70..704c48e55acf 100644 --- a/code/yarn.lock +++ b/code/yarn.lock @@ -414,7 +414,7 @@ __metadata: languageName: node linkType: hard -"@babel/compat-data@npm:^7.20.5, @babel/compat-data@npm:^7.22.6, @babel/compat-data@npm:^7.22.9": +"@babel/compat-data@npm:^7.22.6, @babel/compat-data@npm:^7.22.9": version: 7.22.9 resolution: "@babel/compat-data@npm:7.22.9" checksum: 1334264b041f8ad4e33036326970c9c26754eb5c04b3af6c223fe6da988cbb8a8542b5526f49ec1ac488210d2f710484a0e4bcd30256294ae3f261d0141febad @@ -555,7 +555,7 @@ __metadata: languageName: node linkType: hard -"@babel/helper-compilation-targets@npm:^7.12.0, @babel/helper-compilation-targets@npm:^7.20.7, @babel/helper-compilation-targets@npm:^7.22.15, @babel/helper-compilation-targets@npm:^7.22.5, @babel/helper-compilation-targets@npm:^7.22.6, @babel/helper-compilation-targets@npm:^7.22.9": +"@babel/helper-compilation-targets@npm:^7.12.0, @babel/helper-compilation-targets@npm:^7.22.15, @babel/helper-compilation-targets@npm:^7.22.5, @babel/helper-compilation-targets@npm:^7.22.6, @babel/helper-compilation-targets@npm:^7.22.9": version: 7.22.15 resolution: "@babel/helper-compilation-targets@npm:7.22.15" dependencies: @@ -683,7 +683,7 @@ __metadata: languageName: node linkType: hard -"@babel/helper-plugin-utils@npm:^7.0.0, @babel/helper-plugin-utils@npm:^7.10.4, @babel/helper-plugin-utils@npm:^7.12.13, @babel/helper-plugin-utils@npm:^7.14.5, @babel/helper-plugin-utils@npm:^7.18.6, @babel/helper-plugin-utils@npm:^7.18.9, @babel/helper-plugin-utils@npm:^7.20.2, @babel/helper-plugin-utils@npm:^7.22.5, @babel/helper-plugin-utils@npm:^7.8.0, @babel/helper-plugin-utils@npm:^7.8.3": +"@babel/helper-plugin-utils@npm:^7.0.0, @babel/helper-plugin-utils@npm:^7.10.4, @babel/helper-plugin-utils@npm:^7.12.13, @babel/helper-plugin-utils@npm:^7.14.5, @babel/helper-plugin-utils@npm:^7.18.6, @babel/helper-plugin-utils@npm:^7.20.2, @babel/helper-plugin-utils@npm:^7.22.5, @babel/helper-plugin-utils@npm:^7.8.0, @babel/helper-plugin-utils@npm:^7.8.3": version: 7.22.5 resolution: "@babel/helper-plugin-utils@npm:7.22.5" checksum: d2c4bfe2fa91058bcdee4f4e57a3f4933aed7af843acfd169cd6179fab8d13c1d636474ecabb2af107dc77462c7e893199aa26632bac1c6d7e025a17cbb9d20d @@ -844,7 +844,7 @@ __metadata: languageName: node linkType: hard -"@babel/plugin-proposal-class-properties@npm:^7.13.0, @babel/plugin-proposal-class-properties@npm:^7.16.5, @babel/plugin-proposal-class-properties@npm:^7.18.6": +"@babel/plugin-proposal-class-properties@npm:^7.13.0, @babel/plugin-proposal-class-properties@npm:^7.16.5": version: 7.18.6 resolution: "@babel/plugin-proposal-class-properties@npm:7.18.6" dependencies: @@ -871,18 +871,6 @@ __metadata: languageName: node linkType: hard -"@babel/plugin-proposal-export-namespace-from@npm:^7.18.9": - version: 7.18.9 - resolution: "@babel/plugin-proposal-export-namespace-from@npm:7.18.9" - dependencies: - "@babel/helper-plugin-utils": ^7.18.9 - "@babel/plugin-syntax-export-namespace-from": ^7.8.3 - peerDependencies: - "@babel/core": ^7.0.0-0 - checksum: b90346bd3628ebd44138d0628a5aba1e6b11748893fb48e87008cac30f3bc7cd3161362e49433156737350318174164436357a66fbbfdbe952606b460bd8a0e4 - languageName: node - linkType: hard - "@babel/plugin-proposal-nullish-coalescing-operator@npm:^7.13.8": version: 7.18.6 resolution: "@babel/plugin-proposal-nullish-coalescing-operator@npm:7.18.6" @@ -895,33 +883,6 @@ __metadata: languageName: node linkType: hard -"@babel/plugin-proposal-numeric-separator@npm:^7.18.6": - version: 7.18.6 - resolution: "@babel/plugin-proposal-numeric-separator@npm:7.18.6" - dependencies: - "@babel/helper-plugin-utils": ^7.18.6 - "@babel/plugin-syntax-numeric-separator": ^7.10.4 - peerDependencies: - "@babel/core": ^7.0.0-0 - checksum: a83a65c6ec0d2293d830e9db61406d246f22d8ea03583d68460cb1b6330c6699320acce1b45f66ba3c357830720e49267e3d99f95088be457c66e6450fbfe3fa - languageName: node - linkType: hard - -"@babel/plugin-proposal-object-rest-spread@npm:^7.20.7": - version: 7.20.7 - resolution: "@babel/plugin-proposal-object-rest-spread@npm:7.20.7" - dependencies: - "@babel/compat-data": ^7.20.5 - "@babel/helper-compilation-targets": ^7.20.7 - "@babel/helper-plugin-utils": ^7.20.2 - "@babel/plugin-syntax-object-rest-spread": ^7.8.3 - "@babel/plugin-transform-parameters": ^7.20.7 - peerDependencies: - "@babel/core": ^7.0.0-0 - checksum: b9818749bb49d8095df64c45db682448d04743d96722984cbfd375733b2585c26d807f84b4fdb28474f2d614be6a6ffe3d96ffb121840e9e5345b2ccc0438bd8 - languageName: node - linkType: hard - "@babel/plugin-proposal-optional-chaining@npm:^7.13.12": version: 7.21.0 resolution: "@babel/plugin-proposal-optional-chaining@npm:7.21.0" @@ -1665,7 +1626,7 @@ __metadata: languageName: node linkType: hard -"@babel/plugin-transform-parameters@npm:^7.20.7, @babel/plugin-transform-parameters@npm:^7.22.15, @babel/plugin-transform-parameters@npm:^7.22.5": +"@babel/plugin-transform-parameters@npm:^7.22.15, @babel/plugin-transform-parameters@npm:^7.22.5": version: 7.22.15 resolution: "@babel/plugin-transform-parameters@npm:7.22.15" dependencies: @@ -7283,13 +7244,13 @@ __metadata: resolution: "@storybook/nextjs@workspace:frameworks/nextjs" dependencies: "@babel/core": ^7.22.9 - "@babel/plugin-proposal-class-properties": ^7.18.6 - "@babel/plugin-proposal-export-namespace-from": ^7.18.9 - "@babel/plugin-proposal-numeric-separator": ^7.18.6 - "@babel/plugin-proposal-object-rest-spread": ^7.20.7 "@babel/plugin-syntax-bigint": ^7.8.3 "@babel/plugin-syntax-dynamic-import": ^7.8.3 "@babel/plugin-syntax-import-assertions": ^7.22.5 + "@babel/plugin-transform-class-properties": ^7.22.5 + "@babel/plugin-transform-export-namespace-from": ^7.22.11 + "@babel/plugin-transform-numeric-separator": ^7.22.11 + "@babel/plugin-transform-object-rest-spread": ^7.22.15 "@babel/plugin-transform-runtime": ^7.22.9 "@babel/preset-env": ^7.22.9 "@babel/preset-react": ^7.22.5 diff --git a/scripts/package.json b/scripts/package.json index 906bb2b95926..8a1ace601a4d 100644 --- a/scripts/package.json +++ b/scripts/package.json @@ -58,12 +58,12 @@ "dependencies": { "@actions/core": "^1.10.0", "@babel/core": "^7.22.0", - "@babel/plugin-proposal-class-properties": "^7.18.6", "@babel/plugin-proposal-decorators": "^7.22.0", "@babel/plugin-syntax-class-properties": "^7.12.13", "@babel/plugin-syntax-decorators": "^7.22.0", "@babel/plugin-syntax-jsx": "^7.21.0", "@babel/plugin-syntax-typescript": "^7.21.0", + "@babel/plugin-transform-class-properties": "^7.22.5", "@babel/preset-env": "^7.22.0", "@babel/preset-react": "^7.22.0", "@babel/preset-typescript": "^7.21.0", diff --git a/scripts/yarn.lock b/scripts/yarn.lock index ee273eaf2d45..ee865b1b5b66 100644 --- a/scripts/yarn.lock +++ b/scripts/yarn.lock @@ -131,7 +131,7 @@ __metadata: languageName: node linkType: hard -"@babel/helper-create-class-features-plugin@npm:^7.18.6, @babel/helper-create-class-features-plugin@npm:^7.22.11, @babel/helper-create-class-features-plugin@npm:^7.22.15, @babel/helper-create-class-features-plugin@npm:^7.22.5": +"@babel/helper-create-class-features-plugin@npm:^7.22.11, @babel/helper-create-class-features-plugin@npm:^7.22.15, @babel/helper-create-class-features-plugin@npm:^7.22.5": version: 7.22.15 resolution: "@babel/helper-create-class-features-plugin@npm:7.22.15" dependencies: @@ -393,18 +393,6 @@ __metadata: languageName: node linkType: hard -"@babel/plugin-proposal-class-properties@npm:^7.18.6": - version: 7.18.6 - resolution: "@babel/plugin-proposal-class-properties@npm:7.18.6" - dependencies: - "@babel/helper-create-class-features-plugin": ^7.18.6 - "@babel/helper-plugin-utils": ^7.18.6 - peerDependencies: - "@babel/core": ^7.0.0-0 - checksum: d5172ac6c9948cdfc387e94f3493ad86cb04035cf7433f86b5d358270b1b9752dc25e176db0c5d65892a246aca7bdb4636672e15626d7a7de4bc0bd0040168d9 - languageName: node - linkType: hard - "@babel/plugin-proposal-decorators@npm:^7.22.0": version: 7.22.15 resolution: "@babel/plugin-proposal-decorators@npm:7.22.15" @@ -2891,12 +2879,12 @@ __metadata: dependencies: "@actions/core": ^1.10.0 "@babel/core": ^7.22.0 - "@babel/plugin-proposal-class-properties": ^7.18.6 "@babel/plugin-proposal-decorators": ^7.22.0 "@babel/plugin-syntax-class-properties": ^7.12.13 "@babel/plugin-syntax-decorators": ^7.22.0 "@babel/plugin-syntax-jsx": ^7.21.0 "@babel/plugin-syntax-typescript": ^7.21.0 + "@babel/plugin-transform-class-properties": ^7.22.5 "@babel/preset-env": ^7.22.0 "@babel/preset-react": ^7.22.0 "@babel/preset-typescript": ^7.21.0