Stories glob is invalid
Closed this issue · 9 comments
According to the migration guide, the glob we are using to define the story files, is not valid.
I think this should be a simple change from ../../src/**/*.stories.(js|jsx|ts|tsx|mdx)
to ../../src/**/*.stories.@(js|jsx|ts|tsx|mdx)
, i.e. adding the @
character.
This change is for storybook 6.0?
As I understood the migration guide, the glob is invalid regardless of the storybook version, but until now it worked by accident.
@pksunkara As I understand it:
- the
.@(a|b|c)
syntax is actually the correct glob syntax - the
.(a|b|c)
syntax worked accidentally in 5.3 because it's a valid regex, but is incorrect and caused problems with something we wanted to do in 6.0 - we want people using valid globs for future compatibility
Perhaps @yannbf or @ndelangen can clarify further?
That's 💯 accurate
What about pre 5.3? When was the @ syntax enabled?
@pksunkara we had to switch between minimatch/micromatch/nanomatch with various options to get it to work correctly.
This has been thrown around a bit in 6.0, so it's possible a glob that worked well in 5.3 was actually an invalid glob, which won't work in 6.0. And valid globs might not work in 5.3. That's all fairly unfortunate I know.
I understand that. But this plugin has different generators depending on the storybook versions. I want to know from what version of storybook is the @
character supported so that I can make a fix for this issue.
There were a few iterations during 6.0.0 beta time, but main fix was added here:
https://github.com/storybookjs/storybook/blob/next/CHANGELOG.md#600-beta18-may-29-2020