From 93f7f00c956c14620ef031626f124b57397ca867 Mon Sep 17 00:00:00 2001 From: Ryan Dahl Date: Wed, 9 Oct 2019 17:22:22 -0400 Subject: Run deno_std tests in github actions --- std/bundle/utils.ts | 24 +++++++++++++----------- 1 file changed, 13 insertions(+), 11 deletions(-) (limited to 'std/bundle') diff --git a/std/bundle/utils.ts b/std/bundle/utils.ts index 91c0820bf..062c62231 100644 --- a/std/bundle/utils.ts +++ b/std/bundle/utils.ts @@ -70,18 +70,20 @@ export function instantiate( assert(module != null); assert(module.factory != null); - const dependencies = module.dependencies.map((id): object => { - if (id === "require") { - // TODO(kitsonk) support dynamic import by passing a `require()` that - // can return a local module or dynamically import one. - return (): void => {}; - } else if (id === "exports") { - return module.exports; + const dependencies = module.dependencies.map( + (id): object => { + if (id === "require") { + // TODO(kitsonk) support dynamic import by passing a `require()` that + // can return a local module or dynamically import one. + return (): void => {}; + } else if (id === "exports") { + return module.exports; + } + const dep = modules.get(id)!; + assert(dep != null); + return dep.exports; } - const dep = modules.get(id)!; - assert(dep != null); - return dep.exports; - }); + ); if (typeof module.factory === "function") { module.factory!(...dependencies); -- cgit v1.2.3