Skip to content

Commit

Permalink
fix rebase
Browse files Browse the repository at this point in the history
  • Loading branch information
liuxingbaoyu committed May 2, 2024
1 parent 520b5bb commit 2dbadd4
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 6 deletions.
6 changes: 3 additions & 3 deletions packages/babel-parser/src/plugin-utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ export function validatePlugins(pluginsMap: Map<string, any>) {
}

const tupleSyntaxIsHash = process.env.BABEL_8_BREAKING
? true
? pluginsMap.has("recordAndTuple")
: pluginsMap.get("recordAndTuple")?.syntaxType === "hash";

if (proposal === "hack") {
Expand Down Expand Up @@ -88,12 +88,12 @@ export function validatePlugins(pluginsMap: Map<string, any>) {

if (topicToken === "#" && tupleSyntaxIsHash) {
throw new Error(
`Plugin conflict between \`["pipelineOperator", { proposal: "hack", topicToken: "#" }]\` and \`${JSON.stringify(recordAndTupleConfigItem)}\`.`,
`Plugin conflict between \`["pipelineOperator", { proposal: "hack", topicToken: "#" }]\` and \`${JSON.stringify(["recordAndTuple", pluginsMap.get("recordAndTuple")])}\`.`,
);
}
} else if (proposal === "smart" && tupleSyntaxIsHash) {
throw new Error(
`Plugin conflict between \`["pipelineOperator", { proposal: "smart" }]\` and \`${JSON.stringify(recordAndTupleConfigItem)}\`.`,
`Plugin conflict between \`["pipelineOperator", { proposal: "smart" }]\` and \`${JSON.stringify(["recordAndTuple", pluginsMap.get("recordAndTuple")])}\`.`,
);
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,5 +12,5 @@
"recordAndTuple"
]
],
"throws": "Plugin conflict between `[\"pipelineOperator\", { proposal: \"hack\", topicToken: \"#\" }]` and `\"recordAndTuple\"`."
"throws": "Plugin conflict between `[\"pipelineOperator\", { proposal: \"hack\", topicToken: \"#\" }]` and `[\"recordAndTuple\",{}]`."
}
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,9 @@
"proposal": "smart"
}
],
["recordAndTuple"]
[
"recordAndTuple"
]
],
"throws": "Plugin conflict between `[\"pipelineOperator\", { proposal: \"smart\" }]` and `\"recordAndTuple\"`."
"throws": "Plugin conflict between `[\"pipelineOperator\", { proposal: \"smart\" }]` and `[\"recordAndTuple\",{}]`."
}

0 comments on commit 2dbadd4

Please sign in to comment.