Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@babel/preset-env

Package Overview
Dependencies
Maintainers
4
Versions
180
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@babel/preset-env - npm Package Compare versions

Comparing version 7.14.4 to 7.22.5

data/core-js-compat.js

35

data/shipped-proposals.js

@@ -1,33 +0,2 @@

/* eslint sort-keys: "error" */
// These mappings represent the syntax proposals that have been
// shipped by browsers, and are enabled by the `shippedProposals` option.
const proposalPlugins = new Set([
"proposal-class-static-block",
"proposal-private-property-in-object",
]);
// use intermediary object to enforce alphabetical key order
const pluginSyntaxObject = {
"proposal-async-generator-functions": "syntax-async-generators",
"proposal-class-properties": "syntax-class-properties",
"proposal-class-static-block": "syntax-class-static-block",
"proposal-json-strings": "syntax-json-strings",
"proposal-nullish-coalescing-operator": "syntax-nullish-coalescing-operator",
"proposal-numeric-separator": "syntax-numeric-separator",
"proposal-object-rest-spread": "syntax-object-rest-spread",
"proposal-optional-catch-binding": "syntax-optional-catch-binding",
"proposal-optional-chaining": "syntax-optional-chaining",
// note: we don't have syntax-private-methods
"proposal-private-methods": "syntax-class-properties",
"proposal-private-property-in-object": "syntax-private-property-in-object",
"proposal-unicode-property-regex": null,
};
const pluginSyntaxEntries = Object.keys(pluginSyntaxObject).map(function (key) {
return [key, pluginSyntaxObject[key]];
});
const pluginSyntaxMap = new Map(pluginSyntaxEntries);
module.exports = { pluginSyntaxMap, proposalPlugins };
const { pluginSyntaxMap, proposalPlugins, proposalSyntaxPlugins } = require("../lib/shipped-proposals");
module.exports = { pluginSyntaxMap, proposalPlugins, proposalSyntaxPlugins };

@@ -7,758 +7,160 @@ "use strict";

