first-mate
Advanced tools
Comparing version 2.0.4 to 2.0.5
447
api.json
@@ -6,3 +6,3 @@ { | ||
"filename": "src/grammar-registry.coffee", | ||
"srcUrl": "https://github.com/atom/first-mate/blob/v2.0.4/src/grammar-registry.coffee#L25", | ||
"srcUrl": "https://github.com/atom/first-mate/blob/v2.0.5/src/grammar-registry.coffee#L25", | ||
"sections": [], | ||
@@ -14,3 +14,3 @@ "classMethods": [], | ||
"sectionName": null, | ||
"srcUrl": "https://github.com/atom/first-mate/blob/v2.0.4/src/grammar-registry.coffee#L40", | ||
"srcUrl": "https://github.com/atom/first-mate/blob/v2.0.5/src/grammar-registry.coffee#L40", | ||
"visibility": "Public", | ||
@@ -29,16 +29,14 @@ "summary": "Get all the grammars in this registry.", | ||
"sectionName": null, | ||
"srcUrl": "https://github.com/atom/first-mate/blob/v2.0.4/src/grammar-registry.coffee#L48", | ||
"srcUrl": "https://github.com/atom/first-mate/blob/v2.0.5/src/grammar-registry.coffee#L48", | ||
"visibility": "Public", | ||
"summary": "Get a grammar with the given scope name.", | ||
"description": "Get a grammar with the given scope name.", | ||
"arguments": { | ||
"description": "", | ||
"list": [ | ||
{ | ||
"name": "scopeName", | ||
"description": "A {String} such as `\"source.js\"`.", | ||
"type": "String" | ||
} | ||
] | ||
}, | ||
"arguments": [ | ||
{ | ||
"name": "scopeName", | ||
"description": "A {String} such as `\"source.js\"`.", | ||
"type": "String", | ||
"isOptional": false | ||
} | ||
], | ||
"returnValues": [ | ||
@@ -54,16 +52,14 @@ { | ||
"sectionName": null, | ||
"srcUrl": "https://github.com/atom/first-mate/blob/v2.0.4/src/grammar-registry.coffee#L56", | ||
"srcUrl": "https://github.com/atom/first-mate/blob/v2.0.5/src/grammar-registry.coffee#L56", | ||
"visibility": "Public", | ||
"summary": "Remove a grammar from this registry.", | ||
"description": "Remove a grammar from this registry.", | ||
"arguments": { | ||
"description": "", | ||
"list": [ | ||
{ | ||
"name": "grammar", | ||
"description": "The {Grammar} to remove.", | ||
"type": "Grammar" | ||
} | ||
] | ||
}, | ||
"arguments": [ | ||
{ | ||
"name": "grammar", | ||
"description": "The {Grammar} to remove.", | ||
"type": "Grammar", | ||
"isOptional": false | ||
} | ||
], | ||
"returnValues": [ | ||
@@ -79,16 +75,14 @@ { | ||
"sectionName": null, | ||
"srcUrl": "https://github.com/atom/first-mate/blob/v2.0.4/src/grammar-registry.coffee#L68", | ||
"srcUrl": "https://github.com/atom/first-mate/blob/v2.0.5/src/grammar-registry.coffee#L68", | ||
"visibility": "Public", | ||
"summary": "Remove the grammar with the given scope name.", | ||
"description": "Remove the grammar with the given scope name.", | ||
"arguments": { | ||
"description": "", | ||
"list": [ | ||
{ | ||
"name": "scopeName", | ||
"description": "A {String} such as `\"source.js\"`.", | ||
"type": "String" | ||
} | ||
] | ||
}, | ||
"arguments": [ | ||
{ | ||
"name": "scopeName", | ||
"description": "A {String} such as `\"source.js\"`.", | ||
"type": "String", | ||
"isOptional": false | ||
} | ||
], | ||
"returnValues": [ | ||
@@ -104,16 +98,14 @@ { | ||
"sectionName": null, | ||
"srcUrl": "https://github.com/atom/first-mate/blob/v2.0.4/src/grammar-registry.coffee#L79", | ||
"srcUrl": "https://github.com/atom/first-mate/blob/v2.0.5/src/grammar-registry.coffee#L79", | ||
"visibility": "Public", | ||
"summary": "Add a grammar to this registry.", | ||
"description": "Add a grammar to this registry.\n\nA 'grammar-added' event is emitted after the grammar is added.", | ||
"arguments": { | ||
"description": "", | ||
"list": [ | ||
{ | ||
"name": "grammar", | ||
"description": "The {Grammar} to add. This should be a value previously returned \n```\n from {::readGrammar} or {::readGrammarSync}. \n```", | ||
"type": "Grammar" | ||
} | ||
] | ||
} | ||
"arguments": [ | ||
{ | ||
"name": "grammar", | ||
"description": "The {Grammar} to add. This should be a value previously returned from {::readGrammar} or {::readGrammarSync}. ", | ||
"type": "Grammar", | ||
"isOptional": false | ||
} | ||
] | ||
}, | ||
@@ -123,16 +115,14 @@ { | ||
"sectionName": null, | ||
"srcUrl": "https://github.com/atom/first-mate/blob/v2.0.4/src/grammar-registry.coffee#L91", | ||
"srcUrl": "https://github.com/atom/first-mate/blob/v2.0.5/src/grammar-registry.coffee#L91", | ||
"visibility": "Public", | ||
"summary": "Read a grammar synchronously but don't add it to the registry.", | ||
"description": "Read a grammar synchronously but don't add it to the registry.", | ||
"arguments": { | ||
"description": "", | ||
"list": [ | ||
{ | ||
"name": "grammarPath", | ||
"description": "A {String} absolute file path to a grammar file.", | ||
"type": "String" | ||
} | ||
] | ||
}, | ||
"arguments": [ | ||
{ | ||
"name": "grammarPath", | ||
"description": "A {String} absolute file path to a grammar file.", | ||
"type": "String", | ||
"isOptional": false | ||
} | ||
], | ||
"returnValues": [ | ||
@@ -148,33 +138,34 @@ { | ||
"sectionName": null, | ||
"srcUrl": "https://github.com/atom/first-mate/blob/v2.0.4/src/grammar-registry.coffee#L106", | ||
"srcUrl": "https://github.com/atom/first-mate/blob/v2.0.5/src/grammar-registry.coffee#L106", | ||
"visibility": "Public", | ||
"summary": "Read a grammar asynchronously but don't add it to the registry.", | ||
"description": "Read a grammar asynchronously but don't add it to the registry.", | ||
"arguments": { | ||
"description": "", | ||
"list": [ | ||
{ | ||
"name": "grammarPath", | ||
"description": "A {String} absolute file path to a grammar file.", | ||
"type": "String" | ||
}, | ||
{ | ||
"children": [ | ||
{ | ||
"name": "error", | ||
"description": "An {Error}, may be null.", | ||
"type": "Error" | ||
}, | ||
{ | ||
"name": "grammar", | ||
"description": "A {Grammar} or null if an error occured.", | ||
"type": "Grammar" | ||
} | ||
], | ||
"name": "callback", | ||
"description": "A {Function} to call when read with the following arguments:", | ||
"type": "Function" | ||
} | ||
] | ||
}, | ||
"arguments": [ | ||
{ | ||
"name": "grammarPath", | ||
"description": "A {String} absolute file path to a grammar file.", | ||
"type": "String", | ||
"isOptional": false | ||
}, | ||
{ | ||
"children": [ | ||
{ | ||
"name": "error", | ||
"description": "An {Error}, may be null.", | ||
"type": "Error", | ||
"isOptional": false | ||
}, | ||
{ | ||
"name": "grammar", | ||
"description": "A {Grammar} or null if an error occured.", | ||
"type": "Grammar", | ||
"isOptional": false | ||
} | ||
], | ||
"name": "callback", | ||
"description": "A {Function} to call when read with the following arguments:", | ||
"type": "Function", | ||
"isOptional": false | ||
} | ||
], | ||
"returnValues": [ | ||
@@ -190,16 +181,14 @@ { | ||
"sectionName": null, | ||
"srcUrl": "https://github.com/atom/first-mate/blob/v2.0.4/src/grammar-registry.coffee#L123", | ||
"srcUrl": "https://github.com/atom/first-mate/blob/v2.0.5/src/grammar-registry.coffee#L123", | ||
"visibility": "Public", | ||
"summary": "Read a grammar synchronously and add it to this registry.", | ||
"description": "Read a grammar synchronously and add it to this registry.", | ||
"arguments": { | ||
"description": "", | ||
"list": [ | ||
{ | ||
"name": "grammarPath", | ||
"description": "A {String} absolute file path to a grammar file.", | ||
"type": "String" | ||
} | ||
] | ||
}, | ||
"arguments": [ | ||
{ | ||
"name": "grammarPath", | ||
"description": "A {String} absolute file path to a grammar file.", | ||
"type": "String", | ||
"isOptional": false | ||
} | ||
], | ||
"returnValues": [ | ||
@@ -215,33 +204,34 @@ { | ||
"sectionName": null, | ||
"srcUrl": "https://github.com/atom/first-mate/blob/v2.0.4/src/grammar-registry.coffee#L136", | ||
"srcUrl": "https://github.com/atom/first-mate/blob/v2.0.5/src/grammar-registry.coffee#L136", | ||
"visibility": "Public", | ||
"summary": "Read a grammar asynchronously and add it to the registry.", | ||
"description": "Read a grammar asynchronously and add it to the registry.", | ||
"arguments": { | ||
"description": "", | ||
"list": [ | ||
{ | ||
"name": "grammarPath", | ||
"description": "A {String} absolute file path to a grammar file.", | ||
"type": "String" | ||
}, | ||
{ | ||
"children": [ | ||
{ | ||
"name": "error", | ||
"description": "An {Error}, may be null.", | ||
"type": "Error" | ||
}, | ||
{ | ||
"name": "grammar", | ||
"description": "A {Grammar} or null if an error occured.", | ||
"type": "Grammar" | ||
} | ||
], | ||
"name": "callback", | ||
"description": "A {Function} to call when loaded with the following arguments:", | ||
"type": "Function" | ||
} | ||
] | ||
}, | ||
"arguments": [ | ||
{ | ||
"name": "grammarPath", | ||
"description": "A {String} absolute file path to a grammar file.", | ||
"type": "String", | ||
"isOptional": false | ||
}, | ||
{ | ||
"children": [ | ||
{ | ||
"name": "error", | ||
"description": "An {Error}, may be null.", | ||
"type": "Error", | ||
"isOptional": false | ||
}, | ||
{ | ||
"name": "grammar", | ||
"description": "A {Grammar} or null if an error occured.", | ||
"type": "Grammar", | ||
"isOptional": false | ||
} | ||
], | ||
"name": "callback", | ||
"description": "A {Function} to call when loaded with the following arguments:", | ||
"type": "Function", | ||
"isOptional": false | ||
} | ||
], | ||
"returnValues": [ | ||
@@ -257,16 +247,14 @@ { | ||
"sectionName": null, | ||
"srcUrl": "https://github.com/atom/first-mate/blob/v2.0.4/src/grammar-registry.coffee#L151", | ||
"srcUrl": "https://github.com/atom/first-mate/blob/v2.0.5/src/grammar-registry.coffee#L151", | ||
"visibility": "Public", | ||
"summary": "Get the grammar override for the given file path.", | ||
"description": "Get the grammar override for the given file path.", | ||
"arguments": { | ||
"description": "", | ||
"list": [ | ||
{ | ||
"name": "filePath", | ||
"description": "A {String} file path.", | ||
"type": "String" | ||
} | ||
] | ||
}, | ||
"arguments": [ | ||
{ | ||
"name": "filePath", | ||
"description": "A {String} file path.", | ||
"type": "String", | ||
"isOptional": false | ||
} | ||
], | ||
"returnValues": [ | ||
@@ -282,21 +270,20 @@ { | ||
"sectionName": null, | ||
"srcUrl": "https://github.com/atom/first-mate/blob/v2.0.4/src/grammar-registry.coffee#L160", | ||
"srcUrl": "https://github.com/atom/first-mate/blob/v2.0.5/src/grammar-registry.coffee#L160", | ||
"visibility": "Public", | ||
"summary": "Set the grammar override for the given file path.", | ||
"description": "Set the grammar override for the given file path.", | ||
"arguments": { | ||
"description": "", | ||
"list": [ | ||
{ | ||
"name": "filePath", | ||
"description": "A non-empty {String} file path.", | ||
"type": "String" | ||
}, | ||
{ | ||
"name": "scopeName", | ||
"description": "A {String} such as `\"source.js\"`.", | ||
"type": "String" | ||
} | ||
] | ||
}, | ||
"arguments": [ | ||
{ | ||
"name": "filePath", | ||
"description": "A non-empty {String} file path.", | ||
"type": "String", | ||
"isOptional": false | ||
}, | ||
{ | ||
"name": "scopeName", | ||
"description": "A {String} such as `\"source.js\"`.", | ||
"type": "String", | ||
"isOptional": false | ||
} | ||
], | ||
"returnValues": [ | ||
@@ -312,16 +299,14 @@ { | ||
"sectionName": null, | ||
"srcUrl": "https://github.com/atom/first-mate/blob/v2.0.4/src/grammar-registry.coffee#L169", | ||
"srcUrl": "https://github.com/atom/first-mate/blob/v2.0.5/src/grammar-registry.coffee#L169", | ||
"visibility": "Public", | ||
"summary": "Remove the grammar override for the given file path.", | ||
"description": "Remove the grammar override for the given file path.", | ||
"arguments": { | ||
"description": "", | ||
"list": [ | ||
{ | ||
"name": "filePath", | ||
"description": "A {String} file path.", | ||
"type": "String" | ||
} | ||
] | ||
}, | ||
"arguments": [ | ||
{ | ||
"name": "filePath", | ||
"description": "A {String} file path.", | ||
"type": "String", | ||
"isOptional": false | ||
} | ||
], | ||
"returnValues": [ | ||
@@ -337,3 +322,3 @@ { | ||
"sectionName": null, | ||
"srcUrl": "https://github.com/atom/first-mate/blob/v2.0.4/src/grammar-registry.coffee#L176", | ||
"srcUrl": "https://github.com/atom/first-mate/blob/v2.0.5/src/grammar-registry.coffee#L176", | ||
"visibility": "Public", | ||
@@ -352,21 +337,20 @@ "summary": "Remove all grammar overrides.", | ||
"sectionName": null, | ||
"srcUrl": "https://github.com/atom/first-mate/blob/v2.0.4/src/grammar-registry.coffee#L189", | ||
"srcUrl": "https://github.com/atom/first-mate/blob/v2.0.5/src/grammar-registry.coffee#L189", | ||
"visibility": "Public", | ||
"summary": "Select a grammar for the given file path and file contents.", | ||
"description": "Select a grammar for the given file path and file contents.\n\nThis picks the best match by checking the file path and contents against\neach grammar.", | ||
"arguments": { | ||
"description": "", | ||
"list": [ | ||
{ | ||
"name": "filePath", | ||
"description": "A {String} file path.", | ||
"type": "String" | ||
}, | ||
{ | ||
"name": "fileContents", | ||
"description": "A {String} of text for the file path.", | ||
"type": "String" | ||
} | ||
] | ||
}, | ||
"arguments": [ | ||
{ | ||
"name": "filePath", | ||
"description": "A {String} file path.", | ||
"type": "String", | ||
"isOptional": false | ||
}, | ||
{ | ||
"name": "fileContents", | ||
"description": "A {String} of text for the file path.", | ||
"type": "String", | ||
"isOptional": false | ||
} | ||
], | ||
"returnValues": [ | ||
@@ -380,15 +364,37 @@ { | ||
], | ||
"classProperties": [], | ||
"instanceProperties": [], | ||
"visibility": "Public", | ||
"summary": "Registry containing one or more grammars.", | ||
"description": "Registry containing one or more grammars.", | ||
"events": { | ||
"description": "### grammar-added\n\nFired when a grammar has been added to the registry.", | ||
"list": [ | ||
{ | ||
"name": "grammar", | ||
"description": "The {Grammar} that was added.", | ||
"type": "Grammar" | ||
} | ||
] | ||
} | ||
"events": [ | ||
{ | ||
"name": "grammar-added", | ||
"summary": "Fired when a grammar has been added to the registry.", | ||
"description": "Fired when a grammar has been added to the registry.", | ||
"visibility": "Private", | ||
"arguments": [ | ||
{ | ||
"name": "grammar", | ||
"description": "The {Grammar} that was added.", | ||
"type": "Grammar", | ||
"isOptional": false | ||
} | ||
] | ||
}, | ||
{ | ||
"name": "grammar-updated", | ||
"summary": "Fired whenever a grammar has been updated due to a grammar it depends on\nbeing added to or removed from the registry.", | ||
"description": "Fired whenever a grammar has been updated due to a grammar it depends on\nbeing added to or removed from the registry.", | ||
"visibility": "Private", | ||
"arguments": [ | ||
{ | ||
"name": "grammar", | ||
"description": "The {Grammar} that was updated. ", | ||
"type": "Grammar", | ||
"isOptional": false | ||
} | ||
] | ||
} | ||
] | ||
}, | ||
@@ -398,3 +404,3 @@ "Grammar": { | ||
"filename": "src/grammar.coffee", | ||
"srcUrl": "https://github.com/atom/first-mate/blob/v2.0.4/src/grammar.coffee#L20", | ||
"srcUrl": "https://github.com/atom/first-mate/blob/v2.0.5/src/grammar.coffee#L20", | ||
"sections": [], | ||
@@ -406,16 +412,14 @@ "classMethods": [], | ||
"sectionName": null, | ||
"srcUrl": "https://github.com/atom/first-mate/blob/v2.0.4/src/grammar.coffee#L52", | ||
"srcUrl": "https://github.com/atom/first-mate/blob/v2.0.5/src/grammar.coffee#L52", | ||
"visibility": "Public", | ||
"summary": "Tokenize all lines in the given text.", | ||
"description": "Tokenize all lines in the given text.", | ||
"arguments": { | ||
"description": "", | ||
"list": [ | ||
{ | ||
"name": "text", | ||
"description": "A {String} containing one or more lines.", | ||
"type": "String" | ||
} | ||
] | ||
}, | ||
"arguments": [ | ||
{ | ||
"name": "text", | ||
"description": "A {String} containing one or more lines.", | ||
"type": "String", | ||
"isOptional": false | ||
} | ||
], | ||
"returnValues": [ | ||
@@ -431,25 +435,30 @@ { | ||
"sectionName": null, | ||
"srcUrl": "https://github.com/atom/first-mate/blob/v2.0.4/src/grammar.coffee#L74", | ||
"srcUrl": "https://github.com/atom/first-mate/blob/v2.0.5/src/grammar.coffee#L73", | ||
"visibility": "Public", | ||
"summary": "Tokenize the line of text.", | ||
"description": "Tokenize the line of text.", | ||
"arguments": { | ||
"description": "", | ||
"list": [ | ||
{ | ||
"name": "token", | ||
"description": "An {Array} of tokens covering the entire line of text.", | ||
"type": "Array" | ||
}, | ||
{ | ||
"name": "ruleStack", | ||
"description": "An {Array} of rules representing the tokenized state at the \n```\n end of the line. These should be passed back into this\n method when tokenizing the next line in the file. \n```", | ||
"type": "Array" | ||
} | ||
] | ||
}, | ||
"arguments": [ | ||
{ | ||
"name": "line", | ||
"description": "A {String} of text to tokenize.", | ||
"type": "String", | ||
"isOptional": false | ||
}, | ||
{ | ||
"name": "ruleStack", | ||
"description": "An optional {Array} of rules previously returned from this method. This should be null when tokenizing the first line in the file.", | ||
"type": "Array", | ||
"isOptional": false | ||
}, | ||
{ | ||
"name": "firstLine", | ||
"description": "A optional {Boolean} denoting whether this is the first line in the file which defaults to `false`. This should be `true` when tokenizing the first line in the file.", | ||
"type": "Boolean", | ||
"isOptional": false | ||
} | ||
], | ||
"returnValues": [ | ||
{ | ||
"type": "Object", | ||
"description": "Returns an {Object} containing the following properties:" | ||
"description": "Returns an {Object} containing the following properties:\n\n* `token` An {Array} of tokens covering the entire line of text.\n* `ruleStack` An {Array} of rules representing the tokenized state at the\n end of the line. These should be passed back into this method when\n tokenizing the next line in the file." | ||
} | ||
@@ -459,2 +468,4 @@ ] | ||
], | ||
"classProperties": [], | ||
"instanceProperties": [], | ||
"visibility": "Public", | ||
@@ -461,0 +472,0 @@ "summary": "Grammar that tokenizes lines of text.", |
{ | ||
"name": "first-mate", | ||
"version": "2.0.4", | ||
"version": "2.0.5", | ||
"description": "TextMate helpers", | ||
@@ -42,4 +42,4 @@ "main": "./lib/first-mate.js", | ||
"grunt-peg": "~1.1.0", | ||
"grunt-atomdoc": "^0.2.0" | ||
"grunt-atomdoc": "^1.0.0" | ||
} | ||
} |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
638950
16107
1