diff --git a/bin/lib/getOptions.js b/bin/lib/getOptions.js index b20020e78..9190815aa 100644 --- a/bin/lib/getOptions.js +++ b/bin/lib/getOptions.js @@ -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, diff --git a/bin/lib/parseArgs.js b/bin/lib/parseArgs.js index 1a879a33b..ea63e8716 100644 --- a/bin/lib/parseArgs.js +++ b/bin/lib/parseArgs.js @@ -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 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 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 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. @@ -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 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,