-
Notifications
You must be signed in to change notification settings - Fork 29.9k
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
Avoid __nodeRequire() #74398
Comments
@weinand actually added the dependency to |
Isn't this still going sync, deep down? |
@isidorn BTW, 'vsda' is used in two places: RawDebugSession and RemoteAgentConnection. Please fix both of them since Alex is out. |
@isidorn yeah that sucks, we probably need to throw in a |
Updated the title, there is no difference in loading behaviour but I feel |
Yeah, it's still equally sync. Writing
Putting |
Thanks for advice. |
It should be able to depend, then we need to tweak some tslint rule maybe. |
Ok. I have tweaked the tslint rule to allow vsda to be imported. Did not use a * to not allow random node modules to be imported there. |
@isidorn looks like this is causing build failures and they can be explained by the fact that |
@bpasero yup, just saw the build failure. Reverting my commit. Let's tackle in June. |
I'll be replacing these with importing standalone modules soon: vscode/src/vs/workbench/contrib/terminal/electron-browser/terminalInstanceService.ts Lines 37 to 38 in 6526507
|
Terminal ones removed in #74858 |
@bpasero Do you know why mainThreadKeytar.ts was placed in the 'browser' and not the 'node' folder? Maybe that was an oversight. |
@bpasero I looked into the I could also pass in the signer as part of the options, so the remoteAgentConnection stays in common and different clients would pass a signer. |
fyi |
Created #75257 as a follow up |
We still have a few places of a
__nodeRequire
that we should convert intoasync import()
.For example, code such as:
this._keytar = <IKeytarModule>require.__$__nodeRequire('keytar');
becomes:
this._keytar = await import('keytar');
Places:
MainThreadKeytar
@chrmartireadWindowsCaCertificates
@chrmartiTerminalInstanceService
@TyriarRawDebugSession
@isidornWin32UpdateService
@joaomorenoRemoteAgentConnection
@alexandrudimaThe text was updated successfully, but these errors were encountered: