chore(node-core): Add nodeVersion.js in sideEffect array#21856
Open
JPeer264 wants to merge 1 commit into
Open
Conversation
andreiborza
approved these changes
Jun 30, 2026
Lms24
approved these changes
Jun 30, 2026
Member
|
IMHO we should find a way to properly fix this. likely this is not possible here, so this is OK for now, but I'd vote to add an actual side-effect free (e.g. a |
timfish
approved these changes
Jun 30, 2026
JPeer264
added a commit
that referenced
this pull request
Jun 30, 2026
## Background same as with #21856 I came across this with adding the Prisma integration to Cloudflare. <img width="822" height="428" alt="Screenshot 2026-06-30 at 11 23 57" src="https://github.com/user-attachments/assets/5eff699b-6275-4b99-8627-9062a0ee7e5d" /> ## What has changed The `@sentry/opentelemetry` SDK has some side effect imports, which don't do anything: https://unpkg.com/@sentry/opentelemetry@10.62.0/build/esm/index.js those are the imports ```js import '@sentry/conventions/attributes'; import '@opentelemetry/core'; import '@opentelemetry/sdk-trace-base'; ``` `hoistTransitiveImports` has been added to get rid of the side effect imports. However, I'm confused with this option, as [the docs](https://rollupjs.org/configuration-options/#output-hoisttransitiveimports) say that this option is actually ignored when `preserveModules` have been set (but it still has an effect). Also here, if someone has a better idea - I'm all ears.
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.
It seems that
node-corehas../nodeVersion.jsas a sideEffect: https://unpkg.com/@sentry/node-core@10.62.0/build/esm/integrations/modules.jsActually
nodeVersiondoesn't do anything, so it is not really a side effect. But I also couldn't get rid of that import with the PURE comments - so if someone has a better idea, I'm up for itThis came up while implementing a test for Cloudflare, where I used the Prisma integration within Cloudflare: