{"_id":"@andy0130tw/vscode-jsonrpc-esm","name":"@andy0130tw/vscode-jsonrpc-esm","dist-tags":{"next":"9.0.0-next-esm.9","latest":"9.0.0-next-esm.9"},"versions":{"9.0.0-next-esm.9":{"name":"@andy0130tw/vscode-jsonrpc-esm","description":"A json rpc implementation over streams","version":"9.0.0-next-esm.9","author":{"name":"Microsoft Corporation"},"license":"MIT","type":"module","repository":{"type":"git","url":"git+https://github.com/Microsoft/vscode-languageserver-node.git","directory":"jsonrpc"},"bugs":{"url":"https://github.com/Microsoft/vscode-languageserver-node/issues"},"engines":{"node":">=14.0.0"},"exports":{".":{"types":"./lib/common/api.d.ts","default":"./lib/common/api.js"},"./node":{"types":"./lib/node/main.d.ts","node":"./lib/node/main.js"},"./browser":{"types":"./lib/browser/main.d.ts","browser":"./lib/browser/main.js"}},"devDependencies":{"@types/msgpack-lite":"^0.1.11","msgpack-lite":"^0.1.26"},"scripts":{"prepublishOnly":"echo \"⛔ Can only publish from a secure pipeline ⛔\" && node ../build/npm/fail","prepack":"npm run all:publish","preversion":"npm test","compile":"tsc -b ./tsconfig.json","watch":"tsc -b ./tsconfig.watch.json -w","clean":"rimraf lib && rimraf dist","lint":"eslint --ext ts src","test":"npm run test:node && npm run test:browser","test:node":"node ../node_modules/mocha/bin/_mocha","test:browser":"npm run webpack:test:silent && node ../build/bin/runBrowserTests.js  http://127.0.0.1:8080/jsonrpc/src/browser/test/","webpack":"node ../build/bin/webpack  --mode none --config ./webpack.config.js","webpack:test":"node ../build/bin/webpack --mode none --config ./src/browser/test/webpack.config.js","webpack:test:silent":"node ../build/bin/webpack --no-stats --mode none --config ./src/browser/test/webpack.config.js","all":"npm run clean && npm run compile && npm run lint && npm run test","compile:publish":"tsc -b ./tsconfig.publish.json","all:publish":"git clean -xfd . && npm install && npm run compile:publish && npm run lint && npm run test"},"gitHead":"277eb6dd7a5207cb80091a3d8d2c17decd1f5723","_id":"@andy0130tw/vscode-jsonrpc-esm@9.0.0-next-esm.9","homepage":"https://github.com/Microsoft/vscode-languageserver-node#readme","_nodeVersion":"22.20.0","_npmVersion":"11.6.1","dist":{"integrity":"sha512-zVIx2rtoDOOYb3oOkAE8g7BYRyM2FXm46ZXdKM0p9ynUrOD1bKdb/VVJgt6qdaTd1/q0jqYKWIqqT29B0Oq5NQ==","shasum":"549d1f38d0b3aa98a312e1436186d2cd3514a409","tarball":"https://registry.npmjs.org/@andy0130tw/vscode-jsonrpc-esm/-/vscode-jsonrpc-esm-9.0.0-next-esm.9.tgz","fileCount":43,"unpackedSize":194949,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEYCIQDhRqTc2MYFXiMBkLlgjNaeyANXz2BbhBUV7QAm/4LkcgIhAPasmzgp6VPUCdgsJYpalZOYNgLdlXTc0CAgffwW5sCO"}]},"_npmUser":{"name":"andy0130tw","email":"andy0130tw@yahoo.com.tw"},"directories":{},"maintainers":[{"name":"andy0130tw","email":"andy0130tw@yahoo.com.tw"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/vscode-jsonrpc-esm_9.0.0-next-esm.9_1760644102121_0.5397922826484418"},"_hasShrinkwrap":false}},"time":{"created":"2025-10-16T19:48:22.026Z","9.0.0-next-esm.9":"2025-10-16T19:48:22.324Z","modified":"2025-10-16T19:48:22.569Z"},"maintainers":[{"name":"andy0130tw","email":"andy0130tw@yahoo.com.tw"}],"description":"A json rpc implementation over streams","homepage":"https://github.com/Microsoft/vscode-languageserver-node#readme","repository":{"type":"git","url":"git+https://github.com/Microsoft/vscode-languageserver-node.git","directory":"jsonrpc"},"author":{"name":"Microsoft Corporation"},"bugs":{"url":"https://github.com/Microsoft/vscode-languageserver-node/issues"},"license":"MIT","readme":"# VSCode JSON RPC\n\n[![NPM Version](https://img.shields.io/npm/v/vscode-jsonrpc.svg)](https://npmjs.org/package/vscode-jsonrpc)\n[![NPM Downloads](https://img.shields.io/npm/dm/vscode-jsonrpc.svg)](https://npmjs.org/package/vscode-jsonrpc)\n[![Build Status](https://dev.azure.com/vscode/vscode-languageserver-node/_apis/build/status%2Fvscode-languageserver-node?branchName=main)](https://dev.azure.com/vscode/vscode-languageserver-node/_build/latest?definitionId=52&branchName=main)\n\nThis npm module implements the base messaging protocol spoken between a VSCode language server and a VSCode language client.\n\nThe npm module can also be used standalone to establish a [JSON-RPC](http://www.jsonrpc.org/) channel between\na client and a server. Below an example how to setup a JSON-RPC connection. First the client side.\n\n```ts\nimport * as cp from 'child_process';\nimport * as rpc from 'vscode-jsonrpc/node';\n\nlet childProcess = cp.spawn(...);\n\n// Use stdin and stdout for communication:\nlet connection = rpc.createMessageConnection(\n\tnew rpc.StreamMessageReader(childProcess.stdout),\n\tnew rpc.StreamMessageWriter(childProcess.stdin));\n\nlet notification = new rpc.NotificationType<string, void>('testNotification');\n\nconnection.listen();\n\nconnection.sendNotification(notification, 'Hello World');\n```\n\nThe server side looks very symmetrical:\n\n```ts\nimport * as rpc from 'vscode-jsonrpc/node';\n\n\nlet connection = rpc.createMessageConnection(\n\tnew rpc.StreamMessageReader(process.stdin),\n\tnew rpc.StreamMessageWriter(process.stdout));\n\nlet notification = new rpc.NotificationType<string, void>('testNotification');\nconnection.onNotification(notification, (param: string) => {\n\tconsole.log(param); // This prints Hello World\n});\n\nconnection.listen();\n```\n\n# History\n\n### 5.0.0\n\n- add progress support\n- move JS target to ES2017\n\n### 4.0.0\n\n- move JS target to ES6.\n\n### 3.0.0:\n\n- converted the NPM module to use TypeScript 2.0.3.\n- added strict null support.\n- support for passing more than one parameter to a request or notification.\n- Breaking changes:\n  - due to the use of TypeScript 2.0.3 and differences in d.ts generation users of the new version need to move to\n    TypeScript 2.0.3 as well.\n\n## License\n[MIT](https://github.com/Microsoft/vscode-languageserver-node/blob/master/License.txt)\n","readmeFilename":"README.md","_rev":"1-8403814b72cffbf1f3f8c40da14b47f8"}