Socket
Socket
Sign inDemoInstall

@babel/preset-env

Package Overview
Dependencies
164
Maintainers
4
Versions
164
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 7.20.2 to 7.21.4

1

lib/debug.js

@@ -12,3 +12,2 @@ "use strict";

const support = list[item];
if (item.startsWith("transform-")) {

@@ -15,0 +14,0 @@ const proposalName = `proposal-${item.slice(10)}`;

3

lib/filter-items.js

@@ -25,4 +25,3 @@ "use strict";

items.forEach(item => {
if (has(_availablePlugins.minVersions, item) && _semver.lt(babelVersion,
_availablePlugins.minVersions[item])) {
if (has(_availablePlugins.minVersions, item) && _semver.lt(babelVersion, _availablePlugins.minVersions[item])) {
items.delete(item);

@@ -29,0 +28,0 @@ }

@@ -61,4 +61,3 @@ "use strict";

const getPlugin = pluginName => {
const plugin =
_availablePlugins.default[pluginName]();
const plugin = _availablePlugins.default[pluginName]();
if (!plugin) {

@@ -225,5 +224,3 @@ throw new Error(`Could not find plugin "${pluginName}". Ensure there is an entry in ./available-plugins.js for it.`);

let targets = babelTargets;
if (
_semver.lt(api.version, "7.13.0") ||
opts.targets || opts.configPath || opts.browserslistEnv || opts.ignoreBrowserslistConfig) {
if (_semver.lt(api.version, "7.13.0") || opts.targets || opts.configPath || opts.browserslistEnv || opts.ignoreBrowserslistConfig) {
{

@@ -230,0 +227,0 @@ var hasUglifyTarget = false;

@@ -17,7 +17,5 @@ "use strict";

var _helperValidatorOption = require("@babel/helper-validator-option");
const corejs2DefaultWebIncludes = ["web.timers", "web.immediate", "web.dom.iterable"];
const v = new _helperValidatorOption.OptionValidator("@babel/preset-env");
const allPluginsList = Object.keys(_pluginsCompatData.plugins);
const modulePlugins = ["transform-dynamic-import", ...Object.keys(_moduleTransformations.default).map(m => _moduleTransformations.default[m])];

@@ -46,4 +44,3 @@ const getValidIncludesAndExcludes = (type, corejs) => Array.from(new Set([...allPluginsList, ...(type === "exclude" ? modulePlugins : []), ...(corejs ? corejs == 2 ? [...Object.keys(_corejs2BuiltIns), ...corejs2DefaultWebIncludes] : Object.keys(_coreJsCompat) : [])]));

}
const items = filterableItems.filter(item => re.test(item) ||
re.test(item.replace(/^transform-/, "proposal-")));
const items = filterableItems.filter(item => re.test(item) || re.test(item.replace(/^transform-/, "proposal-")));
if (items.length === 0) invalidFilters.push(filter);

@@ -71,4 +68,3 @@ return items;

const validateModulesOption = (modulesOpt = _options.ModulesOption.auto) => {
v.invariant(
_options.ModulesOption[modulesOpt.toString()] || modulesOpt === _options.ModulesOption.false, `The 'modules' option must be one of \n` + ` - 'false' to indicate no module processing\n` + ` - a specific module type: 'commonjs', 'amd', 'umd', 'systemjs'` + ` - 'auto' (default) which will automatically select 'false' if the current\n` + ` process is known to support ES module syntax, or "commonjs" otherwise\n`);
v.invariant(_options.ModulesOption[modulesOpt.toString()] || modulesOpt === _options.ModulesOption.false, `The 'modules' option must be one of \n` + ` - 'false' to indicate no module processing\n` + ` - a specific module type: 'commonjs', 'amd', 'umd', 'systemjs'` + ` - 'auto' (default) which will automatically select 'false' if the current\n` + ` process is known to support ES module syntax, or "commonjs" otherwise\n`);
return modulesOpt;

@@ -78,4 +74,3 @@ };

const validateUseBuiltInsOption = (builtInsOpt = false) => {
v.invariant(
_options.UseBuiltInsOption[builtInsOpt.toString()] || builtInsOpt === _options.UseBuiltInsOption.false, `The 'useBuiltIns' option must be either
v.invariant(_options.UseBuiltInsOption[builtInsOpt.toString()] || builtInsOpt === _options.UseBuiltInsOption.false, `The 'useBuiltIns' option must be either
'false' (default) to indicate no polyfill,

@@ -82,0 +77,0 @@ '"entry"' to indicate replacing the entry polyfill, or

@@ -7,8 +7,5 @@ "use strict";

exports.proposalSyntaxPlugins = exports.proposalPlugins = exports.pluginSyntaxMap = void 0;
const proposalPlugins = new Set();
exports.proposalPlugins = proposalPlugins;
const proposalSyntaxPlugins = ["syntax-import-assertions"];
exports.proposalSyntaxPlugins = proposalSyntaxPlugins;

@@ -30,4 +27,3 @@ const pluginSyntaxObject = {

const pluginSyntaxEntries = Object.keys(pluginSyntaxObject).map(function (key) {
return [key,
pluginSyntaxObject[key]];
return [key, pluginSyntaxObject[key]];
});

@@ -34,0 +30,0 @@ const pluginSyntaxMap = new Map(pluginSyntaxEntries);

{
"name": "@babel/preset-env",
"version": "7.20.2",
"version": "7.21.4",
"description": "A Babel preset for each environment.",

@@ -19,22 +19,22 @@ "author": "The Babel Team (https://babel.dev/team)",

"dependencies": {
"@babel/compat-data": "^7.20.1",
"@babel/helper-compilation-targets": "^7.20.0",
"@babel/compat-data": "^7.21.4",
"@babel/helper-compilation-targets": "^7.21.4",
"@babel/helper-plugin-utils": "^7.20.2",
"@babel/helper-validator-option": "^7.18.6",
"@babel/helper-validator-option": "^7.21.0",
"@babel/plugin-bugfix-safari-id-destructuring-collision-in-function-expression": "^7.18.6",
"@babel/plugin-bugfix-v8-spread-parameters-in-optional-chaining": "^7.18.9",
"@babel/plugin-proposal-async-generator-functions": "^7.20.1",
"@babel/plugin-bugfix-v8-spread-parameters-in-optional-chaining": "^7.20.7",
"@babel/plugin-proposal-async-generator-functions": "^7.20.7",
"@babel/plugin-proposal-class-properties": "^7.18.6",
"@babel/plugin-proposal-class-static-block": "^7.18.6",
"@babel/plugin-proposal-class-static-block": "^7.21.0",
"@babel/plugin-proposal-dynamic-import": "^7.18.6",
"@babel/plugin-proposal-export-namespace-from": "^7.18.9",
"@babel/plugin-proposal-json-strings": "^7.18.6",
"@babel/plugin-proposal-logical-assignment-operators": "^7.18.9",
"@babel/plugin-proposal-logical-assignment-operators": "^7.20.7",
"@babel/plugin-proposal-nullish-coalescing-operator": "^7.18.6",
"@babel/plugin-proposal-numeric-separator": "^7.18.6",
"@babel/plugin-proposal-object-rest-spread": "^7.20.2",
"@babel/plugin-proposal-object-rest-spread": "^7.20.7",
"@babel/plugin-proposal-optional-catch-binding": "^7.18.6",
"@babel/plugin-proposal-optional-chaining": "^7.18.9",
"@babel/plugin-proposal-optional-chaining": "^7.21.0",
"@babel/plugin-proposal-private-methods": "^7.18.6",
"@babel/plugin-proposal-private-property-in-object": "^7.18.6",
"@babel/plugin-proposal-private-property-in-object": "^7.21.0",
"@babel/plugin-proposal-unicode-property-regex": "^7.18.6",

@@ -56,29 +56,29 @@ "@babel/plugin-syntax-async-generators": "^7.8.4",

"@babel/plugin-syntax-top-level-await": "^7.14.5",
"@babel/plugin-transform-arrow-functions": "^7.18.6",
"@babel/plugin-transform-async-to-generator": "^7.18.6",
"@babel/plugin-transform-arrow-functions": "^7.20.7",
"@babel/plugin-transform-async-to-generator": "^7.20.7",
"@babel/plugin-transform-block-scoped-functions": "^7.18.6",
"@babel/plugin-transform-block-scoping": "^7.20.2",
"@babel/plugin-transform-classes": "^7.20.2",
"@babel/plugin-transform-computed-properties": "^7.18.9",
"@babel/plugin-transform-destructuring": "^7.20.2",
"@babel/plugin-transform-block-scoping": "^7.21.0",
"@babel/plugin-transform-classes": "^7.21.0",
"@babel/plugin-transform-computed-properties": "^7.20.7",
"@babel/plugin-transform-destructuring": "^7.21.3",
"@babel/plugin-transform-dotall-regex": "^7.18.6",
"@babel/plugin-transform-duplicate-keys": "^7.18.9",
"@babel/plugin-transform-exponentiation-operator": "^7.18.6",
"@babel/plugin-transform-for-of": "^7.18.8",
"@babel/plugin-transform-for-of": "^7.21.0",
"@babel/plugin-transform-function-name": "^7.18.9",
"@babel/plugin-transform-literals": "^7.18.9",
"@babel/plugin-transform-member-expression-literals": "^7.18.6",
"@babel/plugin-transform-modules-amd": "^7.19.6",
"@babel/plugin-transform-modules-commonjs": "^7.19.6",
"@babel/plugin-transform-modules-systemjs": "^7.19.6",
"@babel/plugin-transform-modules-amd": "^7.20.11",
"@babel/plugin-transform-modules-commonjs": "^7.21.2",
"@babel/plugin-transform-modules-systemjs": "^7.20.11",
"@babel/plugin-transform-modules-umd": "^7.18.6",
"@babel/plugin-transform-named-capturing-groups-regex": "^7.19.1",
"@babel/plugin-transform-named-capturing-groups-regex": "^7.20.5",
"@babel/plugin-transform-new-target": "^7.18.6",
"@babel/plugin-transform-object-super": "^7.18.6",
"@babel/plugin-transform-parameters": "^7.20.1",
"@babel/plugin-transform-parameters": "^7.21.3",
"@babel/plugin-transform-property-literals": "^7.18.6",
"@babel/plugin-transform-regenerator": "^7.18.6",
"@babel/plugin-transform-regenerator": "^7.20.5",
"@babel/plugin-transform-reserved-words": "^7.18.6",
"@babel/plugin-transform-shorthand-properties": "^7.18.6",
"@babel/plugin-transform-spread": "^7.19.0",
"@babel/plugin-transform-spread": "^7.20.7",
"@babel/plugin-transform-sticky-regex": "^7.18.6",

@@ -90,3 +90,3 @@ "@babel/plugin-transform-template-literals": "^7.18.9",

"@babel/preset-modules": "^0.1.5",
"@babel/types": "^7.20.2",
"@babel/types": "^7.21.4",
"babel-plugin-polyfill-corejs2": "^0.3.3",

@@ -102,6 +102,6 @@ "babel-plugin-polyfill-corejs3": "^0.6.0",

"devDependencies": {
"@babel/core": "^7.20.2",
"@babel/core": "^7.21.4",
"@babel/core-7.12": "npm:@babel/core@7.12.9",
"@babel/helper-plugin-test-runner": "^7.18.6",
"@babel/traverse": "^7.20.1"
"@babel/traverse": "^7.21.4"
},

@@ -108,0 +108,0 @@ "engines": {

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc