Move pipeline operator to Stage 2 (#13754)

This commit is contained in:
Steven Degutis 2021-09-16 10:54:31 -05:00 committed by GitHub
parent 69ae2388f8
commit 137fecc765
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 10 additions and 6 deletions

View File

@ -7,8 +7,8 @@ export default (_: any, opts: any = {}) => {
useBuiltIns = false,
decoratorsLegacy = false,
decoratorsBeforeExport,
pipelineProposal = "minimal",
pipelineTopicToken = "%",
pipelineProposal,
pipelineTopicToken,
recordAndTupleSyntax,
} = opts;
@ -21,6 +21,8 @@ export default (_: any, opts: any = {}) => {
useBuiltIns,
decoratorsLegacy,
decoratorsBeforeExport,
pipelineProposal,
pipelineTopicToken,
recordAndTupleSyntax,
},
],
@ -28,10 +30,6 @@ export default (_: any, opts: any = {}) => {
plugins: [
babelPlugins.syntaxDecimal,
babelPlugins.proposalExportDefaultFrom,
[
babelPlugins.proposalPipelineOperator,
{ proposal: pipelineProposal, topicToken: pipelineTopicToken },
],
babelPlugins.proposalDoExpressions,
],
};

View File

@ -7,6 +7,8 @@ export default (_: any, opts: any = {}) => {
useBuiltIns = false,
decoratorsLegacy = false,
decoratorsBeforeExport,
pipelineProposal = "minimal",
pipelineTopicToken = "%",
recordAndTupleSyntax = "hash",
} = opts;
@ -17,6 +19,10 @@ export default (_: any, opts: any = {}) => {
babelPlugins.proposalDecorators,
{ legacy: decoratorsLegacy, decoratorsBeforeExport },
],
[
babelPlugins.proposalPipelineOperator,
{ proposal: pipelineProposal, topicToken: pipelineTopicToken },
],
babelPlugins.proposalFunctionSent,
babelPlugins.proposalThrowExpressions,
[babelPlugins.syntaxRecordAndTuple, { syntaxType: recordAndTupleSyntax }],