-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #2 from adamvoss/npmPublishing
Configure for publication on NPM
- Loading branch information
Showing
31 changed files
with
562 additions
and
46 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,3 @@ | ||
lib/ | ||
/lib/ | ||
node_modules/ | ||
package-lock.json |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,22 @@ | ||
language: node_js | ||
dist: trusty | ||
sudo: false | ||
|
||
node_js: | ||
- "6" | ||
|
||
before_install: | ||
- ./npminstall.sh | ||
- '6' | ||
- '7' | ||
- '8' | ||
deploy: | ||
- provider: npm | ||
skip_cleanup: true | ||
email: [email protected] | ||
api_key: | ||
secure: >- | ||
sNO19+NGAmQncPhRP9LA59Q7TnvBmJ+aHxaNXaLFUnwVy1O4HWOeH4B0cqaaNOOpuknAEhtuU1p5E9XpehHHgW18XdTdiHuE81uOFQP1CDgEC8EKidOM85CsTlEyN8J9bF+dVwoCnyttPjk0Gg3Ohm9A6apBvn6TDJSAehM7Z03M2Py65o4svvViBA8q2tV5P1Jyl6NT7E/1YRWpYV+GnB2zpWsodk3Vu/ZoMFFjKVjxsl+Z5OxfkVb/+AW6fxSHRJjN7/qFy8ycQfz2gU/iMNxF6nD5tsQWHQf8uRTrRWkDrDpFiU6LC67QwA2eVRoS/DZYTSvUi+0Y45ZD8lomNsXq3FekpbcKv8OGcv+G2UKGO3C57wd9keqqFyEFYHfBAoiO292yjGkWqo0I4E8cFYnKE8Wz/NLGW4uRAcOMyi6vfCWhNaQgUsS4xMNjgsrlapXjtw94ql+fIqQX8MKmT2R3gpt0BbMK2y4czE0gjAtMUbkZc7JEpzCR7JPkXHrKCCM56QJgHpaEbgFQTTZOkyEfxAFUyM6JxJ/wyN1u3s+TDhEQH4aIykCTcd3LeJcBQF5AMRUqRBxa+tpV+P9YYww4UayTQdSJjWzmO9DRaNTeanv0B0xJUOKjNk6V7xKUPixKcwlSDGr2Ve7UW2CQhw+gqKrWTT2s+DaxfWm4+BY= | ||
on: | ||
tags: true | ||
- provider: releases | ||
api_key: | ||
secure: >- | ||
hjSix3LS2pLuV1OOlgEQZt1GDKPLh/8gu81RkPXKfzTR6mWmBdSfPM0UMO+eUPYSTMFuUj1xNAFKwBu1HOKE6bfYtpMoYHGH+t7MDOUB8hgbdgVeBC+rxXYM8fyrGCkxIGyZVZpmMCKHrmH2t/PelMMZdD/2shcCPFPUvlPN3t61nS+UB8PCHQVUCkw+29ET7pB0iJW948aPbgFcf1glaXSLvj0fqbvrHmgW9x/1HqVO/TbdrK2WGa9nw8LCq5OOR3kkWn2HvdiamNV1EOBHQ94YfE399xLhg7m3V7JIQsLpXNPQJy/mKb1saFzIVh2dsY+5Iq+SW3iM/R47VYE4VOaFHdccEK4KrUCSKgLkaucfZd08s1/YeFp3774xTTpFhcZZyhhi+//MT3qfGS20ZGPiVDKRZKi2YTw72grhJ8dOuHlz3clUeNJvfkwCImlfYxFuINiBMFCJ9D8w+5cu+SW/bJLC7WKy73YAl0np4sLKuqGl0OvxXX0lBUHKKl9XLk81isIMJyYkL+XU6A4fcer1zgnSV50zG5rtqLLd8BJ4rR7+gQKLXDWs7+PexvOpS54Y3ZCv0O5EAjNzDdQ3whJslgcyi/AVfHGSWWf6AthTcO5hddd8Rc8jnyO834gJhEBNtCZZrgqSZWGY2POMEKabXrt5lVFKD7u721kZSsE= | ||
on: | ||
tags: true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,5 @@ | ||
import "mocha"; | ||
|
||
import assert = require('assert'); | ||
|
||
import * as calc from '../documentPositionCalculator' | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
--ui tdd | ||
--useColors true | ||
./lib/src/test | ||
./lib/test |
17 changes: 17 additions & 0 deletions
17
types/vscode-json-languageservice/lib/jsonContributions.d.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
import { Thenable, MarkedString, CompletionItem } from './jsonLanguageService'; | ||
export interface JSONWorkerContribution { | ||
getInfoContribution(uri: string, location: JSONPath): Thenable<MarkedString[]>; | ||
collectPropertyCompletions(uri: string, location: JSONPath, currentWord: string, addValue: boolean, isLast: boolean, result: CompletionsCollector): Thenable<any>; | ||
collectValueCompletions(uri: string, location: JSONPath, propertyKey: string, result: CompletionsCollector): Thenable<any>; | ||
collectDefaultCompletions(uri: string, result: CompletionsCollector): Thenable<any>; | ||
resolveCompletion?(item: CompletionItem): Thenable<CompletionItem>; | ||
} | ||
export declare type Segment = string | number; | ||
export declare type JSONPath = Segment[]; | ||
export interface CompletionsCollector { | ||
add(suggestion: CompletionItem): void; | ||
error(message: string): void; | ||
log(message: string): void; | ||
setAsIncomplete(): void; | ||
getNumberOfProposals(): number; | ||
} |
115 changes: 115 additions & 0 deletions
115
types/vscode-json-languageservice/lib/jsonLanguageService.d.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,115 @@ | ||
import { TextDocument, Position, CompletionItem, CompletionList, Hover, Range, SymbolInformation, Diagnostic, TextEdit, FormattingOptions, MarkedString } from 'vscode-languageserver-types'; | ||
import { JSONSchema } from './jsonSchema'; | ||
import { JSONWorkerContribution, JSONPath, Segment, CompletionsCollector } from './jsonContributions'; | ||
export declare type JSONDocument = {}; | ||
export { JSONSchema, JSONWorkerContribution, JSONPath, Segment, CompletionsCollector }; | ||
export { TextDocument, Position, CompletionItem, CompletionList, Hover, Range, SymbolInformation, Diagnostic, TextEdit, FormattingOptions, MarkedString }; | ||
export interface LanguageService { | ||
configure(settings: LanguageSettings): void; | ||
doValidation(document: TextDocument, jsonDocument: JSONDocument): Thenable<Diagnostic[]>; | ||
parseJSONDocument(document: TextDocument): JSONDocument; | ||
resetSchema(uri: string): boolean; | ||
doResolve(item: CompletionItem): Thenable<CompletionItem>; | ||
doComplete(document: TextDocument, position: Position, doc: JSONDocument): Thenable<CompletionList>; | ||
findDocumentSymbols(document: TextDocument, doc: JSONDocument): SymbolInformation[]; | ||
findColorSymbols(document: TextDocument, doc: JSONDocument): Thenable<Range[]>; | ||
doHover(document: TextDocument, position: Position, doc: JSONDocument): Thenable<Hover>; | ||
format(document: TextDocument, range: Range, options: FormattingOptions): TextEdit[]; | ||
} | ||
export interface LanguageSettings { | ||
/** | ||
* If set, the validator will return syntax errors. | ||
*/ | ||
validate?: boolean; | ||
/** | ||
* If set, comments are toleranted. If not set, a syntax error is emmited for comments. | ||
*/ | ||
allowComments?: boolean; | ||
/** | ||
* A list of known schemas and/or associations of schemas to file names. | ||
*/ | ||
schemas?: SchemaConfiguration[]; | ||
} | ||
export interface SchemaConfiguration { | ||
/** | ||
* The URI of the schema, which is also the identifier of the schema. | ||
*/ | ||
uri: string; | ||
/** | ||
* A list of file names that are associated to the schema. The '*' wildcard can be used. For example '*.schema.json', 'package.json' | ||
*/ | ||
fileMatch?: string[]; | ||
/** | ||
* The schema for the given URI. | ||
* If no schema is provided, the schema will be fetched with the schema request service (if available). | ||
*/ | ||
schema?: JSONSchema; | ||
} | ||
export interface WorkspaceContextService { | ||
resolveRelativePath(relativePath: string, resource: string): string; | ||
} | ||
/** | ||
* The schema request service is used to fetch schemas. The result should the schema file comment, or, | ||
* in case of an error, a displayable error string | ||
*/ | ||
export interface SchemaRequestService { | ||
(uri: string): Thenable<string>; | ||
} | ||
export interface PromiseConstructor { | ||
/** | ||
* Creates a new Promise. | ||
* @param executor A callback used to initialize the promise. This callback is passed two arguments: | ||
* a resolve callback used resolve the promise with a value or the result of another promise, | ||
* and a reject callback used to reject the promise with a provided reason or error. | ||
*/ | ||
new <T>(executor: (resolve: (value?: T | Thenable<T>) => void, reject: (reason?: any) => void) => void): Thenable<T>; | ||
/** | ||
* Creates a Promise that is resolved with an array of results when all of the provided Promises | ||
* resolve, or rejected when any Promise is rejected. | ||
* @param values An array of Promises. | ||
* @returns A new Promise. | ||
*/ | ||
all<T>(values: Array<T | Thenable<T>>): Thenable<T[]>; | ||
/** | ||
* Creates a new rejected promise for the provided reason. | ||
* @param reason The reason the promise was rejected. | ||
* @returns A new rejected Promise. | ||
*/ | ||
reject<T>(reason: any): Thenable<T>; | ||
/** | ||
* Creates a new resolved promise for the provided value. | ||
* @param value A promise. | ||
* @returns A promise whose internal state matches the provided promise. | ||
*/ | ||
resolve<T>(value: T | Thenable<T>): Thenable<T>; | ||
} | ||
export interface Thenable<R> { | ||
/** | ||
* Attaches callbacks for the resolution and/or rejection of the Promise. | ||
* @param onfulfilled The callback to execute when the Promise is resolved. | ||
* @param onrejected The callback to execute when the Promise is rejected. | ||
* @returns A Promise for the completion of which ever callback is executed. | ||
*/ | ||
then<TResult>(onfulfilled?: (value: R) => TResult | Thenable<TResult>, onrejected?: (reason: any) => TResult | Thenable<TResult>): Thenable<TResult>; | ||
then<TResult>(onfulfilled?: (value: R) => TResult | Thenable<TResult>, onrejected?: (reason: any) => void): Thenable<TResult>; | ||
} | ||
export interface LanguageServiceParams { | ||
/** | ||
* The schema request service is used to fetch schemas. The result should the schema file comment, or, | ||
* in case of an error, a displayable error string | ||
*/ | ||
schemaRequestService?: SchemaRequestService; | ||
/** | ||
* The workspace context is used to resolve relative paths for relative schema references. | ||
*/ | ||
workspaceContext?: WorkspaceContextService; | ||
/** | ||
* An optional set of completion and hover participants. | ||
*/ | ||
contributions?: JSONWorkerContribution[]; | ||
/** | ||
* A promise constructor. If not set, the ES5 Promise will be used. | ||
*/ | ||
promiseConstructor?: PromiseConstructor; | ||
} | ||
export declare function getLanguageService(params: LanguageServiceParams): LanguageService; |
Oops, something went wrong.