From 08028e0e5983bf47b40d7665aa2ffb91bb830ed4 Mon Sep 17 00:00:00 2001 From: Chris Yang <18487241+ysm-dev@users.noreply.github.com> Date: Sun, 10 Nov 2024 21:57:27 +0900 Subject: [PATCH] fix: add filter to remove falsy values in generateExports (#295) --- build/generateExports.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/build/generateExports.ts b/build/generateExports.ts index 7760487a..7ff68dd3 100644 --- a/build/generateExports.ts +++ b/build/generateExports.ts @@ -1,7 +1,7 @@ import { readFile, writeFile } from "fs/promises"; import { glob } from "glob"; -import { drop, map, not, pipe, reduce } from "../src/index"; +import { drop, filter, identity, map, not, pipe, reduce } from "../src/index"; const SOURCE_DIR = "./src"; const OUTPUT_DIR = "./dist"; @@ -54,6 +54,7 @@ async function generateExports() { const subPathExports = pipe( fileNames, + filter(identity), map((name) => { const conditionalSubPaths = { types: `${TYPES_ROOT_DIR}/${name}.d.ts`,