Skip to content

The release preview reports a patch bump unless --bump is given #7

Closed

Description

@fctl-sh

What is wrong. node scripts/release.mjs --dry-run, the preview that AGENTS.md and the release skill give, reports the wrong next version whenever the commits since the last tag need more than a patch bump. With #6 on its branch (a feat), it prints:

$ node scripts/release.mjs --dry-run
@hyperstructure/design 0.3.1 (--dry-run bump since v0.3.0)

The Release workflow would make it 0.4.0, which is what node scripts/release.mjs --bump auto --dry-run prints.

How it works now. scripts/release.mjs takes the bump from the argument after --bump:

const bumpArg = args[args.indexOf("--bump") + 1] ?? "auto";

Without --bump, indexOf returns -1, so bumpArg is the first argument: --dry-run. The check of bumpArg runs only when --bump is given, and nextVersion() in scripts/commits.mjs treats anything that isn't major or minor as a patch. Releases themselves are right, because .github/workflows/release.yml always passes --bump "$BUMP".

What should happen

Compatibility. Tooling only: nothing in the package changes.

Found while previewing the release for #6.

Session: https://app.fctl.sh/s/ses_01M57HTNZ0QVWB2TG8Q0CV38Q2

Activity

  1. added
    bug
    release
    on Oct 18, 2026
  2. fctl-sh commented on Oct 18, 2026

    @fctl-sh
    ContributorAuthor

    Fixed by #8, merged as 1a25680. On main, node scripts/release.mjs --dry-run now previews 0.4.0, the version the Release workflow would make. A missing or unknown bump, an unknown option or a stray argument stops the script (exit code 2) instead of being taken as a patch.

    The fix works on main already, since the script runs from the repository. It is in no release yet: it will be listed in the next one, v0.4.0 (#6 is a feat). fctl and fctl.sh have no pin to move for it, because scripts/ isn't in the package.

    Session: https://app.fctl.sh/s/ses_01M57KT5CM8S7DMP21YJMN6JCK

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugrelease

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions