open-index/open-npm huggingface dataset:
npm package: @sourcegraph/tsconfig
Description: Base tsconfig.json for Sourcegraph TypeScript projects
Author: Felix Becker
Latest version: 4.0.1


# Sourcegraph tsconfig

[![npm](https://img.shields.io/npm/v/@sourcegraph/tsconfig.svg)](https://www.npmjs.com/package/@sourcegraph/tsconfig)
[![downloads](https://img.shields.io/npm/dt/@sourcegraph/tsconfig.svg)](https://www.npmjs.com/package/@sourcegraph/tsconfig)
[![build](https://travis-ci.org/sourcegraph/tsconfig.svg?branch=master)](https://travis-ci.org/sourcegraph/tsconfig)
[![code style: prettier](https://img.shields.io/badge/code_style-prettier-ff69b4.svg)](https://github.com/prettier/prettier)

Base tsconfig.json for TypeScript projects at Sourcegraph.
It only includes compiler options that make TypeScript more strict.
It does not set any project-specific or environmental settings.

## Usage

```
npm install --save-dev @sourcegraph/tsconfig
```

Then add this tsconfig.json:

```json
{
  "extends": "./node_modules/@sourcegraph/tsconfig/tsconfig.json"
}
```

## Making changes

```
npm link
cd <project>
npm link @sourcegraph/tsconfig
npm run lint
```

## Publish a new version

Follow [semver](http://semver.org/).

```
npm version major|minor|patch
git push
git push --tags
npm publish
```
npm package: @sourcegraph/vscode-jsonrpc
Description: A json rpc implementation over streams
Author: Microsoft Corporation
Latest version: 3.3.1-sourcegraph-20170727-0

# VSCode JSON RPC

[![NPM Version](https://img.shields.io/npm/v/vscode-jsonrpc.svg)](https://npmjs.org/package/vscode-jsonrpc)
[![NPM Downloads](https://img.shields.io/npm/dm/vscode-jsonrpc.svg)](https://npmjs.org/package/vscode-jsonrpc)
[![Build Status](https://travis-ci.org/Microsoft/vscode-languageserver-node.svg?branch=master)](https://travis-ci.org/Microsoft/vscode-languageserver-node)

This npm module implements the base messaging protocol spoken between a VSCode language server and a VSCode language client.

The npm module can also be used standalone to establish a [JSON-RPC](http://www.jsonrpc.org/) channel between
a client and a server. Below an example how to setup a JSON-RPC connection. First the client side.

```ts
import * as cp from 'child_process';
import * as rpc from 'vscode-jsonrpc';

let childProcess = cp.spawn(...);

// Use stdin and stdout for communication:
let connection = rpc.createMessageConnection(
	new rpc.StreamMessageReader(childProcess.stdout),
	new rpc.StreamMessageWriter(childProcess.stdin));

let notification = new NotificationType<string, void>('testNotification');

connection.listen();

connection.sendNotification(notification, 'Hello World');
```

The server side looks very symmetrical:

```ts
import * as rpc from 'vscode-jsonrpc';


let connection = rpc.createMessageConnection(
	new rpc.StreamMessageReader(process.stdin),
	new rpc.StreamMessageWriter(process.stdout));

let notification = new NotificationType<string, void>('testNotification');
connection.onNotification(notification, (param: string) => {
	console.log(param); // This prints Hello World
});

connection.listen();
```

# History

### 3.0.0:

- converted the NPM module to use TypeScript 2.0.3.
- added strict null support.
- support for passing more than one parameter to a request or notification.
- Breaking changes:
  - due to the use of TypeScript 2.0.3 and differences in d.ts generation users of the new version need to move to
    TypeScript 2.0.3 as well.

## License
[MIT](https://github.com/Microsoft/vscode-languageserver-node/blob/master/License.txt)
npm package: @sourcegraph/vscode-languageclient
Description: VSCode Language client implementation
Author: Microsoft Corporation
Latest version: 3.3.0-sourcegraph-20170731-1

# VSCode Language Server - Client Module

[![NPM Version](https://img.shields.io/npm/v/vscode-languageclient.svg)](https://npmjs.org/package/vscode-languageclient)
[![NPM Downloads](https://img.shields.io/npm/dm/vscode-languageclient.svg)](https://npmjs.org/package/vscode-languageclient)
[![Build Status](https://travis-ci.org/Microsoft/vscode-languageserver-node.svg?branch=master)](https://travis-ci.org/Microsoft/vscode-languageserver-node)

This npm module allows VSCode extensions to easily integrate language servers adhering to the [language server protocol](https://github.com/Microsoft/vscode-languageserver-protocol)

See [here](https://code.visualstudio.com/docs/extensions/example-language-server) for a detailed documentation on how to 
implement language servers for [VSCode](https://code.visualstudio.com/).

## History

For the history please see the [main repository](https://github.com/Microsoft/vscode-languageserver-node/blob/master/README.md)

## License
[MIT](https://github.com/Microsoft/vscode-languageserver-node/blob/master/License.txt)
npm package: @sourcegraph/vscode-languageserver-types
Description: Types used by the Language server for node
Author: Microsoft Corporation
Latest version: 3.0.3-patch

# VSCode Language Server

[![NPM Version](https://img.shields.io/npm/v/vscode-languageserver-types.svg)](https://npmjs.org/package/vscode-languageserver-types)
[![NPM Downloads](https://img.shields.io/npm/dm/vscode-languageserver-types.svg)](https://npmjs.org/package/vscode-languageserver-types)
[![Build Status](https://travis-ci.org/Microsoft/vscode-languageserver-types-node.svg?branch=master)](https://travis-ci.org/Microsoft/vscode-languageserver-types-node)

Npm module containing the types used by the VSCode language client and [Node.js](https://nodejs.org/) language server

Click [here](https://code.visualstudio.com/docs/extensions/example-language-server) for a detailed document on how 
to implement language servers for [VSCode](https://code.visualstudio.com/).

## History

For the history please see the [main repository](https://github.com/Microsoft/vscode-languageserver-node/blob/master/README.md)

## License
[MIT](https://github.com/Microsoft/vscode-languageserver-node/blob/master/License.txt)
npm package: @sourcegraph/vscode-textmate
Description: VSCode TextMate grammar helpers
Author: Microsoft Corporation
Latest version: 3.1.4-memory-management-1

# VSCode TextMate [![Build Status](https://travis-ci.org/Microsoft/vscode-textmate.svg?branch=master)](https://travis-ci.org/Microsoft/vscode-textmate) [![Coverage Status](https://coveralls.io/repos/github/Microsoft/vscode-textmate/badge.svg?branch=master)](https://coveralls.io/github/Microsoft/vscode-textmate?branch=master)

An interpreter for grammar files as defined by TextMate. Supports loading grammar files from JSON or PLIST format. Cross - grammar injections are currently not supported.

## Installing

```sh
npm install vscode-textmate
```

## Using

```javascript
var Registry = require('vscode-textmate').Registry;
var registry = new Registry();
var grammar = registry.loadGrammarFromPathSync('./javascript.tmbundle/Syntaxes/JavaScript.plist');

var lineTokens = grammar.tokenizeLine('function add(a,b) { return a+b; }');
for (var i = 0; i < lineTokens.tokens.length; i++) {
	var token = lineTokens.tokens[i];
	console.log('Token from ' + token.startIndex + ' to ' + token.endIndex + ' with scopes ' + token.scopes);
}
```

## Using asynchronously

Sometimes, it is necessary to manage the list of known grammars outside of `vscode-textmate`. The sample below shows how this works:

```javascript
var Registry = require('vscode-textmate').Registry;

var registry = new Registry({
	getFilePath: function (scopeName) {
		// Return here the path to the grammar file for `scopeName`
		if (scopeName === 'source.js') {
			return './javascript.tmbundle/Syntaxes/JavaScript.plist';
		}
		return null;
	}
});

// Load the JavaScript grammar and any other grammars included by it async.
registry.loadGrammar('source.js', function(err, grammar) {
	if (err) {
		console.error(err);
		return;
	}

	// at this point `grammar` is available...
});

```

## Tokenizing multiple lines

To tokenize multiple lines, you must pass in the previous returned `ruleStack`.

```javascript
var ruleStack = null;
for (var i = 0; i < lines.length; i++) {
	var r = grammar.tokenizeLine(lines[i], ruleStack);
	console.log('Line: #' + i + ', tokens: ' + r.tokens);
	ruleStack = r.ruleStack;
}
```

## API doc

See [the main.ts file](./src/main.ts)

## Developing

* Clone the repository
* Run `npm install`
* Compile in the background with `npm run watch`
* Run tests with `npm test`
* Run benchmark with `npm run benchmark`
* Troubleshoot a grammar with `npm run inspect -- PATH_TO_GRAMMAR PATH_TO_FILE`

## Code of Conduct

This project has adopted the [Microsoft Open Source Code of Conduct](https://opensource.microsoft.com/codeofconduct/). For more information see the [Code of Conduct FAQ](https://opensource.microsoft.com/codeofconduct/faq/) or contact [opencode@microsoft.com](mailto:opencode@microsoft.com) with any additional questions or comments.


## License
[MIT](https://github.com/Microsoft/vscode-textmate/blob/master/LICENSE.md)
npm package: @sourcegraph/vscode-ws-jsonrpc
Description: VSCode JSON RPC over WebSocket
Author: TypeFox GmbH
Latest version: 0.0.3-fork

# VSCode WebSocket JSON RPC
NPM module to implement communication between a jsonrpc client and server over WebSocket.

### Client side connection handling
```ts
import * as rpc from 'vscode-ws-jsonrpc';

const webSocket = new WebSocket('ws://www.example.com/socketserver');
rpc.listen({
    webSocket,
    onConnection: (connection: rpc.MessageConnection) => {
        const notification = new rpc.NotificationType<string, void>('testNotification');
        connection.listen();
        connection.sendNotification(notification, 'Hello World');
    }
});
```

### Server side connection handling
```ts
import * as rpc from 'vscode-ws-jsonrpc';

const socket: rpc.IWebSocket; // open the web socket
const reader = new rpc.WebSocketMessageReader(socket);
const writer = new rpc.WebSocketMessageWriter(socket);
const logger = new rpc.ConsoleLogger();
const connection = rpc.createMessageConnection(reader, writer, logger);
const notification = new rpc.NotificationType<string, void>('testNotification');
connection.onNotification(notification, (param: string) => {
	console.log(param); // This prints Hello World
});

connection.listen();
```

### Server side connection forwarding
```ts
import * as rpc from 'vscode-ws-jsonrpc';
import * as server from 'vscode-ws-jsonrpc/lib/server';

const socket: rpc.IWebSocket; // open the web socket
const reader = new rpc.WebSocketMessageReader(socket);
const writer = new rpc.WebSocketMessageWriter(socket);
const socketConnection = server.createConnection(reader, writer, () => socket.dispose())
const serverConnection = server.createServerProcess('Example', 'node', ['example.js']);
server.forward(socketConnection, serverConnection, message => {
    if (rpc.isNotificationMessage(message)) {
        if (message.method === 'testNotification') {
            // handle the test notification
        }
    }
    return message;
});
```

## License
[MIT](https://github.com/TypeFox/vscode-ws-jsonrpc/blob/master/License.txt)