exports.minVersions = exports.default = void 0;
function _pluginSyntaxAsyncGenerators() {
const data = require("@babel/plugin-syntax-async-generators");
_pluginSyntaxAsyncGenerators = function () {
return data;
};
return data;
}
function _pluginSyntaxClassProperties() {
const data = require("@babel/plugin-syntax-class-properties");
_pluginSyntaxClassProperties = function () {
return data;
};
return data;
}
function _pluginSyntaxClassStaticBlock() {
const data = require("@babel/plugin-syntax-class-static-block");
_pluginSyntaxClassStaticBlock = function () {
return data;
};
return data;
}
function _pluginSyntaxDynamicImport() {
const data = require("@babel/plugin-syntax-dynamic-import");
_pluginSyntaxDynamicImport = function () {
return data;
};
return data;
}
function _pluginSyntaxExportNamespaceFrom() {
const data = require("@babel/plugin-syntax-export-namespace-from");
_pluginSyntaxExportNamespaceFrom = function () {
return data;
};
return data;
}
function _pluginSyntaxJsonStrings() {
const data = require("@babel/plugin-syntax-json-strings");
_pluginSyntaxJsonStrings = function () {
return data;
};
return data;
}
function _pluginSyntaxLogicalAssignmentOperators() {
const data = require("@babel/plugin-syntax-logical-assignment-operators");
_pluginSyntaxLogicalAssignmentOperators = function () {
return data;
};
return data;
}
function _pluginSyntaxNullishCoalescingOperator() {
const data = require("@babel/plugin-syntax-nullish-coalescing-operator");
_pluginSyntaxNullishCoalescingOperator = function () {
return data;
};
return data;
}
function _pluginSyntaxNumericSeparator() {
const data = require("@babel/plugin-syntax-numeric-separator");
_pluginSyntaxNumericSeparator = function () {
return data;
};
return data;
}
function _pluginSyntaxObjectRestSpread() {
const data = require("@babel/plugin-syntax-object-rest-spread");
_pluginSyntaxObjectRestSpread = function () {
return data;
};
return data;
}
function _pluginSyntaxOptionalCatchBinding() {
const data = require("@babel/plugin-syntax-optional-catch-binding");
_pluginSyntaxOptionalCatchBinding = function () {
return data;
};
return data;
}
function _pluginSyntaxOptionalChaining() {
const data = require("@babel/plugin-syntax-optional-chaining");
_pluginSyntaxOptionalChaining = function () {
return data;
};
return data;
}
function _pluginSyntaxPrivatePropertyInObject() {
const data = require("@babel/plugin-syntax-private-property-in-object");
_pluginSyntaxPrivatePropertyInObject = function () {
return data;
};
return data;
}
function _pluginSyntaxTopLevelAwait() {
const data = require("@babel/plugin-syntax-top-level-await");
_pluginSyntaxTopLevelAwait = function () {
return data;
};
return data;
}
function _pluginProposalAsyncGeneratorFunctions() {
const data = require("@babel/plugin-proposal-async-generator-functions");
_pluginProposalAsyncGeneratorFunctions = function () {
return data;
};
return data;
}
function _pluginProposalClassProperties() {
const data = require("@babel/plugin-proposal-class-properties");
_pluginProposalClassProperties = function () {
return data;
};
return data;
}
function _pluginProposalClassStaticBlock() {
const data = require("@babel/plugin-proposal-class-static-block");
_pluginProposalClassStaticBlock = function () {
return data;
};
return data;
}
function _pluginProposalDynamicImport() {
const data = require("@babel/plugin-proposal-dynamic-import");
_pluginProposalDynamicImport = function () {
return data;
};
return data;
}
function _pluginProposalExportNamespaceFrom() {
const data = require("@babel/plugin-proposal-export-namespace-from");
_pluginProposalExportNamespaceFrom = function () {
return data;
};
return data;
}
function _pluginProposalJsonStrings() {
const data = require("@babel/plugin-proposal-json-strings");
_pluginProposalJsonStrings = function () {
return data;
};
return data;
}
function _pluginProposalLogicalAssignmentOperators() {
const data = require("@babel/plugin-proposal-logical-assignment-operators");
_pluginProposalLogicalAssignmentOperators = function () {
return data;
};
return data;
}
function _pluginProposalNullishCoalescingOperator() {
const data = require("@babel/plugin-proposal-nullish-coalescing-operator");
_pluginProposalNullishCoalescingOperator = function () {
return data;
};
return data;
}
function _pluginProposalNumericSeparator() {
const data = require("@babel/plugin-proposal-numeric-separator");
_pluginProposalNumericSeparator = function () {
return data;
};
return data;
}
function _pluginProposalObjectRestSpread() {
const data = require("@babel/plugin-proposal-object-rest-spread");
_pluginProposalObjectRestSpread = function () {
return data;
};
return data;
}
function _pluginProposalOptionalCatchBinding() {
const data = require("@babel/plugin-proposal-optional-catch-binding");
_pluginProposalOptionalCatchBinding = function () {
return data;
};
return data;
}
function _pluginProposalOptionalChaining() {
const data = require("@babel/plugin-proposal-optional-chaining");
_pluginProposalOptionalChaining = function () {
return data;
};
return data;
}
function _pluginProposalPrivateMethods() {
const data = require("@babel/plugin-proposal-private-methods");
_pluginProposalPrivateMethods = function () {
return data;
};
return data;
}
function _pluginProposalPrivatePropertyInObject() {
const data = require("@babel/plugin-proposal-private-property-in-object");
_pluginProposalPrivatePropertyInObject = function () {
return data;
};
return data;
}
function _pluginProposalUnicodePropertyRegex() {
const data = require("@babel/plugin-proposal-unicode-property-regex");
_pluginProposalUnicodePropertyRegex = function () {
return data;
};
return data;
}
function _pluginTransformAsyncToGenerator() {
const data = require("@babel/plugin-transform-async-to-generator");
_pluginTransformAsyncToGenerator = function () {
return data;
};
return data;
}
function _pluginTransformArrowFunctions() {
const data = require("@babel/plugin-transform-arrow-functions");
_pluginTransformArrowFunctions = function () {
return data;
};
return data;
}
function _pluginTransformBlockScopedFunctions() {
const data = require("@babel/plugin-transform-block-scoped-functions");
_pluginTransformBlockScopedFunctions = function () {
return data;
};
return data;
}
function _pluginTransformBlockScoping() {
const data = require("@babel/plugin-transform-block-scoping");
_pluginTransformBlockScoping = function () {
return data;
};
return data;
}
function _pluginTransformClasses() {
const data = require("@babel/plugin-transform-classes");
_pluginTransformClasses = function () {
return data;
};
return data;
}
function _pluginTransformComputedProperties() {
const data = require("@babel/plugin-transform-computed-properties");
_pluginTransformComputedProperties = function () {
return data;
};
return data;
}
function _pluginTransformDestructuring() {
const data = require("@babel/plugin-transform-destructuring");
_pluginTransformDestructuring = function () {
return data;
};
return data;
}
function _pluginTransformDotallRegex() {
const data = require("@babel/plugin-transform-dotall-regex");
_pluginTransformDotallRegex = function () {
return data;
};
return data;
}
function _pluginTransformDuplicateKeys() {
const data = require("@babel/plugin-transform-duplicate-keys");
_pluginTransformDuplicateKeys = function () {
return data;
};
return data;
}
function _pluginTransformExponentiationOperator() {
const data = require("@babel/plugin-transform-exponentiation-operator");
_pluginTransformExponentiationOperator = function () {
return data;
};
return data;
}
function _pluginTransformForOf() {
const data = require("@babel/plugin-transform-for-of");
_pluginTransformForOf = function () {
return data;
};
return data;
}
function _pluginTransformFunctionName() {
const data = require("@babel/plugin-transform-function-name");
_pluginTransformFunctionName = function () {
return data;
};
return data;
}
function _pluginTransformLiterals() {
const data = require("@babel/plugin-transform-literals");
_pluginTransformLiterals = function () {
return data;
};
return data;
}
function _pluginTransformMemberExpressionLiterals() {
const data = require("@babel/plugin-transform-member-expression-literals");
_pluginTransformMemberExpressionLiterals = function () {
return data;
};
return data;
}
function _pluginTransformModulesAmd() {
const data = require("@babel/plugin-transform-modules-amd");
_pluginTransformModulesAmd = function () {
return data;
};
return data;
}
function _pluginTransformModulesCommonjs() {
const data = require("@babel/plugin-transform-modules-commonjs");
_pluginTransformModulesCommonjs = function () {
return data;
};
return data;
}
function _pluginTransformModulesSystemjs() {
const data = require("@babel/plugin-transform-modules-systemjs");
_pluginTransformModulesSystemjs = function () {
return data;
};
return data;
}
function _pluginTransformModulesUmd() {
const data = require("@babel/plugin-transform-modules-umd");
_pluginTransformModulesUmd = function () {
return data;
};
return data;
}
function _pluginTransformNamedCapturingGroupsRegex() {
const data = require("@babel/plugin-transform-named-capturing-groups-regex");
_pluginTransformNamedCapturingGroupsRegex = function () {
return data;
};
return data;
}
function _pluginTransformNewTarget() {
const data = require("@babel/plugin-transform-new-target");
_pluginTransformNewTarget = function () {
return data;
};
return data;
}
function _pluginTransformObjectSuper() {
const data = require("@babel/plugin-transform-object-super");
_pluginTransformObjectSuper = function () {
return data;
};
return data;
}
function _pluginTransformParameters() {
const data = require("@babel/plugin-transform-parameters");
_pluginTransformParameters = function () {
return data;
};
return data;
}
function _pluginTransformPropertyLiterals() {
const data = require("@babel/plugin-transform-property-literals");
_pluginTransformPropertyLiterals = function () {
return data;
};
return data;
}
function _pluginTransformRegenerator() {
const data = require("@babel/plugin-transform-regenerator");
_pluginTransformRegenerator = function () {
return data;
};
return data;
}
function _pluginTransformReservedWords() {
const data = require("@babel/plugin-transform-reserved-words");
_pluginTransformReservedWords = function () {
return data;
};
return data;
}
function _pluginTransformShorthandProperties() {
const data = require("@babel/plugin-transform-shorthand-properties");
_pluginTransformShorthandProperties = function () {
return data;
};
return data;
}
function _pluginTransformSpread() {
const data = require("@babel/plugin-transform-spread");
_pluginTransformSpread = function () {
return data;
};
return data;
}
function _pluginTransformStickyRegex() {
const data = require("@babel/plugin-transform-sticky-regex");
_pluginTransformStickyRegex = function () {
return data;
};
return data;
}
function _pluginTransformTemplateLiterals() {
const data = require("@babel/plugin-transform-template-literals");
_pluginTransformTemplateLiterals = function () {
return data;
};
return data;
}
function _pluginTransformTypeofSymbol() {
const data = require("@babel/plugin-transform-typeof-symbol");
_pluginTransformTypeofSymbol = function () {
return data;
};
return data;
}
function _pluginTransformUnicodeEscapes() {
const data = require("@babel/plugin-transform-unicode-escapes");
_pluginTransformUnicodeEscapes = function () {
return data;
};
return data;
}
function _pluginTransformUnicodeRegex() {
const data = require("@babel/plugin-transform-unicode-regex");
_pluginTransformUnicodeRegex = function () {
return data;
};
return data;
}
function _transformAsyncArrowsInClass() {
const data = require("@babel/preset-modules/lib/plugins/transform-async-arrows-in-class");
_transformAsyncArrowsInClass = function () {
return data;
};
return data;
}
function _transformEdgeDefaultParameters() {
const data = require("@babel/preset-modules/lib/plugins/transform-edge-default-parameters");
_transformEdgeDefaultParameters = function () {
return data;
};
return data;
}
function _transformEdgeFunctionName() {
const data = require("@babel/preset-modules/lib/plugins/transform-edge-function-name");
_transformEdgeFunctionName = function () {
return data;
};
return data;
}
function _transformTaggedTemplateCaching() {
const data = require("@babel/preset-modules/lib/plugins/transform-tagged-template-caching");
_transformTaggedTemplateCaching = function () {
return data;
};
return data;
}
function _transformSafariBlockShadowing() {
const data = require("@babel/preset-modules/lib/plugins/transform-safari-block-shadowing");
_transformSafariBlockShadowing = function () {
return data;
};
return data;
}
function _transformSafariForShadowing() {
const data = require("@babel/preset-modules/lib/plugins/transform-safari-for-shadowing");
_transformSafariForShadowing = function () {
return data;
};
return data;
}
function _pluginBugfixV8SpreadParametersInOptionalChaining() {
const data = require("@babel/plugin-bugfix-v8-spread-parameters-in-optional-chaining");
_pluginBugfixV8SpreadParametersInOptionalChaining = function () {
return data;
};
return data;
}
var _pluginSyntaxAsyncGenerators = require("@babel/plugin-syntax-async-generators");
var _pluginSyntaxClassProperties = require("@babel/plugin-syntax-class-properties");
var _pluginSyntaxClassStaticBlock = require("@babel/plugin-syntax-class-static-block");
var _pluginSyntaxDynamicImport = require("@babel/plugin-syntax-dynamic-import");
var _pluginSyntaxExportNamespaceFrom = require("@babel/plugin-syntax-export-namespace-from");
var _pluginSyntaxImportAssertions = require("@babel/plugin-syntax-import-assertions");
var _pluginSyntaxImportAttributes = require("@babel/plugin-syntax-import-attributes");
var _pluginSyntaxImportMeta = require("@babel/plugin-syntax-import-meta");
var _pluginSyntaxJsonStrings = require("@babel/plugin-syntax-json-strings");
var _pluginSyntaxLogicalAssignmentOperators = require("@babel/plugin-syntax-logical-assignment-operators");
var _pluginSyntaxNullishCoalescingOperator = require("@babel/plugin-syntax-nullish-coalescing-operator");
var _pluginSyntaxNumericSeparator = require("@babel/plugin-syntax-numeric-separator");
var _pluginSyntaxObjectRestSpread = require("@babel/plugin-syntax-object-rest-spread");
var _pluginSyntaxOptionalCatchBinding = require("@babel/plugin-syntax-optional-catch-binding");
var _pluginSyntaxOptionalChaining = require("@babel/plugin-syntax-optional-chaining");
var _pluginSyntaxPrivatePropertyInObject = require("@babel/plugin-syntax-private-property-in-object");
var _pluginSyntaxTopLevelAwait = require("@babel/plugin-syntax-top-level-await");
var _pluginTransformAsyncGeneratorFunctions = require("@babel/plugin-transform-async-generator-functions");
var _pluginTransformClassProperties = require("@babel/plugin-transform-class-properties");
var _pluginTransformClassStaticBlock = require("@babel/plugin-transform-class-static-block");
var _pluginTransformDynamicImport = require("@babel/plugin-transform-dynamic-import");
var _pluginTransformExportNamespaceFrom = require("@babel/plugin-transform-export-namespace-from");
var _pluginTransformJsonStrings = require("@babel/plugin-transform-json-strings");
var _pluginTransformLogicalAssignmentOperators = require("@babel/plugin-transform-logical-assignment-operators");
var _pluginTransformNullishCoalescingOperator = require("@babel/plugin-transform-nullish-coalescing-operator");
var _pluginTransformNumericSeparator = require("@babel/plugin-transform-numeric-separator");
var _pluginTransformObjectRestSpread = require("@babel/plugin-transform-object-rest-spread");
var _pluginTransformOptionalCatchBinding = require("@babel/plugin-transform-optional-catch-binding");
var _pluginTransformOptionalChaining = require("@babel/plugin-transform-optional-chaining");
var _pluginTransformPrivateMethods = require("@babel/plugin-transform-private-methods");
var _pluginTransformPrivatePropertyInObject = require("@babel/plugin-transform-private-property-in-object");
var _pluginTransformUnicodePropertyRegex = require("@babel/plugin-transform-unicode-property-regex");
var _pluginTransformAsyncToGenerator = require("@babel/plugin-transform-async-to-generator");
var _pluginTransformArrowFunctions = require("@babel/plugin-transform-arrow-functions");
var _pluginTransformBlockScopedFunctions = require("@babel/plugin-transform-block-scoped-functions");
var _pluginTransformBlockScoping = require("@babel/plugin-transform-block-scoping");
var _pluginTransformClasses = require("@babel/plugin-transform-classes");
var _pluginTransformComputedProperties = require("@babel/plugin-transform-computed-properties");
var _pluginTransformDestructuring = require("@babel/plugin-transform-destructuring");
var _pluginTransformDotallRegex = require("@babel/plugin-transform-dotall-regex");
var _pluginTransformDuplicateKeys = require("@babel/plugin-transform-duplicate-keys");
var _pluginTransformExponentiationOperator = require("@babel/plugin-transform-exponentiation-operator");
var _pluginTransformForOf = require("@babel/plugin-transform-for-of");
var _pluginTransformFunctionName = require("@babel/plugin-transform-function-name");
var _pluginTransformLiterals = require("@babel/plugin-transform-literals");
var _pluginTransformMemberExpressionLiterals = require("@babel/plugin-transform-member-expression-literals");
var _pluginTransformModulesAmd = require("@babel/plugin-transform-modules-amd");
var _pluginTransformModulesCommonjs = require("@babel/plugin-transform-modules-commonjs");
var _pluginTransformModulesSystemjs = require("@babel/plugin-transform-modules-systemjs");
var _pluginTransformModulesUmd = require("@babel/plugin-transform-modules-umd");
var _pluginTransformNamedCapturingGroupsRegex = require("@babel/plugin-transform-named-capturing-groups-regex");
var _pluginTransformNewTarget = require("@babel/plugin-transform-new-target");
var _pluginTransformObjectSuper = require("@babel/plugin-transform-object-super");
var _pluginTransformParameters = require("@babel/plugin-transform-parameters");
var _pluginTransformPropertyLiterals = require("@babel/plugin-transform-property-literals");
var _pluginTransformRegenerator = require("@babel/plugin-transform-regenerator");
var _pluginTransformReservedWords = require("@babel/plugin-transform-reserved-words");
var _pluginTransformShorthandProperties = require("@babel/plugin-transform-shorthand-properties");
var _pluginTransformSpread = require("@babel/plugin-transform-spread");
var _pluginTransformStickyRegex = require("@babel/plugin-transform-sticky-regex");
var _pluginTransformTemplateLiterals = require("@babel/plugin-transform-template-literals");
var _pluginTransformTypeofSymbol = require("@babel/plugin-transform-typeof-symbol");
var _pluginTransformUnicodeEscapes = require("@babel/plugin-transform-unicode-escapes");
var _pluginTransformUnicodeRegex = require("@babel/plugin-transform-unicode-regex");
var _pluginTransformUnicodeSetsRegex = require("@babel/plugin-transform-unicode-sets-regex");
var _transformAsyncArrowsInClass = require("@babel/preset-modules/lib/plugins/transform-async-arrows-in-class");
var _transformEdgeDefaultParameters = require("@babel/preset-modules/lib/plugins/transform-edge-default-parameters");
var _transformEdgeFunctionName = require("@babel/preset-modules/lib/plugins/transform-edge-function-name");
var _transformTaggedTemplateCaching = require("@babel/preset-modules/lib/plugins/transform-tagged-template-caching");
var _transformSafariBlockShadowing = require("@babel/preset-modules/lib/plugins/transform-safari-block-shadowing");
var _transformSafariForShadowing = require("@babel/preset-modules/lib/plugins/transform-safari-for-shadowing");
var _pluginBugfixSafariIdDestructuringCollisionInFunctionExpression = require("@babel/plugin-bugfix-safari-id-destructuring-collision-in-function-expression");
var _pluginBugfixV8SpreadParametersInOptionalChaining = require("@babel/plugin-bugfix-v8-spread-parameters-in-optional-chaining");
var _default = {
"bugfix/transform-async-arrows-in-class": () => _transformAsyncArrowsInClass(),
"bugfix/transform-edge-default-parameters": () => _transformEdgeDefaultParameters(),
"bugfix/transform-edge-function-name": () => _transformEdgeFunctionName(),
"bugfix/transform-safari-block-shadowing": () => _transformSafariBlockShadowing(),
"bugfix/transform-safari-for-shadowing": () => _transformSafariForShadowing(),
"bugfix/transform-tagged-template-caching": () => _transformTaggedTemplateCaching(),
"bugfix/transform-v8-spread-parameters-in-optional-chaining": () => _pluginBugfixV8SpreadParametersInOptionalChaining().default,
"proposal-async-generator-functions": () => _pluginProposalAsyncGeneratorFunctions().default,
"proposal-class-properties": () => _pluginProposalClassProperties().default,
"proposal-class-static-block": () => _pluginProposalClassStaticBlock().default,
"proposal-dynamic-import": () => _pluginProposalDynamicImport().default,
"proposal-export-namespace-from": () => _pluginProposalExportNamespaceFrom().default,
"proposal-json-strings": () => _pluginProposalJsonStrings().default,
"proposal-logical-assignment-operators": () => _pluginProposalLogicalAssignmentOperators().default,
"proposal-nullish-coalescing-operator": () => _pluginProposalNullishCoalescingOperator().default,
"proposal-numeric-separator": () => _pluginProposalNumericSeparator().default,
"proposal-object-rest-spread": () => _pluginProposalObjectRestSpread().default,
"proposal-optional-catch-binding": () => _pluginProposalOptionalCatchBinding().default,
"proposal-optional-chaining": () => _pluginProposalOptionalChaining().default,
"proposal-private-methods": () => _pluginProposalPrivateMethods().default,
"proposal-private-property-in-object": () => _pluginProposalPrivatePropertyInObject().default,
"proposal-unicode-property-regex": () => _pluginProposalUnicodePropertyRegex().default,
"syntax-async-generators": () => _pluginSyntaxAsyncGenerators(),
"syntax-class-properties": () => _pluginSyntaxClassProperties(),
"syntax-class-static-block": () => _pluginSyntaxClassStaticBlock().default,
"syntax-dynamic-import": () => _pluginSyntaxDynamicImport(),
"syntax-export-namespace-from": () => _pluginSyntaxExportNamespaceFrom(),
"syntax-json-strings": () => _pluginSyntaxJsonStrings(),
"syntax-logical-assignment-operators": () => _pluginSyntaxLogicalAssignmentOperators(),
"syntax-nullish-coalescing-operator": () => _pluginSyntaxNullishCoalescingOperator(),
"syntax-numeric-separator": () => _pluginSyntaxNumericSeparator(),
"syntax-object-rest-spread": () => _pluginSyntaxObjectRestSpread(),
"syntax-optional-catch-binding": () => _pluginSyntaxOptionalCatchBinding(),
"syntax-optional-chaining": () => _pluginSyntaxOptionalChaining(),
"syntax-private-property-in-object": () => _pluginSyntaxPrivatePropertyInObject().default,
"syntax-top-level-await": () => _pluginSyntaxTopLevelAwait().default,
"transform-arrow-functions": () => _pluginTransformArrowFunctions().default,
"transform-async-to-generator": () => _pluginTransformAsyncToGenerator().default,
"transform-block-scoped-functions": () => _pluginTransformBlockScopedFunctions().default,
"transform-block-scoping": () => _pluginTransformBlockScoping().default,
"transform-classes": () => _pluginTransformClasses().default,
"transform-computed-properties": () => _pluginTransformComputedProperties().default,
"transform-destructuring": () => _pluginTransformDestructuring().default,
"transform-dotall-regex": () => _pluginTransformDotallRegex().default,
"transform-duplicate-keys": () => _pluginTransformDuplicateKeys().default,
"transform-exponentiation-operator": () => _pluginTransformExponentiationOperator().default,
"transform-for-of": () => _pluginTransformForOf().default,
"transform-function-name": () => _pluginTransformFunctionName().default,
"transform-literals": () => _pluginTransformLiterals().default,
"transform-member-expression-literals": () => _pluginTransformMemberExpressionLiterals().default,
"transform-modules-amd": () => _pluginTransformModulesAmd().default,
"transform-modules-commonjs": () => _pluginTransformModulesCommonjs().default,
"transform-modules-systemjs": () => _pluginTransformModulesSystemjs().default,
"transform-modules-umd": () => _pluginTransformModulesUmd().default,
"transform-named-capturing-groups-regex": () => _pluginTransformNamedCapturingGroupsRegex().default,
"transform-new-target": () => _pluginTransformNewTarget().default,
"transform-object-super": () => _pluginTransformObjectSuper().default,
"transform-parameters": () => _pluginTransformParameters().default,
"transform-property-literals": () => _pluginTransformPropertyLiterals().default,
"transform-regenerator": () => _pluginTransformRegenerator().default,
"transform-reserved-words": () => _pluginTransformReservedWords().default,
"transform-shorthand-properties": () => _pluginTransformShorthandProperties().default,
"transform-spread": () => _pluginTransformSpread().default,
"transform-sticky-regex": () => _pluginTransformStickyRegex().default,
"transform-template-literals": () => _pluginTransformTemplateLiterals().default,
"transform-typeof-symbol": () => _pluginTransformTypeofSymbol().default,
"transform-unicode-escapes": () => _pluginTransformUnicodeEscapes().default,
"transform-unicode-regex": () => _pluginTransformUnicodeRegex().default
"bugfix/transform-async-arrows-in-class": () => _transformAsyncArrowsInClass,
"bugfix/transform-edge-default-parameters": () => _transformEdgeDefaultParameters,
"bugfix/transform-edge-function-name": () => _transformEdgeFunctionName,
"bugfix/transform-safari-block-shadowing": () => _transformSafariBlockShadowing,
"bugfix/transform-safari-for-shadowing": () => _transformSafariForShadowing,
"bugfix/transform-safari-id-destructuring-collision-in-function-expression": () => _pluginBugfixSafariIdDestructuringCollisionInFunctionExpression.default,
"bugfix/transform-tagged-template-caching": () => _transformTaggedTemplateCaching,
"bugfix/transform-v8-spread-parameters-in-optional-chaining": () => _pluginBugfixV8SpreadParametersInOptionalChaining.default,
"syntax-async-generators": () => _pluginSyntaxAsyncGenerators,
"syntax-class-properties": () => _pluginSyntaxClassProperties,
"syntax-class-static-block": () => _pluginSyntaxClassStaticBlock,
"syntax-dynamic-import": () => _pluginSyntaxDynamicImport,
"syntax-export-namespace-from": () => _pluginSyntaxExportNamespaceFrom,
"syntax-import-assertions": () => _pluginSyntaxImportAssertions.default,
"syntax-import-attributes": () => _pluginSyntaxImportAttributes.default,
"syntax-import-meta": () => _pluginSyntaxImportMeta,
"syntax-json-strings": () => _pluginSyntaxJsonStrings,
"syntax-logical-assignment-operators": () => _pluginSyntaxLogicalAssignmentOperators,
"syntax-nullish-coalescing-operator": () => _pluginSyntaxNullishCoalescingOperator,
"syntax-numeric-separator": () => _pluginSyntaxNumericSeparator,
"syntax-object-rest-spread": () => _pluginSyntaxObjectRestSpread,
"syntax-optional-catch-binding": () => _pluginSyntaxOptionalCatchBinding,
"syntax-optional-chaining": () => _pluginSyntaxOptionalChaining,
"syntax-private-property-in-object": () => _pluginSyntaxPrivatePropertyInObject,
"syntax-top-level-await": () => _pluginSyntaxTopLevelAwait,
"syntax-unicode-sets-regex": () => require("@babel/plugin-syntax-unicode-sets-regex"),
"transform-arrow-functions": () => _pluginTransformArrowFunctions.default,
"transform-async-generator-functions": () => _pluginTransformAsyncGeneratorFunctions.default,
"transform-async-to-generator": () => _pluginTransformAsyncToGenerator.default,
"transform-block-scoped-functions": () => _pluginTransformBlockScopedFunctions.default,
"transform-block-scoping": () => _pluginTransformBlockScoping.default,
"transform-class-properties": () => _pluginTransformClassProperties.default,
"transform-class-static-block": () => _pluginTransformClassStaticBlock.default,
"transform-classes": () => _pluginTransformClasses.default,
"transform-computed-properties": () => _pluginTransformComputedProperties.default,
"transform-destructuring": () => _pluginTransformDestructuring.default,
"transform-dotall-regex": () => _pluginTransformDotallRegex.default,
"transform-duplicate-keys": () => _pluginTransformDuplicateKeys.default,
"transform-dynamic-import": () => _pluginTransformDynamicImport.default,
"transform-exponentiation-operator": () => _pluginTransformExponentiationOperator.default,
"transform-export-namespace-from": () => _pluginTransformExportNamespaceFrom.default,
"transform-for-of": () => _pluginTransformForOf.default,
"transform-function-name": () => _pluginTransformFunctionName.default,
"transform-json-strings": () => _pluginTransformJsonStrings.default,
"transform-literals": () => _pluginTransformLiterals.default,
"transform-logical-assignment-operators": () => _pluginTransformLogicalAssignmentOperators.default,
"transform-member-expression-literals": () => _pluginTransformMemberExpressionLiterals.default,
"transform-modules-amd": () => _pluginTransformModulesAmd.default,
"transform-modules-commonjs": () => _pluginTransformModulesCommonjs.default,
"transform-modules-systemjs": () => _pluginTransformModulesSystemjs.default,
"transform-modules-umd": () => _pluginTransformModulesUmd.default,
"transform-named-capturing-groups-regex": () => _pluginTransformNamedCapturingGroupsRegex.default,
"transform-new-target": () => _pluginTransformNewTarget.default,
"transform-nullish-coalescing-operator": () => _pluginTransformNullishCoalescingOperator.default,
"transform-numeric-separator": () => _pluginTransformNumericSeparator.default,
"transform-object-rest-spread": () => _pluginTransformObjectRestSpread.default,
"transform-object-super": () => _pluginTransformObjectSuper.default,
"transform-optional-catch-binding": () => _pluginTransformOptionalCatchBinding.default,
"transform-optional-chaining": () => _pluginTransformOptionalChaining.default,
"transform-parameters": () => _pluginTransformParameters.default,
"transform-private-methods": () => _pluginTransformPrivateMethods.default,
"transform-private-property-in-object": () => _pluginTransformPrivatePropertyInObject.default,
"transform-property-literals": () => _pluginTransformPropertyLiterals.default,
"transform-regenerator": () => _pluginTransformRegenerator.default,
"transform-reserved-words": () => _pluginTransformReservedWords.default,
"transform-shorthand-properties": () => _pluginTransformShorthandProperties.default,
"transform-spread": () => _pluginTransformSpread.default,
"transform-sticky-regex": () => _pluginTransformStickyRegex.default,
"transform-template-literals": () => _pluginTransformTemplateLiterals.default,
"transform-typeof-symbol": () => _pluginTransformTypeofSymbol.default,
"transform-unicode-escapes": () => _pluginTransformUnicodeEscapes.default,
"transform-unicode-property-regex": () => _pluginTransformUnicodePropertyRegex.default,
"transform-unicode-regex": () => _pluginTransformUnicodeRegex.default,
"transform-unicode-sets-regex": () => _pluginTransformUnicodeSetsRegex.default
};
exports.default = _default;
const minVersions = {
"proposal-class-static-block": "7.12.0",
"proposal-private-property-in-object": "7.10.0"
"bugfix/transform-safari-id-destructuring-collision-in-function-expression": "7.16.0",
"syntax-import-attributes": "7.22.0",
"transform-class-static-block": "7.12.0",
"transform-private-property-in-object": "7.10.0"
};
exports.minVersions = minVersions;
exports.minVersions = minVersions;
//# sourceMappingURL=available-plugins.js.map

