Comparing version 3.1.1 to 3.1.2
{ | ||
"name": "lilconfig", | ||
"version": "3.1.1", | ||
"version": "3.1.2", | ||
"description": "A zero-dependency alternative to cosmiconfig", | ||
@@ -9,3 +9,3 @@ "main": "src/index.js", | ||
"test": "NODE_OPTIONS=--experimental-vm-modules ./node_modules/.bin/jest --coverage", | ||
"lint": "eslint ./src", | ||
"lint": "biome ci ./src", | ||
"types": "tsc" | ||
@@ -30,10 +30,8 @@ }, | ||
"devDependencies": { | ||
"@biomejs/biome": "^1.6.0", | ||
"@types/jest": "^29.5.12", | ||
"@types/node": "^14.18.63", | ||
"@types/webpack-env": "^1.18.5", | ||
"cosmiconfig": "^8.3.6", | ||
"eslint": "^8.56.0", | ||
"eslint-config-prettier": "^9.1.0", | ||
"eslint-plugin-prettier": "^5.1.3", | ||
"jest": "^29.7.0", | ||
"prettier": "^3.2.5", | ||
"typescript": "^5.3.3", | ||
@@ -40,0 +38,0 @@ "uvu": "^0.5.6" |
@@ -42,7 +42,9 @@ // @ts-check | ||
const jsonLoader = (_, content) => JSON.parse(content); | ||
// Use plain require in webpack context for dynamic import | ||
const requireFunc = typeof __webpack_require__ === "function" ? __non_webpack_require__ : require; | ||
/** @type {import('./index').LoadersSync} */ | ||
const defaultLoadersSync = Object.freeze({ | ||
'.js': require, | ||
'.json': require, | ||
'.cjs': require, | ||
'.js': requireFunc, | ||
'.json': requireFunc, | ||
'.cjs': requireFunc, | ||
noExt: jsonLoader, | ||
@@ -55,3 +57,3 @@ }); | ||
try { | ||
const mod = await import(id); | ||
const mod = await import(/* webpackIgnore: true */ id); | ||
@@ -61,3 +63,3 @@ return mod.default; | ||
try { | ||
return require(id); | ||
return requireFunc(id); | ||
} catch (/** @type {any} */ requireE) { | ||
@@ -64,0 +66,0 @@ if ( |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
Dynamic require
Supply chain riskDynamic require can indicate the package is performing dangerous or unsafe dynamic code execution.
Found 1 instance in 1 package
17879
8
468
2
0