Skip to content

Conversation

@mcmire
Copy link
Contributor

@mcmire mcmire commented Jan 7, 2026

If the user includes a package in the release and selects a new major version, currently, we display a message that requires the user to include all peer dependents in the release. However, since we moved peer dependencies to dependencies in the core repo, realistically, this error will never appear, and instead we want to strongly advise the user to include all direct dependents in the release.

To do this we have to modify the core logic to detect missing direct dependents separately from peer dependents.

References

https://consensyssoftware.atlassian.net/browse/WPC-330

Screenshots

Before

Screenshot 2026-01-07 at 12 02 55 PM

After

Notice the new "Missing Direct Dependents" section:

Screenshot 2026-01-07 at 11 03 33 AM

Note

Introduces explicit handling of direct dependents when a package is major-bumped, alongside existing peer dependent checks.

  • Refactors helpers to be dependency-type aware (findWorkspaceDependentNamesOfType, findCandidateDependentsOfTypeForMajorBump, findCandidateDependencies) and updates validation to emit a new error for missing direct dependents with tailored guidance; retains peer-dependent errors with minor copy tweaks
  • Server updates: /api/packages now includes required direct and peer dependents; /api/check-packages returns missingDirectDependentNames and missingPeerDependentNames; response types adjusted
  • UI changes: adds "Missing Direct Dependents" section with guidance; propagates new error fields through App.tsx and PackageItem.tsx
  • Tests substantially expanded to cover direct-dependent scenarios (both literal and "major" specifiers, changed/unchanged and null/skip cases) and updated for renamed helpers and messages

Written by Cursor Bugbot for commit 9e36c12. This will update automatically on new commits. Configure here.

/>
)}
{packageDependencyErrors[pkg.name].missingDependentNames.length >
{packageDependencyErrors[pkg.name].missingDirectDependentNames
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Note there aren't any tests for these changes. I think we'd need to do some refactoring to this component to make that easy, as this component has a lot of responsibilities. I didn't want to get into this right now, but maybe in a future PR.

* @returns An array of package names.
*/
export function findAllWorkspacePackagesThatDependOnPackage(
export function findWorkspaceDependentNamesOfType(
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Note there aren't any tests for the functions we're updating here. We probably should do that eventually, but in the meantime they're tested implicitly via release-specification.test.ts.

Base automatically changed from improve-per-package-error-messages to main January 7, 2026 20:38
If the user includes a package in the release and selects a new major
version, currently, we display a message that requires the user to
include all peer dependents in the release. However, since we moved peer
dependencies to dependencies in the `core`, realistically, this error
will never appear, and instead we want to strongly advise the user to
include all *direct* dependents in the release.

To do this we have to modify the core logic to detect missing direct
dependents separately from peer dependents.
@mcmire mcmire force-pushed the update-advice-on-major-bumps branch from af7baeb to 628bf64 Compare January 7, 2026 20:39
@mcmire mcmire marked this pull request as ready for review January 7, 2026 20:42
@mcmire mcmire requested a review from a team as a code owner January 7, 2026 20:42
});
});

// NEW
Copy link

Choose a reason for hiding this comment

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

Debug comment accidentally left in test file

Low Severity

A // NEW comment appears to be a development artifact that was left behind when adding the new direct dependents test cases. This comment doesn't serve any documentation purpose in the final code and appears to have been used during development to mark newly added tests.

Fix in Cursor Fix in Web

});
});

it('throws if there are any packages in the release with a major version bump using the word "major", but any of their direct dependents have changes since their latest release and are not listed in the release', async () => {
Copy link
Contributor Author

Choose a reason for hiding this comment

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

There are way too many tests here, and I need to refactor this. A problem for another day...

Copy link
Contributor

@cryptodev-2s cryptodev-2s left a comment

Choose a reason for hiding this comment

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

LGTM!

Copy link
Member

@Gudahtt Gudahtt left a comment

Choose a reason for hiding this comment

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

LGTM!

@mcmire mcmire merged commit 3855be0 into main Jan 8, 2026
16 checks passed
@mcmire mcmire deleted the update-advice-on-major-bumps branch January 8, 2026 16:24
@cursor cursor bot mentioned this pull request Jan 12, 2026
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

Successfully merging this pull request may close these issues.

4 participants