Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Support pipeline proposal flag in
@babel/parser
(#8291)
- Loading branch information
1 parent
10910a1
commit 19a1705
Showing
42 changed files
with
95 additions
and
33 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
3 changes: 1 addition & 2 deletions
3
...-parser/test/fixtures/experimental/nullish-coalescing-operator/with-pipeline/options.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,3 @@ | ||
{ | ||
"plugins": ["nullishCoalescingOperator", "pipelineOperator"] | ||
"plugins": ["nullishCoalescingOperator", ["pipelineOperator", { "proposal": "minimal" }]] | ||
} | ||
|
4 changes: 0 additions & 4 deletions
4
...xtures/experimental/pipeline-operator/arrow-requires-parens-with-parend-args/options.json
This file was deleted.
Oops, something went wrong.
4 changes: 0 additions & 4 deletions
4
...el-parser/test/fixtures/experimental/pipeline-operator/arrow-requires-parens/options.json
This file was deleted.
Oops, something went wrong.
3 changes: 0 additions & 3 deletions
3
...el-parser/test/fixtures/experimental/pipeline-operator/await-requires-parens/options.json
This file was deleted.
Oops, something went wrong.
3 changes: 0 additions & 3 deletions
3
packages/babel-parser/test/fixtures/experimental/pipeline-operator/base/options.json
This file was deleted.
Oops, something went wrong.
3 changes: 0 additions & 3 deletions
3
packages/babel-parser/test/fixtures/experimental/pipeline-operator/chain/options.json
This file was deleted.
Oops, something went wrong.
File renamed without changes.
6 changes: 6 additions & 0 deletions
6
...s/babel-parser/test/fixtures/experimental/pipeline-operator/invalid-proposal/options.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
{ | ||
"plugins": [ | ||
["pipelineOperator", { "proposal": "invalid" }] | ||
], | ||
"throws": "'pipelineOperator' requires 'proposal' option whose value should be one of: minimal" | ||
} |
3 changes: 0 additions & 3 deletions
3
packages/babel-parser/test/fixtures/experimental/pipeline-operator/multiline/options.json
This file was deleted.
Oops, something went wrong.
3 changes: 0 additions & 3 deletions
3
packages/babel-parser/test/fixtures/experimental/pipeline-operator/precedence/options.json
This file was deleted.
Oops, something went wrong.
File renamed without changes.
6 changes: 6 additions & 0 deletions
6
...al/pipeline-operator/proposal-minimal-arrow-requires-parens-with-parend-args/options.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
{ | ||
"plugins": [ | ||
["pipelineOperator", { "proposal": "minimal" }] | ||
], | ||
"throws": "Unexpected token, expected \";\" (1:10)" | ||
} |
File renamed without changes.
6 changes: 6 additions & 0 deletions
6
...xtures/experimental/pipeline-operator/proposal-minimal-arrow-requires-parens/options.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
{ | ||
"plugins": [ | ||
["pipelineOperator", { "proposal": "minimal" }] | ||
], | ||
"throws": "Unexpected token, expected \";\" (1:8)" | ||
} |
File renamed without changes.
5 changes: 5 additions & 0 deletions
5
...xtures/experimental/pipeline-operator/proposal-minimal-await-requires-parens/options.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
{ | ||
"plugins": [ | ||
["pipelineOperator", { "proposal": "minimal" }] | ||
] | ||
} |
File renamed without changes.
File renamed without changes.
4 changes: 3 additions & 1 deletion
4
.../pipeline-operator/ban-await/options.json → ...proposal-minimal-ban-await-f/options.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,6 @@ | ||
{ | ||
"plugins": ["pipelineOperator"], | ||
"plugins": [ | ||
["pipelineOperator", { "proposal": "minimal" }] | ||
], | ||
"throws": "Unexpected \"await\" after pipeline body; await must have parentheses in minimal proposal (2:14)" | ||
} |
File renamed without changes.
4 changes: 3 additions & 1 deletion
4
...ipeline-operator/ban-await-f/options.json → ...r/proposal-minimal-ban-await/options.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,6 @@ | ||
{ | ||
"plugins": ["pipelineOperator"], | ||
"plugins": [ | ||
["pipelineOperator", { "proposal": "minimal" }] | ||
], | ||
"throws": "Unexpected \"await\" after pipeline body; await must have parentheses in minimal proposal (2:14)" | ||
} |
1 change: 1 addition & 0 deletions
1
.../babel-parser/test/fixtures/experimental/pipeline-operator/proposal-minimal-base/input.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
a |> b |
5 changes: 5 additions & 0 deletions
5
...el-parser/test/fixtures/experimental/pipeline-operator/proposal-minimal-base/options.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
{ | ||
"plugins": [ | ||
["pipelineOperator", { "proposal": "minimal" }] | ||
] | ||
} |
File renamed without changes.
File renamed without changes.
5 changes: 5 additions & 0 deletions
5
...l-parser/test/fixtures/experimental/pipeline-operator/proposal-minimal-chain/options.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
{ | ||
"plugins": [ | ||
["pipelineOperator", { "proposal": "minimal" }] | ||
] | ||
} |
File renamed without changes.
File renamed without changes.
5 changes: 5 additions & 0 deletions
5
...rser/test/fixtures/experimental/pipeline-operator/proposal-minimal-multiline/options.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
{ | ||
"plugins": [ | ||
["pipelineOperator", { "proposal": "minimal" }] | ||
] | ||
} |
File renamed without changes.
File renamed without changes.
5 changes: 5 additions & 0 deletions
5
...ser/test/fixtures/experimental/pipeline-operator/proposal-minimal-precedence/options.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
{ | ||
"plugins": [ | ||
["pipelineOperator", { "proposal": "minimal" }] | ||
] | ||
} |
File renamed without changes.
File renamed without changes.
5 changes: 5 additions & 0 deletions
5
...res/experimental/pipeline-operator/proposal-minimal-with-arrow-parend-params/options.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
{ | ||
"plugins": [ | ||
["pipelineOperator", { "proposal": "minimal" }] | ||
] | ||
} |
File renamed without changes.
File renamed without changes.
5 changes: 5 additions & 0 deletions
5
...ser/test/fixtures/experimental/pipeline-operator/proposal-minimal-with-arrow/options.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
{ | ||
"plugins": [ | ||
["pipelineOperator", { "proposal": "minimal" }] | ||
] | ||
} |
File renamed without changes.
3 changes: 0 additions & 3 deletions
3
...parser/test/fixtures/experimental/pipeline-operator/with-arrow-parend-params/options.json
This file was deleted.
Oops, something went wrong.
3 changes: 0 additions & 3 deletions
3
packages/babel-parser/test/fixtures/experimental/pipeline-operator/with-arrow/options.json
This file was deleted.
Oops, something went wrong.