Skip to content

Commit cf58f78

Browse files
committed
upgrade coana. fix formatting
1 parent 32add9c commit cf58f78

File tree

10 files changed

+40
-16
lines changed

10 files changed

+40
-16
lines changed

CHANGELOG.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,9 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/).
99
### Added
1010
- Added `--silence` flag to `socket fix` to suppress intermediate output and show only the final result.
1111

12+
### Changed
13+
- Updated the Coana CLI to v `14.12.139`.
14+
1215
## [1.1.51](https://github.com/SocketDev/socket-cli/releases/tag/v1.1.51) - 2025-12-23
1316

1417
### Added

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@
9494
"@babel/preset-typescript": "7.27.1",
9595
"@babel/runtime": "7.28.4",
9696
"@biomejs/biome": "2.2.4",
97-
"@coana-tech/cli": "14.12.138",
97+
"@coana-tech/cli": "14.12.139",
9898
"@cyclonedx/cdxgen": "11.11.0",
9999
"@dotenvx/dotenvx": "1.49.0",
100100
"@eslint/compat": "1.3.2",

pnpm-lock.yaml

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

src/commands/ci/fetch-default-org-slug.mts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,9 @@ import { fetchOrganization } from '../organization/fetch-organization-list.mts'
77
import type { CResult } from '../../types.mts'
88

99
// Use the config defaultOrg when set, otherwise discover from remote.
10-
export async function getDefaultOrgSlug(silence?: boolean): Promise<CResult<string>> {
10+
export async function getDefaultOrgSlug(
11+
silence?: boolean,
12+
): Promise<CResult<string>> {
1113
const defaultOrgResult = getConfigValueOrUndef('defaultOrg')
1214
if (defaultOrgResult) {
1315
debugFn(

src/commands/fix/cmd-fix.e2e.test.mts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -454,7 +454,9 @@ describe('socket fix (E2E tests)', async () => {
454454
'stderr should be empty when --silence is used',
455455
).toBe('')
456456

457-
logger.info('\nSuccessfully verified --silence --json outputs only JSON')
457+
logger.info(
458+
'\nSuccessfully verified --silence --json outputs only JSON',
459+
)
458460
} catch (e) {
459461
if (code !== 0) {
460462
logCommandOutput(code, stdout, stderr)

src/commands/fix/cmd-fix.mts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -170,8 +170,7 @@ Available styles:
170170
silence: {
171171
type: 'boolean',
172172
default: false,
173-
description:
174-
'Silence all output except the final result',
173+
description: 'Silence all output except the final result',
175174
},
176175
}
177176

src/commands/fix/coana-fix.mts

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,11 @@ async function discoverGhsaIds(
8989
...(ecosystems?.length ? ['--purl-types', ...ecosystems] : []),
9090
],
9191
orgSlug,
92-
{ cwd, spinner: silence ? undefined : spinner, coanaVersion: options?.coanaVersion },
92+
{
93+
cwd,
94+
spinner: silence ? undefined : spinner,
95+
coanaVersion: options?.coanaVersion,
96+
},
9397
{ stdio: 'pipe' },
9498
)
9599

@@ -417,7 +421,9 @@ export async function coanaFix(
417421

418422
if (!fixCResult.ok) {
419423
if (!silence) {
420-
logger.error(`Update failed for ${ghsaId}: ${getErrorCause(fixCResult)}`)
424+
logger.error(
425+
`Update failed for ${ghsaId}: ${getErrorCause(fixCResult)}`,
426+
)
421427
}
422428
continue ghsaLoop
423429
}

src/commands/scan/fetch-supported-scan-file-names.mts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,11 @@ export type FetchSupportedScanFileNamesOptions = {
1515
export async function fetchSupportedScanFileNames(
1616
options?: FetchSupportedScanFileNamesOptions | undefined,
1717
): Promise<CResult<SocketSdkSuccessResult<'getReportSupportedFiles'>['data']>> {
18-
const { sdkOpts, spinner, silence = false } = {
18+
const {
19+
sdkOpts,
20+
spinner,
21+
silence = false,
22+
} = {
1923
__proto__: null,
2024
...options,
2125
} as FetchSupportedScanFileNamesOptions

src/utils/api.mts

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -135,7 +135,12 @@ export async function handleApiCall<T extends SocketSdkOperations>(
135135
value: Promise<SocketSdkResult<T>>,
136136
options?: HandleApiCallOptions | undefined,
137137
): Promise<ApiCallResult<T>> {
138-
const { commandPath, description, spinner, silence = false } = {
138+
const {
139+
commandPath,
140+
description,
141+
spinner,
142+
silence = false,
143+
} = {
139144
__proto__: null,
140145
...options,
141146
} as HandleApiCallOptions

src/utils/package-environment.mts

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -244,7 +244,7 @@ function preferWindowsCmdShim(binPath: string, binName: string): string {
244244
if (!constants.WIN32) {
245245
return binPath
246246
}
247-
247+
248248
// Relative paths might be shell commands or aliases, not file paths with potential shims
249249
if (!path.isAbsolute(binPath)) {
250250
return binPath
@@ -327,7 +327,10 @@ async function getAgentVersion(
327327
shouldRunWithNode = resolved
328328
}
329329
} catch (e) {
330-
debugFn('warn', `Failed to resolve bin path for ${agentExecPath}, falling back to direct spawn.`)
330+
debugFn(
331+
'warn',
332+
`Failed to resolve bin path for ${agentExecPath}, falling back to direct spawn.`,
333+
)
331334
debugDir('error', e)
332335
}
333336
}

0 commit comments

Comments
 (0)