From bb8c2b999d05fbe5cf197aa4afd10d2ed8482c35 Mon Sep 17 00:00:00 2001 From: Tom Coleman Date: Wed, 9 Aug 2023 13:20:26 +1000 Subject: [PATCH] Drop `--local` flag, only allow setting it from node --- node-src/lib/getOptions.ts | 2 +- node-src/lib/parseArgs.ts | 2 -- node-src/types.ts | 1 - 3 files changed, 1 insertion(+), 4 deletions(-) diff --git a/node-src/lib/getOptions.ts b/node-src/lib/getOptions.ts index 7c8ee2dea..59091c5eb 100644 --- a/node-src/lib/getOptions.ts +++ b/node-src/lib/getOptions.ts @@ -58,7 +58,7 @@ export default function getOptions({ argv, env, flags, log, packageJson }: Conte autoAcceptChanges: trueIfSet(flags.autoAcceptChanges), exitZeroOnChanges: trueIfSet(flags.exitZeroOnChanges), exitOnceUploaded: trueIfSet(flags.exitOnceUploaded), - isLocalBuild: !!flags.local, + isLocalBuild: false, ignoreLastBuildOnBranch: flags.ignoreLastBuildOnBranch, // deprecated preserveMissingSpecs: flags.preserveMissing || !!flags.only, diff --git a/node-src/lib/parseArgs.ts b/node-src/lib/parseArgs.ts index 754fcedd9..7370864ab 100644 --- a/node-src/lib/parseArgs.ts +++ b/node-src/lib/parseArgs.ts @@ -27,7 +27,6 @@ export default function parseArgs(argv: string[]) { --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. --externals Disable TurboSnap when any of these files have changed since the baseline build. Globs are supported via picomatch. This flag can be specified multiple times. Requires --only-changed. --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. - --local Create a "local" build, that will not affect other user's baselines. --only-changed [branch] Enables TurboSnap: 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. --only-story-files Only run a single story or a subset of stories by their filename(s). Specify the full path to the story file relative to the root of your Storybook project. Globs are supported via picomatch. This flag can be specified multiple times. --only-story-names Only run a single story or a subset of stories. Story paths typically look like "Path/To/Story". Globs are supported via picomatch. This flag can be specified multiple times. @@ -75,7 +74,6 @@ export default function parseArgs(argv: string[]) { exitOnceUploaded: { type: 'string' }, exitZeroOnChanges: { type: 'string' }, externals: { type: 'string', isMultiple: true }, - local: { type: 'boolean' }, ignoreLastBuildOnBranch: { type: 'string' }, onlyChanged: { type: 'string' }, onlyStoryFiles: { type: 'string', isMultiple: true }, diff --git a/node-src/types.ts b/node-src/types.ts index e3072e1c4..24674caad 100644 --- a/node-src/types.ts +++ b/node-src/types.ts @@ -19,7 +19,6 @@ export interface Flags { exitZeroOnChanges?: string; externals?: string[]; ignoreLastBuildOnBranch?: string; - local?: string; onlyChanged?: string; onlyStoryFiles?: string[]; onlyStoryNames?: string[];