- Notifications
You must be signed in to change notification settings - Fork35
Remove node forge dependency#648
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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
Uh oh!
There was an error while loading.Please reload this page.
Conversation
efa4a61 to72c86aeCompareUh oh!
There was an error while loading.Please reload this page.
code-asher left a comment
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.
awesome
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
2ff6fef tobd045e9Comparefa2272a intocoder:mainUh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
Replaced the
node-forgedependency with@peculiar/x509, which is more modern, lightweight, and still widely adopted (600K+ downloads). I initially attempted to use Node.js's built-incryptomodule, but encountered an issue wherekeyUsageconsistently returnedundefinedin Electron environments.Testing in Electron Environments
Added comprehensive testing for Electron environments. In the latest commit, all
vitesttests now run in Electron, which mirrors the environment VS Code operates in. This introduces a few seconds of additional overhead compared to running them in pure NodeJS env. An alternative approach would be to create a separate command (e.g.,yarn test:electron) that runs only the relevant tests in Electron, but this is less robust and could result in missed test coverage as the codebase evolves.I also explored running these as VS Code integration tests, but this approach has significant limitations. It would require converting the test suite to Mocha and rewriting tests to use VS Code API calls, which would make it difficult to write focused unit tests.
Electron Dependency
Added
electronas a dev dependency to ensure proper BoringSSL usage (rather than OpenSSL, which Node.js uses). Note that the current version is the latest release, while VS Code may be running an older version. We should consider pinning to an older Electron version that more closely matches VS Code's environment.