Skip to content

feat: Use Electron's net module as the default HTTP transport - #2027

Draft
joker23 wants to merge 2 commits into
mainfrom
skz/electron-sdk-next-net-module
Draft

joker23 wants to merge 2 commits into
mainfrom
skz/electron-sdk-next-net-module

Conversation

@joker23

@joker23 joker23 commented Sep 16, 2026

Copy link
Copy Markdown
Contributor

This PR will make it so that electron sdk will use the native net module as the default HTTP transport.

@joker23
joker23 added this pull request to stack #2019 September 16, 2026 20:26
@github-actions

Copy link
Copy Markdown
Contributor

@launchdarkly/js-sdk-common size report
This is the brotli compressed size of the ESM build.
Compressed size: 26983 bytes
Compressed size limit: 29000
Uncompressed size: 131377 bytes

@github-actions

Copy link
Copy Markdown
Contributor

@launchdarkly/js-client-sdk size report
This is the brotli compressed size of the ESM build.
Compressed size: 32597 bytes
Compressed size limit: 34000
Uncompressed size: 116806 bytes

@github-actions

Copy link
Copy Markdown
Contributor

@launchdarkly/js-client-sdk-common size report
This is the brotli compressed size of the ESM build.
Compressed size: 25421 bytes
Compressed size limit: 44000
Uncompressed size: 165321 bytes

@joker23
joker23 force-pushed the skz/electron-sdk-next-net-module branch 2 times, most recently from 7032cb2 to c4b16bd Compare September 16, 2026 20:54
Comment on lines +67 to +69
redirect: 'error',
credentials: 'omit',
cache: 'no-store',

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

would like some opinions on this one. I personally don't see a reason to deviate from current behavior (what we have in nodes http/https implementation)

Comment on lines +4 to +10
// electron.net isn't available outside a real Electron main process, so this fakes just
// enough of the ClientRequest API to drive the local test server below over Node's real
// http module. Verified against real Electron 42.6.0: Chromium's net module transparently
// decompresses a compressed body while `IncomingMessage.headers` still reports the origin's
// original `content-encoding` -- this fake reproduces exactly that (see the scrutinize
// report for the real-Electron verification), rather than handing back a raw, never
// -transcoded Node response the way a naive passthrough would.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

This is something I had claude whip up (obviously), but it does seem like electron heavily favors e2e tests (https://www.electronjs.org/docs/latest/development/testing)... debating whether or not it is worth it to have an e2e suite that also runs to supplement test coverage.

@joker23
joker23 force-pushed the skz/electron-sdk-next-net-module branch 3 times, most recently from e974fde to 86efe47 Compare September 17, 2026 13:57
Base automatically changed from skz/electron-sdk-next-move-example to main September 22, 2026 15:56
@joker23
joker23 force-pushed the skz/electron-sdk-next-net-module branch from 86efe47 to a023721 Compare September 22, 2026 15:57

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant