Skip to content

Conversation

@BYK
Copy link
Member

@BYK BYK commented Dec 3, 2025

Adds support for auto-expanding workspaces to avoid config bloat in monorepos like sentry-javascript

BYK added 3 commits December 3, 2025 03:56
Adds support for auto-expanding workspaces to avoid config bloat in monorepos like sentry-javascript
@BYK BYK marked this pull request as ready for review December 3, 2025 04:18
@BYK BYK requested a review from Lms24 December 3, 2025 04:18
@BYK BYK force-pushed the byk/feat/npm-workspaces branch from 666d9b0 to 88d3667 Compare December 3, 2025 15:39
Copy link
Member

@Lms24 Lms24 left a comment

Choose a reason for hiding this comment

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

Just to confirm I understand the intention: We want to avoid that workspaces/monorepos like our JS SDK repo have to register each package as separate publishing targets?

My main question here is: Can we guarantee releasing in the correct dependency order? Right now, we maintain this list primarily to guarantee that we release the packages in correct order. So if publishing @sentry/browser fails, that's okay because didn't yet publish any packages depending on it (@sentry/react).

@BYK
Copy link
Member Author

BYK commented Dec 3, 2025

Ah, great yeah I think we can do that. Will update the patch accordingly

Copy link
Member

@Lms24 Lms24 left a comment

Choose a reason for hiding this comment

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

Thanks for adding this! Excited to give it a try.

Had some comments, mostly non-blocking low-prio stuff. Let's just clarify the publishConfig comment. After that, good to go from my end!

Comment on lines 257 to 261
expect(names.indexOf('@sentry/types')).toBeLessThan(names.indexOf('@sentry/core'));
expect(names.indexOf('@sentry/core')).toBeLessThan(names.indexOf('@sentry/browser'));
expect(names.indexOf('@sentry/core')).toBeLessThan(names.indexOf('@sentry/node'));
expect(names.indexOf('@sentry/browser')).toBeLessThan(names.indexOf('@sentry/integrations'));
expect(names.indexOf('@sentry/node')).toBeLessThan(names.indexOf('@sentry/integrations'));
Copy link
Member

Choose a reason for hiding this comment

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

this is a good test and depicts something like @sentry/nextjs really well that also depends on browser and node, thanks for adding!

L: Could we add @sentry/node-core as a dependency of @sentry/node (where node-core also depends on core)? Then we have a second "branch" in the graph.

Super-L: WDYT about checking against the names array directly? I think the indexOf is good enough but unless there's something that makes the ordering non-deterministic, the "equals array" (or inline snapshot, whatever you prefer) check makes it super easy to read the test.

(Only suggesting because this is probably the most crucial part to this change. Feel free to disregard)

Copy link
Member Author

Choose a reason for hiding this comment

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

Added the node-core test. Will see for the other request :)

@BYK BYK merged commit 2f3d5e7 into master Dec 5, 2025
14 checks passed
@BYK BYK deleted the byk/feat/npm-workspaces branch December 5, 2025 16:56
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.

3 participants