@babel/plugin-syntax-decorators
Advanced tools
Comparing version 7.18.6 to 7.19.0
@@ -32,3 +32,3 @@ "use strict"; | ||
version = legacy ? "legacy" : "2018-09"; | ||
} else if (version !== "2021-12" && version !== "2018-09" && version !== "legacy") { | ||
} else if (version !== "2022-03" && version !== "2021-12" && version !== "2018-09" && version !== "legacy") { | ||
throw new Error("Unsupported decorators version: " + version); | ||
@@ -42,3 +42,3 @@ } | ||
if (decoratorsBeforeExport === undefined) { | ||
if (version === "2021-12") { | ||
if (version === "2021-12" || version === "2022-03") { | ||
decoratorsBeforeExport = false; | ||
@@ -49,4 +49,4 @@ } else if (version === "2018-09") { | ||
} else { | ||
if (version === "legacy") { | ||
throw new Error("'decoratorsBeforeExport' can't be used with legacy decorators."); | ||
if (version === "legacy" || version === "2022-03") { | ||
throw new Error(`'decoratorsBeforeExport' can't be used with ${version} decorators.`); | ||
} | ||
@@ -68,4 +68,9 @@ | ||
} else { | ||
if (version === "2021-12") { | ||
if (version === "2022-03") { | ||
parserOpts.plugins.push(["decorators", { | ||
decoratorsBeforeExport: false, | ||
allowCallParenthesized: false | ||
}], "decoratorAutoAccessors"); | ||
} else if (version === "2021-12") { | ||
parserOpts.plugins.push(["decorators", { | ||
decoratorsBeforeExport | ||
@@ -86,2 +91,4 @@ }], "decoratorAutoAccessors"); | ||
exports.default = _default; | ||
exports.default = _default; | ||
//# sourceMappingURL=index.js.map |
{ | ||
"name": "@babel/plugin-syntax-decorators", | ||
"version": "7.18.6", | ||
"version": "7.19.0", | ||
"description": "Allow parsing of decorators", | ||
@@ -20,3 +20,3 @@ "repository": { | ||
"dependencies": { | ||
"@babel/helper-plugin-utils": "^7.18.6" | ||
"@babel/helper-plugin-utils": "^7.19.0" | ||
}, | ||
@@ -27,3 +27,3 @@ "peerDependencies": { | ||
"devDependencies": { | ||
"@babel/core": "^7.18.6" | ||
"@babel/core": "^7.19.0" | ||
}, | ||
@@ -30,0 +30,0 @@ "engines": { |
11055
5
76