Research
Security News
Malicious npm Packages Inject SSH Backdoors via Typosquatted Libraries
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
@shopify/theme-language-server-common
Advanced tools
The Language Server Protocol empowers developers to provide code editing features to all code editors in a single code base with no code-editor-specific code.
This module serves as a runtime-agnostic Liquid Language Server so that we can also run it inside the Online Store Code Editor (via a CodeMirror Language Client).
You may be interested in the sibling modules:
@shopify/theme-language-server-common
— (you are here) Runtime agnostic Language Server that can run in browser or Node.js.@shopify/theme-language-server-browser
— Browser specific wrapper over the common library.@shopify/theme-language-server-node
— Node.js specific wrapper over the common library.This repo only contains the library over the functionality. The CLI is implemented in Shopify/cli.
The Node.js version comes with batteries included and uses STDIN and STDOUT as the communication channel.
// slim-cli.ts
import { startServer } from '@shopify/theme-language-server-node';
// start the server (batteries included)
startServer();
The browser version accepts a Web Worker as argument.
// worker.ts
import { startServer, Dependencies } from '@shopify/theme-language-server-browser';
// Provide implementations for the dependency injections
const dependencies: Dependencies = { /* ... */ };
// In a Web Worker, the self object refers to the worker.
startServer(self as any as Worker, dependencies);
Read the Language Server Protocol Spec
It's important to understand the following concepts:
Take a look at the vscode-languageserver-*
libraries offered by VS Code.
They have vscode
in their name, but only vscode-languageclient
is VS Code specific, the other libraries can be used in non-VS Code contexts (we do this here).
This library provides the connection
object and is runtime agnostic. The entire spec is implemented and thus you can hook into every message type.
Examples: connection.onInitialize(params => {})
, connection.onTextDocumentDidOpen(params => {})
, etc.
vscode-languageserver-protocol
This library is useful to reuse and type check message parameter types.
Examples: PublishDiagnosticsNotification
, DiagnosticClientCapabilities
, DiagnosticServerCapabilities
, etc.
This library is useful to get the types of specific parts of the Protocol.
Examples: Diagnostic
, URI
, TextDocument
, Position
, Range
, LocationLink
, etc.
FAQs
Theme Language Server
The npm package @shopify/theme-language-server-common receives a total of 26,713 weekly downloads. As such, @shopify/theme-language-server-common popularity was classified as popular.
We found that @shopify/theme-language-server-common demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 8 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Research
Security News
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
Security News
MITRE's 2024 CWE Top 25 highlights critical software vulnerabilities like XSS, SQL Injection, and CSRF, reflecting shifts due to a refined ranking methodology.
Security News
In this segment of the Risky Business podcast, Feross Aboukhadijeh and Patrick Gray discuss the challenges of tracking malware discovered in open source softare.