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

fix: Promise.any requires global.AggregateError #10930

Merged
merged 2 commits into from Dec 27, 2019
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
Expand Up @@ -57,6 +57,11 @@ const PromiseDependenciesWithIterators = [
...CommonIterators,
];

const PromiseAnyDependencies = [
"esnext.aggregate-error",
...PromiseDependenciesWithIterators, // includes aggregate-error dependencies
];

const SymbolDependencies = [
"es.symbol",
"es.symbol.description",
Expand Down Expand Up @@ -358,7 +363,7 @@ export const StaticProperties: ObjectMap<ObjectMap<string | string[]>> = {
"esnext.promise.all-settled",
...PromiseDependenciesWithIterators,
],
any: ["esnext.promise.any", ...PromiseDependenciesWithIterators],
any: ["esnext.promise.any", ...PromiseAnyDependencies],
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think that it would be better just add esnext.aggregate-error to this line since at this moment it's used only here and I have no ideas wherePromiseAnyDependencies can be used in the future.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can do. I thought it was some unwritten code convention that almost every entry is written as [name, ...depedencies].

race: PromiseDependenciesWithIterators,
try: ["esnext.promise.try", ...PromiseDependenciesWithIterators],
},
Expand Down