Skip to content

Commit

Permalink
Move pipeline operator to Stage 2 (#13754)
Browse files Browse the repository at this point in the history
  • Loading branch information
sdegutis committed Sep 16, 2021
1 parent 69ae238 commit 137fecc
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 6 deletions.
10 changes: 4 additions & 6 deletions packages/babel-standalone/src/preset-stage-1.ts
Expand Up @@ -7,8 +7,8 @@ export default (_: any, opts: any = {}) => {
useBuiltIns = false,
decoratorsLegacy = false,
decoratorsBeforeExport,
pipelineProposal = "minimal",
pipelineTopicToken = "%",
pipelineProposal,
pipelineTopicToken,
recordAndTupleSyntax,
} = opts;

Expand All @@ -21,17 +21,15 @@ export default (_: any, opts: any = {}) => {
useBuiltIns,
decoratorsLegacy,
decoratorsBeforeExport,
pipelineProposal,
pipelineTopicToken,
recordAndTupleSyntax,
},
],
],
plugins: [
babelPlugins.syntaxDecimal,
babelPlugins.proposalExportDefaultFrom,
[
babelPlugins.proposalPipelineOperator,
{ proposal: pipelineProposal, topicToken: pipelineTopicToken },
],
babelPlugins.proposalDoExpressions,
],
};
Expand Down
6 changes: 6 additions & 0 deletions packages/babel-standalone/src/preset-stage-2.ts
Expand Up @@ -7,6 +7,8 @@ export default (_: any, opts: any = {}) => {
useBuiltIns = false,
decoratorsLegacy = false,
decoratorsBeforeExport,
pipelineProposal = "minimal",
pipelineTopicToken = "%",
recordAndTupleSyntax = "hash",
} = opts;

Expand All @@ -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 }],
Expand Down

0 comments on commit 137fecc

Please sign in to comment.