Skip to content

Using --snapshot breaks with "@changesets/assemble-release-plan": "5.2.0"  #910

@logan-anderson

Description

@logan-anderson

Affected Packages

"@changesets/assemble-release-plan": "5.2.0"

Problem

Recently, I was doing updates to our monorepo and while doing so "@changesets/assemble-release-plan" got updated from "5.1.3" to "5.2.0". When using changeset version --snapshot I get the following error.

error TypeError: Cannot read properties of undefined (reading 'prereleaseTemplate')
🦋  error     at Object.assembleReleasePlan [as default] (/home/runner/work/***/***/node_modules/.pnpm/@changesets+assemble-release-plan@5.2.0/node_modules/@changesets/assemble-release-plan/dist/assemble-release-plan.cjs.dev.js:562:72)
🦋  error     at version (/home/runner/work/***/***/node_modules/.pnpm/@changesets+cli@2.18.0/node_modules/@changesets/cli/dist/cli.cjs.dev.js:566:60)
🦋  error     at async run$2 (/home/runner/work/***/***/node_modules/.pnpm/@changesets+cli@2.[18](https://github.com/tinacms/tinacms/runs/7772584139?check_suite_focus=true#step:11:19).0/node_modules/@changesets/cli/dist/cli.cjs.dev.js:1256:11)
 ELIFECYCLE  Command failed with exit code 1.

Proposed solution

In the package.json if I force the version back to "5.1.3" the error goes away.

Since we are using pnpm this can be done by

"pnpm": {
    "overrides": {
      "@changesets/assemble-release-plan": "5.1.3"
    }
  }

in the root package.json

I also asked a question about it here but after digging around I realized it was a bug.

More info

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