Skip to content

Compatibility with changesets v3 #249

Description

@rajzik

Description

After upgrading @changesets/cli to v3, changesets-gitlab no longer performs the release after the version MR has been merged.

Instead, it runs the version command again, creates or resets the changeset-release/develop branch, and attempts to create a new merge request even though changeset version produces no file changes. This results in a new empty release MR instead of publishing the already-versioned packages.

Steps to reproduce

  1. Configure changesets-gitlab with a version command such as:

    {
      "scripts": {
        "version": "changeset version",
        "release": "changeset publish"
      }
    }
  2. Use @changesets/cli v3.

  3. Add a changeset and let changesets-gitlab create the version MR.

  4. Merge the version MR into the target branch.

  5. Run changesets-gitlab again with publishing configured.

  6. Observe that it runs the version workflow again and tries to create an empty MR instead of publishing.

Expected behavior

After the version MR is merged, changesets-gitlab should detect that the repository contains versioned packages awaiting publication and execute the configured publish command.

It should not create a new release MR when the version command makes no changes.

Actual behavior

changesets-gitlab executes changeset version, receives the Changesets v3 output, finds no modified files, but still pushes the release branch and attempts to create another merge request:

$ pnpm run changesets-gitlab
[WARN] Unsupported engine: wanted: {"node":"^24.0.0"} (current: {"node":"v22.21.1","pnpm":"11.21.0"})
$ changesets-gitlab
::set-output name=published::false
::set-output name=publishedPackages::[]
setting git user
[command]/usr/bin/git config user.name gitlabbot
[command]/usr/bin/git config user.email gitlab[bot]@users.noreply.gitlab.com
setting GitLab credentials
[command]/usr/bin/git checkout changeset-release/develop
error: pathspec 'changeset-release/develop' did not match any file(s) known to git
[command]/usr/bin/git checkout -b changeset-release/develop
Switched to a new branch 'changeset-release/develop'
[command]/usr/bin/git fetch origin develop
From https://repo.risedev.at/epa/fdv/fdv-desktop/integrations/shared-packages
 * branch            develop    -> FETCH_HEAD
[command]/usr/bin/git reset --hard origin/develop
HEAD is now at a9c971c Version Packages
[command]/usr/local/bin/pnpm run version
[WARN] Unsupported engine: wanted: {"node":"^24.0.0"} (current: {"node":"v22.21.1","pnpm":"11.21.0"})
$ changeset version
🦋 changeset v3.0.0
All files have been updated. Review them and commit at your leisure
[command]/usr/bin/git status --porcelain
[command]/usr/bin/git push origin HEAD:changeset-release/develop --force
Everything up-to-date
[]
creating merge request from changeset-release/develop to develop.

Activity

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

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions