-
Notifications
You must be signed in to change notification settings - Fork 5k
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
Remove any-promise dependency #3381
Conversation
Verified ✅ |
@cgewecke Oh! Have you done some further tests with the ... and did you also thought about to fix this upstream instead of removing it? (I think the possibility is here that some depending projects do want to support IE11) Edit:
"add some explicit test cases for it" this is probably the better wording. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Would also agree that keeping this dependency causes more problems than helping to address. Also adding a Can-I-use-Web-Workers table here for reference. Generally have to say that I have not very much of a picture of how widely web workers are used atm.
Yes. There have been no changes to any-promise for ~4 years. The problem with the On the surface, the lib seems abandoned / a historical artifact but according to npm it continues see significant increases in usage. Its weekly downloads have almost doubled in the last year (base = 1.5 mil) RE: testing. I don't know what test to add here. If you can think of one, will happily add. |
Description
The any-promise package has an unsafe dereferencing of the
window
object in its code that throws in the Web Worker environment. This PR removes it and falls back on native promises.What does any-promise do? (from their README)
Essentially, consumers of Web3 can decide which promise to use and Web3 will respect that, since it (usually) requires Promise from
any-promise
.Hard to know if anyone is relying on this...
Resources
any-promise
at Web3Fixes #3377 #2211 #1774
Type of change
Checklist:
npm run dtslint
with success and extended the tests and types if necessary.npm run test:unit
with success.npm run test:cov
and my test cases do cover all lines and branches of the added code.npm run build-all
and tested the resulting file/'s fromdist
folder in a browser.CHANGELOG.md
file in the root folder.