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

Fix misalignment between releaseNotes and package.json #72

Merged
merged 3 commits into from
Aug 13, 2021

Conversation

reuzel
Copy link
Contributor

@reuzel reuzel commented Aug 13, 2021

My attempt to improve the versioning logic...

  • It creates a list of all package manifest dependencies that require an update
  • based on the commitAnalyzer results and the list of dependency changes the update type (major, minor, path, nothing) is determined
  • the list of dependency changes is used for both the release notes as well as update the package.json content
  • update of package.json content is done in the prepare step when all the new releases are determined by semantic-release

In the process I fixed a few extra corner cases. E.g.,

  • with new packages, dependencies are not seen as dependency updates. As such they don't show up in the release notes as updates, and they won't impact the type of package version. The package content is set correctly though
  • With inherit policy, a major dependency update will now override a minor local update, and vice-versa, a local major update will override a dependency minor update.
  • workspace protocol (workspace:* versions) will always trigger a package.json rewrite, but if the corresponding dependency is not updated it won't be marked as update. This did not work with the 'satisfy' policy as workspace:* was always seen as update, regardless if the referenced package was updated or not.

Fixes #47

Copy link
Collaborator

@antongolub antongolub left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@reuzel,

Looks great and reasonable. But only practice will show whether everything has been taken into account. LGTM.

Thanks a lot for your efforts.

@antongolub antongolub merged commit bb2ea25 into dhoulb:master Aug 13, 2021
@antongolub
Copy link
Collaborator

🎉 This PR is included in version 2.8.3 🎉

The release is available on:

Your semantic-release bot 📦🚀

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

Successfully merging this pull request may close these issues.

Release note generation disagreeing with package.json
2 participants