feat: refactoring project

This commit is contained in:
Carlos
2024-11-23 14:56:07 -05:00
parent f0c2a50c18
commit 1c6db5818d
2351 changed files with 39323 additions and 60326 deletions

View File

@@ -159,7 +159,8 @@ function getTargets(inputTargets = {}, options = {}) {
esmodules
} = inputTargets;
const {
configPath = "."
configPath = ".",
onBrowserslistConfigFound
} = options;
validateBrowsers(browsers);
const input = generateTargets(inputTargets);
@@ -168,11 +169,17 @@ function getTargets(inputTargets = {}, options = {}) {
const hasTargets = shouldParseBrowsers || Object.keys(targets).length > 0;
const shouldSearchForConfig = !options.ignoreBrowserslistConfig && !hasTargets;
if (!browsers && shouldSearchForConfig) {
browsers = _browserslist.loadConfig({
config: options.configFile,
path: configPath,
env: options.browserslistEnv
});
browsers = process.env.BROWSERSLIST;
if (!browsers) {
const configFile = options.configFile || process.env.BROWSERSLIST_CONFIG || _browserslist.findConfigFile(configPath);
if (configFile != null) {
onBrowserslistConfigFound == null || onBrowserslistConfigFound(configFile);
browsers = _browserslist.loadConfig({
config: configFile,
env: options.browserslistEnv
});
}
}
if (browsers == null) {
{
browsers = [];

File diff suppressed because one or more lines are too long

View File

@@ -1,6 +1,6 @@
{
"name": "@babel/helper-compilation-targets",
"version": "7.25.2",
"version": "7.25.9",
"author": "The Babel Team (https://babel.dev/team)",
"license": "MIT",
"description": "Helper functions on Babel compilation targets",
@@ -25,14 +25,14 @@
"babel-plugin"
],
"dependencies": {
"@babel/compat-data": "^7.25.2",
"@babel/helper-validator-option": "^7.24.8",
"browserslist": "^4.23.1",
"@babel/compat-data": "^7.25.9",
"@babel/helper-validator-option": "^7.25.9",
"browserslist": "^4.24.0",
"lru-cache": "^5.1.1",
"semver": "^6.3.1"
},
"devDependencies": {
"@babel/helper-plugin-test-runner": "^7.24.7",
"@babel/helper-plugin-test-runner": "^7.25.9",
"@types/lru-cache": "^5.1.1",
"@types/semver": "^5.5.0"
},