chromatic
Advanced tools
Changelog
6.8.0 - 2022-08-26
--only
to --only-story-names
but keep it as a deprecated alias--preserve-missing
and raise a warning if it's being usedpreserveMissing
In order to support advanced use cases where only a subset of stories would be included in a Storybook, the --preserve-missing
flag could be used to prevent excluded stories from being marked as "removed" in Chromatic. This behavior could lead to problematic situations regarding infrastructure upgrades and cause truly removed stories to never be removed from Chromatic. That's why we are sunsetting the "preserve missing" behavior. As of v6.8.0, using this flag will raise a warning message in the CLI. In a future major version, the flag will be removed completely, and continuing to use it with an older CLI version will start to fail your build.
To upgrade, you should remove the --preserve-missing
flag from your CI and/or package.json
scripts. If you use our GitHub Action, you should remove the preserveMissing
input (with: ...
) from your workflow config file. Furthermore, you should make sure that your build-storybook
script builds all stories, not just a subset. Check your stories
configuration in .storybook/main.js
so it doesn't omit any stories (e.g. based on an environment variable).
Most likely you were using preserveMissing
to cut down on the number of snapshots taken by Chromatic. To achieve the same goal, you have three options:
--only-story-names
to only snapshot stories matching a glob pattern by component/story name.--only-story-files
to only snapshot stories matching a glob pattern by story filename.In each of these cases, any stories that aren't captured are "inherited" from their baseline.