-
Notifications
You must be signed in to change notification settings - Fork 143
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 since 2019-03-26 #483
Comments
This was referenced Dec 24, 2019
alangpierce
added a commit
that referenced
this issue
Dec 24, 2019
Progress toward #483 c7587c016 Don't accept '\08' or '\09' in strict mode (#9769) 🚫 Validation change, not relevant for Sucrase. 508fde400 v7.4.3 🚫 Release only 338853b5d Fix parsing typescript bodiless methods with the estree plugin also enabled (#9890) 🚫 AST-only 4198d91b8 Fix: remove constant context type check for TS (#9869) 🚫 Validation-only d7757f6d0 Fix TypeScript readonly error location (#9887) 🚫 Error-handling only cf3668779 Always register global bindings as exportable (#9865) 🚫 Scope code not relevant to Sucrase 30d507c91 Add TS support to @babel/parser's Scope (#9766) 🚫 Sucrase deals with scope differently and generally doesn't need to implement TS scope. 277a2620c allow directives and other comments before flow pragma (#9891) 🚫 We already remove all flow pragmas everywhere. 2c8869438 v7.4.4 🚫 Release only 555d50a08 Generate missing test output 🚫 Test only 354666aa1 fix: allow shebang directive (#9922) 🚫 We already handle shebangs and remove flow pragmas. 85432e2c4 Remove guardedHandlers from ASTs (#9979) 🚫 AST-only 47eb1ddfe Do not use lookahead when parsing dynamic import or import.meta (#9983) ✅ Implemented in a slightly different way with new tests. 4da7a01aa Avoid unnecessary work during lookahead (#9982) 🚫 Not relevant here c2d303f8b Do not use lookahead when parsing declare module or declare module.exports in flow (#9985) ✅ Straightforward port. 5661de590 Do not use lookahead when parsing imports in declare module in flow (#9987) 🚫 Code removed from Sucrase. 3f0590de2 Do not use lookahead when parsing jsx expression containers (#9988) ✅ Ported in a similar way to original code. b1826bf0a Only compute Position if not already in state (#9989) 🚫 Not relevant for Sucrase. f5b814058 Do not use lookahead when parsing construct signature declarations (#9995) ✅ Ported in similar way to original code, removed unnecessary enum. 9c06e4ed4 avoid exceptions for control flow (#9974) 🚫 Sucrase already avoids exceptions. 54d257c10 Fix location for optional params in arrow functions (#9998) 🚫 AST-only change. 33ab4f166 v7.4.5 🚫 Release only. 888b9f694 Remove unused code in the TS parser plugin (#10025) 🚫 Already removed from Sucrase. fdbbb743b flow - allow type parameter defaults in function declarations (#10084) 🚫 Nothing to do, we already allow defaults in function type parameters. 11fa2461c Disallow "let" as name at lexical bindings (#10099) 🚫 Validation-only. 1d3f9815d fix import typeof in declare module (#10132) 🚫 Code doesn't exist in Sucrase. ca67637da [@babel/parser] Add "allowUndeclaredExports" option (#9864) 🚫 Validation-only. 8bf9714d6 [legacy decorators] Allow decorating generator methods (#9912) 🚫 Sucrase doesn't support legacy decorators. 6b8a37c41 Implement f# pipeline in parser (#9450) 🚫 I'll leave out support for F# pipelines for now. 0bf0ae341 Fix typos (#10153) 🚫 Not relevant for Sucrase. f588e4ec4 BigInt type for Flow (#10091) 🚫 No changes necessary. 49da9a07c v7.5.0 🚫 Release only. 7f47cb65d Add Pipeline nodes to ast.spec (#10214) 🚫 Docs only. d8da63c92 Use correct extension for typescript fixtures (#10014) 🚫 Test only. 0407f034f v7.5.5 🚫 Release only. 1e7ed5c46 Add `allowUndeclaredExports` option to typings. (#10263) 🚫 Types only. f160522ab updated ParsePlugin type definition (#10259) 🚫 Types only. 4f0840ab8 Update dev dependencies and fix linting errors (#10228) 🚫 Formatting only. 75090f10e fix: assign comment to ObjectProperty only when inside an ObjectExpression (#10292) 🚫 Comment parsing only, not relevant for Sucrase. 15aa511b8 Do not register ambient classes to the TS scope (#10352) 🚫 Scope code not relevant for Sucrase. 1664cce68 Don't allow JSXNamespacedName to chain (#10366) 🚫 Validation only. 8a775a32b Retain trailing comments in array expressions (#10369) 🚫 Comment only. c0e3fa008 Refactor trailing comma comment adjustment (#10380) 🚫 Comment only. b02e35c19 Fix parenthesis for nullish coalescing (#10269) ✅ Updated precedence for operators. da0af5fd9 V8intrinsic syntax plugin (#10148) ✅ Added case to the start of `parseExprAtom`.
alangpierce
added a commit
that referenced
this issue
Dec 25, 2019
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.
alangpierce
added a commit
that referenced
this issue
Dec 25, 2019
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.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Last port PR was #440
Here are the new commits, from reversing the output of
git log --oneline --first-parent packages/babel-parser | pbcopy
:The text was updated successfully, but these errors were encountered: