Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

feat: Inline @sentry/core dependency #242

Merged
merged 4 commits into from
Jan 27, 2025

Conversation

mydea
Copy link
Contributor

@mydea mydea commented Jan 23, 2025

This PR inlines the @sentry/core dependency into the build, moving it from dependencies to devDependencies.

The reason for this is to avoid shipping this dependency to users, as this may conflict with their own installed Sentry version.
Ideally, this should not really be a problem, but we have seen reports where package managers could not solve this issue nicely. So this is the "safer" solution, and also what we do at https://github.com/getsentry/sentry-javascript-bundler-plugins.

I played around a bit with unbuild and found this reference here: https://github.com/nuxt/nuxt/blob/f0ce20388d2ab533eba016de0565c150ea3c5172/packages/schema/build.config.ts#L23-L34, which I used as a basis for this. If unbuild were to be updated to 3.3.0+, this could be done via the new inlineDependencies config.

@mydea
Copy link
Contributor Author

mydea commented Jan 23, 2025

cc @AbhiPrasad maybe you can sanity check this!

mydea added a commit to getsentry/gib-potato that referenced this pull request Jan 23, 2025
To ensure that a consistent version is used.
May be fixed by codecov/codecov-javascript-bundler-plugins#242
@mydea
Copy link
Contributor Author

mydea commented Jan 23, 2025

For reference, we noticed this here: getsentry/gib-potato#237 and then "fixed" it here: getsentry/gib-potato#238 which shows the problem. I do not really believe this is a "bug" from this plugin here, as IMHO this should all work just fine, but somehow, apparently, some (?) bundlers just can't handle this nicely. 😬

cleptric pushed a commit to getsentry/gib-potato that referenced this pull request Jan 23, 2025
To ensure that a consistent version is used.
May be fixed by codecov/codecov-javascript-bundler-plugins#242
@nicholas-codecov
Copy link
Collaborator

nicholas-codecov commented Jan 24, 2025

@mydea are you able to run pnpm install to update the lockfile, and add in a quick changeset minor for all packages?

Figured out how to do this myself 🤦

@nicholas-codecov nicholas-codecov merged commit 392003d into codecov:main Jan 27, 2025
60 of 62 checks passed
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants