@babel/preset-env
Advanced tools
Comparing version
@@ -11,3 +11,2 @@ "use strict"; | ||
var _debug = require("./debug.js"); | ||
var _getOptionSpecificExcludes = require("./get-option-specific-excludes.js"); | ||
var _filterItems = require("./filter-items.js"); | ||
@@ -209,2 +208,3 @@ var _moduleTransformations = require("./module-transformations.js"); | ||
const babelTargets = api.targets(); | ||
; | ||
const { | ||
@@ -218,6 +218,4 @@ bugfixes, | ||
include: optionsInclude, | ||
loose, | ||
modules: optionsModules, | ||
shippedProposals, | ||
spec, | ||
targets: optionsTargets, | ||
@@ -231,2 +229,8 @@ useBuiltIns, | ||
} = (0, _normalizeOptions.default)(opts); | ||
{ | ||
var { | ||
loose, | ||
spec = false | ||
} = opts; | ||
} | ||
let targets = babelTargets; | ||
@@ -256,5 +260,3 @@ if (_semver.lt(api.version, "7.13.0") || opts.targets || opts.configPath || opts.browserslistEnv || opts.ignoreBrowserslistConfig) { | ||
} | ||
const pluginNames = (0, _helperCompilationTargets.filterItems)(compatData, include.plugins, exclude.plugins, transformTargets, getSpecialModulesPluginNames(modules, shouldTransformDynamicImport), (0, _getOptionSpecificExcludes.default)({ | ||
loose | ||
}), _shippedProposals.pluginSyntaxMap); | ||
const pluginNames = (0, _helperCompilationTargets.filterItems)(compatData, include.plugins, exclude.plugins, transformTargets, getSpecialModulesPluginNames(modules, shouldTransformDynamicImport), !loose ? undefined : ["transform-typeof-symbol"], _shippedProposals.pluginSyntaxMap); | ||
if (shippedProposals) { | ||
@@ -261,0 +263,0 @@ (0, _filterItems.addProposalSyntaxPlugins)(pluginNames, _shippedProposals.proposalSyntaxPlugins); |
@@ -132,2 +132,6 @@ "use strict"; | ||
checkDuplicateIncludeExcludes(include, exclude); | ||
{ | ||
v.validateBooleanOption("loose", opts.loose); | ||
v.validateBooleanOption("spec", opts.spec); | ||
} | ||
return { | ||
@@ -142,6 +146,4 @@ bugfixes: v.validateBooleanOption(_options.TopLevelOptions.bugfixes, opts.bugfixes, false), | ||
ignoreBrowserslistConfig: v.validateBooleanOption(_options.TopLevelOptions.ignoreBrowserslistConfig, opts.ignoreBrowserslistConfig, false), | ||
loose: v.validateBooleanOption(_options.TopLevelOptions.loose, opts.loose), | ||
modules: validateModulesOption(opts.modules), | ||
shippedProposals: v.validateBooleanOption(_options.TopLevelOptions.shippedProposals, opts.shippedProposals, false), | ||
spec: v.validateBooleanOption(_options.TopLevelOptions.spec, opts.spec, false), | ||
targets: normalizeTargets(opts.targets), | ||
@@ -148,0 +150,0 @@ useBuiltIns: useBuiltIns, |
@@ -16,6 +16,4 @@ "use strict"; | ||
include: "include", | ||
loose: "loose", | ||
modules: "modules", | ||
shippedProposals: "shippedProposals", | ||
spec: "spec", | ||
targets: "targets", | ||
@@ -25,2 +23,8 @@ useBuiltIns: "useBuiltIns", | ||
}; | ||
{ | ||
Object.assign(TopLevelOptions, { | ||
loose: "loose", | ||
spec: "spec" | ||
}); | ||
} | ||
const ModulesOption = exports.ModulesOption = { | ||
@@ -27,0 +31,0 @@ false: false, |
{ | ||
"name": "@babel/preset-env", | ||
"version": "7.23.5", | ||
"version": "7.23.6", | ||
"description": "A Babel preset for each environment.", | ||
@@ -20,3 +20,3 @@ "author": "The Babel Team (https://babel.dev/team)", | ||
"@babel/compat-data": "^7.23.5", | ||
"@babel/helper-compilation-targets": "^7.22.15", | ||
"@babel/helper-compilation-targets": "^7.23.6", | ||
"@babel/helper-plugin-utils": "^7.22.5", | ||
@@ -61,3 +61,3 @@ "@babel/helper-validator-option": "^7.23.5", | ||
"@babel/plugin-transform-export-namespace-from": "^7.23.4", | ||
"@babel/plugin-transform-for-of": "^7.23.3", | ||
"@babel/plugin-transform-for-of": "^7.23.6", | ||
"@babel/plugin-transform-function-name": "^7.23.3", | ||
@@ -106,6 +106,6 @@ "@babel/plugin-transform-json-strings": "^7.23.4", | ||
"devDependencies": { | ||
"@babel/core": "^7.23.5", | ||
"@babel/core": "^7.23.6", | ||
"@babel/core-7.12": "npm:@babel/core@7.12.9", | ||
"@babel/helper-plugin-test-runner": "^7.22.5", | ||
"@babel/traverse": "^7.23.5" | ||
"@babel/traverse": "^7.23.6" | ||
}, | ||
@@ -112,0 +112,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
147515
-0.13%43
-4.44%1014
-0.29%