Skip to content
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

Fix language server crash relying on node crypto #657

Merged
merged 2 commits into from
Jun 10, 2024
Merged

Conversation

aaronvg
Copy link
Contributor

@aaronvg aaronvg commented Jun 10, 2024

🚀 This description was created by Ellipsis for commit 900d14e

Summary:

This PR addresses crashes by removing the assignment of Node's crypto module to globalThis.crypto in the language server and updates the package version.

Key points:

  • Removed global assignment of crypto to node:crypto's webcrypto in server.ts.
  • Removed assignment of Node's crypto module to globalThis.crypto in server.ts.
  • Updated package version in package.json from 0.36.0 to 0.36.1.

Generated with ❤️ by ellipsis.dev

Copy link

vercel bot commented Jun 10, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

1 Ignored Deployment
Name Status Preview Comments Updated (UTC)
baml ⬜️ Ignored (Inspect) Visit Preview Jun 10, 2024 11:46pm

Copy link
Contributor

@ellipsis-dev ellipsis-dev bot left a comment

Choose a reason for hiding this comment

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

👍 Looks good to me! Reviewed everything up to 35a931e in 49 seconds

More details
  • Looked at 27 lines of code in 2 files
  • Skipped 0 files when reviewing.
  • Skipped posting 1 drafted comments based on config settings.
1. typescript/vscode-ext/packages/language-server/src/server.ts:37
  • Draft comment:
    Removing the global assignment of the Node.js 'crypto' module is a significant change. Ensure that all cryptographic operations in the language server and its dependencies are compatible with this change and that there is an alternative implementation that does not rely on Node.js-specific features.
  • Reason this comment was not posted:
    Confidence of 0% on close inspection, compared to threshold of 50%.

Workflow ID: wflow_8NpKBKSJhnZRS6Oq


You can customize Ellipsis with 👍 / 👎 feedback, review rules, user-specific overrides, quiet mode, and more.

@aaronvg aaronvg force-pushed the vscode-crash-fix branch from 35a931e to 900d14e Compare June 10, 2024 23:46
Copy link
Contributor

@ellipsis-dev ellipsis-dev bot left a comment

Choose a reason for hiding this comment

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

👍 Looks good to me! Incremental review on 900d14e in 56 seconds

More details
  • Looked at 130 lines of code in 3 files
  • Skipped 0 files when reviewing.
  • Skipped posting 1 drafted comments based on config settings.
1. typescript/vscode-ext/packages/package.json:5
  • Draft comment:
    The PR description states the version was incremented from 0.36.0 to 0.36.1, but the diff shows an increment to 0.36.2. Please confirm the correct version update.
  • Reason this comment was not posted:
    Confidence of 0% on close inspection, compared to threshold of 50%.

Workflow ID: wflow_AkqmFNVQftACBX7B


You can customize Ellipsis with 👍 / 👎 feedback, review rules, user-specific overrides, quiet mode, and more.

@@ -548,6 +548,7 @@
break

case 'port_number':
console.log('Setting port number', content.port)

Check warning

Code scanning / CodeQL

Log injection Medium

Log entry depends on a
user-provided value
.
@aaronvg aaronvg merged commit dec509d into canary Jun 10, 2024
6 checks passed
@aaronvg aaronvg deleted the vscode-crash-fix branch June 10, 2024 23:50
anish-palakurthi pushed a commit that referenced this pull request Jun 11, 2024
<!-- ELLIPSIS_HIDDEN -->


| 🚀 | This description was created by
[Ellipsis](https://www.ellipsis.dev) for commit
900d14e |
|--------|--------|

### Summary:
This PR addresses crashes by removing the assignment of Node's `crypto`
module to `globalThis.crypto` in the language server and updates the
package version.

**Key points**:
- Removed global assignment of `crypto` to `node:crypto`'s `webcrypto`
in `server.ts`.
- Removed assignment of Node's `crypto` module to `globalThis.crypto` in
`server.ts`.
- Updated package version in `package.json` from `0.36.0` to `0.36.1`.


----
Generated with ❤️ by [ellipsis.dev](https://www.ellipsis.dev)



<!-- ELLIPSIS_HIDDEN -->
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