Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

vscode-textmate

Package Overview
Dependencies
Maintainers
5
Versions
72
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

vscode-textmate - npm Package Compare versions

Comparing version 2.1.1 to 2.2.0

22

package.json
{
"name": "vscode-textmate",
"version": "2.1.1",
"version": "2.2.0",
"description": "VSCode TextMate grammar helpers",

@@ -9,2 +9,3 @@ "author": {

"main": "./release/main.js",
"typings": "./release/main.d.ts",
"repository": {

@@ -19,10 +20,12 @@ "type": "git",

"scripts": {
"watch": "gulp watch",
"compile": "gulp compile",
"watch": "tsc -watch",
"compile": "tsc",
"test": "mocha out/tests/tests",
"test-travis": "istanbul cover ./node_modules/mocha/bin/_mocha -- -R spec out/tests/tests",
"benchmark": "node benchmark/benchmark.js"
"benchmark": "node benchmark/benchmark.js",
"inspect": "node scripts/inspect.js",
"prepublish": "node scripts/release.js"
},
"dependencies": {
"fast-plist": "^0.1.0",
"fast-plist": "^0.1.2",
"oniguruma": "^6.0.1"

@@ -32,9 +35,8 @@ },

"coveralls": "^2.11.12",
"event-stream": "^3.3.1",
"gulp": "^3.9.0",
"gulp-concat": "^2.6.0",
"gulp-typescript": "^2.8.2",
"istanbul": "^0.4.4",
"mocha": "^3.0.2"
"mocha": "^3.0.2",
"remap-istanbul": "^0.6.4",
"typescript": "^1.8.10",
"typings": "^1.3.2"
}
}

@@ -69,3 +69,3 @@ # 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)

See [the .d.ts file](./src/typings/main.d.ts)
See [the main.ts file](./src/main.ts)

@@ -79,5 +79,11 @@ ## Developing

* 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)

@@ -1,5 +0,1 @@

/*---------------------------------------------------------
* Copyright (C) Microsoft Corporation. All rights reserved.
*--------------------------------------------------------*/
/**

@@ -9,36 +5,31 @@ * A registry helper that can locate grammar file paths given scope names.

export interface IGrammarLocator {
getFilePath(scopeName:string): string;
getInjections?(scopeName:string): string[];
getFilePath(scopeName: string): string;
getInjections?(scopeName: string): string[];
}
/**
* The registry that will hold all grammars.
*/
export class Registry {
constructor(locator?:IGrammarLocator);
/**
* Load the grammar for `scopeName` and all referenced included grammars asynchronously.
*/
public loadGrammar(scopeName:string, callback:(err:any, grammar:IGrammar)=>void): void;
/**
* Load the grammar at `path` synchronously.
*/
public loadGrammarFromPathSync(path:string): IGrammar;
/**
* Get the grammar for `scopeName`. The grammar must first be created via `loadGrammar` or `loadGrammarFromPathSync`.
*/
public grammarForScopeName(scopeName:string): IGrammar;
export declare class Registry {
private _locator;
private _syncRegistry;
constructor(locator?: IGrammarLocator);
/**
* Load the grammar for `scopeName` and all referenced included grammars asynchronously.
*/
loadGrammar(initialScopeName: string, callback: (err: any, grammar: IGrammar) => void): void;
/**
* Load the grammar at `path` synchronously.
*/
loadGrammarFromPathSync(path: string): IGrammar;
/**
* Get the grammar for `scopeName`. The grammar must first be created via `loadGrammar` or `loadGrammarFromPathSync`.
*/
grammarForScopeName(scopeName: string): IGrammar;
}
export interface IGrammarInfo {
fileTypes: string[];
name: string;
scopeName: string;
firstLineMatch: string;
fileTypes: string[];
name: string;
scopeName: string;
firstLineMatch: string;
}
/**

@@ -48,29 +39,26 @@ * A grammar

export interface IGrammar {
/**
* Tokenize `lineText` using previous line state `prevState`.
*/
tokenizeLine(lineText: string, prevState: StackElement): ITokenizeLineResult;
/**
* Tokenize `lineText` using previous line state `prevState`.
*/
tokenizeLine(lineText: string, prevState: StackElement): ITokenizeLineResult;
}
export interface ITokenizeLineResult {
tokens: IToken[];
/**
* The `prevState` to be passed on to the next line tokenization.
*/
ruleStack: StackElement;
tokens: IToken[];
/**
* The `prevState` to be passed on to the next line tokenization.
*/
ruleStack: StackElement;
}
export interface IToken {
startIndex: number;
endIndex: number;
scopes: string[];
startIndex: number;
endIndex: number;
scopes: string[];
}
/**
* Should not be used by consumers, as its shape might change at any time.
* **IMPORTANT** - Immutable!
*/
export interface StackElement {
_stackElementBrand: void;
equals(other:StackElement): boolean;
_parent: StackElement;
_stackElementBrand: void;
equals(other: StackElement): boolean;
}

Sorry, the diff of this file is too big to display

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc