airlight-resolve
Advanced tools
Comparing version 0.4.1 to 0.4.2
{ | ||
"name": "airlight-resolve", | ||
"version": "0.4.1", | ||
"version": "0.4.2", | ||
"description": "[WIP] `require.resolve` faster implementation based on oxc-resolver", | ||
@@ -5,0 +5,0 @@ "type": "module", |
import { ResolverFactory } from 'oxc-resolver'; | ||
/** @type {Partial<import('./interface.js').ResolveOptions>} */ | ||
const defaultOptions = { | ||
@@ -10,3 +11,5 @@ preferAbsolute: true, | ||
export const create = (opts = {}) => { | ||
export const create = ( | ||
/** @type {Partial<import('./interface.js').ResolveOptions>} */ opts = {} | ||
) => { | ||
const options = Object.assign( | ||
@@ -21,6 +24,7 @@ { | ||
const factory = new ResolverFactory(options); | ||
/** @type {Map<string, string | undefined>} */ | ||
const cache = new Map(); | ||
// eslint-disable-next-line complexity | ||
return (...args) => { | ||
return (/** @type {string[]} */ ...args) => { | ||
const key = args.length < 2 ? args[0] : args.join('/'); | ||
@@ -27,0 +31,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
1934
32