Skip to content

fix(node): Remove trailing slash in @sentry/utils import #5776

New issue

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

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

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Sep 20, 2022

Conversation

lobsterkatie
Copy link
Member

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 for build/cjs and build/esm becomes packages rather than packages/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 and webpack, respectively, which must have handled the trailing slash more gracefully than rollup 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.)

@lobsterkatie lobsterkatie merged commit 9a6f98e into master Sep 20, 2022
@lobsterkatie lobsterkatie deleted the kmclb-fix-node-requestdata-trailing-slash branch September 20, 2022 07:21
@lforst
Copy link
Contributor

lforst commented Sep 20, 2022

Could this somehow be related to #5773?

@lobsterkatie
Copy link
Member Author

Could this somehow be related to #5773?

No, I don't think so. The error fixed in this PR was introduced in #5759, which hasn't yet been released.

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.

2 participants