Skip to content

feat(cli): accept -u as the short form of --snapshot-update - #1294

Merged
Chemaclass merged 2 commits into
mainfrom
feat/1293-snapshot-update-short-flag
Aug 17, 2026
Merged

feat(cli): accept -u as the short form of --snapshot-update#1294
Chemaclass merged 2 commits into
mainfrom
feat/1293-snapshot-update-short-flag

Conversation

@Chemaclass

Copy link
Copy Markdown
Member

🤔 Background

Related #1293

--snapshot-update gets retyped more than most flags — it is what you reach for the moment a deliberate output change turns a snapshot red — and it had no short form. jest (-u, --updateSnapshot) and vitest (-u, --update) agree on -u, so that is what anyone arriving from either types first; today it is an unknown option and the run fails.

💡 Changes

  • -u accepted as an alias; the long form is unchanged. -u was unclaimed among the short options in use
  • Both completion scripts updated, which their parity test enforces, plus the help text and the docs

Same reasoning as --pass-with-no-tests: adopt the ecosystem's spelling rather than invent a third one.

jest spells it -u, --updateSnapshot and vitest -u, --update, so -u is what
anyone arriving from either types first -- and it was an unknown option, so
the run failed instead of re-recording. The long form is unchanged.

Closes #1293
@Chemaclass Chemaclass added the enhancement New feature or request label Aug 16, 2026
@Chemaclass Chemaclass self-assigned this Aug 16, 2026
@Chemaclass
Chemaclass merged commit 6dfd218 into main Aug 17, 2026
@Chemaclass
Chemaclass deleted the feat/1293-snapshot-update-short-flag branch August 17, 2026 05:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant