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

Restore implying of --preserve-missing when using --only #345

Merged
merged 2 commits into from May 18, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 1 addition & 1 deletion bin/lib/getOptions.js
Expand Up @@ -42,7 +42,7 @@ export default async function getOptions({ argv, env, flags, log, packageJson })
exitZeroOnChanges: flags.exitZeroOnChanges === '' ? true : flags.exitZeroOnChanges,
exitOnceUploaded: flags.exitOnceUploaded === '' ? true : flags.exitOnceUploaded,
ignoreLastBuildOnBranch: flags.ignoreLastBuildOnBranch,
preserveMissingSpecs: flags.preserveMissing,
preserveMissingSpecs: flags.preserveMissing || !!flags.only,
originalArgv: argv,

buildScriptName: flags.buildScriptName,
Expand Down
2 changes: 1 addition & 1 deletion bin/lib/parseArgs.js
Expand Up @@ -21,7 +21,6 @@ export default function parseArgs(argv) {
--exit-once-uploaded [branch] Exit with 0 once the built version has been published to Chromatic. Only for [branch], if specified. Globs are supported via picomatch.
--exit-zero-on-changes [branch] If all snapshots render but there are visual changes, exit with code 0 rather than the usual exit code 1. Only for [branch], if specified. Globs are supported via picomatch.
--ignore-last-build-on-branch <branch> Do not use the last build on this branch as a baseline if it is no longer in history (i.e. branch was rebased). Globs are supported via picomatch.
--only <storypath> Only run a single story or a subset of stories. Story paths typically look like "Path/To/Story". Globs are supported via picomatch. All other snapshots will be inherited from the prior commit.
--only-changed [branch] Only run stories affected by files changed since the baseline build. Only for [branch], if specified. Globs are supported via picomatch. All other snapshots will be inherited from the prior commit.
--patch-build <headbranch...basebranch> Create a patch build to fix a missing PR comparison.
--preserve-missing Treat missing stories as unchanged rather than deleted when comparing to the baseline.
Expand All @@ -33,6 +32,7 @@ export default function parseArgs(argv) {
--junit-report [filepath] Write build results to a JUnit XML file. {buildNumber} will be replaced with the actual build number. [chromatic-build-{buildNumber}.xml]
--list List available stories. This requires running a full build.
--no-interactive Don't ask interactive questions about your setup and don't overwrite output. Always true in non-TTY environments.
--only <storypath> Only run a single story or a subset of stories. Story paths typically look like "Path/To/Story". Globs are supported via picomatch. All other snapshots will be inherited from the prior commit. This option implies --preserve-missing.
`,
{
argv,
Expand Down