Skip to content
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
32 changes: 1 addition & 31 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 0 additions & 2 deletions packages/core/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -502,8 +502,6 @@
"mime-types": "^2.1.32",
"node-fetch": "^2.7.0",
"portfinder": "^1.0.32",
"proper-lockfile": "^4.1.2",
"ps-list": "^8.1.1",
"semver": "^7.5.4",
"stream-buffers": "^3.0.2",
"strip-ansi": "^5.2.0",
Expand Down
76 changes: 0 additions & 76 deletions packages/core/src/shared/fs/node/fs.ts

This file was deleted.

15 changes: 0 additions & 15 deletions packages/core/src/shared/utilities/processUtils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ import * as proc from 'child_process'
import * as crossSpawn from 'cross-spawn'
import * as logger from '../logger'
import { Timeout, CancellationError, waitUntil } from './timeoutUtils'
import { isWeb } from '../extensionGlobals'

export interface RunParameterContext {
/** Reports an error parsed from the stdin/stdout streams. */
Expand Down Expand Up @@ -369,17 +368,3 @@ export class ChildProcess {
return `${pid} [${this.#command} ${noparams ? '...' : this.#args.join(' ')}]`
}
}

/**
* Returns a sorted list of all PIDs currently running
*/
export async function getPids(): Promise<number[]> {
if (isWeb()) {
throw new Error('getPids() is not supported in web mode')
}
// Note: This is an ESM module, which is why we cannot import it the standard way
// Note: This module is explicitly excluded in the web mode webpack since this breaks the bundling.
const psList = (await import('ps-list')).default
const pids = (await psList()).map((p) => p.pid)
return pids.sort((a, b) => a - b)
}
31 changes: 0 additions & 31 deletions packages/core/src/shared/utilities/searchUtils.ts

This file was deleted.

119 changes: 0 additions & 119 deletions packages/core/src/test/shared/fs/node/fs.test.ts

This file was deleted.

15 changes: 1 addition & 14 deletions packages/core/src/test/shared/utilities/processUtils.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import { fs as fs2 } from '../../../shared'
import * as os from 'os'
import * as path from 'path'
import { makeTemporaryToolkitFolder, tryRemoveFolder } from '../../../shared/filesystemUtilities'
import { ChildProcess, eof, getPids } from '../../../shared/utilities/processUtils'
import { ChildProcess, eof } from '../../../shared/utilities/processUtils'
import { sleep } from '../../../shared/utilities/timeoutUtils'
import { Timeout, waitUntil } from '../../../shared/utilities/timeoutUtils'

Expand Down Expand Up @@ -348,16 +348,3 @@ describe('ChildProcess', async function () {
await writeShellFile(filename, file)
}
})

describe('getPids', function () {
it('returns pids sorted in ascending order', async function () {
const pids = await getPids()
assert.ok(pids.length > 0)
assert.deepStrictEqual(
pids.some((pid) => typeof pid !== 'number'),
false
)
const sortedPids = [...pids].sort((a, b) => a - b)
assert.deepStrictEqual(pids, sortedPids)
})
})
Loading
Loading