extensionless
Advanced tools
Comparing version 1.5.1 to 1.5.2
{ | ||
"name": "extensionless", | ||
"version": "1.5.1", | ||
"version": "1.5.2", | ||
"type": "module", | ||
@@ -5,0 +5,0 @@ "exports": { |
import {readFile} from 'fs/promises' | ||
import {dirname, isAbsolute, join} from 'path' | ||
import {argv, cwd} from 'process' | ||
import {cwd} from 'process' | ||
@@ -10,3 +10,3 @@ let warn = (field, desc) => console.warn('⚠️ \x1b[33m%s\x1b[0m', | ||
let getPkgJson = async argv1 => { | ||
let curDir, upDir = isAbsolute(argv1 ?? '') ? argv1 : isAbsolute(argv[1] ?? '') ? argv[1] : cwd() | ||
let curDir, upDir = isAbsolute(argv1 ?? '') ? argv1 : cwd() | ||
@@ -13,0 +13,0 @@ do { |
import {extname, isAbsolute} from 'path' | ||
import {getConfig} from './config.js' | ||
export function globalPreload(context) { | ||
return (initialize(), '') | ||
let initPromise | ||
export function globalPreload({port}) { | ||
port.onmessage = e => initPromise = initialize({argv1: e.data}) | ||
return 'port.postMessage(process.argv[1])' | ||
} | ||
@@ -26,2 +29,4 @@ | ||
let selfURL = new URL((isAbs ? 'file://' : '') + specifier, parentURL).href | ||
await initPromise | ||
let postfixes = selfURL.endsWith('/') ? indexFiles : extToSkip.includes(extname(selfURL)) ? empty : candidates | ||
@@ -28,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
6527
68