fix(bundler-plugins): Integration with monorepo build#21479
Open
isaacs wants to merge 6 commits into
Open
Conversation
Member
Author
|
If CI passes, this can be landed after the |
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 2 potential issues.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit d665aad. Configure here.
Contributor
size-limit report 📦
|
8e03cf7 to
18f6ebe
Compare
a8f4623 to
b1938e8
Compare
andreiborza
reviewed
Jun 15, 2026
| dist | ||
| build | ||
| *.tgz | ||
| src/core/version.ts |
Member
Author
There was a problem hiding this comment.
It's built by the prebuild script.
andreiborza
reviewed
Jun 15, 2026
Contributor
10c1285 to
ce99389
Compare
Update the bundler-plugins so that integration tests run in CI, and the module follows the same patterns as the rest of sentry-javascript.
Issue found by sentry pr review bot: > Potential issue: The fallback logic for the webpack plugin's component > annotation loader is incorrect. In an ESM context, where `__dirname` > is undefined, the code attempts to resolve a file with an `.mjs` > extension. However, the new Rollup build configuration outputs `.js` > files for both CJS and ESM formats. This discrepancy will cause a > runtime crash when the plugin is used in a non-packaged environment > (e.g., via `yarn link` or direct monorepo consumption), as the primary > module resolution will fail, and the incorrect fallback path will be > used. Fix: since both formats emit .js, the extension is unconditional — replaced the branch with a single component-annotation-transform.js path. Verified the rebuilt ESM and CJS both now reference .js. The unused __dirname conditional is gone; fileURLToPath/path imports are still used.
Issue found by a code review agent: > Potential issue: In the `uploadSourcemaps` function, the > cleanup of a temporary directory is initiated using `void > startSpan()`, which does not await the completion of the > cleanup promise. This creates a race condition where the main > function can return and the parent process can exit before the > asynchronous file deletion (`fs.promises.rm`) is finished. In > environments where processes terminate quickly after a task, > such as in CI/CD pipelines, this can lead to the temporary > directory (`sentry-bundler-plugin-upload-*`) being left behind. > Over time, the accumulation of these orphaned directories can > consume significant disk space, resulting in a resource leak. Fixed by awaiting the cleanup function.
This isn't super significant, but it's a little simpler to just converge on the same test framework used by the rest of the monorepo.
b1938e8 to
b1f7ccc
Compare
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.

Update the bundler-plugins so that integration tests run in CI, and the module follows the same patterns as the rest of sentry-javascript.