Skip to content

Conversation

@yashwanthatla
Copy link
Owner

@yashwanthatla yashwanthatla commented Jun 21, 2025

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

Type Description
Feature Added TypeScript and JavaScript language server support
Enhancement Added ARM64 architecture detection

Affected Modules

Module / File Change Description
multilspy/multilspy_config.py Added TYPESCRIPT and JAVASCRIPT enum values to Language class
multilspy/language_server.py Added TypeScript and JavaScript language support to LanguageServer.create method
multilspy/multilspy_utils.py Added "arm64" key in machine_map dictionary for ARM64 architecture detection
multilspy/language_servers/typescript_language_server/typescript_language_server.py Created new TypeScriptLanguageServer class
multilspy/test_sync_multilspy_javascript.py Added tests for JavaScript Language Server functionality
multilspy/test_sync_multilspy_typescript.py Added tests for TypeScript Language Server functionality
multilspy/test_multilspy_typescript.py Added tests for TypeScript Language Server with trpc repository
multilspy/test_multilspy_javascript.py Added tests for JavaScript Language Server definition and reference requests

Notes for Reviewers

  • Node.js is required for JavaScript/TypeScript language servers to function properly

dependency["command"],
shell=True,
check=True,
user=user,
Copy link

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.

Suggested change
user=user,
cwd=tsserver_ls_dir,

user = pwd.getpwuid(os.getuid()).pw_name
subprocess.run(
dependency["command"],
shell=True,
Copy link

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.

Suggested change
shell=True,
shell=False,

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.

4 participants