Skip to content

Commit

Permalink
Add @babel/core as a dependency in Nextjs framework
Browse files Browse the repository at this point in the history
@babel/core is not installed per default in Next.js anymore, because Next.js might not use webpack + babel, but turbopack and swc instead. Storybook though still relies on @babel/core for several transformations.
  • Loading branch information
valentinpalkovic committed Jun 19, 2023
1 parent 0d7c3a8 commit dc2294d
Show file tree
Hide file tree
Showing 13 changed files with 209 additions and 87 deletions.
2 changes: 1 addition & 1 deletion code/builders/builder-webpack5/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@
"prep": "../../../scripts/prepare/bundle.ts"
},
"dependencies": {
"@babel/core": "^7.22.0",
"@babel/core": "^7.22.5",
"@storybook/addons": "7.1.0-alpha.36",
"@storybook/api": "7.1.0-alpha.36",
"@storybook/channel-postmessage": "7.1.0-alpha.36",
Expand Down
20 changes: 8 additions & 12 deletions code/frameworks/nextjs/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -58,18 +58,19 @@
"prep": "../../../scripts/prepare/bundle.ts"
},
"dependencies": {
"@babel/core": "^7.22.5",
"@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.20.0",
"@babel/plugin-transform-runtime": "^7.22.0",
"@babel/preset-env": "^7.22.0",
"@babel/preset-react": "^7.22.0",
"@babel/preset-typescript": "^7.21.0",
"@babel/runtime": "^7.22.0",
"@babel/plugin-syntax-import-assertions": "^7.22.5",
"@babel/plugin-transform-runtime": "^7.22.5",
"@babel/preset-env": "^7.22.5",
"@babel/preset-react": "^7.22.5",
"@babel/preset-typescript": "^7.22.5",
"@babel/runtime": "^7.22.5",
"@storybook/addon-actions": "7.1.0-alpha.36",
"@storybook/builder-webpack5": "7.1.0-alpha.36",
"@storybook/core-common": "7.1.0-alpha.36",
Expand Down Expand Up @@ -97,8 +98,7 @@
"tsconfig-paths-webpack-plugin": "^4.0.1"
},
"devDependencies": {
"@babel/core": "^7.22.0",
"@babel/types": "^7.22.0",
"@babel/types": "^7.22.5",
"@types/babel__core": "^7",
"@types/babel__plugin-transform-runtime": "^7",
"@types/babel__preset-env": "^7",
Expand All @@ -107,17 +107,13 @@
"webpack": "^5.65.0"
},
"peerDependencies": {
"@babel/core": "^7.22.0",
"@next/font": "^13.0.0",
"next": "^9.0.0 || ^10.0.0 || ^11.0.0 || ^12.0.0 || ^13.0.0",
"react": "^16.8.0 || ^17.0.0 || ^18.0.0",
"react-dom": "^16.8.0 || ^17.0.0 || ^18.0.0",
"webpack": "^5.0.0"
},
"peerDependenciesMeta": {
"@babel/core": {
"optional": true
},
"@next/font": {
"optional": true
},
Expand Down
2 changes: 1 addition & 1 deletion code/frameworks/web-components-webpack5/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@
"prep": "../../../scripts/prepare/bundle.ts"
},
"dependencies": {
"@babel/preset-env": "^7.22.0",
"@babel/preset-env": "^7.22.5",
"@storybook/builder-webpack5": "7.1.0-alpha.36",
"@storybook/core-common": "7.1.0-alpha.36",
"@storybook/preset-web-components-webpack": "7.1.0-alpha.36",
Expand Down
4 changes: 2 additions & 2 deletions code/lib/cli/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -54,8 +54,8 @@
"test": "jest test/**/*.test.js"
},
"dependencies": {
"@babel/core": "^7.22.0",
"@babel/preset-env": "^7.22.0",
"@babel/core": "^7.22.5",
"@babel/preset-env": "^7.22.5",
"@ndelangen/get-tarball": "^3.0.7",
"@storybook/codemod": "7.1.0-alpha.36",
"@storybook/core-common": "7.1.0-alpha.36",
Expand Down
6 changes: 3 additions & 3 deletions code/lib/codemod/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -45,9 +45,9 @@
"prep": "../../../scripts/prepare/bundle.ts"
},
"dependencies": {
"@babel/core": "^7.22.0",
"@babel/preset-env": "^7.22.0",
"@babel/types": "^7.22.0",
"@babel/core": "^7.22.5",
"@babel/preset-env": "^7.22.5",
"@babel/types": "^7.22.5",
"@storybook/csf": "^0.1.0",
"@storybook/csf-tools": "7.1.0-alpha.36",
"@storybook/node-logger": "7.1.0-alpha.36",
Expand Down
8 changes: 4 additions & 4 deletions code/lib/csf-tools/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -41,10 +41,10 @@
"prep": "../../../scripts/prepare/bundle.ts"
},
"dependencies": {
"@babel/generator": "^7.22.0",
"@babel/parser": "^7.22.0",
"@babel/traverse": "^7.22.0",
"@babel/types": "^7.22.0",
"@babel/generator": "^7.22.5",
"@babel/parser": "^7.22.5",
"@babel/traverse": "^7.22.5",
"@babel/types": "^7.22.5",
"@storybook/csf": "^0.1.0",
"@storybook/types": "7.1.0-alpha.36",
"fs-extra": "^11.1.0",
Expand Down
2 changes: 1 addition & 1 deletion code/lib/docs-tools/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@
"lodash": "^4.17.21"
},
"devDependencies": {
"@babel/core": "^7.22.0",
"@babel/core": "^7.22.5",
"jest-specific-snapshot": "^8.0.0",
"require-from-string": "^2.0.2",
"typescript": "~4.9.3"
Expand Down
10 changes: 5 additions & 5 deletions code/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -91,11 +91,11 @@
"type-fest": "^3.11.0"
},
"dependencies": {
"@babel/core": "^7.22.0",
"@babel/preset-env": "^7.22.0",
"@babel/preset-react": "^7.22.0",
"@babel/preset-typescript": "^7.21.0",
"@babel/runtime": "^7.20.1",
"@babel/core": "^7.22.5",
"@babel/preset-env": "^7.22.5",
"@babel/preset-react": "^7.22.5",
"@babel/preset-typescript": "^7.22.5",
"@babel/runtime": "^7.22.5",
"@emotion/jest": "^11.10.0",
"@jest/globals": "^29.3.1",
"@nx/workspace": "16.2.1",
Expand Down
4 changes: 2 additions & 2 deletions code/presets/preact-webpack/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -48,8 +48,8 @@
"prep": "../../../scripts/prepare/bundle.ts"
},
"dependencies": {
"@babel/plugin-transform-react-jsx": "^7.21.0",
"@babel/preset-typescript": "^7.21.0",
"@babel/plugin-transform-react-jsx": "^7.22.5",
"@babel/preset-typescript": "^7.22.5",
"@storybook/core-webpack": "7.1.0-alpha.36",
"@types/node": "^16.0.0"
},
Expand Down
4 changes: 2 additions & 2 deletions code/presets/react-webpack/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -63,8 +63,8 @@
"prep": "../../../scripts/prepare/bundle.ts"
},
"dependencies": {
"@babel/preset-flow": "^7.21.0",
"@babel/preset-react": "^7.22.0",
"@babel/preset-flow": "^7.22.5",
"@babel/preset-react": "^7.22.5",
"@pmmmwh/react-refresh-webpack-plugin": "^0.5.5",
"@storybook/core-webpack": "7.1.0-alpha.36",
"@storybook/docs-tools": "7.1.0-alpha.36",
Expand Down
2 changes: 1 addition & 1 deletion code/presets/web-components-webpack/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@
"dependencies": {
"@babel/plugin-syntax-dynamic-import": "^7.8.3",
"@babel/plugin-syntax-import-meta": "^7.10.4",
"@babel/preset-env": "^7.22.0",
"@babel/preset-env": "^7.22.5",
"@storybook/core-webpack": "7.1.0-alpha.36",
"@types/node": "^16.0.0",
"babel-loader": "^7.0.0 || ^8.0.0 || ^9.0.0",
Expand Down
2 changes: 1 addition & 1 deletion code/renderers/react/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@
"util-deprecate": "^1.0.2"
},
"devDependencies": {
"@babel/core": "^7.22.0",
"@babel/core": "^7.22.5",
"@types/util-deprecate": "^1.0.0",
"expect-type": "^0.15.0",
"jest-specific-snapshot": "^8.0.0",
Expand Down

0 comments on commit dc2294d

Please sign in to comment.