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 May 8, 2023
1 parent 0cc12b1 commit 8cb40a4
Show file tree
Hide file tree
Showing 2 changed files with 150 additions and 10 deletions.
8 changes: 2 additions & 6 deletions code/frameworks/nextjs/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@
"prep": "../../../scripts/prepare/bundle.ts"
},
"dependencies": {
"@babel/core": "^7.21.8",
"@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",
Expand Down Expand Up @@ -96,8 +97,7 @@
"tsconfig-paths-webpack-plugin": "^3.5.2"
},
"devDependencies": {
"@babel/core": "^7.20.5",
"@babel/types": "^7.20.5",
"@babel/types": "^7.21.5",
"@types/babel__core": "^7",
"@types/babel__plugin-transform-runtime": "^7",
"@types/babel__preset-env": "^7",
Expand All @@ -106,17 +106,13 @@
"webpack": "^5.65.0"
},
"peerDependencies": {
"@babel/core": "^7.11.5",
"@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
152 changes: 148 additions & 4 deletions code/yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -407,6 +407,13 @@ __metadata:
languageName: node
linkType: hard

"@babel/compat-data@npm:^7.21.5":
version: 7.21.7
resolution: "@babel/compat-data@npm:7.21.7"
checksum: cd6bc85364a569cc74bcf0bfdc27161a1cb423c60c624e06f44b53c9e6fe7708bd0af3e389d376aec8ed9b2795907c43d01e4163dbc2a3a3142a2de55464a51d
languageName: node
linkType: hard

"@babel/core@npm:7.19.3":
version: 7.19.3
resolution: "@babel/core@npm:7.19.3"
Expand All @@ -430,7 +437,7 @@ __metadata:
languageName: node
linkType: hard

"@babel/core@npm:7.21.4, @babel/core@npm:^7.11.6, @babel/core@npm:^7.12.0, @babel/core@npm:^7.12.10, @babel/core@npm:^7.12.3, @babel/core@npm:^7.13.16, @babel/core@npm:^7.19.6, @babel/core@npm:^7.20.12, @babel/core@npm:^7.20.2, @babel/core@npm:^7.20.5, @babel/core@npm:^7.3.4, @babel/core@npm:^7.7.5, @babel/core@npm:^7.9.6, @babel/core@npm:~7.21.0":
"@babel/core@npm:7.21.4, @babel/core@npm:^7.11.6, @babel/core@npm:^7.12.0, @babel/core@npm:^7.12.10, @babel/core@npm:^7.12.3, @babel/core@npm:^7.13.16, @babel/core@npm:^7.19.6, @babel/core@npm:^7.20.12, @babel/core@npm:^7.20.2, @babel/core@npm:^7.3.4, @babel/core@npm:^7.7.5, @babel/core@npm:^7.9.6, @babel/core@npm:~7.21.0":
version: 7.21.4
resolution: "@babel/core@npm:7.21.4"
dependencies:
Expand Down Expand Up @@ -476,6 +483,29 @@ __metadata:
languageName: node
linkType: hard

"@babel/core@npm:^7.21.8":
version: 7.21.8
resolution: "@babel/core@npm:7.21.8"
dependencies:
"@ampproject/remapping": ^2.2.0
"@babel/code-frame": ^7.21.4
"@babel/generator": ^7.21.5
"@babel/helper-compilation-targets": ^7.21.5
"@babel/helper-module-transforms": ^7.21.5
"@babel/helpers": ^7.21.5
"@babel/parser": ^7.21.8
"@babel/template": ^7.20.7
"@babel/traverse": ^7.21.5
"@babel/types": ^7.21.5
convert-source-map: ^1.7.0
debug: ^4.1.0
gensync: ^1.0.0-beta.2
json5: ^2.2.2
semver: ^6.3.0
checksum: bf6bb92bd78fb8b6628bb0612ac0915407b996b179e1404108f92ed32972978340b4457b08f2abf86390a58fb51815cab419edb2dbbc8846efc39eaa61b8cde3
languageName: node
linkType: hard

"@babel/generator@npm:7.21.4, @babel/generator@npm:^7.12.11, @babel/generator@npm:^7.19.3, @babel/generator@npm:^7.21.4, @babel/generator@npm:^7.7.2, @babel/generator@npm:^7.8.7, @babel/generator@npm:~7.21.1":
version: 7.21.4
resolution: "@babel/generator@npm:7.21.4"
Expand All @@ -488,6 +518,18 @@ __metadata:
languageName: node
linkType: hard

"@babel/generator@npm:^7.21.5":
version: 7.21.5
resolution: "@babel/generator@npm:7.21.5"
dependencies:
"@babel/types": ^7.21.5
"@jridgewell/gen-mapping": ^0.3.2
"@jridgewell/trace-mapping": ^0.3.17
jsesc: ^2.5.1
checksum: e98b51440cbbcee68e66c66684b5334f5929dba512067a6c3c1aecc77131b308bf61eca74a5ae1fb73028089d22a188ca2219c364596117f27695102afc18e95
languageName: node
linkType: hard

"@babel/helper-annotate-as-pure@npm:7.18.6, @babel/helper-annotate-as-pure@npm:^7.18.6":
version: 7.18.6
resolution: "@babel/helper-annotate-as-pure@npm:7.18.6"
Expand Down Expand Up @@ -522,6 +564,21 @@ __metadata:
languageName: node
linkType: hard

"@babel/helper-compilation-targets@npm:^7.21.5":
version: 7.21.5
resolution: "@babel/helper-compilation-targets@npm:7.21.5"
dependencies:
"@babel/compat-data": ^7.21.5
"@babel/helper-validator-option": ^7.21.0
browserslist: ^4.21.3
lru-cache: ^5.1.1
semver: ^6.3.0
peerDependencies:
"@babel/core": ^7.0.0
checksum: 36752452eb70d6a6f52f68846344a739089374a97619e5a4857e31e7d067bdad8270efd9dd0dd5dfc483dd2d98bf0c1c6f08e3315fe949e7bfffef67eaf669ad
languageName: node
linkType: hard

"@babel/helper-create-class-features-plugin@npm:^7.18.6, @babel/helper-create-class-features-plugin@npm:^7.21.0":
version: 7.21.4
resolution: "@babel/helper-create-class-features-plugin@npm:7.21.4"
Expand Down Expand Up @@ -575,6 +632,13 @@ __metadata:
languageName: node
linkType: hard

"@babel/helper-environment-visitor@npm:^7.21.5":
version: 7.21.5
resolution: "@babel/helper-environment-visitor@npm:7.21.5"
checksum: d3f965d9691e3e2e11036d23ba9993a42d18f9be3d4589d3bb3d09d02e9d4d204026965633e36fb43b35fde905c2dfe753fb59b72ae0c3841f5a627fb1738d8a
languageName: node
linkType: hard

"@babel/helper-explode-assignable-expression@npm:^7.18.6":
version: 7.18.6
resolution: "@babel/helper-explode-assignable-expression@npm:7.18.6"
Expand Down Expand Up @@ -637,6 +701,22 @@ __metadata:
languageName: node
linkType: hard

"@babel/helper-module-transforms@npm:^7.21.5":
version: 7.21.5
resolution: "@babel/helper-module-transforms@npm:7.21.5"
dependencies:
"@babel/helper-environment-visitor": ^7.21.5
"@babel/helper-module-imports": ^7.21.4
"@babel/helper-simple-access": ^7.21.5
"@babel/helper-split-export-declaration": ^7.18.6
"@babel/helper-validator-identifier": ^7.19.1
"@babel/template": ^7.20.7
"@babel/traverse": ^7.21.5
"@babel/types": ^7.21.5
checksum: a3b6ceaa995bf35e7a072066c3c9ba9ee6983cf36605f0c6a0ffcaab94d6dc13eba21b00434a023bf99d66c080fec335cf464619b97f7af39e1a5269cf0d7169
languageName: node
linkType: hard

"@babel/helper-optimise-call-expression@npm:^7.18.6":
version: 7.18.6
resolution: "@babel/helper-optimise-call-expression@npm:7.18.6"
Expand Down Expand Up @@ -690,6 +770,15 @@ __metadata:
languageName: node
linkType: hard

"@babel/helper-simple-access@npm:^7.21.5":
version: 7.21.5
resolution: "@babel/helper-simple-access@npm:7.21.5"
dependencies:
"@babel/types": ^7.21.5
checksum: 682cd80b47c2424c31afe70bcc8ad3e401c612f6923c432e4b8245c5b6bc5ccddf3e405ea41ba890ccab79c0b5b95da3db125944ac0decc8d31d48469e593a0e
languageName: node
linkType: hard

"@babel/helper-skip-transparent-expression-wrappers@npm:^7.20.0":
version: 7.20.0
resolution: "@babel/helper-skip-transparent-expression-wrappers@npm:7.20.0"
Expand All @@ -715,6 +804,13 @@ __metadata:
languageName: node
linkType: hard

"@babel/helper-string-parser@npm:^7.21.5":
version: 7.21.5
resolution: "@babel/helper-string-parser@npm:7.21.5"
checksum: 4d0834c4a67c283e9277f5e565551fede00b7d68007e368c95c776e13d05002e8f9861716e11613880889d6f3463329d2af687ceea5fc5263f8b3d25a53d31da
languageName: node
linkType: hard

"@babel/helper-validator-identifier@npm:^7.18.6, @babel/helper-validator-identifier@npm:^7.19.1":
version: 7.19.1
resolution: "@babel/helper-validator-identifier@npm:7.19.1"
Expand Down Expand Up @@ -752,6 +848,17 @@ __metadata:
languageName: node
linkType: hard

"@babel/helpers@npm:^7.21.5":
version: 7.21.5
resolution: "@babel/helpers@npm:7.21.5"
dependencies:
"@babel/template": ^7.20.7
"@babel/traverse": ^7.21.5
"@babel/types": ^7.21.5
checksum: 5e58854afa1d0896185dcb12a1b6feacefb7d913d52bafa84792274651af2d3172923bdc26d1320fd6b04a2e208dc0d6730951043f17d10c08ca87231e5b84ec
languageName: node
linkType: hard

"@babel/highlight@npm:^7.18.6":
version: 7.18.6
resolution: "@babel/highlight@npm:7.18.6"
Expand All @@ -772,6 +879,15 @@ __metadata:
languageName: node
linkType: hard

"@babel/parser@npm:^7.21.5, @babel/parser@npm:^7.21.8":
version: 7.21.8
resolution: "@babel/parser@npm:7.21.8"
bin:
parser: ./bin/babel-parser.js
checksum: 58789e972e5acce3abbd9dd4c8d4be7e15e071818d2038d195bc56664722f238abb8842d91da5c8894ab0b8f8c0841eabc675f681925c2fba12675bf3ec5c5fc
languageName: node
linkType: hard

"@babel/plugin-bugfix-safari-id-destructuring-collision-in-function-expression@npm:^7.18.6":
version: 7.18.6
resolution: "@babel/plugin-bugfix-safari-id-destructuring-collision-in-function-expression@npm:7.18.6"
Expand Down Expand Up @@ -1996,6 +2112,24 @@ __metadata:
languageName: node
linkType: hard

"@babel/traverse@npm:^7.21.5":
version: 7.21.5
resolution: "@babel/traverse@npm:7.21.5"
dependencies:
"@babel/code-frame": ^7.21.4
"@babel/generator": ^7.21.5
"@babel/helper-environment-visitor": ^7.21.5
"@babel/helper-function-name": ^7.21.0
"@babel/helper-hoist-variables": ^7.18.6
"@babel/helper-split-export-declaration": ^7.18.6
"@babel/parser": ^7.21.5
"@babel/types": ^7.21.5
debug: ^4.1.0
globals: ^11.1.0
checksum: 1b126b71b98aaff01ec1f0f0389d08beb6eda3d0b71878af4c6cf386686933a076d969240f270c6a01910d8036a1fb9013d53bd5c136b9b24025204a4dc48d03
languageName: node
linkType: hard

"@babel/types@npm:^7.0.0, @babel/types@npm:^7.11.5, @babel/types@npm:^7.18.6, @babel/types@npm:^7.18.8, @babel/types@npm:^7.18.9, @babel/types@npm:^7.19.3, @babel/types@npm:^7.2.0, @babel/types@npm:^7.20.0, @babel/types@npm:^7.20.2, @babel/types@npm:^7.20.5, @babel/types@npm:^7.20.7, @babel/types@npm:^7.21.0, @babel/types@npm:^7.21.2, @babel/types@npm:^7.21.4, @babel/types@npm:^7.3.0, @babel/types@npm:^7.3.3, @babel/types@npm:^7.4.4, @babel/types@npm:^7.6.1, @babel/types@npm:^7.7.0, @babel/types@npm:^7.7.2, @babel/types@npm:^7.8.3, @babel/types@npm:^7.8.6, @babel/types@npm:^7.8.7, @babel/types@npm:^7.9.6, @babel/types@npm:~7.21.2":
version: 7.21.4
resolution: "@babel/types@npm:7.21.4"
Expand All @@ -2007,6 +2141,17 @@ __metadata:
languageName: node
linkType: hard

"@babel/types@npm:^7.21.5":
version: 7.21.5
resolution: "@babel/types@npm:7.21.5"
dependencies:
"@babel/helper-string-parser": ^7.21.5
"@babel/helper-validator-identifier": ^7.19.1
to-fast-properties: ^2.0.0
checksum: 23c943aa2c0d11b798e9298b55b1993da8b386504aac2f781a49b4bbf2cf2ad5e1003409241578574e421c999ff7a3aab2cf30ad3581d33eb9053d82b9e20408
languageName: node
linkType: hard

"@base2/pretty-print-object@npm:1.0.1":
version: 1.0.1
resolution: "@base2/pretty-print-object@npm:1.0.1"
Expand Down Expand Up @@ -6304,7 +6449,7 @@ __metadata:
version: 0.0.0-use.local
resolution: "@storybook/nextjs@workspace:frameworks/nextjs"
dependencies:
"@babel/core": ^7.20.5
"@babel/core": ^7.21.8
"@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
Expand All @@ -6317,7 +6462,7 @@ __metadata:
"@babel/preset-react": ^7.18.6
"@babel/preset-typescript": ^7.21.0
"@babel/runtime": ^7.21.0
"@babel/types": ^7.20.5
"@babel/types": ^7.21.5
"@storybook/addon-actions": 7.1.0-alpha.13
"@storybook/builder-webpack5": 7.1.0-alpha.13
"@storybook/core-common": 7.1.0-alpha.13
Expand Down Expand Up @@ -6349,7 +6494,6 @@ __metadata:
typescript: ^4.9.3
webpack: ^5.65.0
peerDependencies:
"@babel/core": ^7.11.5
"@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
Expand Down

0 comments on commit 8cb40a4

Please sign in to comment.