From 3a930850c3daca93f856693192f2abe5e2ac37e3 Mon Sep 17 00:00:00 2001 From: Yoshiya Hinosawa Date: Fri, 14 Jun 2024 19:15:35 +0900 Subject: [PATCH] BREAKING(async): stop exporting ERROR_WHILE_MAPPING_MESSAGE (#5041) --- async/pool.ts | 2 +- async/pool_test.ts | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/async/pool.ts b/async/pool.ts index 64f1737e4..f5c2f2e5a 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 diff --git a/async/pool_test.ts b/async/pool_test.ts index 2a2fa45f1..f5852128c 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");