From 35f31a4edb5e2d6e8477c677c6929df6e1190103 Mon Sep 17 00:00:00 2001 From: Pooya Parsa Date: Thu, 5 May 2022 11:56:03 +0200 Subject: [PATCH] fix: add `fs/promises` to NodeBuiltinModules (resolves #34) --- src/utils.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/utils.ts b/src/utils.ts index caf78909..1e95139f 100644 --- a/src/utils.ts +++ b/src/utils.ts @@ -1,6 +1,8 @@ import { Module } from 'module' -export const NodeBuiltinModules = Module.builtinModules +export const NodeBuiltinModules = ([] as string[]).concat(Module.builtinModules, [ + 'fs/promises' +]) export function mapArrToVal (val: any, arr: any[]) { return arr.reduce((p, c) => ({ ...p, [c]: val }), {})