Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

BREAKING(async): stop exporting ERROR_WHILE_MAPPING_MESSAGE #5041

Merged
merged 2 commits into from
Jun 14, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion async/pool.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions async/pool_test.ts
Original file line number Diff line number Diff line change
@@ -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,
Expand Down Expand Up @@ -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");
Expand Down