Repository navigation
Conversation
👷 Deploy request for changesets pending review.Visit the deploys page to approve it
|
🦋 Changeset detectedLatest commit: 3529dcc The changes in this PR will be included in the next version bump. This PR includes changesets to release 2 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #2394 +/- ##
==========================================
+ Coverage 87.71% 87.73% +0.02%
==========================================
Files 81 81
Lines 2987 2993 +6
Branches 853 858 +5
==========================================
+ Hits 2620 2626 +6
Misses 331 331
Partials 36 36 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
`getDependencyVersionEdits` rewrites the range of an internal dependency in all four dependency maps (`dependencies`, `devDependencies`, `peerDependencies`, `optionalDependencies`), and the dependents graph used by `assemble-release-plan` also includes `optionalDependencies`, so a package that only optionally depends on a released package is bumped and its range is rewritten. `getChangelogEntry` however only looked at `dependencies` and `peerDependencies`, so those releases were documented as "No changes in this release." with no hint that the optional dependency was updated. Check `optionalDependencies` as well, between `dependencies` and `peerDependencies`, and pass the matching `depType` to `shouldUpdateDependencyBasedOnConfig` so the range rules stay identical to the ones used for the rewrite itself.
mixelburg
force-pushed
the
fix/changelog-optional-dependencies
branch
from
November 21, 2026 22:09
8693b4d to
3529dcc
Compare
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
getDependencyVersionEditsrewrites an internal dependency's range in all four dependency maps, includingoptionalDependencies, and the dependents graph thatassemble-release-planuses also includesoptionalDependencies. So a package that only optionally depends on a released package is bumped and its range is rewritten.getChangelogEntryonly looked atdependenciesandpeerDependencies, so these releases ended up in the changelog as:— with no hint that the optional dependency was updated, even though
package.jsonnow says~1.2.1. This checksoptionalDependenciestoo and passes the matchingdepTypetoshouldUpdateDependencyBasedOnConfig, so the changelog uses exactly the same range rules as the rewrite.Added a regression test:
pkg-ahas no changeset of its own, onlyoptionalDependencies: { "pkg-b": "~1.2.0" }, andpkg-bis patched. Before the change the changelog reads "No changes in this release."; after it listspkg-b@1.2.1underUpdated dependencies. Full suite: 809 tests, 807 passed, 0 failed.Related: #1460 covers the same gap for
peerDependenciesand is now stale/conflicting — peer dependencies are already handled onmain.