-
Notifications
You must be signed in to change notification settings - Fork 0
Replication of original PR #6: Adding language support for JS/TS via typescript-language-server #5
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
base: replicated-pr-6-before
Are you sure you want to change the base?
Conversation
Adding language support for JS/TS via typescript-language-server
| dependency["command"], | ||
| shell=True, | ||
| check=True, | ||
| user=user, |
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.
🐛 Correctness Issue
Invalid 'user' parameter in subprocess.run().
The 'user' parameter doesn't exist in Python's subprocess.run() function and will cause a TypeError when executed.
Current Code (Diff):
- user=user,
cwd=tsserver_ls_dir,📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| user=user, | |
| cwd=tsserver_ls_dir, |
| user = pwd.getpwuid(os.getuid()).pw_name | ||
| subprocess.run( | ||
| dependency["command"], | ||
| shell=True, |
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.
🔒 Security Issue
Command injection vulnerability with shell=True.
Using shell=True with commands from a JSON file creates a critical security vulnerability allowing command injection attacks.
Current Code (Diff):
- shell=True,
+ shell=False,📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| shell=True, | |
| shell=False, |
PR Summary
Add TypeScript and JavaScript Language Server Support
Overview
This PR adds support for TypeScript and JavaScript language servers to the multilspy library, including implementation of language server classes, architecture detection for ARM64 platforms, and comprehensive test coverage for both languages.
Change Types
Affected Modules
multilspy/multilspy_config.pymultilspy/language_server.pymultilspy/multilspy_utils.pymultilspy/language_servers/typescript_language_server/typescript_language_server.pymultilspy/test_sync_multilspy_javascript.pymultilspy/test_sync_multilspy_typescript.pymultilspy/test_multilspy_typescript.pymultilspy/test_multilspy_javascript.pyNotes for Reviewers