Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unexpected Updated dependencies changelog #1302

Open
johnameyer opened this issue Jan 28, 2024 · 0 comments
Open

Unexpected Updated dependencies changelog #1302

johnameyer opened this issue Jan 28, 2024 · 0 comments

Comments

@johnameyer
Copy link

Affected Packages

@changesets/cli/changelog
@changesets/changelog-github

Problem

Changelog and Github PR description generation seem to have some duplication / incorrect behavior with the "Updated dependencies" changelog generation

When generating changelogs and publish PR off of two commits touching a core package and the packages that depend off of it:

  • 6464b83 - patching all packages - including a minor package.json script change
  • 2510048 - updating dependencies

The PR unexpectedly called out 6464b83 twice for updating dependencies despite it not changing these:

6464b83: Fix max score defaulting to 100 and remove quickEnd
Updated dependencies [6464b83]
Updated dependencies [2510048]
Updated dependencies [6464b83]
  @cards-ts/core@0.7.0

Replication:

git clone github.com/johnameyer/cards-ts cards-ts
cd $_
git reset --hard 6464b83bc5e49028f1cc26adf344419bd4c3ced0
pnpm i
pnpm changeset version
grep -E "6464b83|2510048|$" packages/hearts/CHANGELOG.md
# See that "Updated dependencies" are printed multiple times with @changesets/cli/changelog
# See that 6464b83 is printed multiple times with @changesets/changelog-github

Proposed solution

For @changesets/cli/changelog:

Combine all "Updated dependencies" lines into a single message

For @changesets/changelog-github:

De-duplicate multiple commit hashes

For both:

Only output if actually changing external dependencies of a package (if a workspace dependency then give the option to exclude)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant