Skip to content

Conversation

@guesant
Copy link

@guesant guesant commented May 8, 2025

Resolves #394

The detection strategy for the affected packages, since this action only relies on affected files diff.
Possible values: `diff-only` (default) and `recursive-discovery`
required: true
default: diff-only
Copy link
Owner

Choose a reason for hiding this comment

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

I honestly think this should probably be opt-out. There's a chance it ultimately detects a package.json which isn't managed by changesets, so we probably do need to provide a way to turn it off, but I think what we've discussed so far is strictly an improvement if you don't run into edge cases with monorepos not including all the packages in a repo.

Copy link
Author

Choose a reason for hiding this comment

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

yeah, I agree with you

by know, maybe I'm wrong but this action currently dont relies on workspaces right? only in changeset/config.json private field. so even now can be false positives, as changesets id being generated by this action for this edge cases.

since dependabot and maybe renovate (as I think) only updates files that is about dependency management and nothing more, we can make also the resolution with micromatch/minimatch or any other, as an opt-out option

Copy link
Owner

Choose a reason for hiding this comment

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

Not sure what you mean about minimatch, but no, neither this action nor changeset relies on workspaces, there are a couple repos I have which aren't monorepos at all but manage releases using changesets just fine.

Copy link
Owner

Choose a reason for hiding this comment

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

There is some logic that involves workspaces, because whether the repo is a monorepo or not impacts which packages in the repo are valid for inclusion in a changeset (specifically, the root package.json) so this action isn't ignorant of them, but they aren't required.

Copy link
Author

Choose a reason for hiding this comment

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

Not sure what you mean about minimatch, but no, neither this action nor changeset relies on workspaces, there are a couple repos I have which aren't monorepos at all but manage releases using changesets just fine.

changeset does not relies directly on the workspaces field, it relies however in the @manypkg/get-packages, maintained by changesets member

https://github.com/changesets/changesets/blob/5ca6271a779b8f0414a29855ec21aa767a4fae16/packages/git/src/index.ts#L265

https://github.com/Thinkmill/manypkg/blob/734a9a8c52243e4e10a851b8dedf1016977a3b5e/packages/tools/src/NpmTool.ts#L71

Copy link
Author

@guesant guesant May 9, 2025

Choose a reason for hiding this comment

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

after getting the monorepo packages, changesets does a filter for ignored packages

this is the function that changesets relies for finding package.jsons

https://github.com/Thinkmill/manypkg/blob/main/packages/get-packages/src/index.ts

you can see that its relies on "tool" dependency injection, and the NpmTool expands the glob for the workspaces field

Copy link
Author

Choose a reason for hiding this comment

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

fyi:

changesets/changesets#1025

to be more precise, actually changesets suports the two approaches: rush (without root package.json but with rush config file) and workspaces for monorepos

@0xar-ds
Copy link

0xar-ds commented Sep 17, 2025

Any chances this could also support Renovate updates to pnpm-workspace:catalogs?

@mscharley
Copy link
Owner

@0xar-ds I suspect I know where you're going with this, and I suspect this would need to be it's own feature, it won't be covered automatically by what this feature request is attempting. Can you open a new issue with more details of what you'd expect to happen and how that differs from what does happen currently?

@0xar-ds
Copy link

0xar-ds commented Sep 17, 2025

@0xar-ds I suspect I know where you're going with this, and I suspect this would need to be it's own feature, it won't be covered automatically by what this feature request is attempting. Can you open a new issue with more details of what you'd expect to happen and how that differs from what does happen currently?

#497 lmk if you need any further research/help

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.

Feature Request: support other package managers rather than package.json (dependabot)

3 participants