fix(devtools-bundler-core): skip primitive values when walking AST children (#539)

* fix(devtools-bundler-core): skip primitive values when walking AST children

getChildKeys caches the object-valued keys of the first node it sees for a
type. A regex Literal has an object `value`, so `value` was cached for every
Literal. A later string Literal then reached `'type' in value` with a string,
which throws. addSourceToJsx catches the error and returns nothing, so after
one regex literal no file got data-tsd-source attributes.

forEachChild now skips every non-object value.

Fixes #523

* docs(changeset): describe which files lost source injection
This commit is contained in:
Alem Tuzlak 2026-10-29 16:23:13 +01:00 • committed by GitHub
commit ed8b314173
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 35 additions and 1 deletions