Part of the parity effort tracked in #600.
Goal
Handle inline base64-encoded sourcemaps in sentry sourcemap inject / upload, matching legacy sentry-cli sourcemaps.
Background
The new CLI's sourcemap inject already follows external //# sourceMappingURL=<path> directives (slow-path in src/lib/sourcemap/inject.ts, SOURCE_MAPPING_URL_RE). The remaining gap is inline sourcemaps embedded as data URLs:
//# sourceMappingURL=data:application/json;base64,<...>
Scope
- Detect
data:application/json;...;base64, sourceMappingURL values.
- Base64-decode, inject the debug ID into the decoded JSON map, re-encode, and rewrite the directive in place.
- For upload, extract/handle the inline map accordingly.
Critical gotcha (from issue #600 / legacy PR #3243)
Base64 decode failures MUST be non-fatal — warn and skip, never crash. Bundled terser/babel code contains template literals that produce false-positive sourceMappingURL lines.
Effort
Medium (2-3 days).
Part of the parity effort tracked in #600.
Goal
Handle inline base64-encoded sourcemaps in
sentry sourcemap inject/upload, matching legacysentry-cli sourcemaps.Background
The new CLI's
sourcemap injectalready follows external//# sourceMappingURL=<path>directives (slow-path insrc/lib/sourcemap/inject.ts,SOURCE_MAPPING_URL_RE). The remaining gap is inline sourcemaps embedded as data URLs:Scope
data:application/json;...;base64,sourceMappingURL values.Critical gotcha (from issue #600 / legacy PR #3243)
Base64 decode failures MUST be non-fatal — warn and skip, never crash. Bundled terser/babel code contains template literals that produce false-positive
sourceMappingURLlines.Effort
Medium (2-3 days).