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 all babel-parser changes from 2018-11-13 to 2019-01-24 #439

Merged
merged 1 commit into from
Mar 31, 2019

Conversation

alangpierce
Copy link
Owner

Progress toward #437

Notes about each change:
4e1d6e7ff v7.1.6
🚫 Release only.

a2afb974b Fix parsing typescript function types with destructuring (#9035)
🚫 Already fixed with #278.

445b14148 Better error for disallowed trailing commas/parameters after rest elements (#9046)
🚫 Just error reporting.

e7f0c065c Bump some deps (#9056)
🚫 Nothing to do.

4f16a12c0 Fix bug with parsing TS generic async arrow function (#9055)
🚫 Sucrase seems unaffected by bug.

d2971a195 Fix compatibility between typescript and jsx plugins in interface declarations (#9058)
🚫 Sucrase seems unaffected by bug.

856edbf95 [flow] Allow type casts in array patterns inside arrow parameters (#9069)
🚫 Bug caused by error reporting, doesn't affect Sucrase.

61f2aed5b Disallow await inside arrow functions (#9074)
🚫 Error handling out of scope for Sucrase.

07eaa3c63 Ignore empty fixture directories and fix fixtures in the parser (#9113)
🚫 Test-only.

393283053 Parse non-octals with leading zeros in non strict mode correctly (#9114)
🚫 Sucrase assumes strict mode, so this doesn't apply.

fa9df678a Move tests from babylon to babel-parser and enable one test that works now
🚫 Test-only.

fdc869ce1 Merge pull request #8289 from valtech-nyc/implement-smart-pipeline-in-parser
✅ Almost all logic was for error-reporting and complexity around node creation, but
I did add # as a valid expression.

282129ea6 v7.2.0
🚫 Release only.

4ca35ef8b Fix running flow on travis and update flow (#9128)
🚫 Types only.

72471aff6 Handle flow comments with leading spaces (#9168)
🚫 Sucrase doesn't do anything special for flow comments.

c1499b13a v7.2.2
🚫 Release only.

5cb38995c Allow keywords to be used in type annotations (#9184)
✅ I also fixed this for TypeScript.

0bb720401 v7.2.3
🚫 Release only.

b5177ce29 babel-parser: typescript: add missing bigint keyword (#9230)
🚫 Test only.

60ffe1d10 parser, smart pipes: Add test for async–await
🚫 Test only.

c586d4e8c parser, smart pipes: Add support for yield in pipeline bodies
🚫 Only validation change, startsExpr was removed from Sucrase.

a58893d1e Ensure modifiers are included in TSParameterProperty ranges (#9276)
🚫 AST only.

e43777bb5 Fix location for typescript type assertions in AST (#9284)
🚫 AST only, wasn't a problem in Sucrase tokens.

03022d169 Throw error if TypeScript class has empty implements (#9292)
🚫 Error handling only.

46e3f6df1 @babel/parser: include leading character into range of generic ArrowFunctionExpression (#9295)
🚫 AST only.

2cc037675 @babel/parser(ts): Add parsing of type import (#9302)
🚫 Already done in #380.

9764718c3 Disallow trailing comma after rest (#9311)
🚫 Error handling only.

5889620a6 Disallow new import(x) and import(x,) (#9313)
🚫 Error handling only.

3e4b608a8 Parse class heritage as strict mode code (#9315)
🚫 Sucrase is always in strict mode.

694e3fd8c Merge declaration and init of props in parser's state (#9312)
🚫 Refactor that isn't relevant to Sucrase.

e8038863c Fix range on TypeScript this type predicate (#9339)
🚫 AST only.

34c9890f4 Fix range on TypeScript index signature parameters (#9335)
🚫 AST only.

aaec2cd51 Fix handling newline with TypeScript declare and abstract classes (#9328)
✅ Implemented newline checking in various places.

0a88230ec Disallow async functions as loop bodies (#9314)
🚫 Error handling only.

a2e6d8e96 Disallow usage of invalid keyword after export abstract statement in Typescript (#9336)
🚫 Error handling only.

96a734314 Merge pull request #9348 from danez/perf
🚫 Nothing stood out as being valuable to incorporate.

f6ee26c3d v7.3.0
🚫 Release only.

af88e63df fix new keyword broken by recent refactoring (#9377)
🚫 Not relevant in Sucrase.

f2af6c117 v7.3.1
🚫 Release only.

f77c450cd Bump prettier (#9373)
🚫 Tooling only.

65febdd13 Refactor import and export parsing (#9326)
🚫 Skipping refactor for now since it's not clear that I'll need it.

93e1b5e61 Merge pull request #9375 from danez/contextual-let
🚫 Not necessary for strict mode.

8bc9f9a05 fix: Allow toplevel await when option true and correctly mark await keyword as unexpected (#9371)
🚫 Error handling only.

42c5d3fc4 Correctly fail for invalid yield in for (#9398)
🚫 Error handling only.

46ba5940c Make yield a contextual keyword (#9400)
🚫 Not necessary for strict mode.

7dc157f9b Fix location/range on TypeScript ExportNamedDeclarations (#9406)
🚫 AST only.

Progress toward #437

Notes about each change:
4e1d6e7ff v7.1.6
🚫 Release only.

a2afb974b Fix parsing typescript function types with destructuring (#9035)
🚫 Already fixed with #278.

445b14148 Better error for disallowed trailing commas/parameters after rest elements (#9046)
🚫 Just error reporting.

e7f0c065c Bump some deps (#9056)
🚫 Nothing to do.

4f16a12c0 Fix bug with parsing TS generic async arrow function (#9055)
🚫 Sucrase seems unaffected by bug.

d2971a195 Fix compatibility between typescript and jsx plugins in interface declarations (#9058)
🚫 Sucrase seems unaffected by bug.

856edbf95 [flow] Allow type casts in array patterns inside arrow parameters (#9069)
🚫 Bug caused by error reporting, doesn't affect Sucrase.

61f2aed5b Disallow await inside arrow functions (#9074)
🚫 Error handling out of scope for Sucrase.

07eaa3c63 Ignore empty fixture directories and fix fixtures in the parser (#9113)
🚫 Test-only.

393283053 Parse non-octals with leading zeros in non strict mode correctly (#9114)
🚫 Sucrase assumes strict mode, so this doesn't apply.

fa9df678a Move tests from babylon to babel-parser and enable one test that works now
🚫 Test-only.

fdc869ce1 Merge pull request #8289 from valtech-nyc/implement-smart-pipeline-in-parser
✅ Almost all logic was for error-reporting and complexity around node creation, but
   I did add # as a valid expression.

282129ea6 v7.2.0
🚫 Release only.

4ca35ef8b Fix running flow on travis and update flow (#9128)
🚫 Types only.

72471aff6 Handle flow comments with leading spaces (#9168)
🚫 Sucrase doesn't do anything special for flow comments.

c1499b13a v7.2.2
🚫 Release only.

5cb38995c Allow keywords to be used in type annotations (#9184)
✅ I also fixed this for TypeScript.

0bb720401 v7.2.3
🚫 Release only.

b5177ce29 babel-parser: typescript: add missing bigint keyword (#9230)
🚫 Test only.

60ffe1d10 parser, smart pipes: Add test for async–await
🚫 Test only.

c586d4e8c parser, smart pipes: Add support for yield in pipeline bodies
🚫 Only validation change, startsExpr was removed from Sucrase.

a58893d1e Ensure modifiers are included in TSParameterProperty ranges (#9276)
🚫 AST only.

e43777bb5 Fix location for typescript type assertions in AST (#9284)
🚫 AST only, wasn't a problem in Sucrase tokens.

03022d169 Throw error if TypeScript class has empty implements (#9292)
🚫 Error handling only.

46e3f6df1 @babel/parser: include leading character into range of generic ArrowFunctionExpression (#9295)
🚫 AST only.

2cc037675 @babel/parser(ts): Add parsing of type import (#9302)
🚫 Already done in #380.

9764718c3 Disallow trailing comma after rest (#9311)
🚫 Error handling only.

5889620a6 Disallow `new import(x)` and `import(x,)` (#9313)
🚫 Error handling only.

3e4b608a8 Parse class heritage as strict mode code (#9315)
🚫 Sucrase is always in strict mode.

694e3fd8c Merge declaration and init of props in parser's state (#9312)
🚫 Refactor that isn't relevant to Sucrase.

e8038863c Fix range on TypeScript this type predicate (#9339)
🚫 AST only.

34c9890f4 Fix range on TypeScript index signature parameters (#9335)
🚫 AST only.

aaec2cd51 Fix handling newline with TypeScript declare and abstract classes (#9328)
✅ Implemented newline checking in various places.

0a88230ec Disallow async functions as loop bodies (#9314)
🚫 Error handling only.

a2e6d8e96 Disallow usage of invalid keyword after export abstract statement in Typescript (#9336)
🚫 Error handling only.

96a734314 Merge pull request #9348 from danez/perf
🚫 Nothing stood out as being valuable to incorporate.

f6ee26c3d v7.3.0
🚫 Release only.

af88e63df fix new keyword broken by recent refactoring (#9377)
🚫 Not relevant in Sucrase.

f2af6c117 v7.3.1
🚫 Release only.

f77c450cd Bump prettier (#9373)
🚫 Tooling only.

65febdd13 Refactor import and export parsing (#9326)
🚫 Skipping refactor for now since it's not clear that I'll need it.

93e1b5e61 Merge pull request #9375 from danez/contextual-let
🚫 Not necessary for strict mode.

8bc9f9a05 fix: Allow toplevel await when option true and correctly mark await keyword as unexpected (#9371)
🚫 Error handling only.

42c5d3fc4 Correctly fail for invalid yield in for (#9398)
🚫 Error handling only.

46ba5940c Make yield a contextual keyword (#9400)
🚫 Not necessary for strict mode.

7dc157f9b Fix location/range on TypeScript ExportNamedDeclarations (#9406)
🚫 AST only.
@codecov-io
Copy link

Codecov Report

Merging #439 into master will increase coverage by 0.44%.
The diff coverage is 70%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #439      +/-   ##
==========================================
+ Coverage   80.65%   81.09%   +0.44%     
==========================================
  Files          49       49              
  Lines        5123     5370     +247     
  Branches     1199     1204       +5     
==========================================
+ Hits         4132     4355     +223     
- Misses        690      716      +26     
+ Partials      301      299       -2
Impacted Files Coverage Δ
src/parser/traverser/expression.ts 83.29% <100%> (+0.56%) ⬆️
src/parser/plugins/typescript.ts 78.95% <64.28%> (+2.38%) ⬆️
src/parser/plugins/flow.ts 62.5% <75%> (-1.3%) ⬇️
src/util/formatTokens.ts 70.58% <0%> (-10.06%) ⬇️
src/parser/util/identifier.ts 90.9% <0%> (-4.1%) ⬇️
src/parser/plugins/jsx/index.ts 91.33% <0%> (-1.48%) ⬇️
src/util/getClassInfo.ts 85.12% <0%> (-1.21%) ⬇️
src/identifyShadowedGlobals.ts 87.8% <0%> (-1.09%) ⬇️
src/parser/traverser/statement.ts 81.12% <0%> (-1%) ⬇️
... and 21 more

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 36b9d76...cc37dfd. Read the comment docs.

@alangpierce alangpierce merged commit e5e9003 into master Mar 31, 2019
@alangpierce alangpierce deleted the port-babel-parser-late-2018 branch March 31, 2019 03:48
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.

2 participants