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

enable optional chaining by default in @babel/parser #10817

Closed
wants to merge 19 commits into from
Closed
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
19 commits
Select commit Hold shift + click to select a range
73afad3
enable optional chaining by default
jackisherwood Dec 5, 2019
e9dc74e
fix: Promise.any requires global.AggregateError (#10930)
JLHwung Dec 27, 2019
b91720c
helper-module-transforms: dereference imported template tag (#10934)
ajafff Dec 28, 2019
3145133
chore: update test262 (#10943)
JLHwung Dec 30, 2019
197a8da
Remove unused parser methods (#10942)
JLHwung Dec 30, 2019
86245a8
TSTypeCastExpression should not be inside call parameters (#10939)
JLHwung Dec 30, 2019
30449fe
Refactor parseSubscript (#10937)
JLHwung Dec 30, 2019
2f3f779
refactor: remove unused invalidTemplateEscapePosition tokenizer state…
JLHwung Dec 30, 2019
0238244
refactor: remove unecessary checkYieldAwaitInDefaultParams (#10936)
JLHwung Dec 30, 2019
26eb891
fix: Class Field Initializer should not allow await expression as imm…
JLHwung Dec 31, 2019
daaa206
Override toString in case this function is printed (#10949)
jayenashar Jan 1, 2020
9f832c2
@babel/eslint-parser: Fix ClassPrivateMethods (#10913)
kaicataldo Jan 2, 2020
e504805
Add integration test: e2e-vue-cli (#10919)
JLHwung Jan 3, 2020
6ee8c97
Fix: TopLevelAwait should respect await identifiers defined in… (#10947)
JLHwung Jan 3, 2020
467667a
When reading a new string, U+2028/2029 should correctly set th… (#10944)
JLHwung Jan 3, 2020
a283537
fix: check await when parsing AsyncArrowBindingIdentifier (#10953)
JLHwung Jan 3, 2020
455d782
test: add invalid-lone-import test (#10950)
JLHwung Jan 3, 2020
a11281f
enable optional chaining by default
jackisherwood Dec 5, 2019
7665a54
Merge branch 'master' of https://github.com/jackisherwood/babel
jackisherwood Jan 3, 2020
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
1 change: 0 additions & 1 deletion packages/babel-parser/src/parser/expression.js
Expand Up @@ -609,7 +609,6 @@ export default class ExpressionParser extends LValParser {
noCalls,
);
} else if (this.match(tt.questionDot)) {
this.expectPlugin("optionalChaining");
state.optionalChainMember = true;
if (noCalls && this.lookaheadCharCode() === charCodes.leftParenthesis) {
state.stop = true;
Expand Down
1 change: 0 additions & 1 deletion packages/babel-parser/src/plugins/flow.js
Expand Up @@ -2801,7 +2801,6 @@ export default (superClass: Class<Parser>): Class<Parser> =>
subscriptState: N.ParseSubscriptState,
): N.Expression {
if (this.match(tt.questionDot) && this.isLookaheadRelational("<")) {
this.expectPlugin("optionalChaining");
subscriptState.optionalChainMember = true;
if (noCalls) {
subscriptState.stop = true;
Expand Down

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

@@ -1,3 +1,3 @@
{
"plugins": ["jsx", "flow", "optionalChaining"]
"plugins": ["jsx", "flow"]
}
@@ -1,3 +1,3 @@
{
"plugins": ["jsx", "flow", "optionalChaining"]
"plugins": ["jsx", "flow"]
}
@@ -1,3 +1,3 @@
{
"plugins": ["jsx", "flow", "optionalChaining"]
"plugins": ["jsx", "flow"]
}
@@ -1,4 +1,4 @@
{
"sourceType": "module",
"plugins": ["typescript", "optionalChaining"]
"plugins": ["typescript"]
}
@@ -1,4 +1,4 @@
{
"plugins": ["optionalChaining", "v8intrinsic"],
"plugins": ["v8intrinsic"],
"throws": "Unexpected token (1:0)"
}