Skip to content

Commit 22a4944

Browse files
authored
Merge branch 'main' into merogge/inline-help-improvement
2 parents 9eb77af + dfcaefa commit 22a4944

File tree

22 files changed

+148
-228
lines changed

22 files changed

+148
-228
lines changed

build/.moduleignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,8 @@ fsevents/test/**
3737
@vscode/windows-process-tree/binding.gyp
3838
@vscode/windows-process-tree/build/**
3939
@vscode/windows-process-tree/src/**
40+
@vscode/windows-process-tree/tsconfig.json
41+
@vscode/windows-process-tree/tslint.json
4042
!@vscode/windows-process-tree/**/*.node
4143

4244
@vscode/windows-registry/binding.gyp

build/.moduleignore.darwin

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,12 @@
33
@vscode/windows-mutex/*.md
44
@vscode/windows-mutex/package.json
55

6+
@vscode/windows-process-tree/lib/**
7+
@vscode/windows-process-tree/**/*.node
8+
@vscode/windows-process-tree/LICENSE
9+
@vscode/windows-process-tree/package.json
10+
@vscode/windows-process-tree/*.md
11+
612
@vscode/windows-registry/dist/**
713
@vscode/windows-registry/**/*.node
814
@vscode/windows-registry/*.md

build/.moduleignore.linux

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,12 @@
33
@vscode/windows-mutex/*.md
44
@vscode/windows-mutex/package.json
55

6+
@vscode/windows-process-tree/lib/**
7+
@vscode/windows-process-tree/**/*.node
8+
@vscode/windows-process-tree/LICENSE
9+
@vscode/windows-process-tree/package.json
10+
@vscode/windows-process-tree/*.md
11+
612
@vscode/windows-registry/dist/**
713
@vscode/windows-registry/**/*.node
814
@vscode/windows-registry/*.md

extensions/typescript-language-features/src/languageFeatures/completions.ts

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,8 @@ class MyCompletionItem extends vscode.CompletionItem {
5858
public readonly metadata: any | undefined,
5959
client: ITypeScriptServiceClient,
6060
) {
61-
super(tsEntry.name, MyCompletionItem.convertKind(tsEntry.kind));
61+
const label = tsEntry.name || (tsEntry.insertText ?? '');
62+
super(label, MyCompletionItem.convertKind(tsEntry.kind));
6263

6364
if (tsEntry.source && tsEntry.hasAction && client.apiVersion.lt(API.v490)) {
6465
// De-prioritze auto-imports
@@ -72,18 +73,18 @@ class MyCompletionItem extends vscode.CompletionItem {
7273
// Render "fancy" when source is a workspace path
7374
const qualifierCandidate = vscode.workspace.asRelativePath(tsEntry.source);
7475
if (qualifierCandidate !== tsEntry.source) {
75-
this.label = { label: tsEntry.name, description: qualifierCandidate };
76+
this.label = { label, description: qualifierCandidate };
7677
}
7778

7879
}
7980

8081
const { sourceDisplay, isSnippet } = tsEntry;
8182
if (sourceDisplay) {
82-
this.label = { label: tsEntry.name, description: Previewer.asPlainTextWithLinks(sourceDisplay, client) };
83+
this.label = { label, description: Previewer.asPlainTextWithLinks(sourceDisplay, client) };
8384
}
8485

8586
if (tsEntry.labelDetails) {
86-
this.label = { label: tsEntry.name, ...tsEntry.labelDetails };
87+
this.label = { label, ...tsEntry.labelDetails };
8788
}
8889

8990
this.preselect = tsEntry.isRecommended;

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,7 @@
7575
"@vscode/sudo-prompt": "9.3.1",
7676
"@vscode/vscode-languagedetection": "1.0.21",
7777
"@vscode/windows-mutex": "^0.4.4",
78+
"@vscode/windows-process-tree": "^0.5.0",
7879
"@vscode/windows-registry": "^1.1.0",
7980
"graceful-fs": "4.2.8",
8081
"http-proxy-agent": "^2.1.0",
@@ -85,7 +86,7 @@
8586
"native-is-elevated": "0.6.0",
8687
"native-keymap": "^3.3.2",
8788
"native-watchdog": "^1.4.1",
88-
"node-pty": "0.11.0-beta33",
89+
"node-pty": "1.0",
8990
"tas-client-umd": "0.1.8",
9091
"v8-inspect-profiler": "^0.1.0",
9192
"vscode-oniguruma": "1.7.0",
@@ -227,7 +228,6 @@
227228
"url": "https://github.com/microsoft/vscode/issues"
228229
},
229230
"optionalDependencies": {
230-
"@vscode/windows-process-tree": "0.4.2",
231231
"windows-foreground-love": "0.5.0"
232232
}
233233
}

remote/package.json

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
"@vscode/ripgrep": "^1.15.4",
1212
"@vscode/spdlog": "^0.13.10",
1313
"@vscode/vscode-languagedetection": "1.0.21",
14+
"@vscode/windows-process-tree": "^0.5.0",
1415
"@vscode/windows-registry": "^1.1.0",
1516
"cookie": "^0.4.0",
1617
"graceful-fs": "4.2.8",
@@ -20,7 +21,7 @@
2021
"keytar": "7.9.0",
2122
"minimist": "^1.2.6",
2223
"native-watchdog": "^1.4.1",
23-
"node-pty": "0.11.0-beta33",
24+
"node-pty": "1.0",
2425
"tas-client-umd": "0.1.8",
2526
"vscode-oniguruma": "1.7.0",
2627
"vscode-regexpp": "^3.1.0",
@@ -35,8 +36,5 @@
3536
"xterm-headless": "5.3.0-beta.1",
3637
"yauzl": "^2.9.2",
3738
"yazl": "^2.4.3"
38-
},
39-
"optionalDependencies": {
40-
"@vscode/windows-process-tree": "0.4.2"
4139
}
4240
}

remote/yarn.lock

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -101,10 +101,10 @@
101101
dependencies:
102102
node-addon-api "^3.0.2"
103103

104-
"@vscode/windows-process-tree@0.4.2":
105-
version "0.4.2"
106-
resolved "https://registry.yarnpkg.com/@vscode/windows-process-tree/-/windows-process-tree-0.4.2.tgz#54d010fdeb06dfe3a9c6d58fcb3ed9acfc962f33"
107-
integrity sha512-b20865s1HG1VtGt887KrB1blwFS6p4L1Fl1o/WplO9j7sGBle8sLqkNnGXbCaRNgdIgfXtitmzG366FVynJZdQ==
104+
"@vscode/windows-process-tree@^0.5.0":
105+
version "0.5.0"
106+
resolved "https://registry.yarnpkg.com/@vscode/windows-process-tree/-/windows-process-tree-0.5.0.tgz#b8205b862c75a1e0ad8b7bf4350dc85036ee3a2c"
107+
integrity sha512-y8Oliel/rBSYh9f1T4F0zQjJNPeJRgYRhEKZsjas7JXKLf46FpE3Ux8e9+7HelUD8dXFH7C7N6895nU0WhrMlg==
108108
dependencies:
109109
nan "^2.17.0"
110110

@@ -537,10 +537,10 @@ node-gyp-build@^4.3.0:
537537
resolved "https://registry.yarnpkg.com/node-gyp-build/-/node-gyp-build-4.3.0.tgz#9f256b03e5826150be39c764bf51e993946d71a3"
538538
integrity sha512-iWjXZvmboq0ja1pUGULQBexmxq8CV4xBhX7VDOTbL7ZR4FOowwY/VOtRxBN/yKxmdGoIp4j5ysNT4u3S2pDQ3Q==
539539

540-
node-pty@0.11.0-beta33:
541-
version "0.11.0-beta33"
542-
resolved "https://registry.yarnpkg.com/node-pty/-/node-pty-0.11.0-beta33.tgz#722a729fb9449f591279bee1f8b431b71a9af4a1"
543-
integrity sha512-SoP5BbSfvc8Um51rIriUEOPvMltc43iTaKXGJaJKLR3+NfQbjcCcNQGyOd9P9pvBccWYg+Rncv18qMtJKIAi1Q==
540+
node-pty@1.0:
541+
version "1.0.0"
542+
resolved "https://registry.yarnpkg.com/node-pty/-/node-pty-1.0.0.tgz#7daafc0aca1c4ca3de15c61330373af4af5861fd"
543+
integrity sha512-wtBMWWS7dFZm/VgqElrTvtfMq4GzJ6+edFI0Y0zyzygUSZMgZdraDUMUhCIvkjhJjme15qWmbyJbtAx4ot4uZA==
544544
dependencies:
545545
nan "^2.17.0"
546546

src/typings/windows-process-tree.d.ts

Lines changed: 0 additions & 75 deletions
This file was deleted.

src/vs/base/node/ps.ts

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -115,13 +115,13 @@ export function listProcesses(rootPid: number): Promise<ProcessItem> {
115115

116116
const cleanUNCPrefix = (value: string): string => {
117117
if (value.indexOf('\\\\?\\') === 0) {
118-
return value.substr(4);
118+
return value.substring(4);
119119
} else if (value.indexOf('\\??\\') === 0) {
120-
return value.substr(4);
120+
return value.substring(4);
121121
} else if (value.indexOf('"\\\\?\\') === 0) {
122-
return '"' + value.substr(5);
122+
return '"' + value.substring(5);
123123
} else if (value.indexOf('"\\??\\') === 0) {
124-
return '"' + value.substr(5);
124+
return '"' + value.substring(5);
125125
} else {
126126
return value;
127127
}
@@ -169,10 +169,7 @@ export function listProcesses(rootPid: number): Promise<ProcessItem> {
169169
reject(new Error(`Root process ${rootPid} not found`));
170170
}
171171
});
172-
},
173-
// Workaround duplicate enum identifiers issue in @vscode/windows-process-tree
174-
// Ref https://github.com/microsoft/vscode/pull/179508
175-
(windowsProcessTree.ProcessDataFlag as any).CommandLine | (windowsProcessTree.ProcessDataFlag as any).Memory);
172+
}, windowsProcessTree.ProcessDataFlag.CommandLine | windowsProcessTree.ProcessDataFlag.Memory);
176173
});
177174
} else { // OS X & Linux
178175
function calculateLinuxCpuUsage() {

0 commit comments

Comments
 (0)