extensionless
Advanced tools
Comparing version 1.5.2 to 1.5.3
{ | ||
"name": "extensionless", | ||
"version": "1.5.2", | ||
"version": "1.5.3", | ||
"type": "module", | ||
@@ -5,0 +5,0 @@ "exports": { |
@@ -11,3 +11,2 @@ import {readFile} from 'fs/promises' | ||
let curDir, upDir = isAbsolute(argv1 ?? '') ? argv1 : cwd() | ||
do { | ||
@@ -25,4 +24,2 @@ try { | ||
let getConfig = async ({argv1} = {}) => { | ||
let pkgJson = await getPkgJson(argv1) | ||
let defaults = { | ||
@@ -32,3 +29,3 @@ lookFor: ['js'] | ||
lookFor | ||
} = {...defaults, ...pkgJson?.extensionless} | ||
} = {...defaults, ...(await getPkgJson(argv1))?.extensionless} | ||
@@ -35,0 +32,0 @@ Array.isArray(lookFor) && lookFor.length && lookFor.every(a => typeof a === 'string' && /^[a-z]+\w*$/i.test(a)) || ( |
@@ -23,3 +23,2 @@ import {extname, isAbsolute} from 'path' | ||
let isAbs = isAbsolute(specifier) | ||
if (!isAbs && !relSpecs.includes(specifier) && !prefixes.some(p => specifier.startsWith(p))) { | ||
@@ -29,5 +28,5 @@ return await nextResolve(specifier) | ||
await initPromise | ||
let selfURL = new URL((isAbs ? 'file://' : '') + specifier, parentURL).href | ||
await initPromise | ||
let postfixes = selfURL.endsWith('/') ? indexFiles : extToSkip.includes(extname(selfURL)) ? empty : candidates | ||
@@ -34,0 +33,0 @@ |
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
6502
67