fix(buckets): read camelCased enable-snapshots flag in create#120
Merged
Conversation
Commander delivers `--enable-snapshots` to handlers as the camelCased key `enableSnapshots`, but `buckets create` only looked up `enable-snapshots`/`s`/`S`, so the flag was never read and snapshots were never enabled — the bucket was created with snapshots off. (`mk` reads the camelCase key, which is why it worked there.) Add `enableSnapshots` to the lookup, matching mk.ts and the sibling enableDirectoryListing/sourceSnapshot reads. Adds an integration test that verifies snapshots are actually enabled via `buckets get`; the existing "create with all flags" test only asserted exit code and so missed this. Assisted-by: Claude Opus 4.8 via Claude Code Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
MantasMiksys
approved these changes
Jul 2, 2026
designcode
added a commit
that referenced
this pull request
Jul 2, 2026
Seed the first Changesets release: a minor for the `buckets rebase` / `buckets merge` commands (#119) and a patch for the `buckets create --enable-snapshots` fix (#120) — both merged to main but unreleased since v3.3.0. Together they cut 3.4.0 once this lands. Assisted-by: Claude Opus 4.8 via Claude Code Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
designcode
added a commit
that referenced
this pull request
Jul 2, 2026
) * chore: migrate release tooling from semantic-release to changesets Replace semantic-release with Changesets for versioning and publishing: - Add @changesets/cli + @changesets/changelog-github and .changeset config (public access, github changelog, baseBranch main). Set the package version to the real base 3.3.0. - Rework release.yaml: stable releases run on push to main via the changesets action (Version Packages PR -> publish -> v<version> tag, GitHub release, binaries, Homebrew). Beta prereleases publish an npm snapshot to the `beta` dist-tag on manual workflow_dispatch only. - Drop the release-branch flow: delete sync-release-to-main.yaml. - npm publishing stays on OIDC / provenance (auth unchanged); keeping the release.yaml filename preserves the trusted-publisher config. Also drop commitlint (no longer needed now that commits don't drive versioning) and sweep unused dev dependencies: - Remove @commitlint/cli, @commitlint/config-conventional, the commitlint config block, and the .husky/commit-msg hook. - Remove conventional-changelog-conventionalcommits, orphaned by the semantic-release removal. Assisted-by: Claude Opus 4.8 via Claude Code Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> * chore: add changesets for pending fork commands and enable-snapshots fix Seed the first Changesets release: a minor for the `buckets rebase` / `buckets merge` commands (#119) and a patch for the `buckets create --enable-snapshots` fix (#120) — both merged to main but unreleased since v3.3.0. Together they cut 3.4.0 once this lands. Assisted-by: Claude Opus 4.8 via Claude Code Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> * ci: gate npm publish on integration tests in the release job The stable release job dropped `npm run test:integration`, so a Version Packages merge could publish to npm without integration passing (ci.yaml runs it only in parallel). Re-add it in the release job, gated to pushes with no pending changesets — i.e. exactly the publish push — so it gates the publish without running on every feature merge. Assisted-by: Claude Opus 4.8 via Claude Code Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
buckets create --enable-snapshotsnever enabled snapshots — it created the bucket but silently left snapshots off. (mk --enable-snapshotswas unaffected.)Root cause
Commander passes flags to handlers as camelCase keys, so
--enable-snapshotsarrives asenableSnapshots.buckets/create.tslooked up only['enable-snapshots', 's', 'S']— missing the camelCase key — so the value was alwaysundefinedandenableSnapshot: enableSnapshots === truewas alwaysfalse.mk.tsalready reads the camelCase key, which is why it worked there.Fix
Add
'enableSnapshots'to thegetOptionlookup, matchingmk.tsand the siblingenableDirectoryListing/sourceSnapshotreads.Test
The existing "create with all flags" integration test passed
--enable-snapshotsbut only asserted exit code, so it never caught this. Added a regression test that creates a bucket with--enable-snapshotsand verifies snapshots are actually enabled viabuckets get. Verified passing against the live backend.🤖 Generated with Claude Code
Note
Low Risk
Small option-parsing fix in bucket create plus a new integration test; behavior change is limited to honoring an existing flag correctly.
Overview
Fixes
buckets create --enable-snapshotsso it actually turns snapshots on instead of succeeding with snapshots still disabled.Commander exposes that flag to handlers as
enableSnapshots, butbuckets/create.tsonly looked up kebab-case and short aliases, so the value was always missing andenableSnapshotwas sent as false. The change addsenableSnapshotsto thegetOptionlist, consistent with other create flags and withmk.Adds a CLI integration test that creates a bucket with
--enable-snapshotsand assertsbuckets getshows snapshots enabled, since the prior “all flags” test only checked exit code.Reviewed by Cursor Bugbot for commit f46ab4c. Bugbot is set up for automated code reviews on this repo. Configure here.