Skip to content

Commit bddfc80

Browse files
remove unnecessary code
Signed-off-by: nkomonen-amazon <[email protected]>
1 parent 0c4289b commit bddfc80

File tree

8 files changed

+3
-343
lines changed

8 files changed

+3
-343
lines changed

package-lock.json

Lines changed: 2 additions & 35 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

packages/core/package.json

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4183,8 +4183,6 @@
41834183
"mime-types": "^2.1.32",
41844184
"node-fetch": "^2.7.0",
41854185
"portfinder": "^1.0.32",
4186-
"proper-lockfile": "^4.1.2",
4187-
"ps-list": "^8.1.1",
41884186
"semver": "^7.5.4",
41894187
"stream-buffers": "^3.0.2",
41904188
"strip-ansi": "^5.2.0",

packages/core/src/shared/fs/node/fs.ts

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

packages/core/src/shared/utilities/processUtils.ts

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@ import * as proc from 'child_process'
77
import * as crossSpawn from 'cross-spawn'
88
import * as logger from '../logger'
99
import { Timeout, CancellationError, waitUntil } from './timeoutUtils'
10-
import { isWeb } from '../extensionGlobals'
1110

1211
interface RunParameterContext {
1312
/** Reports an error parsed from the stdin/stdout streams. */
@@ -366,17 +365,3 @@ export class ChildProcess {
366365
return `${pid} [${this.#command} ${noparams ? '...' : this.#args.join(' ')}]`
367366
}
368367
}
369-
370-
/**
371-
* Returns a sorted list of all PIDs currently running
372-
*/
373-
export async function getPids(): Promise<number[]> {
374-
if (isWeb()) {
375-
throw new Error('getPids() is not supported in web mode')
376-
}
377-
// Note: This is an ESM module, which is why we cannot import it the standard way
378-
// Note: This module is explicitly excluded in the web mode webpack since this breaks the bundling.
379-
const psList = (await import('ps-list')).default
380-
const pids = (await psList()).map((p) => p.pid)
381-
return pids.sort((a, b) => a - b)
382-
}

packages/core/src/shared/utilities/searchUtils.ts

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

packages/core/src/test/shared/fs/node/fs.test.ts

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

packages/core/src/test/shared/utilities/processUtils.test.ts

Lines changed: 1 addition & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ import * as fs from 'fs-extra'
88
import * as os from 'os'
99
import * as path from 'path'
1010
import { makeTemporaryToolkitFolder, tryRemoveFolder } from '../../../shared/filesystemUtilities'
11-
import { ChildProcess, eof, getPids } from '../../../shared/utilities/processUtils'
11+
import { ChildProcess, eof } from '../../../shared/utilities/processUtils'
1212
import { sleep } from '../../../shared/utilities/timeoutUtils'
1313
import { Timeout, waitUntil } from '../../../shared/utilities/timeoutUtils'
1414

@@ -344,16 +344,3 @@ describe('ChildProcess', async function () {
344344
writeShellFile(filename, file)
345345
}
346346
})
347-
348-
describe('getPids', function () {
349-
it('returns pids sorted in ascending order', async function () {
350-
const pids = await getPids()
351-
assert.ok(pids.length > 0)
352-
assert.deepStrictEqual(
353-
pids.some((pid) => typeof pid !== 'number'),
354-
false
355-
)
356-
const sortedPids = [...pids].sort((a, b) => a - b)
357-
assert.deepStrictEqual(pids, sortedPids)
358-
})
359-
})

0 commit comments

Comments
 (0)