Open devm33 opened 5 months ago
@deepak1556 @alexdima @chrmarti do either of you know what work is involved for me to adopt this?
Fetch API in Node.js and Electron share the same API design, so you should be able to just swap in the imports and everything should just work. The minimal changes needed would be
import net from 'electron';
export const fetching = net.fetch;
However, I would recommend to try this out as experiment similar to how copilot extension does it, refs https://github.com/microsoft/vscode-copilot/pull/3461
With https://github.com/microsoft/vscode/issues/192899 and https://github.com/microsoft/vscode/pull/206822 extensions have the ability to use
electron.net.fetch
to benefit from improved proxy and networking capabilities offered by Electron and Chromium.For
github-authentication
, this could replace the use ofnode-fetch
.