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 storyshots with new babel config #1721

Merged
merged 2 commits into from
Aug 23, 2017
Merged

Conversation

satazor
Copy link
Contributor

@satazor satazor commented Aug 23, 2017

Issue: #1720

What I did

Set modules to 'commonjs' when NODE_ENV === 'test'.

How to test

Simply test against the storyshot demos.

@satazor
Copy link
Contributor Author

satazor commented Aug 23, 2017

//cc @ndelangen @shilman

It turns out there was one more issue regarding storyshots on the newest releases.

@codecov
Copy link

codecov bot commented Aug 23, 2017

Codecov Report

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

Impacted file tree graph

@@           Coverage Diff           @@
##           master    #1721   +/-   ##
=======================================
  Coverage   21.18%   21.18%           
=======================================
  Files         252      252           
  Lines        5694     5694           
  Branches      684      692    +8     
=======================================
  Hits         1206     1206           
+ Misses       3965     3941   -24     
- Partials      523      547   +24
Impacted Files Coverage Δ
app/vue/src/server/config/babel.js 0% <ø> (-100%) ⬇️
app/react-native/src/server/config/babel.js 0% <ø> (ø) ⬆️
app/react/src/server/config/babel.js 100% <ø> (+100%) ⬆️
app/vue/src/server/babel_config.js 0% <0%> (-83.88%) ⬇️
app/react/src/server/utils.js 0% <0%> (-32.15%) ⬇️
lib/ui/src/modules/ui/configs/init_panels.js 25% <0%> (ø) ⬆️
addons/storyshots/src/storybook-channel-mock.js 0% <0%> (ø) ⬆️
lib/ui/src/modules/ui/routes.js 0% <0%> (ø) ⬆️
addons/knobs/src/react/WrapStory.js 12% <0%> (ø) ⬆️
... and 19 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 658e359...c5fc849. Read the comment docs.

@@ -8,7 +8,7 @@ module.exports = {
targets: {
browsers: ['last 2 versions', 'safari >= 7'],
},
modules: false,
modules: process.env.NODE_ENV === 'test' ? undefined : false,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

not sure if we should do undefined here or commonjs. the default for this is commonjs but I'm worried it might change in future versions and break support.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I can change it. Anyways, if they change the default it will be a major bump.

Want me to set to commonjs?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yeah let's do commonjs

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Updated! Also did the same for vue and react-native

Copy link
Member

@danielduan danielduan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM on crna-kitchen-sink and cra-kitchen-sink

We don't have storyshots set up for vue-kitchen-sink yet.

@shilman shilman merged commit f4f223e into storybookjs:master Aug 23, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants