-
Notifications
You must be signed in to change notification settings - Fork 15.3k
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
feat: convert shell.openItem to async shell.openPath #20682
Conversation
@codebytere this will conflict #10902 in behavior. /cc @zcbenz @ckerr |
@deepak1556 hmm - why don't we allow in an optional callback with an error code and description string if one exists? i think that would solve both issues 🤔 |
There is no reason to not implement it #7210 😄 |
ef0db35
to
e2be35a
Compare
e335b9f
to
23dfb54
Compare
Generally I think we should not change API's behavior and return value silently, otherwise we would not be able to show deprecation warnings, and it would very hard to users to debug if any bug was introduced to their apps due to the behavior change. For example, previous silent errors would now turn into unhandled exceptions. A safe choice would be deprecating /cc @electron/wg-api for more inputs. |
@zcbenz fair point! i'll address these mechanical changes and then add this to the agenda for tomorrow :) Do you think we should get rid of the sync version entirely? I personally would prefer that as I think the sync version leads to false assumtions for users about the nature of the synchronicity. |
23dfb54
to
1637981
Compare
a8277e7
to
973b403
Compare
870166d
to
d83a000
Compare
This should be ready to go per the spec! |
d83a000
to
0c4847a
Compare
0c4847a
to
9cd82ae
Compare
Release Notes Persisted
|
The release-notes of this breaking change says: Split |
Description of Change
BREAKING CHANGE.
Resolves #20606.
Resolves #7210.
Implements an asynchronous version of
shell.openItem(path)
as a new methodshell.openPath(path)
.Adheres to this spec.
Checklist
npm test
passesRelease Notes
Notes: Split
shell.openItem(path)
into synchronous and asynchronous methods.