Registry / devops / vscode-ws-jsonrpc-webgal

vscode-ws-jsonrpc-webgal

JSON →
library0.2.1jsnpmunverified

This package is deprecated. It provides JSON-RPC communication over WebSocket for VSCode extensions, enabling client-server messaging in language server protocols. The current version is 0.2.1. It was originally maintained by TypeFox but is now superseded by a newer version within the monaco-languageclient monorepo. Key differentiators: lightweight, integrates with VSCode's JSON-RPC library, and supports both client and server WebSocket connections. However, it is no longer actively developed; users should migrate to the new package. It ships TypeScript types and is primarily used in Node.js/browser environments.

npm install vscode-ws-jsonrpc-webgal
INSTALL
IMPORT
SIG · VSCODE-WS-JSONRPC-
V
vscode-ws-jsonrpc-webgal
devopsjavascriptv0.2.1
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

Namespace import via 'vscode-ws-jsonrpc'
import * as rpc from 'vscode-ws-jsonrpc'
const rpc = require('vscode-ws-jsonrpc')
This package is ESM-only; CommonJS require may not work in newer Node versions. The namespace import is the standard way.
WebSocketMessageReader
import { WebSocketMessageReader } from 'vscode-ws-jsonrpc'
import { WebSocketMessageReader } from 'vscode-ws-jsonrpc/lib'
Do not use path import; it's re-exported from the main entry.
Server utilities from 'vscode-ws-jsonrpc/lib/server'
import * as server from 'vscode-ws-jsonrpc/lib/server'
import { createConnection } from 'vscode-ws-jsonrpc'
The server module is only available via the 'lib/server' subpath import. Direct import from main will not include it.

Shows client-side WebSocket connection and sending a JSON-RPC notification.

import * as rpc from 'vscode-ws-jsonrpc'; const webSocket = new WebSocket('ws://example.com/socket'); rpc.listen({ webSocket, onConnection: (connection: rpc.MessageConnection) => { const notification = new rpc.NotificationType<string, void>('testNotification'); connection.listen(); connection.sendNotification(notification, 'Hello World'); } });
Debug
Known issues
deprecatedvscode-ws-jsonrpc is deprecated. Use vscode-ws-jsonrpc from monaco-languageclient instead.
fix
Migrate to @vscode/wasm-jsonrpc or the monaco-languageclient version.
affects: >=0.0.0
gotchaThe server side functions are in a separate subpath import 'vscode-ws-jsonrpc/lib/server'.
fix
Import from 'vscode-ws-jsonrpc/lib/server' for server-side APIs.
affects: <1.0.0
Errors
Common errors & fixes
Cannot find module 'vscode-ws-jsonrpc/lib/server'
Missing subpath export or wrong import path.
fix
Use import * as server from 'vscode-ws-jsonrpc/lib/server'.
Error [ERR_REQUIRE_ESM]: require() of ES Module
The package is ESM-only, but CommonJS require is used.
fix
Use dynamic import() or switch to ESM imports.
Upgrade
Version history
0.2.1latest on npm
Audit
Dependencies

No dependency data recorded yet.

Agent activity
25 hits · last 30 days
node
22
OpenAI (training)
1
Resources
vscode-ws-jsonrpc-webgal — npm install vscode-ws-jsonrpc-webgal · libregistry