Skip to content

Commit e98c09c

Browse files
committed
Fixes microsoft#27738: Defer switching to Tasks 2.0.0 as the default
1 parent 6ba4801 commit e98c09c

12 files changed

Lines changed: 626 additions & 342 deletions

File tree

extensions/grunt/package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
"engines": {
88
"vscode": "*"
99
},
10+
"enableProposedApi": true,
1011
"categories": [
1112
"Other"
1213
],

extensions/gulp/package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
"engines": {
88
"vscode": "*"
99
},
10+
"enableProposedApi": true,
1011
"categories": [
1112
"Other"
1213
],

extensions/jake/package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
"engines": {
88
"vscode": "*"
99
},
10+
"enableProposedApi": true,
1011
"categories": [
1112
"Other"
1213
],

extensions/typescript/package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
"engines": {
1111
"vscode": "*"
1212
},
13+
"enableProposedApi": true,
1314
"dependencies": {
1415
"semver": "4.3.6",
1516
"vscode-extension-telemetry": "^0.0.7",

extensions/typescript/src/typings/ref.d.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,5 @@
44
*--------------------------------------------------------------------------------------------*/
55

66
/// <reference path='../../../../src/vs/vscode.d.ts'/>
7+
/// <reference path='../../../../src/vs/vscode.proposed.d.ts'/>
78
/// <reference types='@types/node'/>

src/vs/vscode.d.ts

Lines changed: 0 additions & 329 deletions
Original file line numberDiff line numberDiff line change
@@ -3537,335 +3537,6 @@ declare module 'vscode' {
35373537
update(key: string, value: any): Thenable<void>;
35383538
}
35393539

3540-
/**
3541-
* Controls the behaviour of the terminal's visibility.
3542-
*/
3543-
export enum TaskRevealKind {
3544-
/**
3545-
* Always brings the terminal to front if the task is executed.
3546-
*/
3547-
Always = 1,
3548-
3549-
/**
3550-
* Only brings the terminal to front if a problem is detected executing the task
3551-
* (e.g. the task couldn't be started because).
3552-
*/
3553-
Silent = 2,
3554-
3555-
/**
3556-
* The terminal never comes to front when the task is executed.
3557-
*/
3558-
Never = 3
3559-
}
3560-
3561-
/**
3562-
* Controls terminal specific behavior.
3563-
*/
3564-
export interface TaskTerminalBehavior {
3565-
/**
3566-
* Controls whether the terminal executing a task is brought to front or not.
3567-
* Defaults to `RevealKind.Always`.
3568-
*/
3569-
reveal?: TaskRevealKind;
3570-
3571-
/**
3572-
* Controls whether the command is echoed in the terminal or not.
3573-
*/
3574-
echo?: boolean;
3575-
}
3576-
3577-
export interface ProcessTaskOptions {
3578-
/**
3579-
* The current working directory of the executed program or shell.
3580-
* If omitted the tools current workspace root is used.
3581-
*/
3582-
cwd?: string;
3583-
3584-
/**
3585-
* The additional environment of the executed program or shell. If omitted
3586-
* the parent process' environment is used. If provided it is merged with
3587-
* the parent process' environment.
3588-
*/
3589-
env?: { [key: string]: string };
3590-
}
3591-
3592-
export namespace TaskGroup {
3593-
/**
3594-
* The clean task group
3595-
*/
3596-
export const Clean: 'clean';
3597-
/**
3598-
* The build task group. If a task is part of the build task group
3599-
* it can be executed via the run build short cut.
3600-
*/
3601-
export const Build: 'build';
3602-
/**
3603-
* The rebuild all task group
3604-
*/
3605-
export const RebuildAll: 'rebuildAll';
3606-
/**
3607-
* The test task group. If a task is part of the test task group
3608-
* it can be executed via the run test short cut.
3609-
*/
3610-
export const Test: 'test';
3611-
}
3612-
3613-
/**
3614-
* A task that starts an external process.
3615-
*/
3616-
export class ProcessTask {
3617-
3618-
/**
3619-
* Creates a process task.
3620-
*
3621-
* @param name the task's name. Is presented in the user interface.
3622-
* @param process the process to start.
3623-
* @param problemMatchers the names of problem matchers to use, like '$tsc'
3624-
* or '$eslint'. Problem matchers can be contributed by an extension using
3625-
* the `problemMatchers` extension point.
3626-
*/
3627-
constructor(name: string, process: string, problemMatchers?: string | string[]);
3628-
3629-
/**
3630-
* Creates a process task.
3631-
*
3632-
* @param name the task's name. Is presented in the user interface.
3633-
* @param process the process to start.
3634-
* @param args arguments to be passed to the process.
3635-
* @param problemMatchers the names of problem matchers to use, like '$tsc'
3636-
* or '$eslint'. Problem matchers can be contributed by an extension using
3637-
* the `problemMatchers` extension point.
3638-
*/
3639-
constructor(name: string, process: string, args: string[], problemMatchers?: string | string[]);
3640-
3641-
/**
3642-
* Creates a process task.
3643-
*
3644-
* @param name the task's name. Is presented in the user interface.
3645-
* @param process the process to start.
3646-
* @param args arguments to be passed to the process.
3647-
* @param options additional options for the started process.
3648-
* @param problemMatchers the names of problem matchers to use, like '$tsc'
3649-
* or '$eslint'. Problem matchers can be contributed by an extension using
3650-
* the `problemMatchers` extension point.
3651-
*/
3652-
constructor(name: string, process: string, args: string[], options: ProcessTaskOptions, problemMatchers?: string | string[]);
3653-
3654-
/**
3655-
* The task's name
3656-
*/
3657-
readonly name: string;
3658-
3659-
/**
3660-
* The task's identifier. If omitted the internal identifier will
3661-
* be `${extensionName}:${name}`
3662-
*/
3663-
identifier: string | undefined;
3664-
3665-
/**
3666-
* Whether the task is a background task or not.
3667-
*/
3668-
isBackground: boolean;
3669-
3670-
/**
3671-
* The process to be executed.
3672-
*/
3673-
readonly process: string;
3674-
3675-
/**
3676-
* The arguments passed to the process. Defaults to an empty array.
3677-
*/
3678-
args: string[];
3679-
3680-
/**
3681-
* A human-readable string describing the source of this
3682-
* shell task, e.g. 'gulp' or 'npm'.
3683-
*/
3684-
source: string | undefined;
3685-
3686-
/**
3687-
* The task group this tasks belongs to. See TaskGroup
3688-
* for a predefined set of available groups.
3689-
* Defaults to undefined meaning that the task doesn't
3690-
* belong to any special group.
3691-
*/
3692-
group: string | undefined;
3693-
3694-
/**
3695-
* The process options used when the process is executed.
3696-
* Defaults to an empty object literal.
3697-
*/
3698-
options: ProcessTaskOptions;
3699-
3700-
/**
3701-
* The terminal behavior. Defaults to an empty object literal.
3702-
*/
3703-
terminalBehavior: TaskTerminalBehavior;
3704-
3705-
/**
3706-
* The problem matchers attached to the task. Defaults to an empty
3707-
* array.
3708-
*/
3709-
problemMatchers: string[];
3710-
}
3711-
3712-
export type ShellTaskOptions = {
3713-
/**
3714-
* The shell executable.
3715-
*/
3716-
executable: string;
3717-
3718-
/**
3719-
* The arguments to be passed to the shell executable used to run the task.
3720-
*/
3721-
shellArgs?: string[];
3722-
3723-
/**
3724-
* The current working directory of the executed shell.
3725-
* If omitted the tools current workspace root is used.
3726-
*/
3727-
cwd?: string;
3728-
3729-
/**
3730-
* The additional environment of the executed shell. If omitted
3731-
* the parent process' environment is used. If provided it is merged with
3732-
* the parent process' environment.
3733-
*/
3734-
env?: { [key: string]: string };
3735-
} | {
3736-
/**
3737-
* The current working directory of the executed shell.
3738-
* If omitted the tools current workspace root is used.
3739-
*/
3740-
cwd: string;
3741-
3742-
/**
3743-
* The additional environment of the executed shell. If omitted
3744-
* the parent process' environment is used. If provided it is merged with
3745-
* the parent process' environment.
3746-
*/
3747-
env?: { [key: string]: string };
3748-
} | {
3749-
/**
3750-
* The current working directory of the executed shell.
3751-
* If omitted the tools current workspace root is used.
3752-
*/
3753-
cwd?: string;
3754-
3755-
/**
3756-
* The additional environment of the executed shell. If omitted
3757-
* the parent process' environment is used. If provided it is merged with
3758-
* the parent process' environment.
3759-
*/
3760-
env: { [key: string]: string };
3761-
};
3762-
3763-
/**
3764-
* A task that executes a shell command.
3765-
*/
3766-
export class ShellTask {
3767-
3768-
/**
3769-
* Creates a shell task.
3770-
*
3771-
* @param name the task's name. Is presented in the user interface.
3772-
* @param commandLine the command line to execute.
3773-
* @param problemMatchers the names of problem matchers to use, like '$tsc'
3774-
* or '$eslint'. Problem matchers can be contributed by an extension using
3775-
* the `problemMatchers` extension point.
3776-
*/
3777-
constructor(name: string, commandLine: string, problemMatchers?: string | string[]);
3778-
3779-
/**
3780-
* Creates a shell task.
3781-
*
3782-
* @param name the task's name. Is presented in the user interface.
3783-
* @param commandLine the command line to execute.
3784-
* @param options additional options used when creating the shell.
3785-
* @param problemMatchers the names of problem matchers to use, like '$tsc'
3786-
* or '$eslint'. Problem matchers can be contributed by an extension using
3787-
* the `problemMatchers` extension point.
3788-
*/
3789-
constructor(name: string, commandLine: string, options: ShellTaskOptions, problemMatchers?: string | string[]);
3790-
3791-
/**
3792-
* The task's name
3793-
*/
3794-
readonly name: string;
3795-
3796-
/**
3797-
* The task's identifier. If omitted the internal identifier will
3798-
* be `${extensionName}:${name}`
3799-
*/
3800-
identifier: string | undefined;
3801-
3802-
/**
3803-
* Whether the task is a background task or not.
3804-
*/
3805-
isBackground: boolean;
3806-
3807-
/**
3808-
* The command line to execute.
3809-
*/
3810-
readonly commandLine: string;
3811-
3812-
/**
3813-
* A human-readable string describing the source of this
3814-
* shell task, e.g. 'gulp' or 'npm'.
3815-
*/
3816-
source: string | undefined;
3817-
3818-
/**
3819-
* The task group this tasks belongs to. See TaskGroup
3820-
* for a predefined set of available groups.
3821-
* Defaults to undefined meaning that the task doesn't
3822-
* belong to any special group.
3823-
*/
3824-
group: string | undefined;
3825-
3826-
/**
3827-
* The shell options used when the shell is executed. Defaults to an
3828-
* empty object literal.
3829-
*/
3830-
options: ShellTaskOptions;
3831-
3832-
/**
3833-
* The terminal behavior. Defaults to an empty object literal.
3834-
*/
3835-
terminalBehavior: TaskTerminalBehavior;
3836-
3837-
/**
3838-
* The problem matchers attached to the task. Defaults to an empty
3839-
* array.
3840-
*/
3841-
problemMatchers: string[];
3842-
}
3843-
3844-
export type Task = ProcessTask | ShellTask;
3845-
3846-
/**
3847-
* A task provider allows to add tasks to the task service.
3848-
* A task provider is registerd via #workspace.registerTaskProvider.
3849-
*/
3850-
export interface TaskProvider {
3851-
/**
3852-
* Provides additional tasks.
3853-
* @param token A cancellation token.
3854-
* @return a #TaskSet
3855-
*/
3856-
provideTasks(token: CancellationToken): ProviderResult<Task[]>;
3857-
}
3858-
3859-
export namespace workspace {
3860-
/**
3861-
* Register a task provider.
3862-
*
3863-
* @param provider A task provider.
3864-
* @return A [disposable](#Disposable) that unregisters this provider when being disposed.
3865-
*/
3866-
export function registerTaskProvider(provider: TaskProvider): Disposable;
3867-
}
3868-
38693540
/**
38703541
* Namespace describing the environment the editor runs in.
38713542
*/

0 commit comments

Comments
 (0)