Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

upgrade NPM builtin version to 1.44.2 #8000

Merged
merged 2 commits into from
Jun 16, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@
"vscode-builtin-markdown": "https://open-vsx.org/api/vscode/markdown/1.44.2/file/vscode.markdown-1.44.2.vsix",
"vscode-builtin-markdown-language-features": "https://open-vsx.org/api/vscode/markdown-language-features/1.39.1/file/vscode.markdown-language-features-1.39.1.vsix",
"vscode-builtin-merge-conflict": "https://open-vsx.org/api/vscode/merge-conflict/1.44.2/file/vscode.merge-conflict-1.44.2.vsix",
"vscode-builtin-npm": "https://open-vsx.org/api/vscode/npm/1.39.1/file/vscode.npm-1.39.1.vsix",
"vscode-builtin-npm": "https://open-vsx.org/api/vscode/npm/1.44.2/file/vscode.npm-1.44.2.vsix",
"vscode-builtin-node-debug": "https://github.com/theia-ide/vscode-node-debug/releases/download/v1.35.3/node-debug-1.35.3.vsix",
"vscode-builtin-node-debug2": "https://open-vsx.org/api/ms-vscode/node-debug2/1.33.0/file/ms-vscode.node-debug2-1.33.0.vsix",
"vscode-builtin-objective-c": "https://open-vsx.org/api/vscode/objective-c/1.44.2/file/vscode.objective-c-1.44.2.vsix",
Expand Down
1 change: 1 addition & 0 deletions packages/plugin-ext/src/common/plugin-api-rpc.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1167,6 +1167,7 @@ export interface TaskDto {
label: string;
source?: string;
scope: string | number;
detail?: string;
// eslint-disable-next-line @typescript-eslint/no-explicit-any
[key: string]: any;
}
Expand Down
2 changes: 2 additions & 0 deletions packages/plugin-ext/src/plugin/plugin-context.ts
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,7 @@ import {
TaskRevealKind,
TaskGroup,
Task,
Task2,
DebugAdapterExecutable,
DebugAdapterServer,
Breakpoint,
Expand Down Expand Up @@ -863,6 +864,7 @@ export function createAPIFactory(
TaskPanelKind,
TaskGroup,
Task,
Task2,
DebugAdapterExecutable,
DebugAdapterServer,
Breakpoint,
Expand Down
8 changes: 7 additions & 1 deletion packages/plugin-ext/src/plugin/type-converters.ts
Original file line number Diff line number Diff line change
Expand Up @@ -708,6 +708,9 @@ export function fromTask(task: theia.Task): TaskDto | undefined {
const taskDto = {} as TaskDto;
taskDto.label = task.name;
taskDto.source = task.source;
if ('detail' in task) {
taskDto.detail = (task as theia.Task2).detail;
}
if (typeof task.scope === 'object') {
taskDto.scope = task.scope.uri.toString();
} else if (typeof task.scope === 'number') {
Expand Down Expand Up @@ -748,10 +751,13 @@ export function toTask(taskDto: TaskDto): theia.Task {
throw new Error('Task should be provided for converting');
}

const { type, label, source, scope, command, args, options, windows, ...properties } = taskDto;
const { type, label, source, scope, detail, command, args, options, windows, ...properties } = taskDto;
const result = {} as theia.Task;
result.name = label;
result.source = source;
if (detail) {
(result as theia.Task2).detail = detail;
}
if (typeof scope === 'string') {
const uri = URI.parse(scope);
result.scope = {
Expand Down
4 changes: 4 additions & 0 deletions packages/plugin-ext/src/plugin/types-impl.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1808,6 +1808,10 @@ export class Task {
}
}

export class Task2 extends Task {
detail?: string;
}

export class DebugAdapterExecutable {
/**
* The command or path of the debug adapter executable.
Expand Down
4 changes: 4 additions & 0 deletions packages/plugin/src/theia.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8884,6 +8884,10 @@ declare module '@theia/plugin' {
problemMatchers?: string[];
}

export class Task2 extends Task {
detail?: string;
}

export interface TaskProvider {
/**
* Provides tasks.
Expand Down
8 changes: 8 additions & 0 deletions packages/task/src/browser/quick-open-task.ts
Original file line number Diff line number Diff line change
Expand Up @@ -506,6 +506,10 @@ export class TaskRunQuickOpenItem extends QuickOpenGroupItem {
}
return true;
}

getDetail(): string | undefined {
return this.task.detail;
}
}

export class ConfigureBuildOrTestTaskQuickOpenItem extends TaskRunQuickOpenItem {
Expand Down Expand Up @@ -775,6 +779,10 @@ export class RunningTaskQuickOpenItem extends QuickOpenItem {
}
return this.options.run(mode);
}

getDetail(): string | undefined {
return this.taskInfo.config.detail;
}
}

@injectable()
Expand Down
9 changes: 8 additions & 1 deletion packages/task/src/browser/task-schema-updater.ts
Original file line number Diff line number Diff line change
Expand Up @@ -178,6 +178,7 @@ export class TaskSchemaUpdater {
customizedDetectedTask.properties!.presentation = presentation;
customizedDetectedTask.properties!.options = commandOptionsSchema;
customizedDetectedTask.properties!.group = group;
customizedDetectedTask.properties!.detail = detail;
customizedDetectedTask.additionalProperties = true;
customizedDetectedTasks.push(customizedDetectedTask);
});
Expand Down Expand Up @@ -603,6 +604,11 @@ const presentation: IJSONSchema = {
}
};

const detail: IJSONSchema = {
type: 'string',
description: 'An optional description of a task that shows in the Run Task quick pick as a detail.'
};

const taskIdentifier: IJSONSchema = {
type: 'object',
additionalProperties: true,
Expand Down Expand Up @@ -675,7 +681,8 @@ const processTaskConfigurationSchema: IJSONSchema = {
},
group,
problemMatcher,
presentation
presentation,
detail,
},
additionalProperties: true
};
Expand Down
1 change: 1 addition & 0 deletions packages/task/src/common/task-protocol.ts
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,7 @@ export interface TaskCustomization {
group?: 'build' | 'test' | 'none' | { kind: 'build' | 'test' | 'none', isDefault: true };
problemMatcher?: string | ProblemMatcherContribution | (string | ProblemMatcherContribution)[];
presentation?: TaskOutputPresentation;
detail?: string;

/** Whether the task is a background task or not. */
isBackground?: boolean;
Expand Down