Repository navigation
🐛 fix(js): pass member dot at end of input through - #2287
Merged
gaborbernat merged 1 commit intoNov 16, 2026
Merged
Conversation
Refusing a literal token as a property name also refused the end of input in that position, so input such as `t,(0).` raised an error where it was passed through unchanged. The end of input has no text and repeats no earlier name, so the parser lets it through again, as it did before that change. Fixes tox-dev#2285
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.
#2275 made
minify_js()refuse a string, template or regex token where a property name is required, and it also refused the end of input in that position. Input that ends right after a member dot, such ast,(0)., then raisedValueErrorwhere it was passed through unchanged, andtests/js/test_minify.py::test_minify_keeps_trailing_dot_after_numeric_memberfails onmain. Fixes #2285.The name check in
leaf()(parser.c) accepted only an identifier name or a private name. The end of input has no text and repeats no earlier name, so the check lets it through again, as it did before #2275. A string, number, template or regex token after the dot is still refused.The fix is unreleased: the input's behaviour in the last release is unchanged.