Skip to content

Commit

Permalink
Bump windows-process-tree (#184759)
Browse files Browse the repository at this point in the history
Fixes #179697
  • Loading branch information
rzhao271 committed Jun 12, 2023
1 parent bfe6dcb commit 13e7d80
Show file tree
Hide file tree
Showing 9 changed files with 29 additions and 95 deletions.
2 changes: 2 additions & 0 deletions build/.moduleignore
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,8 @@ fsevents/test/**
@vscode/windows-process-tree/binding.gyp
@vscode/windows-process-tree/build/**
@vscode/windows-process-tree/src/**
@vscode/windows-process-tree/tsconfig.json
@vscode/windows-process-tree/tslint.json
!@vscode/windows-process-tree/**/*.node

@vscode/windows-registry/binding.gyp
Expand Down
6 changes: 6 additions & 0 deletions build/.moduleignore.darwin
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,12 @@
@vscode/windows-mutex/*.md
@vscode/windows-mutex/package.json

@vscode/windows-process-tree/lib/**
@vscode/windows-process-tree/**/*.node
@vscode/windows-process-tree/LICENSE
@vscode/windows-process-tree/package.json
@vscode/windows-process-tree/*.md

@vscode/windows-registry/dist/**
@vscode/windows-registry/**/*.node
@vscode/windows-registry/*.md
Expand Down
6 changes: 6 additions & 0 deletions build/.moduleignore.linux
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,12 @@
@vscode/windows-mutex/*.md
@vscode/windows-mutex/package.json

@vscode/windows-process-tree/lib/**
@vscode/windows-process-tree/**/*.node
@vscode/windows-process-tree/LICENSE
@vscode/windows-process-tree/package.json
@vscode/windows-process-tree/*.md

@vscode/windows-registry/dist/**
@vscode/windows-registry/**/*.node
@vscode/windows-registry/*.md
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,7 @@
"@vscode/sudo-prompt": "9.3.1",
"@vscode/vscode-languagedetection": "1.0.21",
"@vscode/windows-mutex": "^0.4.4",
"@vscode/windows-process-tree": "^0.5.0",
"@vscode/windows-registry": "^1.1.0",
"graceful-fs": "4.2.8",
"http-proxy-agent": "^2.1.0",
Expand Down Expand Up @@ -227,7 +228,6 @@
"url": "https://github.com/microsoft/vscode/issues"
},
"optionalDependencies": {
"@vscode/windows-process-tree": "0.4.2",
"windows-foreground-love": "0.5.0"
}
}
4 changes: 1 addition & 3 deletions remote/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
"@vscode/ripgrep": "^1.15.4",
"@vscode/spdlog": "^0.13.10",
"@vscode/vscode-languagedetection": "1.0.21",
"@vscode/windows-process-tree": "^0.5.0",
"@vscode/windows-registry": "^1.1.0",
"cookie": "^0.4.0",
"graceful-fs": "4.2.8",
Expand All @@ -35,8 +36,5 @@
"xterm-headless": "5.3.0-beta.1",
"yauzl": "^2.9.2",
"yazl": "^2.4.3"
},
"optionalDependencies": {
"@vscode/windows-process-tree": "0.4.2"
}
}
8 changes: 4 additions & 4 deletions remote/yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -101,10 +101,10 @@
dependencies:
node-addon-api "^3.0.2"

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

Expand Down
75 changes: 0 additions & 75 deletions src/typings/windows-process-tree.d.ts

This file was deleted.

13 changes: 5 additions & 8 deletions src/vs/base/node/ps.ts
Original file line number Diff line number Diff line change
Expand Up @@ -115,13 +115,13 @@ export function listProcesses(rootPid: number): Promise<ProcessItem> {

const cleanUNCPrefix = (value: string): string => {
if (value.indexOf('\\\\?\\') === 0) {
return value.substr(4);
return value.substring(4);
} else if (value.indexOf('\\??\\') === 0) {
return value.substr(4);
return value.substring(4);
} else if (value.indexOf('"\\\\?\\') === 0) {
return '"' + value.substr(5);
return '"' + value.substring(5);
} else if (value.indexOf('"\\??\\') === 0) {
return '"' + value.substr(5);
return '"' + value.substring(5);
} else {
return value;
}
Expand Down Expand Up @@ -169,10 +169,7 @@ export function listProcesses(rootPid: number): Promise<ProcessItem> {
reject(new Error(`Root process ${rootPid} not found`));
}
});
},
// Workaround duplicate enum identifiers issue in @vscode/windows-process-tree
// Ref https://github.com/microsoft/vscode/pull/179508
(windowsProcessTree.ProcessDataFlag as any).CommandLine | (windowsProcessTree.ProcessDataFlag as any).Memory);
}, windowsProcessTree.ProcessDataFlag.CommandLine | windowsProcessTree.ProcessDataFlag.Memory);
});
} else { // OS X & Linux
function calculateLinuxCpuUsage() {
Expand Down
8 changes: 4 additions & 4 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -1400,10 +1400,10 @@
bindings "^1.2.1"
nan "^2.17.0"

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

Expand Down

0 comments on commit 13e7d80

Please sign in to comment.