From 5f807ae45b625a7c2f3f49a90e263562bc560c0f Mon Sep 17 00:00:00 2001 From: jack Date: Wed, 4 Dec 2019 19:10:42 -0800 Subject: [PATCH] Enable optional chaining by default in @babel/parser (#10817) --- packages/babel-parser/src/parser/expression.js | 1 - packages/babel-parser/src/plugins/flow.js | 1 - .../optional-chaining/class-contructor-call/input.js | 0 .../optional-chaining/class-contructor-call/output.json | 0 .../optional-chaining/conditional-decimal/input.js | 0 .../optional-chaining/conditional-decimal/output.json | 0 .../optional-chaining/function-call/input.js | 0 .../optional-chaining/function-call/output.json | 0 .../optional-chaining/member-access-bracket/input.js | 0 .../optional-chaining/member-access-bracket/output.json | 0 .../optional-chaining/member-access/input.js | 0 .../optional-chaining/member-access/output.json | 0 .../optional-chaining/optioanl-chain-expression/input.js | 0 .../optional-chaining/optioanl-chain-expression/output.json | 0 .../optional-chaining/optional-constructor/input.js | 0 .../optional-chaining/optional-constructor/output.json | 0 .../optional-chaining/optional-super-property-class/input.js | 0 .../optional-super-property-class/output.json | 0 .../optional-chaining/optional-super-property/input.js | 0 .../optional-chaining/optional-super-property/output.json | 0 .../optional-tagged-template-literals/input.js | 0 .../optional-tagged-template-literals/output.json | 0 .../optional-chaining/parenthised-chain/input.js | 0 .../optional-chaining/parenthised-chain/output.json | 0 .../optional-chaining/separated-chaining/input.js | 0 .../optional-chaining/separated-chaining/output.json | 0 .../optional-chaining/super-method-class/input.js | 0 .../optional-chaining/super-method-class/output.json | 0 .../experimental/_no-plugin/optional-chaining/input.js | 1 - .../experimental/_no-plugin/optional-chaining/options.json | 3 --- .../optional-chaining/class-contructor-call/options.json | 3 --- .../optional-chaining/conditional-decimal/options.json | 3 --- .../experimental/optional-chaining/function-call/options.json | 3 --- .../optional-chaining/member-access-bracket/options.json | 3 --- .../experimental/optional-chaining/member-access/options.json | 3 --- .../optional-chaining/optioanl-chain-expression/options.json | 3 --- .../optional-chaining/optional-constructor/options.json | 3 --- .../optional-super-property-class/options.json | 3 --- .../optional-chaining/optional-super-property/options.json | 3 --- .../optional-tagged-template-literals/options.json | 3 --- .../optional-chaining/parenthised-chain/options.json | 3 --- .../optional-chaining/separated-chaining/options.json | 3 --- .../optional-chaining/super-method-class/options.json | 3 --- .../flow/typeapp-call/function-call-optional/options.json | 2 +- .../flow/typeapp-call/method-call-optional/options.json | 2 +- .../flow/typeapp-call/method-call-optional2/options.json | 2 +- .../typescript/optional-chaining/type-arguments/options.json | 2 +- .../v8intrinsic/_errors/optional-call-expression/options.json | 2 +- 48 files changed, 5 insertions(+), 50 deletions(-) rename packages/babel-parser/test/fixtures/{experimental => es2020}/optional-chaining/class-contructor-call/input.js (100%) rename packages/babel-parser/test/fixtures/{experimental => es2020}/optional-chaining/class-contructor-call/output.json (100%) rename packages/babel-parser/test/fixtures/{experimental => es2020}/optional-chaining/conditional-decimal/input.js (100%) rename packages/babel-parser/test/fixtures/{experimental => es2020}/optional-chaining/conditional-decimal/output.json (100%) rename packages/babel-parser/test/fixtures/{experimental => es2020}/optional-chaining/function-call/input.js (100%) rename packages/babel-parser/test/fixtures/{experimental => es2020}/optional-chaining/function-call/output.json (100%) rename packages/babel-parser/test/fixtures/{experimental => es2020}/optional-chaining/member-access-bracket/input.js (100%) rename packages/babel-parser/test/fixtures/{experimental => es2020}/optional-chaining/member-access-bracket/output.json (100%) rename packages/babel-parser/test/fixtures/{experimental => es2020}/optional-chaining/member-access/input.js (100%) rename packages/babel-parser/test/fixtures/{experimental => es2020}/optional-chaining/member-access/output.json (100%) rename packages/babel-parser/test/fixtures/{experimental => es2020}/optional-chaining/optioanl-chain-expression/input.js (100%) rename packages/babel-parser/test/fixtures/{experimental => es2020}/optional-chaining/optioanl-chain-expression/output.json (100%) rename packages/babel-parser/test/fixtures/{experimental => es2020}/optional-chaining/optional-constructor/input.js (100%) rename packages/babel-parser/test/fixtures/{experimental => es2020}/optional-chaining/optional-constructor/output.json (100%) rename packages/babel-parser/test/fixtures/{experimental => es2020}/optional-chaining/optional-super-property-class/input.js (100%) rename packages/babel-parser/test/fixtures/{experimental => es2020}/optional-chaining/optional-super-property-class/output.json (100%) rename packages/babel-parser/test/fixtures/{experimental => es2020}/optional-chaining/optional-super-property/input.js (100%) rename packages/babel-parser/test/fixtures/{experimental => es2020}/optional-chaining/optional-super-property/output.json (100%) rename packages/babel-parser/test/fixtures/{experimental => es2020}/optional-chaining/optional-tagged-template-literals/input.js (100%) rename packages/babel-parser/test/fixtures/{experimental => es2020}/optional-chaining/optional-tagged-template-literals/output.json (100%) rename packages/babel-parser/test/fixtures/{experimental => es2020}/optional-chaining/parenthised-chain/input.js (100%) rename packages/babel-parser/test/fixtures/{experimental => es2020}/optional-chaining/parenthised-chain/output.json (100%) rename packages/babel-parser/test/fixtures/{experimental => es2020}/optional-chaining/separated-chaining/input.js (100%) rename packages/babel-parser/test/fixtures/{experimental => es2020}/optional-chaining/separated-chaining/output.json (100%) rename packages/babel-parser/test/fixtures/{experimental => es2020}/optional-chaining/super-method-class/input.js (100%) rename packages/babel-parser/test/fixtures/{experimental => es2020}/optional-chaining/super-method-class/output.json (100%) delete mode 100644 packages/babel-parser/test/fixtures/experimental/_no-plugin/optional-chaining/input.js delete mode 100644 packages/babel-parser/test/fixtures/experimental/_no-plugin/optional-chaining/options.json delete mode 100644 packages/babel-parser/test/fixtures/experimental/optional-chaining/class-contructor-call/options.json delete mode 100644 packages/babel-parser/test/fixtures/experimental/optional-chaining/conditional-decimal/options.json delete mode 100644 packages/babel-parser/test/fixtures/experimental/optional-chaining/function-call/options.json delete mode 100644 packages/babel-parser/test/fixtures/experimental/optional-chaining/member-access-bracket/options.json delete mode 100644 packages/babel-parser/test/fixtures/experimental/optional-chaining/member-access/options.json delete mode 100644 packages/babel-parser/test/fixtures/experimental/optional-chaining/optioanl-chain-expression/options.json delete mode 100644 packages/babel-parser/test/fixtures/experimental/optional-chaining/optional-constructor/options.json delete mode 100644 packages/babel-parser/test/fixtures/experimental/optional-chaining/optional-super-property-class/options.json delete mode 100644 packages/babel-parser/test/fixtures/experimental/optional-chaining/optional-super-property/options.json delete mode 100644 packages/babel-parser/test/fixtures/experimental/optional-chaining/optional-tagged-template-literals/options.json delete mode 100644 packages/babel-parser/test/fixtures/experimental/optional-chaining/parenthised-chain/options.json delete mode 100644 packages/babel-parser/test/fixtures/experimental/optional-chaining/separated-chaining/options.json delete mode 100644 packages/babel-parser/test/fixtures/experimental/optional-chaining/super-method-class/options.json diff --git a/packages/babel-parser/src/parser/expression.js b/packages/babel-parser/src/parser/expression.js index 69bfbbec0aab..e3b6eae99a0b 100644 --- a/packages/babel-parser/src/parser/expression.js +++ b/packages/babel-parser/src/parser/expression.js @@ -587,7 +587,6 @@ export default class ExpressionParser extends LValParser { } let optional = false; if (this.match(tt.questionDot)) { - this.expectPlugin("optionalChaining"); state.optionalChainMember = optional = true; if (noCalls && this.lookaheadCharCode() === charCodes.leftParenthesis) { state.stop = true; diff --git a/packages/babel-parser/src/plugins/flow.js b/packages/babel-parser/src/plugins/flow.js index 96a5feac5d37..72ed92b6c276 100644 --- a/packages/babel-parser/src/plugins/flow.js +++ b/packages/babel-parser/src/plugins/flow.js @@ -2801,7 +2801,6 @@ export default (superClass: Class): Class => subscriptState: N.ParseSubscriptState, ): N.Expression { if (this.match(tt.questionDot) && this.isLookaheadRelational("<")) { - this.expectPlugin("optionalChaining"); subscriptState.optionalChainMember = true; if (noCalls) { subscriptState.stop = true; diff --git a/packages/babel-parser/test/fixtures/experimental/optional-chaining/class-contructor-call/input.js b/packages/babel-parser/test/fixtures/es2020/optional-chaining/class-contructor-call/input.js similarity index 100% rename from packages/babel-parser/test/fixtures/experimental/optional-chaining/class-contructor-call/input.js rename to packages/babel-parser/test/fixtures/es2020/optional-chaining/class-contructor-call/input.js diff --git a/packages/babel-parser/test/fixtures/experimental/optional-chaining/class-contructor-call/output.json b/packages/babel-parser/test/fixtures/es2020/optional-chaining/class-contructor-call/output.json similarity index 100% rename from packages/babel-parser/test/fixtures/experimental/optional-chaining/class-contructor-call/output.json rename to packages/babel-parser/test/fixtures/es2020/optional-chaining/class-contructor-call/output.json diff --git a/packages/babel-parser/test/fixtures/experimental/optional-chaining/conditional-decimal/input.js b/packages/babel-parser/test/fixtures/es2020/optional-chaining/conditional-decimal/input.js similarity index 100% rename from packages/babel-parser/test/fixtures/experimental/optional-chaining/conditional-decimal/input.js rename to packages/babel-parser/test/fixtures/es2020/optional-chaining/conditional-decimal/input.js diff --git a/packages/babel-parser/test/fixtures/experimental/optional-chaining/conditional-decimal/output.json b/packages/babel-parser/test/fixtures/es2020/optional-chaining/conditional-decimal/output.json similarity index 100% rename from packages/babel-parser/test/fixtures/experimental/optional-chaining/conditional-decimal/output.json rename to packages/babel-parser/test/fixtures/es2020/optional-chaining/conditional-decimal/output.json diff --git a/packages/babel-parser/test/fixtures/experimental/optional-chaining/function-call/input.js b/packages/babel-parser/test/fixtures/es2020/optional-chaining/function-call/input.js similarity index 100% rename from packages/babel-parser/test/fixtures/experimental/optional-chaining/function-call/input.js rename to packages/babel-parser/test/fixtures/es2020/optional-chaining/function-call/input.js diff --git a/packages/babel-parser/test/fixtures/experimental/optional-chaining/function-call/output.json b/packages/babel-parser/test/fixtures/es2020/optional-chaining/function-call/output.json similarity index 100% rename from packages/babel-parser/test/fixtures/experimental/optional-chaining/function-call/output.json rename to packages/babel-parser/test/fixtures/es2020/optional-chaining/function-call/output.json diff --git a/packages/babel-parser/test/fixtures/experimental/optional-chaining/member-access-bracket/input.js b/packages/babel-parser/test/fixtures/es2020/optional-chaining/member-access-bracket/input.js similarity index 100% rename from packages/babel-parser/test/fixtures/experimental/optional-chaining/member-access-bracket/input.js rename to packages/babel-parser/test/fixtures/es2020/optional-chaining/member-access-bracket/input.js diff --git a/packages/babel-parser/test/fixtures/experimental/optional-chaining/member-access-bracket/output.json b/packages/babel-parser/test/fixtures/es2020/optional-chaining/member-access-bracket/output.json similarity index 100% rename from packages/babel-parser/test/fixtures/experimental/optional-chaining/member-access-bracket/output.json rename to packages/babel-parser/test/fixtures/es2020/optional-chaining/member-access-bracket/output.json diff --git a/packages/babel-parser/test/fixtures/experimental/optional-chaining/member-access/input.js b/packages/babel-parser/test/fixtures/es2020/optional-chaining/member-access/input.js similarity index 100% rename from packages/babel-parser/test/fixtures/experimental/optional-chaining/member-access/input.js rename to packages/babel-parser/test/fixtures/es2020/optional-chaining/member-access/input.js diff --git a/packages/babel-parser/test/fixtures/experimental/optional-chaining/member-access/output.json b/packages/babel-parser/test/fixtures/es2020/optional-chaining/member-access/output.json similarity index 100% rename from packages/babel-parser/test/fixtures/experimental/optional-chaining/member-access/output.json rename to packages/babel-parser/test/fixtures/es2020/optional-chaining/member-access/output.json diff --git a/packages/babel-parser/test/fixtures/experimental/optional-chaining/optioanl-chain-expression/input.js b/packages/babel-parser/test/fixtures/es2020/optional-chaining/optioanl-chain-expression/input.js similarity index 100% rename from packages/babel-parser/test/fixtures/experimental/optional-chaining/optioanl-chain-expression/input.js rename to packages/babel-parser/test/fixtures/es2020/optional-chaining/optioanl-chain-expression/input.js diff --git a/packages/babel-parser/test/fixtures/experimental/optional-chaining/optioanl-chain-expression/output.json b/packages/babel-parser/test/fixtures/es2020/optional-chaining/optioanl-chain-expression/output.json similarity index 100% rename from packages/babel-parser/test/fixtures/experimental/optional-chaining/optioanl-chain-expression/output.json rename to packages/babel-parser/test/fixtures/es2020/optional-chaining/optioanl-chain-expression/output.json diff --git a/packages/babel-parser/test/fixtures/experimental/optional-chaining/optional-constructor/input.js b/packages/babel-parser/test/fixtures/es2020/optional-chaining/optional-constructor/input.js similarity index 100% rename from packages/babel-parser/test/fixtures/experimental/optional-chaining/optional-constructor/input.js rename to packages/babel-parser/test/fixtures/es2020/optional-chaining/optional-constructor/input.js diff --git a/packages/babel-parser/test/fixtures/experimental/optional-chaining/optional-constructor/output.json b/packages/babel-parser/test/fixtures/es2020/optional-chaining/optional-constructor/output.json similarity index 100% rename from packages/babel-parser/test/fixtures/experimental/optional-chaining/optional-constructor/output.json rename to packages/babel-parser/test/fixtures/es2020/optional-chaining/optional-constructor/output.json diff --git a/packages/babel-parser/test/fixtures/experimental/optional-chaining/optional-super-property-class/input.js b/packages/babel-parser/test/fixtures/es2020/optional-chaining/optional-super-property-class/input.js similarity index 100% rename from packages/babel-parser/test/fixtures/experimental/optional-chaining/optional-super-property-class/input.js rename to packages/babel-parser/test/fixtures/es2020/optional-chaining/optional-super-property-class/input.js diff --git a/packages/babel-parser/test/fixtures/experimental/optional-chaining/optional-super-property-class/output.json b/packages/babel-parser/test/fixtures/es2020/optional-chaining/optional-super-property-class/output.json similarity index 100% rename from packages/babel-parser/test/fixtures/experimental/optional-chaining/optional-super-property-class/output.json rename to packages/babel-parser/test/fixtures/es2020/optional-chaining/optional-super-property-class/output.json diff --git a/packages/babel-parser/test/fixtures/experimental/optional-chaining/optional-super-property/input.js b/packages/babel-parser/test/fixtures/es2020/optional-chaining/optional-super-property/input.js similarity index 100% rename from packages/babel-parser/test/fixtures/experimental/optional-chaining/optional-super-property/input.js rename to packages/babel-parser/test/fixtures/es2020/optional-chaining/optional-super-property/input.js diff --git a/packages/babel-parser/test/fixtures/experimental/optional-chaining/optional-super-property/output.json b/packages/babel-parser/test/fixtures/es2020/optional-chaining/optional-super-property/output.json similarity index 100% rename from packages/babel-parser/test/fixtures/experimental/optional-chaining/optional-super-property/output.json rename to packages/babel-parser/test/fixtures/es2020/optional-chaining/optional-super-property/output.json diff --git a/packages/babel-parser/test/fixtures/experimental/optional-chaining/optional-tagged-template-literals/input.js b/packages/babel-parser/test/fixtures/es2020/optional-chaining/optional-tagged-template-literals/input.js similarity index 100% rename from packages/babel-parser/test/fixtures/experimental/optional-chaining/optional-tagged-template-literals/input.js rename to packages/babel-parser/test/fixtures/es2020/optional-chaining/optional-tagged-template-literals/input.js diff --git a/packages/babel-parser/test/fixtures/experimental/optional-chaining/optional-tagged-template-literals/output.json b/packages/babel-parser/test/fixtures/es2020/optional-chaining/optional-tagged-template-literals/output.json similarity index 100% rename from packages/babel-parser/test/fixtures/experimental/optional-chaining/optional-tagged-template-literals/output.json rename to packages/babel-parser/test/fixtures/es2020/optional-chaining/optional-tagged-template-literals/output.json diff --git a/packages/babel-parser/test/fixtures/experimental/optional-chaining/parenthised-chain/input.js b/packages/babel-parser/test/fixtures/es2020/optional-chaining/parenthised-chain/input.js similarity index 100% rename from packages/babel-parser/test/fixtures/experimental/optional-chaining/parenthised-chain/input.js rename to packages/babel-parser/test/fixtures/es2020/optional-chaining/parenthised-chain/input.js diff --git a/packages/babel-parser/test/fixtures/experimental/optional-chaining/parenthised-chain/output.json b/packages/babel-parser/test/fixtures/es2020/optional-chaining/parenthised-chain/output.json similarity index 100% rename from packages/babel-parser/test/fixtures/experimental/optional-chaining/parenthised-chain/output.json rename to packages/babel-parser/test/fixtures/es2020/optional-chaining/parenthised-chain/output.json diff --git a/packages/babel-parser/test/fixtures/experimental/optional-chaining/separated-chaining/input.js b/packages/babel-parser/test/fixtures/es2020/optional-chaining/separated-chaining/input.js similarity index 100% rename from packages/babel-parser/test/fixtures/experimental/optional-chaining/separated-chaining/input.js rename to packages/babel-parser/test/fixtures/es2020/optional-chaining/separated-chaining/input.js diff --git a/packages/babel-parser/test/fixtures/experimental/optional-chaining/separated-chaining/output.json b/packages/babel-parser/test/fixtures/es2020/optional-chaining/separated-chaining/output.json similarity index 100% rename from packages/babel-parser/test/fixtures/experimental/optional-chaining/separated-chaining/output.json rename to packages/babel-parser/test/fixtures/es2020/optional-chaining/separated-chaining/output.json diff --git a/packages/babel-parser/test/fixtures/experimental/optional-chaining/super-method-class/input.js b/packages/babel-parser/test/fixtures/es2020/optional-chaining/super-method-class/input.js similarity index 100% rename from packages/babel-parser/test/fixtures/experimental/optional-chaining/super-method-class/input.js rename to packages/babel-parser/test/fixtures/es2020/optional-chaining/super-method-class/input.js diff --git a/packages/babel-parser/test/fixtures/experimental/optional-chaining/super-method-class/output.json b/packages/babel-parser/test/fixtures/es2020/optional-chaining/super-method-class/output.json similarity index 100% rename from packages/babel-parser/test/fixtures/experimental/optional-chaining/super-method-class/output.json rename to packages/babel-parser/test/fixtures/es2020/optional-chaining/super-method-class/output.json diff --git a/packages/babel-parser/test/fixtures/experimental/_no-plugin/optional-chaining/input.js b/packages/babel-parser/test/fixtures/experimental/_no-plugin/optional-chaining/input.js deleted file mode 100644 index 280754611364..000000000000 --- a/packages/babel-parser/test/fixtures/experimental/_no-plugin/optional-chaining/input.js +++ /dev/null @@ -1 +0,0 @@ -a?.b diff --git a/packages/babel-parser/test/fixtures/experimental/_no-plugin/optional-chaining/options.json b/packages/babel-parser/test/fixtures/experimental/_no-plugin/optional-chaining/options.json deleted file mode 100644 index b8e170c94adb..000000000000 --- a/packages/babel-parser/test/fixtures/experimental/_no-plugin/optional-chaining/options.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "throws": "This experimental syntax requires enabling the parser plugin: 'optionalChaining' (1:1)" -} diff --git a/packages/babel-parser/test/fixtures/experimental/optional-chaining/class-contructor-call/options.json b/packages/babel-parser/test/fixtures/experimental/optional-chaining/class-contructor-call/options.json deleted file mode 100644 index fd201c1bdb02..000000000000 --- a/packages/babel-parser/test/fixtures/experimental/optional-chaining/class-contructor-call/options.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "plugins": ["optionalChaining"] -} diff --git a/packages/babel-parser/test/fixtures/experimental/optional-chaining/conditional-decimal/options.json b/packages/babel-parser/test/fixtures/experimental/optional-chaining/conditional-decimal/options.json deleted file mode 100644 index fd201c1bdb02..000000000000 --- a/packages/babel-parser/test/fixtures/experimental/optional-chaining/conditional-decimal/options.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "plugins": ["optionalChaining"] -} diff --git a/packages/babel-parser/test/fixtures/experimental/optional-chaining/function-call/options.json b/packages/babel-parser/test/fixtures/experimental/optional-chaining/function-call/options.json deleted file mode 100644 index fd201c1bdb02..000000000000 --- a/packages/babel-parser/test/fixtures/experimental/optional-chaining/function-call/options.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "plugins": ["optionalChaining"] -} diff --git a/packages/babel-parser/test/fixtures/experimental/optional-chaining/member-access-bracket/options.json b/packages/babel-parser/test/fixtures/experimental/optional-chaining/member-access-bracket/options.json deleted file mode 100644 index fd201c1bdb02..000000000000 --- a/packages/babel-parser/test/fixtures/experimental/optional-chaining/member-access-bracket/options.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "plugins": ["optionalChaining"] -} diff --git a/packages/babel-parser/test/fixtures/experimental/optional-chaining/member-access/options.json b/packages/babel-parser/test/fixtures/experimental/optional-chaining/member-access/options.json deleted file mode 100644 index fd201c1bdb02..000000000000 --- a/packages/babel-parser/test/fixtures/experimental/optional-chaining/member-access/options.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "plugins": ["optionalChaining"] -} diff --git a/packages/babel-parser/test/fixtures/experimental/optional-chaining/optioanl-chain-expression/options.json b/packages/babel-parser/test/fixtures/experimental/optional-chaining/optioanl-chain-expression/options.json deleted file mode 100644 index fd201c1bdb02..000000000000 --- a/packages/babel-parser/test/fixtures/experimental/optional-chaining/optioanl-chain-expression/options.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "plugins": ["optionalChaining"] -} diff --git a/packages/babel-parser/test/fixtures/experimental/optional-chaining/optional-constructor/options.json b/packages/babel-parser/test/fixtures/experimental/optional-chaining/optional-constructor/options.json deleted file mode 100644 index fd201c1bdb02..000000000000 --- a/packages/babel-parser/test/fixtures/experimental/optional-chaining/optional-constructor/options.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "plugins": ["optionalChaining"] -} diff --git a/packages/babel-parser/test/fixtures/experimental/optional-chaining/optional-super-property-class/options.json b/packages/babel-parser/test/fixtures/experimental/optional-chaining/optional-super-property-class/options.json deleted file mode 100644 index fd201c1bdb02..000000000000 --- a/packages/babel-parser/test/fixtures/experimental/optional-chaining/optional-super-property-class/options.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "plugins": ["optionalChaining"] -} diff --git a/packages/babel-parser/test/fixtures/experimental/optional-chaining/optional-super-property/options.json b/packages/babel-parser/test/fixtures/experimental/optional-chaining/optional-super-property/options.json deleted file mode 100644 index fd201c1bdb02..000000000000 --- a/packages/babel-parser/test/fixtures/experimental/optional-chaining/optional-super-property/options.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "plugins": ["optionalChaining"] -} diff --git a/packages/babel-parser/test/fixtures/experimental/optional-chaining/optional-tagged-template-literals/options.json b/packages/babel-parser/test/fixtures/experimental/optional-chaining/optional-tagged-template-literals/options.json deleted file mode 100644 index fd201c1bdb02..000000000000 --- a/packages/babel-parser/test/fixtures/experimental/optional-chaining/optional-tagged-template-literals/options.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "plugins": ["optionalChaining"] -} diff --git a/packages/babel-parser/test/fixtures/experimental/optional-chaining/parenthised-chain/options.json b/packages/babel-parser/test/fixtures/experimental/optional-chaining/parenthised-chain/options.json deleted file mode 100644 index fd201c1bdb02..000000000000 --- a/packages/babel-parser/test/fixtures/experimental/optional-chaining/parenthised-chain/options.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "plugins": ["optionalChaining"] -} diff --git a/packages/babel-parser/test/fixtures/experimental/optional-chaining/separated-chaining/options.json b/packages/babel-parser/test/fixtures/experimental/optional-chaining/separated-chaining/options.json deleted file mode 100644 index fd201c1bdb02..000000000000 --- a/packages/babel-parser/test/fixtures/experimental/optional-chaining/separated-chaining/options.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "plugins": ["optionalChaining"] -} diff --git a/packages/babel-parser/test/fixtures/experimental/optional-chaining/super-method-class/options.json b/packages/babel-parser/test/fixtures/experimental/optional-chaining/super-method-class/options.json deleted file mode 100644 index fd201c1bdb02..000000000000 --- a/packages/babel-parser/test/fixtures/experimental/optional-chaining/super-method-class/options.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "plugins": ["optionalChaining"] -} diff --git a/packages/babel-parser/test/fixtures/flow/typeapp-call/function-call-optional/options.json b/packages/babel-parser/test/fixtures/flow/typeapp-call/function-call-optional/options.json index 05e42d81055f..698e7668500f 100644 --- a/packages/babel-parser/test/fixtures/flow/typeapp-call/function-call-optional/options.json +++ b/packages/babel-parser/test/fixtures/flow/typeapp-call/function-call-optional/options.json @@ -1,3 +1,3 @@ { - "plugins": ["jsx", "flow", "optionalChaining"] + "plugins": ["jsx", "flow"] } diff --git a/packages/babel-parser/test/fixtures/flow/typeapp-call/method-call-optional/options.json b/packages/babel-parser/test/fixtures/flow/typeapp-call/method-call-optional/options.json index 05e42d81055f..698e7668500f 100644 --- a/packages/babel-parser/test/fixtures/flow/typeapp-call/method-call-optional/options.json +++ b/packages/babel-parser/test/fixtures/flow/typeapp-call/method-call-optional/options.json @@ -1,3 +1,3 @@ { - "plugins": ["jsx", "flow", "optionalChaining"] + "plugins": ["jsx", "flow"] } diff --git a/packages/babel-parser/test/fixtures/flow/typeapp-call/method-call-optional2/options.json b/packages/babel-parser/test/fixtures/flow/typeapp-call/method-call-optional2/options.json index 05e42d81055f..698e7668500f 100644 --- a/packages/babel-parser/test/fixtures/flow/typeapp-call/method-call-optional2/options.json +++ b/packages/babel-parser/test/fixtures/flow/typeapp-call/method-call-optional2/options.json @@ -1,3 +1,3 @@ { - "plugins": ["jsx", "flow", "optionalChaining"] + "plugins": ["jsx", "flow"] } diff --git a/packages/babel-parser/test/fixtures/typescript/optional-chaining/type-arguments/options.json b/packages/babel-parser/test/fixtures/typescript/optional-chaining/type-arguments/options.json index ccc6341666b4..fe9bffaa5e1a 100644 --- a/packages/babel-parser/test/fixtures/typescript/optional-chaining/type-arguments/options.json +++ b/packages/babel-parser/test/fixtures/typescript/optional-chaining/type-arguments/options.json @@ -1,4 +1,4 @@ { "sourceType": "module", - "plugins": ["typescript", "optionalChaining"] + "plugins": ["typescript"] } diff --git a/packages/babel-parser/test/fixtures/v8intrinsic/_errors/optional-call-expression/options.json b/packages/babel-parser/test/fixtures/v8intrinsic/_errors/optional-call-expression/options.json index cd2dad552c15..f388c1ba2b25 100644 --- a/packages/babel-parser/test/fixtures/v8intrinsic/_errors/optional-call-expression/options.json +++ b/packages/babel-parser/test/fixtures/v8intrinsic/_errors/optional-call-expression/options.json @@ -1,4 +1,4 @@ { - "plugins": ["optionalChaining", "v8intrinsic"], + "plugins": ["v8intrinsic"], "throws": "Unexpected token (1:0)" }