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

View File

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