Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix compatibility with @babel/core v7 #2494

Merged
merged 4 commits into from
Dec 21, 2017
Merged

fix compatibility with @babel/core v7 #2494

merged 4 commits into from
Dec 21, 2017

Conversation

maiis
Copy link
Contributor

@maiis maiis commented Dec 15, 2017

Issue:
When using babel v7-beta, this happens:

Module build failed: TypeError: Cannot read property 'loose' of undefined
    at _default (/Users/maiis/Projects/zip.ch/node_modules/@babel/plugin-proposal-class-properties/lib/index.js:20:23)
    at Function.memoisePluginContainer (/Users/maiis/Projects/zip.ch/node_modules/@storybook/react/node_modules/babel-core/lib/transformation/file/options/option-manager.js:113:13)
    at Function.normalisePlugin (/Users/maiis/Projects/zip.ch/node_modules/@storybook/react/node_modules/babel-core/lib/transformation/file/options/option-manager.js:146:32)
    at /Users/maiis/Projects/zip.ch/node_modules/@storybook/react/node_modules/babel-core/lib/transformation/file/options/option-manager.js:184:30
    at Array.map (<anonymous>)
    at Function.normalisePlugins (/Users/maiis/Projects/zip.ch/node_modules/@storybook/react/node_modules/babel-core/lib/transformation/file/options/option-manager.js:158:20)
    at OptionManager.mergeOptions (/Users/maiis/Projects/zip.ch/node_modules/@storybook/react/node_modules/babel-core/lib/transformation/file/options/option-manager.js:234:36)
    at OptionManager.init (/Users/maiis/Projects/zip.ch/node_modules/@storybook/react/node_modules/babel-core/lib/transformation/file/options/option-manager.js:368:12)
    at File.initOptions (/Users/maiis/Projects/zip.ch/node_modules/@storybook/react/node_modules/babel-core/lib/transformation/file/index.js:212:65)
    at new File (/Users/maiis/Projects/zip.ch/node_modules/@storybook/react/node_modules/babel-core/lib/transformation/file/index.js:135:24)

What I did

I moved babel-core to peerDependencies. This way babel-core is not installed again into @storybook/react/node_modules/

How to test

Use it with @babel7 dependencies and babel-bridge

  "devDependencies": {
    "@babel/core": "7.0.0-beta.35",
    "babel-core": "7.0.0-bridge.0",
    "@storybook/react": "3.2.17",
   ...
  }

@codecov
Copy link

codecov bot commented Dec 15, 2017

Codecov Report

Merging #2494 into master will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff           @@
##           master    #2494   +/-   ##
=======================================
  Coverage   16.87%   16.87%           
=======================================
  Files         307      307           
  Lines        7792     7792           
  Branches      780      780           
=======================================
  Hits         1315     1315           
- Misses       5863     5871    +8     
+ Partials      614      606    -8
Impacted Files Coverage Δ
app/vue/src/server/config/babel.js 0% <0%> (-100%) ⬇️
app/vue/src/server/babel_config.js 0% <0%> (-77.42%) ⬇️
addons/events/src/components/Event.js 0% <0%> (ø) ⬆️
...b/ui/src/modules/ui/components/left_panel/index.js 18.51% <0%> (ø) ⬆️
addons/a11y/src/components/Tabs.js 0% <0%> (ø) ⬆️
app/react/src/demo/Button.js 0% <0%> (ø) ⬆️
lib/ui/src/modules/ui/components/search_box.js 32.94% <0%> (ø) ⬆️
app/react-native/src/bin/storybook-start.js 0% <0%> (ø) ⬆️
...ents/src/manager/components/CommentsPanel/index.js 0% <0%> (ø) ⬆️
lib/ui/src/modules/api/index.js 0% <0%> (ø) ⬆️
... and 44 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update fb94010...2b4e54b. Read the comment docs.

@Hypnosphi
Copy link
Member

typo

do same for storyshots addon
@maiis
Copy link
Contributor Author

maiis commented Dec 15, 2017

@Hypnosphi done ✅

@Hypnosphi Hypnosphi self-assigned this Dec 15, 2017
@Hypnosphi
Copy link
Member

Thanks, will test

@ndelangen ndelangen merged commit 0b490c5 into storybookjs:master Dec 21, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants