extensionless
Advanced tools
Comparing version 1.9.8 to 1.9.9
{ | ||
"name": "extensionless", | ||
"version": "1.9.8", | ||
"version": "1.9.9", | ||
"type": "module", | ||
@@ -5,0 +5,0 @@ "exports": { |
@@ -22,6 +22,6 @@ import {readFile} from 'fs/promises' | ||
export async function getConfig({argv1} = {}) { | ||
export async function getConfig({argv1 = ''} = {}) { | ||
let defaults = { | ||
lookFor: ['js'] | ||
}, dirPath = isAbsolute(argv1 ?? '') ? argv1 : cwd(), { | ||
}, dirPath = isAbsolute(argv1) ? argv1 : cwd(), { | ||
lookFor | ||
@@ -28,0 +28,0 @@ } = {...defaults, ...(await getPkgJson(dirPath))?.body.extensionless} |
@@ -30,4 +30,4 @@ import {extname} from 'path' | ||
let {type} = context.importAttributes ?? context.importAssertions | ||
let trySpec = error ? specifier : new URL(prefix + specifier, context.parentURL).href | ||
let {type} = context.importAttributes ?? context.importAssertions | ||
let postfixes = (await initPromise, trySpec.endsWith('/') ? indexFiles : knownExts.includes(extname(trySpec)) ? empty : candidates) | ||
@@ -34,0 +34,0 @@ |
6663