@@ -7,9 +7,15 @@ "use strict";

exports.logPlugin = void 0;
var _helperCompilationTargets = require("@babel/helper-compilation-targets");
var _plugins = require("@babel/compat-data/plugins");
const logPlugin = (item, targetVersions, list) => {
const filteredList = (0, _helperCompilationTargets.getInclusionReasons)(item, targetVersions, list);
const support = list[item];
{
if (item.startsWith("transform-")) {
const proposalName = `proposal-${item.slice(10)}`;
if (proposalName === "proposal-dynamic-import" || Object.prototype.hasOwnProperty.call(_plugins, proposalName)) {
item = proposalName;
}
}
}
if (!support) {

@@ -19,6 +25,4 @@ console.log(` ${item}`);

}
let formattedTargets = `{`;
let first = true;
for (const target of Object.keys(filteredList)) {

@@ -30,7 +34,7 @@ if (!first) formattedTargets += `,`;

}
formattedTargets += ` }`;
console.log(` ${item} ${formattedTargets}`);
};
exports.logPlugin = logPlugin;
exports.logPlugin = logPlugin;
//# sourceMappingURL=debug.js.map

@@ -6,25 +6,27 @@ "use strict";

});
exports.addProposalSyntaxPlugins = addProposalSyntaxPlugins;
exports.removeUnnecessaryItems = removeUnnecessaryItems;
exports.removeUnsupportedItems = removeUnsupportedItems;
var _semver = require("semver");
var _availablePlugins = require("./available-plugins");
const has = Function.call.bind(Object.hasOwnProperty);
function addProposalSyntaxPlugins(items, proposalSyntaxPlugins) {
proposalSyntaxPlugins.forEach(plugin => {
items.add(plugin);
});
}
function removeUnnecessaryItems(items, overlapping) {
items.forEach(item => {
var _overlapping$item;
(_overlapping$item = overlapping[item]) == null ? void 0 : _overlapping$item.forEach(name => items.delete(name));
});
}
function removeUnsupportedItems(items, babelVersion) {
items.forEach(item => {
if (has(_availablePlugins.minVersions, item) && (0, _semver.lt)(babelVersion, _availablePlugins.minVersions[item])) {
if (has(_availablePlugins.minVersions, item) && _semver.lt(babelVersion, _availablePlugins.minVersions[item])) {
items.delete(item);
}
});
}
}
//# sourceMappingURL=filter-items.js.map

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

