From 5af05278ba5c6143a656a99fefca639dd1d6d068 Mon Sep 17 00:00:00 2001 From: Yoshiya Hinosawa Date: Fri, 14 Jun 2024 15:01:44 +0900 Subject: [PATCH 1/2] BREAKING(async): stop exporting ERROR_WHILE_MAPPING_MESSAGE --- async/pool.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/async/pool.ts b/async/pool.ts index 64f1737e4196..f5c2f2e5ab24 100644 --- a/async/pool.ts +++ b/async/pool.ts @@ -2,7 +2,7 @@ // This module is browser compatible. /** Error message emitted from the thrown error while mapping. */ -export const ERROR_WHILE_MAPPING_MESSAGE = "Threw while mapping."; +const ERROR_WHILE_MAPPING_MESSAGE = "Threw while mapping."; /** * pooledMap transforms values from an (async) iterable into another async From ff5ec61ca78bccb5bdfe272cc1e8f14ce1b78019 Mon Sep 17 00:00:00 2001 From: Yoshiya Hinosawa Date: Fri, 14 Jun 2024 15:29:27 +0900 Subject: [PATCH 2/2] fix --- async/pool_test.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/async/pool_test.ts b/async/pool_test.ts index 2a2fa45f1748..f5852128c5be 100644 --- a/async/pool_test.ts +++ b/async/pool_test.ts @@ -1,6 +1,6 @@ // Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. import { delay } from "./delay.ts"; -import { ERROR_WHILE_MAPPING_MESSAGE, pooledMap } from "./pool.ts"; +import { pooledMap } from "./pool.ts"; import { assert, assertEquals, @@ -38,7 +38,7 @@ Deno.test("pooledMap() handles errors", async () => { } }, AggregateError, - ERROR_WHILE_MAPPING_MESSAGE, + "Threw while mapping.", ); assertEquals(error.errors.length, 2); assertStringIncludes(error.errors[0].stack, "Error: Bad number: 1");