Vscode merge (#4582)

* Merge from vscode 37cb23d3dd4f9433d56d4ba5ea3203580719a0bd

* fix issues with merges

* bump node version in azpipe

* replace license headers

* remove duplicate launch task

* fix build errors

* fix build errors

* fix tslint issues

* working through package and linux build issues

* more work

* wip

* fix packaged builds

* working through linux build errors

* wip

* wip

* wip

* fix mac and linux file limits

* iterate linux pipeline

* disable editor typing

* revert series to parallel

* remove optimize vscode from linux

* fix linting issues

* revert testing change

* add work round for new node

* readd packaging for extensions

* fix issue with angular not resolving decorator dependencies
This commit is contained in:
Anthony Dresser
2019-03-19 17:44:35 -07:00
committed by GitHub
parent 833d197412
commit 87765e8673
1879 changed files with 54505 additions and 38058 deletions

View File

@@ -16,49 +16,129 @@
declare module 'vscode' {
//#region Joh - selection range provider
//#region Alex - resolvers
export class SelectionRangeKind {
export class ResolvedAuthority {
readonly host: string;
readonly port: number;
debugListenPort?: number;
debugConnectPort?: number;
/**
* Empty Kind.
*/
static readonly Empty: SelectionRangeKind;
/**
* The statement kind, its value is `statement`, possible extensions can be
* `statement.if` etc
*/
static readonly Statement: SelectionRangeKind;
/**
* The declaration kind, its value is `declaration`, possible extensions can be
* `declaration.function`, `declaration.class` etc.
*/
static readonly Declaration: SelectionRangeKind;
readonly value: string;
private constructor(value: string);
append(value: string): SelectionRangeKind;
constructor(host: string, port: number);
}
export class SelectionRange {
kind: SelectionRangeKind;
export interface RemoteAuthorityResolver {
resolve(authority: string): ResolvedAuthority | Thenable<ResolvedAuthority>;
}
export interface ResourceLabelFormatter {
scheme: string;
authority?: string;
formatting: ResourceLabelFormatting;
}
export interface ResourceLabelFormatting {
label: string; // myLabel:/${path}
separator: '/' | '\\' | '';
tildify?: boolean;
normalizeDriveLetter?: boolean;
workspaceSuffix?: string;
authorityPrefix?: string;
}
export namespace workspace {
export function registerRemoteAuthorityResolver(authorityPrefix: string, resolver: RemoteAuthorityResolver): Disposable;
export function registerResourceLabelFormatter(formatter: ResourceLabelFormatter): Disposable;
}
//#endregion
// #region Joh - code insets
/**
*/
export class CodeInset {
range: Range;
constructor(range: Range, kind: SelectionRangeKind);
height?: number;
constructor(range: Range, height?: number);
}
export interface CodeInsetProvider {
onDidChangeCodeInsets?: Event<void>;
provideCodeInsets(document: TextDocument, token: CancellationToken): ProviderResult<CodeInset[]>;
resolveCodeInset(codeInset: CodeInset, webview: Webview, token: CancellationToken): ProviderResult<CodeInset>;
}
export namespace languages {
/**
* Register a code inset provider.
*
*/
export function registerCodeInsetProvider(selector: DocumentSelector, provider: CodeInsetProvider): Disposable;
}
//#endregion
//#region Joh - selection range provider
/**
* A selection range represents a part of a selection hierarchy. A selection range
* may have a parent selection range that contains it.
*/
export class SelectionRange {
/**
* The [range](#Range) of this selection range.
*/
range: Range;
/**
* The parent selection range containing this range.
*/
parent?: SelectionRange;
/**
* Creates a new selection range.
*
* @param range The range of the selection range.
* @param parent The parent of the selection range.
*/
constructor(range: Range, parent?: SelectionRange);
}
export interface SelectionRangeProvider {
/**
* Provide selection ranges starting at a given position. The first range must [contain](#Range.contains)
* position and subsequent ranges must contain the previous range.
* Provide selection ranges for the given positions.
*
* Selection ranges should be computed individually and independend for each postion. The editor will merge
* and deduplicate ranges but providers must return hierarchies of selection ranges so that a range
* is [contained](#Range.contains) by its parent.
*
* @param document The document in which the command was invoked.
* @param positions The positions at which the command was invoked.
* @param token A cancellation token.
* @return Selection ranges or a thenable that resolves to such. The lack of a result can be
* signaled by returning `undefined` or `null`.
*/
provideSelectionRanges(document: TextDocument, position: Position, token: CancellationToken): ProviderResult<SelectionRange[]>;
provideSelectionRanges(document: TextDocument, positions: Position[], token: CancellationToken): ProviderResult<SelectionRange[]>;
}
export namespace languages {
/**
* Register a selection range provider.
*
* Multiple providers can be registered for a language. In that case providers are asked in
* parallel and the results are merged. A failing provider (rejected promise or exception) will
* not cause a failure of the whole operation.
*
* @param selector A selector that defines the documents this provider is applicable to.
* @param provider A selection range provider.
* @return A [disposable](#Disposable) that unregisters this provider when being disposed.
*/
export function registerSelectionRangeProvider(selector: DocumentSelector, provider: SelectionRangeProvider): Disposable;
}
@@ -246,11 +326,6 @@ declare module 'vscode' {
session?: CancellationToken;
}
/**
* Options that apply to requesting the file index.
*/
export interface FileIndexOptions extends SearchOptions { }
/**
* A preview of the text result.
*/
@@ -310,26 +385,6 @@ declare module 'vscode' {
export type TextSearchResult = TextSearchMatch | TextSearchContext;
/**
* A FileIndexProvider provides a list of files in the given folder. VS Code will filter that list for searching with quickopen or from other extensions.
*
* A FileIndexProvider is the simpler of two ways to implement file search in VS Code. Use a FileIndexProvider if you are able to provide a listing of all files
* in a folder, and want VS Code to filter them according to the user's search query.
*
* The FileIndexProvider will be invoked once when quickopen is opened, and VS Code will filter the returned list. It will also be invoked when
* `workspace.findFiles` is called.
*
* If a [`FileSearchProvider`](#FileSearchProvider) is registered for the scheme, that provider will be used instead.
*/
export interface FileIndexProvider {
/**
* Provide the set of files in the folder.
* @param options A set of options to consider while searching.
* @param token A cancellation token.
*/
provideFileIndex(options: FileIndexOptions, token: CancellationToken): ProviderResult<Uri[]>;
}
/**
* A FileSearchProvider provides search results for files in the given folder that match a query string. It can be invoked by quickopen or other extensions.
*
@@ -338,8 +393,6 @@ declare module 'vscode' {
*
* The FileSearchProvider will be invoked on every keypress in quickopen. When `workspace.findFiles` is called, it will be invoked with an empty query string,
* and in that case, every file in the folder should be returned.
*
* @see [FileIndexProvider](#FileIndexProvider)
*/
export interface FileSearchProvider {
/**
@@ -435,17 +488,6 @@ declare module 'vscode' {
*/
export function registerSearchProvider(): Disposable;
/**
* Register a file index provider.
*
* Only one provider can be registered per scheme.
*
* @param scheme The provider will be invoked for workspace folders that have this file scheme.
* @param provider The provider.
* @return A [disposable](#Disposable) that unregisters this provider when being disposed.
*/
export function registerFileIndexProvider(scheme: string, provider: FileIndexProvider): Disposable;
/**
* Register a search provider.
*
@@ -554,6 +596,22 @@ declare module 'vscode' {
//#region André: debug
export namespace debug {
/**
* Start debugging by using either a named launch or named compound configuration,
* or by directly passing a [DebugConfiguration](#DebugConfiguration).
* The named configurations are looked up in '.vscode/launch.json' found in the given folder.
* Before debugging starts, all unsaved files are saved and the launch configurations are brought up-to-date.
* Folder specific variables used in the configuration (e.g. '${workspaceFolder}') are resolved against the given folder.
* @param folder The [workspace folder](#WorkspaceFolder) for looking up named configurations and resolving variables or `undefined` for a non-folder setup.
* @param nameOrConfiguration Either the name of a debug or compound configuration or a [DebugConfiguration](#DebugConfiguration) object.
* @param parent If specified the newly created debug session is registered as a "child" session of a "parent" debug session.
* @return A thenable that resolves when debugging could be successfully started.
*/
export function startDebugging(folder: WorkspaceFolder | undefined, nameOrConfiguration: string | DebugConfiguration, parentSession?: DebugSession): Thenable<boolean>;
}
// deprecated
export interface DebugConfigurationProvider {
@@ -713,7 +771,7 @@ declare module 'vscode' {
/**
* A collection of comments representing a conversation at a particular range in a document.
*/
interface CommentThread {
export interface CommentThread {
/**
* A unique identifier of the comment thread.
*/
@@ -730,21 +788,49 @@ declare module 'vscode' {
*/
range: Range;
/**
* The human-readable label describing the [Comment Thread](#CommentThread)
*/
label?: string;
/**
* The ordered comments of the thread.
*/
comments: Comment[];
/**
* Whether the thread should be collapsed or expanded when opening the document. Defaults to Collapsed.
* Optional accept input command
*
* `acceptInputCommand` is the default action rendered on Comment Widget, which is always placed rightmost.
* This command will be invoked when users the user accepts the value in the comment editor.
* This command will disabled when the comment editor is empty.
*/
acceptInputCommand?: Command;
/**
* Optional additonal commands.
*
* `additionalCommands` are the secondary actions rendered on Comment Widget.
*/
additionalCommands?: Command[];
/**
* Whether the thread should be collapsed or expanded when opening the document.
* Defaults to Collapsed.
*/
collapsibleState?: CommentThreadCollapsibleState;
/**
* Dispose this comment thread.
* Once disposed, the comment thread will be removed from visible text editors and Comments Panel.
*/
dispose?(): void;
}
/**
* A comment is displayed within the editor or the Comments Panel, depending on how it is provided.
*/
interface Comment {
export interface Comment {
/**
* The id of the comment
*/
@@ -755,6 +841,12 @@ declare module 'vscode' {
*/
body: MarkdownString;
/**
* Optional label describing the [Comment](#Comment)
* Label will be rendered next to userName if exists.
*/
label?: string;
/**
* The display name of the user who created the comment
*/
@@ -765,7 +857,6 @@ declare module 'vscode' {
*/
userIconPath?: Uri;
/**
* @deprecated Use userIconPath instead. The avatar src of the user who created the comment
*/
@@ -776,6 +867,8 @@ declare module 'vscode' {
*
* This will be treated as false if the comment is provided by a `WorkspaceCommentProvider`, or
* if it is provided by a `DocumentCommentProvider` and no `editComment` method is given.
*
* DEPRECATED, use editCommand
*/
canEdit?: boolean;
@@ -784,18 +877,46 @@ declare module 'vscode' {
*
* This will be treated as false if the comment is provided by a `WorkspaceCommentProvider`, or
* if it is provided by a `DocumentCommentProvider` and no `deleteComment` method is given.
*
* DEPRECATED, use deleteCommand
*/
canDelete?: boolean;
/**
* @deprecated
* The command to be executed if the comment is selected in the Comments Panel
*/
command?: Command;
/**
* The command to be executed if the comment is selected in the Comments Panel
*/
selectCommand?: Command;
/**
* The command to be executed when users try to save the edits to the comment
*/
editCommand?: Command;
/**
* The command to be executed when users try to delete the comment
*/
deleteCommand?: Command;
/**
* Deprecated
*/
isDraft?: boolean;
/**
* Proposed Comment Reaction
*/
commentReactions?: CommentReaction[];
}
/**
* Deprecated
*/
export interface CommentThreadChangedEvent {
/**
* Added comment threads.
@@ -818,11 +939,19 @@ declare module 'vscode' {
readonly inDraftMode: boolean;
}
/**
* Comment Reactions
*/
interface CommentReaction {
readonly label?: string;
readonly iconPath?: string | Uri;
count?: number;
readonly hasReacted?: boolean;
}
/**
* DEPRECATED
*/
interface DocumentCommentProvider {
/**
* Provide the commenting ranges and comment threads for the given document. The comments are displayed within the editor.
@@ -867,6 +996,9 @@ declare module 'vscode' {
onDidChangeCommentThreads: Event<CommentThreadChangedEvent>;
}
/**
* DEPRECATED
*/
interface WorkspaceCommentProvider {
/**
* Provide all comments for the workspace. Comments are shown within the comments panel. Selecting a comment
@@ -880,21 +1012,135 @@ declare module 'vscode' {
onDidChangeCommentThreads: Event<CommentThreadChangedEvent>;
}
/**
* The comment input box in Comment Widget.
*/
export interface CommentInputBox {
/**
* Setter and getter for the contents of the comment input box.
*/
value: string;
}
export interface CommentReactionProvider {
availableReactions: CommentReaction[];
toggleReaction?(document: TextDocument, comment: Comment, reaction: CommentReaction): Promise<void>;
}
export interface CommentingRangeProvider {
/**
* Provide a list of ranges which allow new comment threads creation or null for a given document
*/
provideCommentingRanges(document: TextDocument, token: CancellationToken): ProviderResult<Range[]>;
}
export interface EmptyCommentThreadFactory {
/**
* The method `createEmptyCommentThread` is called when users attempt to create new comment thread from the gutter or command palette.
* Extensions still need to call `createCommentThread` inside this call when appropriate.
*/
createEmptyCommentThread(document: TextDocument, range: Range): ProviderResult<void>;
}
export interface CommentController {
/**
* The id of this comment controller.
*/
readonly id: string;
/**
* The human-readable label of this comment controller.
*/
readonly label: string;
/**
* The active (focused) [comment input box](#CommentInputBox).
*/
readonly inputBox?: CommentInputBox;
/**
* Create a [CommentThread](#CommentThread)
*/
createCommentThread(id: string, resource: Uri, range: Range, comments: Comment[]): CommentThread;
/**
* Optional commenting range provider.
* Provide a list [ranges](#Range) which support commenting to any given resource uri.
*/
commentingRangeProvider?: CommentingRangeProvider;
/**
* Optional new comment thread factory.
*/
emptyCommentThreadFactory?: EmptyCommentThreadFactory;
/**
* Optional reaction provider
*/
reactionProvider?: CommentReactionProvider;
/**
* Dispose this comment controller.
*/
dispose(): void;
}
namespace comment {
export function createCommentController(id: string, label: string): CommentController;
}
namespace workspace {
/**
* DEPRECATED
* Use vscode.comment.createCommentController instead.
*/
export function registerDocumentCommentProvider(provider: DocumentCommentProvider): Disposable;
/**
* DEPRECATED
* Use vscode.comment.createCommentController instead and we don't differentiate document comments and workspace comments anymore.
*/
export function registerWorkspaceCommentProvider(provider: WorkspaceCommentProvider): Disposable;
}
//#endregion
//#region Terminal
/**
* An [event](#Event) which fires when a [Terminal](#Terminal)'s dimensions change.
*/
export interface TerminalDimensionsChangeEvent {
/**
* The [terminal](#Terminal) for which the dimensions have changed.
*/
readonly terminal: Terminal;
/**
* The new value for the [terminal's dimensions](#Terminal.dimensions).
*/
readonly dimensions: TerminalDimensions;
}
namespace window {
/**
* An event which fires when the [dimensions](#Terminal.dimensions) of the terminal change.
*/
export const onDidChangeTerminalDimensions: Event<TerminalDimensionsChangeEvent>;
}
export interface Terminal {
/**
* The current dimensions of the terminal. This will be `undefined` immediately after the
* terminal is created as the dimensions are not known until shortly after the terminal is
* created.
*/
readonly dimensions: TerminalDimensions | undefined;
/**
* Fires when the terminal's pty slave pseudo-device is written to. In other words, this
* provides access to the raw data stream from the process running within the terminal,
* including VT sequences.
*/
onDidWriteData: Event<string>;
readonly onDidWriteData: Event<string>;
}
/**
@@ -1003,7 +1249,7 @@ declare module 'vscode' {
readonly onDidAcceptInput: Event<string>;
/**
* An event which fires when the [maximum dimensions](#TerminalRenderer.maimumDimensions) of
* An event which fires when the [maximum dimensions](#TerminalRenderer.maximumDimensions) of
* the terminal renderer change.
*/
readonly onDidChangeMaximumDimensions: Event<TerminalDimensions>;
@@ -1098,29 +1344,47 @@ declare module 'vscode' {
}
//#endregion
//#region SignatureHelpContext active parameters - mjbvz
export interface SignatureHelpContext {
/**
* Class used to execute an extension callback as a task.
*/
export class CustomExecution {
/**
* The currently active [`SignatureHelp`](#SignatureHelp).
*
* The `activeSignatureHelp` has its [`SignatureHelp.activeSignature`] field updated based on
* the user arrowing through available signatures.
* @param callback The callback that will be called when the extension callback task is executed.
*/
readonly activeSignatureHelp?: SignatureHelp;
}
//#endregion
constructor(callback: (terminalRenderer: TerminalRenderer, cancellationToken: CancellationToken, thisArg?: any) => Thenable<number>);
//#region CodeAction.isPreferred - mjbvz
export interface CodeAction {
/**
* Marks this as a preferred action. Preferred actions are used by the `auto fix` command.
*
* A quick fix should be marked preferred if it properly addresses the underlying error.
* A refactoring should be marked preferred if it is the most reasonable choice of actions to take.
* The callback used to execute the task.
* @param terminalRenderer Used by the task to render output and receive input.
* @param cancellationToken Cancellation used to signal a cancel request to the executing task.
* @returns The callback should return '0' for success and a non-zero value for failure.
*/
isPreferred?: boolean;
callback: (terminalRenderer: TerminalRenderer, cancellationToken: CancellationToken, thisArg?: any) => Thenable<number>;
}
/**
* A task to execute
*/
export class Task2 extends Task {
/**
* Creates a new task.
*
* @param definition The task definition as defined in the taskDefinitions extension point.
* @param scope Specifies the task's scope. It is either a global or a workspace task or a task for a specific workspace folder.
* @param name The task's name. Is presented in the user interface.
* @param source The task's source (e.g. 'gulp', 'npm', ...). Is presented in the user interface.
* @param execution The process or shell execution.
* @param problemMatchers the names of problem matchers to use, like '$tsc'
* or '$eslint'. Problem matchers can be contributed by an extension using
* the `problemMatchers` extension point.
*/
constructor(taskDefinition: TaskDefinition, scope: WorkspaceFolder | TaskScope.Global | TaskScope.Workspace, name: string, source: string, execution?: ProcessExecution | ShellExecution | CustomExecution, problemMatchers?: string | string[]);
/**
* The task's execution engine
*/
execution2?: ProcessExecution | ShellExecution | CustomExecution;
}
//#endregion
//#region Tasks
export interface TaskPresentationOptions {
@@ -1130,16 +1394,4 @@ declare module 'vscode' {
group?: string;
}
//#endregion
//#region Autofix - mjbvz
export namespace CodeActionKind {
/**
* Base kind for auto-fix source actions: `source.fixAll`.
*
* Fix all actions automatically fix errors that have a clear fix that do not require user input.
* They should not suppress errors or perform unsafe fixes such as generating new types or classes.
*/
export const SourceFixAll: CodeActionKind;
}
//#endregion
}