Skip to content

Commit ea5d331

Browse files
committed
name arguments
1 parent 4680c2e commit ea5d331

File tree

1 file changed

+2
-5
lines changed

1 file changed

+2
-5
lines changed

initialize.mjs

+2-5
Original file line numberDiff line numberDiff line change
@@ -37,13 +37,10 @@ const [NODE_MAJOR, NODE_MINOR] = process.versions.node.split('.').map(x => +x)
3737
const brokenLoaders = NODE_MAJOR === 18 && NODE_MINOR === 0
3838
const iitmExclusions = [/langsmith/, /openai\/_shims/, /openai\/resources\/chat\/completions\/messages/]
3939

40-
export async function load (...args) {
41-
const url = args[0]
42-
const nextLoad = args[args.length - 1]
43-
40+
export async function load (url, context, nextLoad) {
4441
const iitmExclusionsMatch = iitmExclusions.some((exclusion) => exclusion.test(url))
4542
const loadHook = (brokenLoaders || iitmExclusionsMatch) ? nextLoad : origLoad
46-
return insertInit(await loadHook(...args))
43+
return insertInit(await loadHook(url, context, nextLoad))
4744
}
4845

4946
export const resolve = brokenLoaders ? undefined : origResolve

0 commit comments

Comments
 (0)