Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Port babel-parser changes from 2019-09-06 to 2019-12-22 #487

Merged
merged 1 commit into from
Dec 25, 2019

Conversation

alangpierce
Copy link
Owner

Fixes #483

cbd5a26e5 v7.6.0
🚫 Release only.

daf25af47 Fix typo in changelog (#10409)
🚫 Docs only.

4395c22f3 Miscellaneous perf tweak (#10421)
βœ… Ported one small optimization.

cb881e6b3 [parser] Report escapes in kws only if they won't be used as i… (#10455)
🚫 Not relevant for Sucrase since Sucrase doesn't do validation.

9c1ad0a9f [parser] Disallow static fields named constructor (#10461)
🚫 Validation-only change.

b7333ea97 added check to disallow super.private variable access and test case added (#10472)
🚫 Validation-only change.

3069747a8 Leave trailing comments after handling a possible trailing com… (#10445)
🚫 Only affects comments, which aren't relevant for Sucrase.

f339d2d03 [parser] Disallow numeric separator in unicode scape sequences (#10468)
🚫 Validation only.

69d00dc5b [parser] Invalid NonOctal Decimal (#10467)
🚫 Validation only.

b9cb4af95 v7.6.2
🚫 Release only.

6f3460c76 chore: add access: public to babel parser publish config (#10487)
🚫 package.json only.

0e9502685 [parser] Don't crash on comment after trailing comma after eli… (#10490)
βœ… Was already working, but I added a test anyway.

490798a26 [parser] Disallow numeric separators in legacy octal like inte… (#10493)
🚫 Validation only.

80d99b4d4 Do not allow member expressions to start async arrows (#10332)
🚫 Doesn't appear to affect current Sucrase code.

fa5057f9f Flow: interface identifier should be declared in the scope (#10220)
🚫 Scope-only change.

a219b6de7 Disallow await inside async arrow params (#10469)
🚫 Validation only, not relevant for Sucrase.

0856618ed perf: replace lookahead by lookaheadCharCode (#10371)
🚫 I'll hold off on this for now, but seems good to explore at some point.

b0acfb24d add scope to TSModuleDeclaration (#10119)
🚫 Scope only.

d329156eb v7.6.3
🚫 Release only.

34937f13d Trailing comma after rest - The final fix (#10491)
🚫 Looks like this is only for validation, so doesn't affect Sucrase.

a422ea64e v7.6.4
🚫 Release only.

06313a628 Allow duplicate proto keys in patterns, simple case (#6705) (#10532)
🚫 Validation only.

5800fc97b [parser] Exception to 8 and 9 in tagged template (#10567)
🚫 Validation only.

095f28a91 fix: Exclude catch clause from let identifier error (#10559)
🚫 Doesn't apply to strict mode, Sucrase is always strict mode.

78cd63d9c Fix invalid test layout in @babel/parser
🚫 Test only.

b6ef9689b [parser] Parse only modifiers of actual methods (#10594)
🚫 Validation only.

1d1fab4ea [parser] Add support for private fields in TypeScript (#10483)
βœ… Already seems to be working (aside from validation), and I added a test.

4cd93ab5f [parser] Enable "exportNamespaceFrom" by default (#10521)
🚫 Already enabled in Sucrase.

38a306311 add assertions signature for TypeScript (#10543)
βœ… Implemented separately in Sucrase.

63f9a3c94 rename assertsModifier to asserts (#10613)
🚫 AST-only change.

143d15998 Create parser plugin "topLevelAwait" (#10449)
🚫 Sucrase already supports top-level await, and the ambiguities don't apply
since Sucrase assumes module code where await is reserved.

4b3a19ea9 fixed missing errors on assignment pattern in object expression (#10607)
🚫 Validation only.

ec3345bb5 Flow enums parsing (#10344)
🚫 For now I won't support Flow enums since it looks like the runtime semantics
aren't figured out yet.

d023e105b [TS] Parse calls with type args in optional chains (#10631)
βœ… This seems to already work, and I added a test.

87feda7c2 @babel/parser error recovery (#10363)
🚫 Big restructure, but I think doesn't have an effect on Sucrase since Sucrase
isn't interested in reporting detailed errors.

e9c1bce50 Add support for TS declare modifier on fields (#10545)
🚫 Filed #486 to track this issue.

97faa8395 v7.7.0
🚫 Release only.

2cd5ad0c8 fix typo: identifer -> identifier (#10647)
🚫 Docs only.

9082e68d6 Parse arrows with params annotations in conditional expressions (#10669)
🚫 Parsing edge case that shouldn't affect emit anyway, and the parsing code
works differently now in Sucrase.

35f4d1276 v7.7.2
🚫 Release only.

0287c0f02 Don't recover from "adjacent jsx elements" parser error (#10682)
🚫 Error recovery not relevant for Sucrase.

e315d65a7 v7.7.3
🚫 Release only.

4cb5e0a01 Allow TypeScript type assertions in array destructuring (#10592)
🚫 Already works in Sucrase.

d413a3078 Add asserts this [is type] parsing support (#10677)
βœ… Implemented in a simpler way in Sucrase.

a6d134804 Unify build step for ESLint packages (#10723)
🚫 Test only.

cfd26fdbf register ImportEqualsSpecifier to scope (#10710)
🚫 Scope code not relevant to Sucrase.

10213655b [parser] Allow optional async methods (#10582)
βœ… Same bug fix applied.

a502d8804 Fix some incorrect typeof parsing in flow (#10657)
🚫 Doesn't seem to affect Sucrase.

01d6d6dd3 Flow enums: fix enum body location (#10737)
🚫 Not supporting flow enums yet.

75767d87c v7.7.4
🚫 Release only.

5440ae1ca Correctly disambiguate / after async fuctions (#10475)
🚫 Fix wouldn't apply to Sucrase, and seems obscure enough to ignore and likely
wouldn't affect Sucrase output anyway.

d18afbd7c Allow tuple rest trailing comma (#10800)
βœ… Already works in Sucrase, and I added a test.

bb6cc6197 fix(optional chaining): Optional delete returns true with nullish base (#10806)
🚫 Test only.

c6e966cac [parser] Use scope flags to check arguments (#10801)
🚫 Validation only.

d04508e51 v7.7.5
🚫 Release only.

fb100eee4 @babel/eslint-parser: fix BigIntLiteral node to match ESTree spec (#10827)
🚫 Sucrase doesn't support ESTree parsing.

20e43ad10 validate parentheses in the left-hand side of assignment expressions (#10576)
🚫 Validation only.

5156d3ea0 Restore @babel/parser tests (#10854)
🚫 Test only.

7b54a9438 @babel/eslint-parser: fix ImportExpression node to match ESTree spec (#10828)
🚫 Sucrase doesn't support ESTree parsing.

0b3f883ed Properly serialize non-json values in parser tests (#10858)
🚫 Test only.

12da0941c v7.7.7
🚫 Release only.

f651f22f9 fix: lost leading comment after named import (#10901)
🚫 Doesn't affect Sucrase.

Fixes #483

cbd5a26e5 v7.6.0
🚫 Release only.

daf25af47 Fix typo in changelog (#10409)
🚫 Docs only.

4395c22f3 Miscellaneous perf tweak (#10421)
βœ… Ported one small optimization.

cb881e6b3 [parser] Report escapes in kws only if they won't be used as i… (#10455)
🚫 Not relevant for Sucrase since Sucrase doesn't do validation.

9c1ad0a9f [parser] Disallow static fields named `constructor` (#10461)
🚫 Validation-only change.

b7333ea97 added check to disallow super.private variable access and test case added (#10472)
🚫 Validation-only change.

3069747a8 Leave trailing comments after handling a possible trailing com… (#10445)
🚫 Only affects comments, which aren't relevant for Sucrase.

f339d2d03 [parser] Disallow numeric separator in unicode scape sequences (#10468)
🚫 Validation only.

69d00dc5b [parser] Invalid NonOctal Decimal (#10467)
🚫 Validation only.

b9cb4af95 v7.6.2
🚫 Release only.

6f3460c76 chore: add access: public to babel parser publish config (#10487)
🚫 package.json only.

0e9502685 [parser] Don't crash on comment after trailing comma after eli… (#10490)
βœ… Was already working, but I added a test anyway.

490798a26 [parser] Disallow numeric separators in legacy octal like inte… (#10493)
🚫 Validation only.

80d99b4d4 Do not allow member expressions to start async arrows (#10332)
🚫 Doesn't appear to affect current Sucrase code.

fa5057f9f Flow: interface identifier should be declared in the scope (#10220)
🚫 Scope-only change.

a219b6de7 Disallow await inside async arrow params (#10469)
🚫 Validation only, not relevant for Sucrase.

0856618ed perf: replace lookahead by lookaheadCharCode (#10371)
🚫 I'll hold off on this for now, but seems good to explore at some point.

b0acfb24d add scope to TSModuleDeclaration (#10119)
🚫 Scope only.

d329156eb v7.6.3
🚫 Release only.

34937f13d Trailing comma after rest - The final fix (#10491)
🚫 Looks like this is only for validation, so doesn't affect Sucrase.

a422ea64e v7.6.4
🚫 Release only.

06313a628 Allow duplicate __proto__ keys in patterns, simple case (#6705) (#10532)
🚫 Validation only.

5800fc97b [parser] Exception to 8 and 9 in tagged template (#10567)
🚫 Validation only.

095f28a91 fix: Exclude catch clause from let identifier error (#10559)
🚫 Doesn't apply to strict mode, Sucrase is always strict mode.

78cd63d9c Fix invalid test layout in @babel/parser
🚫 Test only.

b6ef9689b [parser] Parse only modifiers of actual methods (#10594)
🚫 Validation only.

1d1fab4ea [parser] Add support for private fields in TypeScript (#10483)
βœ… Already seems to be working (aside from validation), and I added a test.

4cd93ab5f [parser] Enable "exportNamespaceFrom" by default (#10521)
🚫 Already enabled in Sucrase.

38a306311 add assertions signature for TypeScript (#10543)
βœ… Implemented separately in Sucrase.

63f9a3c94 rename `assertsModifier` to `asserts` (#10613)
🚫 AST-only change.

143d15998 Create parser plugin "topLevelAwait" (#10449)
🚫 Sucrase already supports top-level await, and the ambiguities don't apply
since Sucrase assumes module code where await is reserved.

4b3a19ea9 fixed missing errors on assignment pattern in object expression (#10607)
🚫 Validation only.

ec3345bb5 Flow enums parsing (#10344)
🚫 For now I won't support Flow enums since it looks like the runtime semantics
aren't figured out yet.

d023e105b [TS] Parse calls with type args in optional chains (#10631)
βœ… This seems to already work, and I added a test.

87feda7c2 @babel/parser error recovery (#10363)
🚫 Big restructure, but I think doesn't have an effect on Sucrase since Sucrase
isn't interested in reporting detailed errors.

e9c1bce50 Add support for TS declare modifier on fields (#10545)
🚫 Filed #486 to track this issue.

97faa8395 v7.7.0
🚫 Release only.

2cd5ad0c8 fix typo: identifer -> identifier (#10647)
🚫 Docs only.

9082e68d6 Parse arrows with params annotations in conditional expressions (#10669)
🚫 Parsing edge case that shouldn't affect emit anyway, and the parsing code
works differently now in Sucrase.

35f4d1276 v7.7.2
🚫 Release only.

0287c0f02 Don't recover from "adjacent jsx elements" parser error (#10682)
🚫 Error recovery not relevant for Sucrase.

e315d65a7 v7.7.3
🚫 Release only.

4cb5e0a01 Allow TypeScript type assertions in array destructuring (#10592)
🚫 Already works in Sucrase.

d413a3078 Add `asserts this [is type]` parsing support (#10677)
βœ… Implemented in a simpler way in Sucrase.

a6d134804 Unify build step for ESLint packages (#10723)
🚫 Test only.

cfd26fdbf register ImportEqualsSpecifier to scope (#10710)
🚫 Scope code not relevant to Sucrase.

10213655b [parser] Allow optional async methods (#10582)
βœ… Same bug fix applied.

a502d8804 Fix some incorrect typeof parsing in flow (#10657)
🚫 Doesn't seem to affect Sucrase.

01d6d6dd3 Flow enums: fix enum body location (#10737)
🚫 Not supporting flow enums yet.

75767d87c v7.7.4
🚫 Release only.

5440ae1ca Correctly disambiguate / after async fuctions (#10475)
🚫 Fix wouldn't apply to Sucrase, and seems obscure enough to ignore and likely
wouldn't affect Sucrase output anyway.

d18afbd7c Allow tuple rest trailing comma (#10800)
βœ… Already works in Sucrase, and I added a test.

bb6cc6197 fix(optional chaining): Optional delete returns true with nullish base (#10806)
🚫 Test only.

c6e966cac [parser] Use scope flags to check arguments (#10801)
🚫 Validation only.

d04508e51 v7.7.5
🚫 Release only.

fb100eee4 @babel/eslint-parser: fix BigIntLiteral node to match ESTree spec (#10827)
🚫 Sucrase doesn't support ESTree parsing.

20e43ad10 validate parentheses in the left-hand side of assignment expressions (#10576)
🚫 Validation only.

5156d3ea0 Restore `@babel/parser` tests (#10854)
🚫 Test only.

7b54a9438 @babel/eslint-parser: fix ImportExpression node to match ESTree spec  (#10828)
🚫 Sucrase doesn't support ESTree parsing.

0b3f883ed Properly serialize non-json values in parser tests (#10858)
🚫 Test only.

12da0941c v7.7.7
🚫 Release only.

f651f22f9 fix: lost leading comment after named import (#10901)
🚫 Doesn't affect Sucrase.
@codecov-io
Copy link

Codecov Report

Merging #487 into master will increase coverage by 0.3%.
The diff coverage is 100%.

Impacted file tree graph

@@            Coverage Diff            @@
##           master     #487     +/-   ##
=========================================
+ Coverage   81.82%   82.13%   +0.3%     
=========================================
  Files          52       52             
  Lines        5421     5431     +10     
  Branches     1206     1210      +4     
=========================================
+ Hits         4436     4461     +25     
+ Misses        695      682     -13     
+ Partials      290      288      -2
Impacted Files Coverage Ξ”
src/parser/tokenizer/readWordTree.ts 100% <ΓΈ> (ΓΈ) ⬆️
src/parser/tokenizer/index.ts 76.58% <100%> (+1.34%) ⬆️
src/parser/tokenizer/keywords.ts 100% <100%> (ΓΈ) ⬆️
src/parser/plugins/typescript.ts 80.36% <100%> (+0.25%) ⬆️
src/parser/traverser/statement.ts 83% <100%> (+0.91%) ⬆️
src/parser/traverser/expression.ts 85.71% <0%> (+0.65%) ⬆️
src/parser/traverser/lval.ts 98.79% <0%> (+1.2%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Ξ” = absolute <relative> (impact), ΓΈ = not affected, ? = missing data
Powered by Codecov. Last update ff0c26c...44c54ef. Read the comment docs.

@alangpierce alangpierce merged commit 2498bcc into master Dec 25, 2019
@alangpierce alangpierce deleted the port-babel-changes-late-2019 branch December 25, 2019 06:52
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.

Port babel-parser changes since 2019-03-26
2 participants