@babel/plugin-external-helpers
Advanced tools
Comparing version 7.18.6 to 7.22.5
@@ -7,7 +7,4 @@ "use strict"; | ||
exports.default = void 0; | ||
var _helperPluginUtils = require("@babel/helper-plugin-utils"); | ||
var _core = require("@babel/core"); | ||
var _default = (0, _helperPluginUtils.declare)((api, options) => { | ||
@@ -19,11 +16,8 @@ api.assertVersion(7); | ||
} = options; | ||
if (whitelist !== false && (!Array.isArray(whitelist) || whitelist.some(w => typeof w !== "string"))) { | ||
throw new Error(".whitelist must be undefined, false, or an array of strings"); | ||
} | ||
const helperWhitelist = whitelist ? new Set(whitelist) : null; | ||
return { | ||
name: "external-helpers", | ||
pre(file) { | ||
@@ -34,3 +28,2 @@ file.set("helperGenerator", name => { | ||
} | ||
if (helperWhitelist && !helperWhitelist.has(name)) return; | ||
@@ -40,6 +33,6 @@ return _core.types.memberExpression(_core.types.identifier("babelHelpers"), _core.types.identifier(name)); | ||
} | ||
}; | ||
}); | ||
exports.default = _default; | ||
exports.default = _default; | ||
//# sourceMappingURL=index.js.map |
{ | ||
"name": "@babel/plugin-external-helpers", | ||
"version": "7.18.6", | ||
"version": "7.22.5", | ||
"description": "This plugin contains helper functions that’ll be placed at the top of the generated code", | ||
@@ -20,3 +20,3 @@ "repository": { | ||
"dependencies": { | ||
"@babel/helper-plugin-utils": "^7.18.6" | ||
"@babel/helper-plugin-utils": "^7.22.5" | ||
}, | ||
@@ -27,4 +27,4 @@ "peerDependencies": { | ||
"devDependencies": { | ||
"@babel/core": "^7.18.6", | ||
"@babel/helper-plugin-test-runner": "^7.18.6" | ||
"@babel/core": "^7.22.5", | ||
"@babel/helper-plugin-test-runner": "^7.22.5" | ||
}, | ||
@@ -31,0 +31,0 @@ "engines": { |
6552
5
32