From 66c6d32bbd35747efef0e1c743923bc9d2fcf285 Mon Sep 17 00:00:00 2001 From: Matteo Pietro Dazzi Date: Thu, 7 Dec 2023 12:27:12 +0100 Subject: [PATCH] fix: prepublish --- .npmrc | 2 ++ package.json | 3 ++- test/pipeline.test.ts | 16 ++++++++++++---- 3 files changed, 16 insertions(+), 5 deletions(-) create mode 100644 .npmrc diff --git a/.npmrc b/.npmrc new file mode 100644 index 0000000..73c108a --- /dev/null +++ b/.npmrc @@ -0,0 +1,2 @@ +enable-pre-post-scripts=true +auto-install-peers=true \ No newline at end of file diff --git a/package.json b/package.json index ae3e0f9..a8a3db8 100644 --- a/package.json +++ b/package.json @@ -26,7 +26,8 @@ "test:node": "vitest", "test:browser": "vitest --config ./vitest-browser.config.ts", "test:edge": "vitest --config ./vitest-edge.config.ts", - "build": "tsup" + "build": "tsup", + "prepublish": "pnpm run build" }, "keywords": [ "streams" diff --git a/test/pipeline.test.ts b/test/pipeline.test.ts index 6b47517..970acfa 100644 --- a/test/pipeline.test.ts +++ b/test/pipeline.test.ts @@ -79,11 +79,19 @@ describe("pipeline", () => { const destinationArrayTimes3 = []; await Promise.all([ - pipeline(source1, map((value) => value * 2), toArray(destinationArrayTimes2)), - pipeline(source2, map((value) => value * 3), toArray(destinationArrayTimes3)), - ]) + pipeline( + source1, + map((value) => value * 2), + toArray(destinationArrayTimes2), + ), + pipeline( + source2, + map((value) => value * 3), + toArray(destinationArrayTimes3), + ), + ]); expect(destinationArrayTimes2).toEqual([2, 4, 6]); expect(destinationArrayTimes3).toEqual([3, 6, 9]); - }) + }); });