Repository navigation
Conversation
guybedford
reviewed
Oct 10, 2026
guybedford
left a comment
Collaborator
There was a problem hiding this comment.
Verified locally: the three fixes are real JS/Wasm parity bugs, the new tests fail on main and pass on this branch in all three test modes, and lib/lexer.wasm rebuilds byte-identical from src/lexer.c. As bug fixes these fit the policy to land.
One inline note on a test that enshrines a bug rather than fixing it.
Object-literal detection records getter and async prefixes before checking the following token, so it returns phantom export names. The JavaScript identifier check compares a numeric code point with a string, and Wasm permits a leading identifier escape. The Wasm adapter also discards empty reexport strings through a truthiness check. Signed-off-by: Ruben Bridgewater <ruben.bridgewater@datadoghq.com>
An identifier escape in an object property value stops detection before the parser records its key. Keep the key and stop detecting later properties, as with member expressions. Signed-off-by: Ruben Bridgewater <ruben.bridgewater@datadoghq.com>
BridgeAR
force-pushed
the
BridgeAR/2026-10-05-cjs-export-parity
branch
from
October 11, 2026 03:21
646a71c to
dc088cc
Compare
BridgeAR
marked this pull request as ready for review
October 11, 2026 09:47
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.
Object-literal detection records getter and async prefixes before checking the following token, so it returns phantom export names. The JavaScript identifier check compares a numeric code point with a string, and Wasm permits a leading identifier escape. The Wasm adapter also discards empty reexport strings through a truthiness check.