Updating NPM dependencies
This commit is contained in:
17
node_modules/@babel/parser/lib/plugin-utils.js
generated
vendored
17
node_modules/@babel/parser/lib/plugin-utils.js
generated
vendored
@@ -49,6 +49,7 @@ function getPluginOption(plugins, name, option) {
|
||||
}
|
||||
|
||||
const PIPELINE_PROPOSALS = ["minimal", "smart", "fsharp"];
|
||||
const RECORD_AND_TUPLE_SYNTAX_TYPES = ["hash", "bar"];
|
||||
|
||||
function validatePlugins(plugins) {
|
||||
if (hasPlugin(plugins, "decorators")) {
|
||||
@@ -76,6 +77,22 @@ function validatePlugins(plugins) {
|
||||
if (hasPlugin(plugins, "pipelineOperator") && !PIPELINE_PROPOSALS.includes(getPluginOption(plugins, "pipelineOperator", "proposal"))) {
|
||||
throw new Error("'pipelineOperator' requires 'proposal' option whose value should be one of: " + PIPELINE_PROPOSALS.map(p => `'${p}'`).join(", "));
|
||||
}
|
||||
|
||||
if (hasPlugin(plugins, "moduleAttributes")) {
|
||||
if (hasPlugin(plugins, "importAssertions")) {
|
||||
throw new Error("Cannot combine importAssertions and moduleAttributes plugins.");
|
||||
}
|
||||
|
||||
const moduleAttributesVerionPluginOption = getPluginOption(plugins, "moduleAttributes", "version");
|
||||
|
||||
if (moduleAttributesVerionPluginOption !== "may-2020") {
|
||||
throw new Error("The 'moduleAttributes' plugin requires a 'version' option," + " representing the last proposal update. Currently, the" + " only supported value is 'may-2020'.");
|
||||
}
|
||||
}
|
||||
|
||||
if (hasPlugin(plugins, "recordAndTuple") && !RECORD_AND_TUPLE_SYNTAX_TYPES.includes(getPluginOption(plugins, "recordAndTuple", "syntaxType"))) {
|
||||
throw new Error("'recordAndTuple' requires 'syntaxType' option whose value should be one of: " + RECORD_AND_TUPLE_SYNTAX_TYPES.map(p => `'${p}'`).join(", "));
|
||||
}
|
||||
}
|
||||
|
||||
const mixinPlugins = {
|
||||
|
||||
Reference in New Issue
Block a user