Port babel-parser changes from 2023-01-11 to 2023-03-14 #786
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.
Instructions: https://github.com/alangpierce/sucrase/wiki/Porting-changes-from-Babel's-parser
Fixes #783
f7e231fc97 Allow negative number in ambient const initializer (#15338)
🚫 Only affects error handling.
89f38880ce v7.20.13
🚫 Release only.
41aac8b803 fix:
new (foo?.bar)()
incorrectly throws exceptionOptionalChainingNoNew
(#15377)🚫 Only affects error handling.
91b24d5d55 chore: Remove meaningless
typeof undefined
(#15395)🚫 Babel-internal change.
3aee4e367a Disallows specifiers after export * as ns (#15385)
🚫 Only affects error handling.
e5e923d99c Disallow await as bound name in using declaration (#15391)
🚫 Only affects error handling.
6e1cc6e958 v7.20.15
🚫 Release only.
812ad554ab polish: improve "
await
as identifier" error in modules (#15400)🚫 Only affects error handling.
d3bd1a3f2f [ts] Fix restrictions for optional parameters (#15414)
🚫 Appears to only affect error handling.
9be2c7fd79 [ts] treat single type param with a constraint as unambiguous (#15436)
🚫 Only affects error handling.
3c26949819 Add
annexb: false
parser option to disable Annex B (#15320)🚫 I believe all Annex B syntax support was removed long ago.
6e8ce9da64 [ts] Support
export type * from
(#15381)✅ Ported and added test.
2a7495f2c8 Parser option to allow
new.target
outside functions (#15114)🚫 Only affects error handling.
eae47c9ec8 Implement decorators as presented at
2023-01
TC39 meeting (#15405)✅ No parser changes were necessary, but added support for decorators after export with imports transform.
2f3ef392d6 [ts] Support
const
modifier in type parameters (#15384)✅ This was already accidentally working, but I added some logic to make it work intentionally and added a test.
34136c53f8 docs: fix typos (#15432)
🚫 Babel-internal change.
de7d75a78b v7.21.0
🚫 Release only.
7feaa36ad5 Fix problems found while publishing 7.21.0 (#15440)
🚫 Not relevant to Sucrase.
fa77313884 v7.21.1
🚫 Release only.
a2fdc207ce fix: Throws on
new foo?.bar!()
(#15439)🚫 Only affects error handling.
fc33467911 v7.21.2
🚫 Release only.
6e3dffe51a disallow mixins/implements in flow interface (#15479)
🚫 Only affects error handling.
4035521068 chore: Enable rule
no-confusing-void-expression
(#15485)🚫 Babel-internal change.
80863c220b [ts] Allow keywords in tuple labels (#15423)
✅ Type parsing already allowed keywords, added a test for this case.
fbfbd1da8c v7.21.3
🚫 Release only.