const defaultExcludesForLooseMode = ["transform-typeof-symbol"];
function _default({

@@ -14,2 +13,4 @@ loose

return loose ? defaultExcludesForLooseMode : null;
}
}
//# sourceMappingURL=get-option-specific-excludes.js.map

@@ -6,43 +6,24 @@ "use strict";

});
exports.getPolyfillPlugins = exports.getModulesPluginNames = exports.default = void 0;
exports.isPluginRequired = isPluginRequired;
exports.default = exports.getPolyfillPlugins = exports.getModulesPluginNames = exports.transformIncludesAndExcludes = void 0;
exports.transformIncludesAndExcludes = void 0;
var _semver = require("semver");
var _debug = require("./debug");
var _getOptionSpecificExcludes = require("./get-option-specific-excludes");
var _filterItems = require("./filter-items");
var _moduleTransformations = require("./module-transformations");
var _normalizeOptions = require("./normalize-options");
var _shippedProposals = require("../data/shipped-proposals");
var _shippedProposals = require("./shipped-proposals");
var _pluginsCompatData = require("./plugins-compat-data");
var _overlappingPlugins = require("@babel/compat-data/overlapping-plugins");
var _regenerator = require("./polyfills/regenerator");
var _babelPolyfill = require("./polyfills/babel-polyfill");
var _babelPluginPolyfillCorejs = require("babel-plugin-polyfill-corejs2");
var _babelPluginPolyfillCorejs2 = require("babel-plugin-polyfill-corejs3");
var _babelPluginPolyfillRegenerator = require("babel-plugin-polyfill-regenerator");
var _helperCompilationTargets = require("@babel/helper-compilation-targets");
var _availablePlugins = require("./available-plugins");
var _helperPluginUtils = require("@babel/helper-plugin-utils");
const pluginCoreJS2 = _babelPluginPolyfillCorejs.default || _babelPluginPolyfillCorejs;
const pluginCoreJS3 = _babelPluginPolyfillCorejs2.default || _babelPluginPolyfillCorejs2;
const pluginRegenerator = _babelPluginPolyfillRegenerator.default || _babelPluginPolyfillRegenerator;
function isPluginRequired(targets, support) {

@@ -55,3 +36,2 @@ return (0, _helperCompilationTargets.isRequired)("fake-name", targets, {

}
function filterStageFromList(list, stageList) {

@@ -62,7 +42,5 @@ return Object.keys(list).reduce((result, item) => {

}
return result;
}, {});
}
const pluginLists = {

@@ -78,3 +56,2 @@ withProposals: {

};
function getPluginList(proposals, bugfixes) {

@@ -87,13 +64,9 @@ if (proposals) {

}
const getPlugin = pluginName => {
const plugin = _availablePlugins.default[pluginName]();
if (!plugin) {
throw new Error(`Could not find plugin "${pluginName}". Ensure there is an entry in ./available-plugins.js for it.`);
}
return plugin;
};
const transformIncludesAndExcludes = opts => {

@@ -110,5 +83,3 @@ return opts.reduce((result, opt) => {

};
exports.transformIncludesAndExcludes = transformIncludesAndExcludes;
const getModulesPluginNames = ({

@@ -123,3 +94,2 @@ modules,

const modulesPluginNames = [];
if (modules !== false && transformations[modules]) {

@@ -129,5 +99,4 @@ if (shouldTransformESM) {

}
if (shouldTransformDynamicImport && shouldTransformESM && modules !== "umd") {
modulesPluginNames.push("proposal-dynamic-import");
modulesPluginNames.push("transform-dynamic-import");
} else {

@@ -137,3 +106,2 @@ if (shouldTransformDynamicImport) {

}
modulesPluginNames.push("syntax-dynamic-import");

@@ -144,18 +112,14 @@ }

}
if (shouldTransformExportNamespaceFrom) {
modulesPluginNames.push("proposal-export-namespace-from");
modulesPluginNames.push("transform-export-namespace-from");
} else {
modulesPluginNames.push("syntax-export-namespace-from");
}
if (shouldParseTopLevelAwait) {
modulesPluginNames.push("syntax-top-level-await");
}
modulesPluginNames.push("syntax-import-meta");
return modulesPluginNames;
};
exports.getModulesPluginNames = getModulesPluginNames;
const getPolyfillPlugins = ({

@@ -173,3 +137,2 @@ useBuiltIns,

const polyfillPlugins = [];
if (useBuiltIns === "usage" || useBuiltIns === "entry") {

@@ -184,5 +147,7 @@ const pluginOptions = {

shippedProposals,
debug
debug,
"#__secret_key__@babel/preset-env__compatibility": {
noRuntimeName: true
}
};
if (corejs) {

@@ -200,3 +165,2 @@ if (useBuiltIns === "usage") {

}
if (regenerator) {

@@ -217,3 +181,2 @@ polyfillPlugins.push([pluginRegenerator, {

}]);
if (!regenerator) {

@@ -226,8 +189,5 @@ polyfillPlugins.push([_regenerator.default, pluginOptions]);

}
return polyfillPlugins;
};
exports.getPolyfillPlugins = getPolyfillPlugins;
function getLocalTargets(optionsTargets, ignoreBrowserslistConfig, configPath, browserslistEnv) {

@@ -240,3 +200,2 @@ if (optionsTargets != null && optionsTargets.esmodules && optionsTargets.browsers) {

}
return (0, _helperCompilationTargets.default)(optionsTargets, {

@@ -248,20 +207,15 @@ ignoreBrowserslistConfig,

}
function supportsStaticESM(caller) {
return !!(caller != null && caller.supportsStaticESM);
}
function supportsDynamicImport(caller) {
return !!(caller != null && caller.supportsDynamicImport);
}
function supportsExportNamespaceFrom(caller) {
return !!(caller != null && caller.supportsExportNamespaceFrom);
}
function supportsTopLevelAwait(caller) {
return !!(caller != null && caller.supportsTopLevelAwait);
}
var _default = (0, _helperPluginUtils.declare)((api, opts) => {
var _default = (0, _helperPluginUtils.declarePreset)((api, opts) => {
api.assertVersion(7);

@@ -290,7 +244,5 @@ const babelTargets = api.targets();

let targets = babelTargets;
if ((0, _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) {
{
var hasUglifyTarget = false;
if (optionsTargets != null && optionsTargets.uglify) {

@@ -307,3 +259,2 @@ hasUglifyTarget = true;

}
const transformTargets = forceAllTransforms || hasUglifyTarget ? {} : targets;

@@ -313,3 +264,3 @@ const include = transformIncludesAndExcludes(optionsInclude);

const compatData = getPluginList(shippedProposals, bugfixes);
const shouldSkipExportNamespaceFrom = modules === "auto" && (api.caller == null ? void 0 : api.caller(supportsExportNamespaceFrom)) || modules === false && !(0, _helperCompilationTargets.isRequired)("proposal-export-namespace-from", transformTargets, {
const shouldSkipExportNamespaceFrom = modules === "auto" && (api.caller == null ? void 0 : api.caller(supportsExportNamespaceFrom)) || modules === false && !(0, _helperCompilationTargets.isRequired)("transform-export-namespace-from", transformTargets, {
compatData,

@@ -330,4 +281,7 @@ includes: include.plugins,

}), _shippedProposals.pluginSyntaxMap);
(0, _filterItems.removeUnnecessaryItems)(pluginNames, _overlappingPlugins);
if (shippedProposals) {
(0, _filterItems.addProposalSyntaxPlugins)(pluginNames, _shippedProposals.proposalSyntaxPlugins);
}
(0, _filterItems.removeUnsupportedItems)(pluginNames, api.version);
(0, _filterItems.removeUnnecessaryItems)(pluginNames, _pluginsCompatData.overlappingPlugins);
const polyfillPlugins = getPolyfillPlugins({

@@ -346,3 +300,3 @@ useBuiltIns,

const plugins = Array.from(pluginNames).map(pluginName => {
if (pluginName === "proposal-class-properties" || pluginName === "proposal-private-methods" || pluginName === "proposal-private-property-in-object") {
if (pluginName === "transform-class-properties" || pluginName === "transform-private-methods" || pluginName === "transform-private-property-in-object") {
return [getPlugin(pluginName), {

@@ -352,3 +306,7 @@ loose: loose ? "#__internal__@babel/preset-env__prefer-true-but-false-is-ok-if-it-prevents-an-error" : "#__internal__@babel/preset-env__prefer-false-but-true-is-ok-if-it-prevents-an-error"

}
if (pluginName === "syntax-import-attributes") {
return [getPlugin(pluginName), {
deprecatedAssertSyntax: true
}];
}
return [getPlugin(pluginName), {

@@ -360,3 +318,2 @@ spec,

}).concat(polyfillPlugins);
if (debug) {

@@ -371,3 +328,2 @@ console.log("@babel/preset-env: `DEBUG` option");

});
if (!useBuiltIns) {

@@ -377,3 +333,2 @@ console.log("\nUsing polyfills: No polyfills were added, since the `useBuiltIns` option was not set.");

}
return {

@@ -383,3 +338,4 @@ plugins

});
exports.default = _default;
exports.default = _default;
//# sourceMappingURL=index.js.map

@@ -15,2 +15,4 @@ "use strict";

};
exports.default = _default;
exports.default = _default;
//# sourceMappingURL=module-transformations.js.map

@@ -6,54 +6,49 @@ "use strict";

});
exports.checkDuplicateIncludeExcludes = void 0;
exports.default = normalizeOptions;
exports.normalizeCoreJSOption = normalizeCoreJSOption;
exports.default = normalizeOptions;
exports.validateUseBuiltInsOption = exports.validateModulesOption = exports.checkDuplicateIncludeExcludes = exports.normalizePluginName = void 0;
var _data = require("core-js-compat/data.json");
exports.validateUseBuiltInsOption = exports.validateModulesOption = exports.normalizePluginName = void 0;
var _semver = require("semver");
var _corejs2BuiltIns = require("@babel/compat-data/corejs2-built-ins");
var _coreJsCompat = require("../data/core-js-compat");
var _pluginsCompatData = require("./plugins-compat-data");
var _moduleTransformations = require("./module-transformations");
var _options = require("./options");
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 = ["proposal-dynamic-import", ...Object.keys(_moduleTransformations.default).map(m => _moduleTransformations.default[m])];
const getValidIncludesAndExcludes = (type, corejs) => new Set([...allPluginsList, ...(type === "exclude" ? modulePlugins : []), ...(corejs ? corejs == 2 ? [...Object.keys(_corejs2BuiltIns), ...corejs2DefaultWebIncludes] : Object.keys(_data) : [])]);
const pluginToRegExp = plugin => {
if (plugin instanceof RegExp) return plugin;
try {
return new RegExp(`^${normalizePluginName(plugin)}$`);
} catch (e) {
return null;
}
};
const selectPlugins = (regexp, type, corejs) => Array.from(getValidIncludesAndExcludes(type, corejs)).filter(item => regexp instanceof RegExp && regexp.test(item));
const flatten = array => [].concat(...array);
const expandIncludesAndExcludes = (plugins = [], type, corejs) => {
if (plugins.length === 0) return [];
const selectedPlugins = plugins.map(plugin => selectPlugins(pluginToRegExp(plugin), type, corejs));
const invalidRegExpList = plugins.filter((p, i) => selectedPlugins[i].length === 0);
v.invariant(invalidRegExpList.length === 0, `The plugins/built-ins '${invalidRegExpList.join(", ")}' passed to the '${type}' option are not
const modulePlugins = ["transform-dynamic-import", ...Object.keys(_moduleTransformations.default).map(m => _moduleTransformations.default[m])];
const getValidIncludesAndExcludes = (type, corejs) => Array.from(new Set([...allPluginsList, ...(type === "exclude" ? modulePlugins : []), ...(corejs ? corejs == 2 ? [...Object.keys(_corejs2BuiltIns), ...corejs2DefaultWebIncludes] : Object.keys(_coreJsCompat) : [])]));
function flatMap(array, fn) {
return Array.prototype.concat.apply([], array.map(fn));
}
const normalizePluginName = plugin => plugin.replace(/^(@babel\/|babel-)(plugin-)?/, "");
exports.normalizePluginName = normalizePluginName;
const expandIncludesAndExcludes = (filterList = [], type, corejs) => {
if (filterList.length === 0) return [];
const filterableItems = getValidIncludesAndExcludes(type, corejs);
const invalidFilters = [];
const selectedPlugins = flatMap(filterList, filter => {
let re;
if (typeof filter === "string") {
try {
re = new RegExp(`^${normalizePluginName(filter)}$`);
} catch (e) {
invalidFilters.push(filter);
return [];
}
} else {
re = filter;
}
const items = filterableItems.filter(item => {
return re.test(item) || re.test(item.replace(/^transform-/, "proposal-"));
});
if (items.length === 0) invalidFilters.push(filter);
return items;
});
v.invariant(invalidFilters.length === 0, `The plugins/built-ins '${invalidFilters.join(", ")}' passed to the '${type}' option are not
valid. Please check data/[plugin-features|built-in-features].js in babel-preset-env`);
return flatten(selectedPlugins);
return selectedPlugins;
};
const normalizePluginName = plugin => plugin.replace(/^(@babel\/|babel-)(plugin-)?/, "");
exports.normalizePluginName = normalizePluginName;
const checkDuplicateIncludeExcludes = (include = [], exclude = []) => {

@@ -64,5 +59,3 @@ const duplicates = include.filter(opt => exclude.indexOf(opt) >= 0);

};
exports.checkDuplicateIncludeExcludes = checkDuplicateIncludeExcludes;
const normalizeTargets = targets => {

@@ -74,6 +67,4 @@ if (typeof targets === "string" || Array.isArray(targets)) {

}
return Object.assign({}, targets);
};
const validateModulesOption = (modulesOpt = _options.ModulesOption.auto) => {

@@ -83,5 +74,3 @@ 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`);

};
exports.validateModulesOption = validateModulesOption;
const validateUseBuiltInsOption = (builtInsOpt = false) => {

@@ -94,9 +83,6 @@ v.invariant(_options.UseBuiltInsOption[builtInsOpt.toString()] || builtInsOpt === _options.UseBuiltInsOption.false, `The 'useBuiltIns' option must be either

};
exports.validateUseBuiltInsOption = validateUseBuiltInsOption;
function normalizeCoreJSOption(corejs, useBuiltIns) {
let proposals = false;
let rawVersion;
if (useBuiltIns && corejs === undefined) {

@@ -111,13 +97,9 @@ rawVersion = 2;

}
const version = rawVersion ? (0, _semver.coerce)(String(rawVersion)) : false;
const version = rawVersion ? _semver.coerce(String(rawVersion)) : false;
if (!useBuiltIns && version) {
console.warn("\nWARNING (@babel/preset-env): The `corejs` option only has an effect when the `useBuiltIns` option is not `false`\n");
}
if (useBuiltIns && (!version || version.major < 2 || version.major > 3)) {
throw new RangeError("Invalid Option: The version passed to `corejs` is invalid. Currently, " + "only core-js@2 and core-js@3 are supported.");
}
return {

@@ -128,3 +110,2 @@ version,

}
function normalizeOptions(opts) {

@@ -154,2 +135,4 @@ v.validateTopLevelOptions(opts, _options.TopLevelOptions);

};
}
}
//# sourceMappingURL=normalize-options.js.map

@@ -6,3 +6,3 @@ "use strict";

});
exports.UseBuiltInsOption = exports.ModulesOption = exports.TopLevelOptions = void 0;
exports.UseBuiltInsOption = exports.TopLevelOptions = exports.ModulesOption = void 0;
const TopLevelOptions = {

@@ -41,2 +41,4 @@ bugfixes: "bugfixes",

};
exports.UseBuiltInsOption = UseBuiltInsOption;
exports.UseBuiltInsOption = UseBuiltInsOption;
//# sourceMappingURL=options.js.map

@@ -6,27 +6,25 @@ "use strict";

});
exports.pluginsBugfixes = exports.plugins = void 0;
exports.pluginsBugfixes = exports.plugins = exports.overlappingPlugins = void 0;
var _plugins = require("@babel/compat-data/plugins");
var _pluginBugfixes = require("@babel/compat-data/plugin-bugfixes");
var _overlappingPlugins = require("@babel/compat-data/overlapping-plugins");
var _availablePlugins = require("./available-plugins");
const pluginsFiltered = {};
exports.plugins = pluginsFiltered;
const bugfixPluginsFiltered = {};
exports.pluginsBugfixes = bugfixPluginsFiltered;
for (const plugin of Object.keys(_plugins)) {
if (Object.hasOwnProperty.call(_availablePlugins.default, plugin)) {
pluginsFiltered[plugin] = _plugins[plugin];
const keys = Object.keys;
const plugins = filterAvailable(_plugins);
exports.plugins = plugins;
const pluginsBugfixes = filterAvailable(_pluginBugfixes);
exports.pluginsBugfixes = pluginsBugfixes;
const overlappingPlugins = filterAvailable(_overlappingPlugins);
exports.overlappingPlugins = overlappingPlugins;
overlappingPlugins["syntax-import-attributes"] = ["syntax-import-assertions"];
function filterAvailable(data) {
const result = {};
for (const plugin of keys(data)) {
if (Object.hasOwnProperty.call(_availablePlugins.default, plugin)) {
result[plugin] = data[plugin];
}
}
return result;
}
for (const plugin of Object.keys(_pluginBugfixes)) {
if (Object.hasOwnProperty.call(_availablePlugins.default, plugin)) {
bugfixPluginsFiltered[plugin] = _pluginBugfixes[plugin];
}
}
pluginsFiltered["proposal-class-properties"] = pluginsFiltered["proposal-private-methods"];
//# sourceMappingURL=plugins-compat-data.js.map

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

exports.default = _default;
var _utils = require("./utils");
const BABEL_POLYFILL_DEPRECATION = `

@@ -17,3 +15,2 @@ \`@babel/polyfill\` is deprecated. Please, use required parts of \`core-js\`

Please remove the direct import of \`SPECIFIER\` or use \`useBuiltIns: 'entry'\` instead.`;
function _default({

@@ -31,3 +28,2 @@ template

const src = (0, _utils.getImportSource)(path);
if (usage && (0, _utils.isPolyfillSource)(src)) {

@@ -51,7 +47,5 @@ console.warn(NO_DIRECT_POLYFILL_IMPORT.replace("SPECIFIER", src));

},
Program(path) {
path.get("body").forEach(bodyPath => {
const src = (0, _utils.getRequireSource)(bodyPath);
if (usage && (0, _utils.isPolyfillSource)(src)) {

@@ -76,5 +70,6 @@ console.warn(NO_DIRECT_POLYFILL_IMPORT.replace("SPECIFIER", src));

}
}
};
}
}
//# sourceMappingURL=babel-polyfill.js.map

@@ -7,9 +7,6 @@ "use strict";

exports.default = _default;
var _utils = require("./utils");
function isRegeneratorSource(source) {
return source === "regenerator-runtime/runtime" || source === "regenerator-runtime/runtime.js";
}
function _default() {

@@ -23,3 +20,2 @@ const visitor = {

},
Program(path) {

@@ -33,3 +29,2 @@ path.get("body").forEach(bodyPath => {

}
};

@@ -39,20 +34,17 @@ return {

visitor,
pre() {
this.regeneratorImportExcluded = false;
},
post() {
if (this.opts.debug && this.regeneratorImportExcluded) {
let filename = this.file.opts.filename;
if (process.env.BABEL_ENV === "test") {
filename = filename.replace(/\\/g, "/");
}
console.log(`\n[${filename}] Based on your targets, regenerator-runtime import excluded.`);
}
}
};
}
};
}
//# sourceMappingURL=regenerator.js.map

@@ -9,5 +9,9 @@ "use strict";

exports.isPolyfillSource = isPolyfillSource;
var t = require("@babel/types");
var _t = require("@babel/types");
const {
isCallExpression,
isExpressionStatement,
isIdentifier,
isStringLiteral
} = _t;
function getImportSource({

@@ -18,16 +22,17 @@ node

}
function getRequireSource({
node
}) {
if (!t.isExpressionStatement(node)) return;
if (!isExpressionStatement(node)) return;
const {
expression
} = node;
const isRequire = t.isCallExpression(expression) && t.isIdentifier(expression.callee) && expression.callee.name === "require" && expression.arguments.length === 1 && t.isStringLiteral(expression.arguments[0]);
if (isRequire) return expression.arguments[0].value;
if (isCallExpression(expression) && isIdentifier(expression.callee) && expression.callee.name === "require" && expression.arguments.length === 1 && isStringLiteral(expression.arguments[0])) {
return expression.arguments[0].value;
}
}
function isPolyfillSource(source) {
return source === "@babel/polyfill" || source === "core-js";
}
}
//# sourceMappingURL=utils.js.map

@@ -18,9 +18,4 @@ "use strict";

});
Object.defineProperty(exports, "semverMin", {
enumerable: true,
get: function () {
return _helperCompilationTargets.semverMin;
}
});
var _helperCompilationTargets = require("@babel/helper-compilation-targets");
var _helperCompilationTargets = require("@babel/helper-compilation-targets");
//# sourceMappingURL=targets-parser.js.map
{
"name": "@babel/preset-env",
"version": "7.14.4",
"version": "7.22.5",
"description": "A Babel preset for each environment.",
"author": "Henry Zhu <hi@henryzoo.com>",
"author": "The Babel Team (https://babel.dev/team)",
"homepage": "https://babel.dev/docs/en/next/babel-preset-env",

@@ -17,29 +17,19 @@ "bugs": "https://github.com/babel/babel/issues?utf8=%E2%9C%93&q=is%3Aissue+label%3A%22pkg%3A%20preset-env%22+is%3Aopen",

},
"main": "lib/index.js",
"main": "./lib/index.js",
"dependencies": {
"@babel/compat-data": "^7.14.4",
"@babel/helper-compilation-targets": "^7.14.4",
"@babel/helper-plugin-utils": "^7.13.0",
"@babel/helper-validator-option": "^7.12.17",
"@babel/plugin-bugfix-v8-spread-parameters-in-optional-chaining": "^7.13.12",
"@babel/plugin-proposal-async-generator-functions": "^7.14.2",
"@babel/plugin-proposal-class-properties": "^7.13.0",
"@babel/plugin-proposal-class-static-block": "^7.14.3",
"@babel/plugin-proposal-dynamic-import": "^7.14.2",
"@babel/plugin-proposal-export-namespace-from": "^7.14.2",
"@babel/plugin-proposal-json-strings": "^7.14.2",
"@babel/plugin-proposal-logical-assignment-operators": "^7.14.2",
"@babel/plugin-proposal-nullish-coalescing-operator": "^7.14.2",
"@babel/plugin-proposal-numeric-separator": "^7.14.2",
"@babel/plugin-proposal-object-rest-spread": "^7.14.4",
"@babel/plugin-proposal-optional-catch-binding": "^7.14.2",
"@babel/plugin-proposal-optional-chaining": "^7.14.2",
"@babel/plugin-proposal-private-methods": "^7.13.0",
"@babel/plugin-proposal-private-property-in-object": "^7.14.0",
"@babel/plugin-proposal-unicode-property-regex": "^7.12.13",
"@babel/compat-data": "^7.22.5",
"@babel/helper-compilation-targets": "^7.22.5",
"@babel/helper-plugin-utils": "^7.22.5",
"@babel/helper-validator-option": "^7.22.5",
"@babel/plugin-bugfix-safari-id-destructuring-collision-in-function-expression": "^7.22.5",
"@babel/plugin-bugfix-v8-spread-parameters-in-optional-chaining": "^7.22.5",
"@babel/plugin-proposal-private-property-in-object": "7.21.0-placeholder-for-preset-env.2",
"@babel/plugin-syntax-async-generators": "^7.8.4",
"@babel/plugin-syntax-class-properties": "^7.12.13",
"@babel/plugin-syntax-class-static-block": "^7.12.13",
"@babel/plugin-syntax-class-static-block": "^7.14.5",
"@babel/plugin-syntax-dynamic-import": "^7.8.3",
"@babel/plugin-syntax-export-namespace-from": "^7.8.3",
"@babel/plugin-syntax-import-assertions": "^7.22.5",
"@babel/plugin-syntax-import-attributes": "^7.22.5",
"@babel/plugin-syntax-import-meta": "^7.10.4",
"@babel/plugin-syntax-json-strings": "^7.8.3",

@@ -52,42 +42,59 @@ "@babel/plugin-syntax-logical-assignment-operators": "^7.10.4",

"@babel/plugin-syntax-optional-chaining": "^7.8.3",
"@babel/plugin-syntax-private-property-in-object": "^7.14.0",
"@babel/plugin-syntax-top-level-await": "^7.12.13",
"@babel/plugin-transform-arrow-functions": "^7.13.0",
"@babel/plugin-transform-async-to-generator": "^7.13.0",
"@babel/plugin-transform-block-scoped-functions": "^7.12.13",
"@babel/plugin-transform-block-scoping": "^7.14.4",
"@babel/plugin-transform-classes": "^7.14.4",
"@babel/plugin-transform-computed-properties": "^7.13.0",
"@babel/plugin-transform-destructuring": "^7.14.4",
"@babel/plugin-transform-dotall-regex": "^7.12.13",
"@babel/plugin-transform-duplicate-keys": "^7.12.13",
"@babel/plugin-transform-exponentiation-operator": "^7.12.13",
"@babel/plugin-transform-for-of": "^7.13.0",
"@babel/plugin-transform-function-name": "^7.12.13",
"@babel/plugin-transform-literals": "^7.12.13",
"@babel/plugin-transform-member-expression-literals": "^7.12.13",
"@babel/plugin-transform-modules-amd": "^7.14.2",
"@babel/plugin-transform-modules-commonjs": "^7.14.0",
"@babel/plugin-transform-modules-systemjs": "^7.13.8",
"@babel/plugin-transform-modules-umd": "^7.14.0",
"@babel/plugin-transform-named-capturing-groups-regex": "^7.12.13",
"@babel/plugin-transform-new-target": "^7.12.13",
"@babel/plugin-transform-object-super": "^7.12.13",
"@babel/plugin-transform-parameters": "^7.14.2",
"@babel/plugin-transform-property-literals": "^7.12.13",
"@babel/plugin-transform-regenerator": "^7.13.15",
"@babel/plugin-transform-reserved-words": "^7.12.13",
"@babel/plugin-transform-shorthand-properties": "^7.12.13",
"@babel/plugin-transform-spread": "^7.13.0",
"@babel/plugin-transform-sticky-regex": "^7.12.13",
"@babel/plugin-transform-template-literals": "^7.13.0",
"@babel/plugin-transform-typeof-symbol": "^7.12.13",
"@babel/plugin-transform-unicode-escapes": "^7.12.13",
"@babel/plugin-transform-unicode-regex": "^7.12.13",
"@babel/preset-modules": "^0.1.4",
"@babel/types": "^7.14.4",
"babel-plugin-polyfill-corejs2": "^0.2.0",
"babel-plugin-polyfill-corejs3": "^0.2.0",
"babel-plugin-polyfill-regenerator": "^0.2.0",
"core-js-compat": "^3.9.0",
"@babel/plugin-syntax-private-property-in-object": "^7.14.5",
"@babel/plugin-syntax-top-level-await": "^7.14.5",
"@babel/plugin-syntax-unicode-sets-regex": "^7.18.6",
"@babel/plugin-transform-arrow-functions": "^7.22.5",
"@babel/plugin-transform-async-generator-functions": "^7.22.5",
"@babel/plugin-transform-async-to-generator": "^7.22.5",
"@babel/plugin-transform-block-scoped-functions": "^7.22.5",
"@babel/plugin-transform-block-scoping": "^7.22.5",
"@babel/plugin-transform-class-properties": "^7.22.5",
"@babel/plugin-transform-class-static-block": "^7.22.5",
"@babel/plugin-transform-classes": "^7.22.5",
"@babel/plugin-transform-computed-properties": "^7.22.5",
"@babel/plugin-transform-destructuring": "^7.22.5",
"@babel/plugin-transform-dotall-regex": "^7.22.5",
"@babel/plugin-transform-duplicate-keys": "^7.22.5",
"@babel/plugin-transform-dynamic-import": "^7.22.5",
"@babel/plugin-transform-exponentiation-operator": "^7.22.5",
"@babel/plugin-transform-export-namespace-from": "^7.22.5",
"@babel/plugin-transform-for-of": "^7.22.5",
"@babel/plugin-transform-function-name": "^7.22.5",
"@babel/plugin-transform-json-strings": "^7.22.5",
"@babel/plugin-transform-literals": "^7.22.5",
"@babel/plugin-transform-logical-assignment-operators": "^7.22.5",
"@babel/plugin-transform-member-expression-literals": "^7.22.5",
"@babel/plugin-transform-modules-amd": "^7.22.5",
"@babel/plugin-transform-modules-commonjs": "^7.22.5",
"@babel/plugin-transform-modules-systemjs": "^7.22.5",
"@babel/plugin-transform-modules-umd": "^7.22.5",
"@babel/plugin-transform-named-capturing-groups-regex": "^7.22.5",
"@babel/plugin-transform-new-target": "^7.22.5",
"@babel/plugin-transform-nullish-coalescing-operator": "^7.22.5",
"@babel/plugin-transform-numeric-separator": "^7.22.5",
"@babel/plugin-transform-object-rest-spread": "^7.22.5",
"@babel/plugin-transform-object-super": "^7.22.5",
"@babel/plugin-transform-optional-catch-binding": "^7.22.5",
"@babel/plugin-transform-optional-chaining": "^7.22.5",
"@babel/plugin-transform-parameters": "^7.22.5",
"@babel/plugin-transform-private-methods": "^7.22.5",
"@babel/plugin-transform-private-property-in-object": "^7.22.5",
"@babel/plugin-transform-property-literals": "^7.22.5",
"@babel/plugin-transform-regenerator": "^7.22.5",
"@babel/plugin-transform-reserved-words": "^7.22.5",
"@babel/plugin-transform-shorthand-properties": "^7.22.5",
"@babel/plugin-transform-spread": "^7.22.5",
"@babel/plugin-transform-sticky-regex": "^7.22.5",
"@babel/plugin-transform-template-literals": "^7.22.5",
"@babel/plugin-transform-typeof-symbol": "^7.22.5",
"@babel/plugin-transform-unicode-escapes": "^7.22.5",
"@babel/plugin-transform-unicode-property-regex": "^7.22.5",
"@babel/plugin-transform-unicode-regex": "^7.22.5",
"@babel/plugin-transform-unicode-sets-regex": "^7.22.5",
"@babel/preset-modules": "^0.1.5",
"@babel/types": "^7.22.5",
"babel-plugin-polyfill-corejs2": "^0.4.3",
"babel-plugin-polyfill-corejs3": "^0.8.1",
"babel-plugin-polyfill-regenerator": "^0.5.0",
"core-js-compat": "^3.30.2",
"semver": "^6.3.0"

@@ -99,7 +106,11 @@ },

"devDependencies": {
"@babel/core": "7.14.3",
"@babel/core": "^7.22.5",
"@babel/core-7.12": "npm:@babel/core@7.12.9",
"@babel/helper-plugin-test-runner": "7.13.10",
"@babel/plugin-syntax-dynamic-import": "^7.8.3"
}
"@babel/helper-plugin-test-runner": "^7.22.5",
"@babel/traverse": "^7.22.5"
},
"engines": {
"node": ">=6.9.0"
},
"type": "commonjs"
}
SocketSocket SOC 2 Logo

Product

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

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc