Skip to content

Conversation

@szokeasaurusrex
Copy link
Member

@szokeasaurusrex szokeasaurusrex commented Dec 3, 2025

The debug ID field on all source maps is now serialized as debugId rather than debug_id.

To maintain backwards-compatibility with source maps that contain a debug_id field, we can still read the debug_id field. If a source map contains a debugId field and a debug_id field, the debugId field takes precedence, which is a change from the old behavior.

Corresponding Sentry CLI PR: getsentry/sentry-cli#3005

Closes #96
Closes CLI-240

@linear
Copy link

linear bot commented Dec 3, 2025

@szokeasaurusrex szokeasaurusrex marked this pull request as ready for review December 3, 2025 16:22
@szokeasaurusrex
Copy link
Member Author

While this change technically does not break the public API, I think it likely makes sense to release this change in a major. What do you think @loewenheim? Are there any considerations when making a major release for this crate?

@loewenheim
Copy link
Contributor

While this change technically does not break the public API, I think it likely makes sense to release this change in a major. What do you think @loewenheim? Are there any considerations when making a major release for this crate?

I'll get back to you on that.

@szokeasaurusrex szokeasaurusrex changed the title feat!(debugId): Serialize source maps with debugId, not debug_id feat(debugId): Serialize source maps with debugId, not debug_id Dec 4, 2025
@szokeasaurusrex
Copy link
Member Author

@loewenheim says team consensus was we can do this in a minor

@szokeasaurusrex szokeasaurusrex merged commit fb19fa4 into master Dec 4, 2025
8 checks passed
@szokeasaurusrex szokeasaurusrex deleted the szokeasaurusrex/debug-id branch December 4, 2025 10:24
szokeasaurusrex added a commit to getsentry/sentry-cli that referenced this pull request Dec 4, 2025
(#3005)

Align debug ID injection [with the relevant TC39
proposal](https://github.com/tc39/ecma426/blob/main/proposals/debug-id.md#debug-ids-in-source-maps)
by upgrading the `sourcemap` crate to
[9.3.0](https://github.com/getsentry/rust-sourcemap/releases/tag/9.3.0),
which serializes the Debug ID on a sourcemap [under the `"debugId"` key,
instead of the `"debug_id"`
key](getsentry/rust-sourcemap#134). The crate
still supports reading the `"debug_id"` key, but the `"debugId"` key
takes precedence if both keys are present.

These changes primarily affect the `sourcemaps inject` command, which
will now place the debug ID in the `"debugId"` field rather than the
`"debug_id"` field. The `sourcemaps upload` command is also affected, as
sourcemaps will be rewritten with `"debugId"` rather than `"debug_id"`.
Previously, rewriting preserved the key being used; if a sourcemap
contained both keys, both would have been preserved after rewriting, but
after these changes, we emit only `"debugId"`. For example, if a
sourcemap contains only the `"debug_id"` key, the rewritten sourcemap
will have that key in `"debugId"` instead; however, if a sourcemap
contains both the `"debugId"` and the `"debug_id"` keys, the
`"debug_id"` is completely stripped, and its value ignored.

Closes #2221 Closes
[CLI-44](https://linear.app/getsentry/issue/CLI-44/time-capsule-dont-open-before-nov-6-2025-emit-debugid-instead-of-debug)
szokeasaurusrex added a commit to getsentry/sentry-cli that referenced this pull request Dec 11, 2025
…3005)

Align debug ID injection [with the relevant TC39 proposal](https://github.com/tc39/ecma426/blob/main/proposals/debug-id.md#debug-ids-in-source-maps) by upgrading the `sourcemap` crate to [9.3.0](https://github.com/getsentry/rust-sourcemap/releases/tag/9.3.0), which serializes the Debug ID on a sourcemap [under the `"debugId"` key, instead of the `"debug_id"` key](getsentry/rust-sourcemap#134). The crate still supports reading the `"debug_id"` key, but the `"debugId"` key takes precedence if both keys are present.

These changes primarily affect the `sourcemaps inject` command, which will now place the debug ID in the `"debugId"` field rather than the `"debug_id"` field. The `sourcemaps upload` command is also affected, as sourcemaps will be rewritten with `"debugId"` rather than `"debug_id"`. Previously, rewriting preserved the key being used; if a sourcemap contained both keys, both would have been preserved after rewriting, but after these changes, we emit only `"debugId"`. For example, if a sourcemap contains only the `"debug_id"` key, the rewritten sourcemap will have that key in `"debugId"` instead; however, if a sourcemap contains both the `"debugId"` and the `"debug_id"` keys, the `"debug_id"` is completely stripped, and its value ignored.

Closes #2221
Closes [CLI-44](https://linear.app/getsentry/issue/CLI-44/time-capsule-dont-open-before-nov-6-2025-emit-debugid-instead-of-debug)
szokeasaurusrex added a commit to getsentry/sentry-cli that referenced this pull request Dec 11, 2025
…3005)

Align debug ID injection [with the relevant TC39 proposal](https://github.com/tc39/ecma426/blob/main/proposals/debug-id.md#debug-ids-in-source-maps) by upgrading the `sourcemap` crate to [9.3.0](https://github.com/getsentry/rust-sourcemap/releases/tag/9.3.0), which serializes the Debug ID on a sourcemap [under the `"debugId"` key, instead of the `"debug_id"` key](getsentry/rust-sourcemap#134). The crate still supports reading the `"debug_id"` key, but the `"debugId"` key takes precedence if both keys are present.

These changes primarily affect the `sourcemaps inject` command, which will now place the debug ID in the `"debugId"` field rather than the `"debug_id"` field. The `sourcemaps upload` command is also affected, as sourcemaps will be rewritten with `"debugId"` rather than `"debug_id"`. Previously, rewriting preserved the key being used; if a sourcemap contained both keys, both would have been preserved after rewriting, but after these changes, we emit only `"debugId"`. For example, if a sourcemap contains only the `"debug_id"` key, the rewritten sourcemap will have that key in `"debugId"` instead; however, if a sourcemap contains both the `"debugId"` and the `"debug_id"` keys, the `"debug_id"` is completely stripped, and its value ignored.

Closes #2221
Closes [CLI-44](https://linear.app/getsentry/issue/CLI-44/time-capsule-dont-open-before-nov-6-2025-emit-debugid-instead-of-debug)
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.

Turn debug_id field to debugId

3 participants