extensionless
Advanced tools
Comparing version 1.1.0 to 1.1.1
{ | ||
"name": "extensionless", | ||
"version": "1.1.0", | ||
"version": "1.1.1", | ||
"type": "module", | ||
@@ -5,0 +5,0 @@ "main": "src/index.js", |
@@ -42,2 +42,3 @@ import {access, existsSync, readFileSync} from 'fs' | ||
let extToSkip = ['.wasm', '.cjs', '.mjs', '.js', '.json'] | ||
let relPrefixes = [...new Set(['./', '../', `.${sep}`, `..${sep}`])] | ||
@@ -48,5 +49,7 @@ export async function resolve(specifier, context, nextResolve) { | ||
let postfix = (isAbsolute(spec) || relPrefixes.some(p => spec.startsWith(p))) | ||
&& !extname(spec) && await findPostfix(normalize(spec), context) | ||
&& (spec = normalize(spec)) | ||
&& (spec.endsWith(sep) || !extToSkip.includes(extname(spec))) | ||
&& await findPostfix(spec, context) | ||
return await nextResolve(specifier + (postfix || '')) | ||
} |
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
4174
43