Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Port babel-parser changes from 2019-09-06 to 2019-12-22
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.
- Loading branch information