Skip to content

feat(core): Pass mapDir to rewriteSourcesHook#908

Merged
chargome merged 3 commits intomainfrom
cg/mapdir-in-rewritesources
Apr 2, 2026
Merged

feat(core): Pass mapDir to rewriteSourcesHook#908
chargome merged 3 commits intomainfrom
cg/mapdir-in-rewritesources

Conversation

@chargome
Copy link
Copy Markdown
Member

@chargome chargome commented Apr 2, 2026

  • Adds a context parameter (with a mapDir property) to the rewriteSources hook, so users can resolve source paths relative to the source map's location.

ref getsentry/sentry-javascript#20028

@chargome chargome self-assigned this Apr 2, 2026
@github-actions
Copy link
Copy Markdown

github-actions bot commented Apr 2, 2026

Semver Impact of This PR

🟡 Minor (new features)

📋 Changelog Preview

This is how your changes will appear in the changelog.
Entries from this PR are highlighted with a left border (blockquote style).


New Features ✨

  • (core) Pass mapDir to rewriteSourcesHook by chargome in #908
  • Use crypto.randomUUID rather than uuid by timfish in #892

Bug Fixes 🐛

  • (core) Conditionally add tracing headers by chargome in #907
  • (e2e-tests) Pin axios to 1.13.5 to avoid compromised 1.14.1 by andreiborza in #906
  • Add missing webpack5 entrypoint in webpack-plugin by brunodccarvalho in #905

Internal Changes 🔧

  • Vite integration tests by timfish in #899
  • Webpack integration tests by timfish in #904
  • Isolate integration test package installs by timfish in #902
  • Pin GitHub Actions to full-length commit SHAs by joshuarli in #900
  • Rollup integration tests by timfish in #897
  • New integration tests by timfish in #896
  • Remove lerna by timfish in #895
  • Migrate to Vitest by timfish in #894

🤖 This preview updates automatically when you update the PR.

@chargome chargome requested review from Lms24 and timfish April 2, 2026 12:08
Copy link
Copy Markdown
Collaborator

@timfish timfish left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

PR is good but don't sourcemaps contain a relative path to the source files?

Or is this feature for when that is missing or wrong?

@chargome
Copy link
Copy Markdown
Member Author

chargome commented Apr 2, 2026

This is basically just a helper for users that need an anchorpoint for their relative paths like in getsentry/sentry-javascript#20028

@chargome chargome merged commit 3bf270c into main Apr 2, 2026
77 of 79 checks passed
@chargome chargome deleted the cg/mapdir-in-rewritesources branch April 2, 2026 13:36
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.

3 participants