Skip to content

Commit fb16a3d

Browse files
committed
fix: resolve TypeScript errors after nodeDebugFlags removal
Fixed type errors introduced by removing nodeDebugFlags: - Removed getNodeDebugFlags import from constants.mts (3 occurrences) - Added SpawnResult type import to dlx/spawn.mts - Fixed PromiseSpawnResult to Promise<SpawnResult> type conversions using double cast via unknown as TypeScript requires
1 parent 5911892 commit fb16a3d

File tree

2 files changed

+3
-6
lines changed

2 files changed

+3
-6
lines changed

packages/cli/src/constants.mts

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -211,7 +211,6 @@ import {
211211
getNmNpmPath,
212212
getNmPnpmPath,
213213
getNmYarnPath,
214-
getNodeDebugFlags,
215214
getNodeHardenFlags,
216215
getNodeNoWarningsFlags,
217216
getPackageJsonPath,
@@ -370,7 +369,6 @@ export {
370369
getNmNpmPath,
371370
getNmPnpmPath,
372371
getNmYarnPath,
373-
getNodeDebugFlags,
374372
getNodeHardenFlags,
375373
getNodeNoWarningsFlags,
376374
getNpmExecPath,
@@ -620,7 +618,6 @@ export default {
620618
getNmNpmPath,
621619
getNmPnpmPath,
622620
getNmYarnPath,
623-
getNodeDebugFlags,
624621
getNodeHardenFlags,
625622
getNodeNoWarningsFlags,
626623
getNpmExecPath,

packages/cli/src/utils/dlx/spawn.mts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ import type {
3434
ShadowBinResult,
3535
} from '../../shadow/npm-base.mjs'
3636
import type { CResult } from '../../types.mjs'
37-
import type { SpawnExtra } from '@socketsecurity/lib/spawn'
37+
import type { SpawnExtra, SpawnResult } from '@socketsecurity/lib/spawn'
3838

3939
export type DlxOptions = ShadowBinOptions & {
4040
agent?: 'npm' | 'pnpm' | 'yarn' | undefined
@@ -73,7 +73,7 @@ export async function spawnDlx(
7373
)
7474

7575
return {
76-
spawnPromise: result.spawnPromise,
76+
spawnPromise: result.spawnPromise as unknown as Promise<SpawnResult>,
7777
}
7878
}
7979

@@ -216,7 +216,7 @@ export async function spawnCdxgenDlx(
216216
})
217217

218218
return {
219-
spawnPromise: spawnResult,
219+
spawnPromise: spawnResult as unknown as Promise<SpawnResult>,
220220
}
221221
}
222222

0 commit comments

Comments
 (0)