fix(node): Remove trailing slash in @sentry/utils
import
#5776
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.
This removes a trailing slash which somehow crept into an
@sentry/utils
import when the request-data-adding functions were moved back to node. As a result of the trailing slash, Rollup doesn't recognize the import as external, which leads to the inclusion of files from the utils package in the node build, as well as an incorrect file structure (the root which is used forbuild/cjs
andbuild/esm
becomespackages
rather thanpackages/node/src
).(I think that the reason this wasn't caught by our tests is that both our unit and integration tests do their own building of the SDK, using
tsc
andwebpack
, respectively, which must have handled the trailing slash more gracefully thanrollup
does. We've talked before about having tests for our build process, and this is a good example of a time they would have been helpful.)