Skip to content

Commit a757f7b

Browse files
committed
Update logging modules
1 parent bedfc5b commit a757f7b

File tree

12 files changed

+153
-155
lines changed

12 files changed

+153
-155
lines changed

package-lock.json

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

package.json

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -58,10 +58,12 @@
5858
"@apideck/better-ajv-errors": "^0.3.6",
5959
"@cyclonedx/cdxgen": "^11.0.10",
6060
"@npmcli/promise-spawn": "^8.0.2",
61-
"@socketregistry/hyrious__bun.lockb": "1.0.10",
62-
"@socketregistry/yocto-spinner": "^1.0.3",
61+
"@socketregistry/hyrious__bun.lockb": "^1.0.11",
62+
"@socketregistry/indent-string": "^1.0.9",
63+
"@socketregistry/is-interactive": "^1.0.1",
64+
"@socketregistry/is-unicode-supported": "^1.0.0",
6365
"@socketsecurity/config": "^2.1.3",
64-
"@socketsecurity/registry": "^1.0.69",
66+
"@socketsecurity/registry": "^1.0.72",
6567
"@socketsecurity/sdk": "^1.4.5",
6668
"blessed": "^0.1.81",
6769
"blessed-contrib": "^4.11.0",
@@ -71,16 +73,14 @@
7173
"has-flag": "^4.0.0",
7274
"hpagent": "^1.2.0",
7375
"ignore": "^7.0.3",
74-
"is-interactive": "^2.0.0",
75-
"is-unicode-supported": "^2.1.0",
7676
"meow": "^13.2.0",
7777
"micromatch": "^4.0.8",
7878
"npm-package-arg": "^12.0.1",
7979
"open": "^10.1.0",
8080
"pony-cause": "^2.1.11",
8181
"semver": "^7.6.3",
8282
"synp": "^1.9.14",
83-
"terminal-link": "^3.0.0",
83+
"terminal-link": "^2.1.1",
8484
"tiny-updater": "^3.5.3",
8585
"tinyglobby": "^0.2.10",
8686
"which": "^5.0.0",
@@ -110,8 +110,8 @@
110110
"@types/micromatch": "^4.0.9",
111111
"@types/mocha": "^10.0.10",
112112
"@types/mock-fs": "^4.13.4",
113-
"@types/node": "^22.10.6",
114-
"@types/npmcli__arborist": "^5.6.11",
113+
"@types/node": "^22.10.7",
114+
"@types/npmcli__arborist": "^6.3.0",
115115
"@types/npmcli__promise-spawn": "^6.0.3",
116116
"@types/proc-log": "^3.0.4",
117117
"@types/semver": "^7.5.8",
@@ -130,7 +130,7 @@
130130
"eslint-plugin-sort-destructure-keys": "^2.0.0",
131131
"eslint-plugin-unicorn": "^56.0.1",
132132
"husky": "^9.1.7",
133-
"knip": "^5.42.0",
133+
"knip": "^5.42.1",
134134
"magic-string": "^0.30.17",
135135
"mock-fs": "^5.4.1",
136136
"nock": "^13.5.6",

src/cli.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,8 @@ import colors from 'yoctocolors-cjs'
88

99
import * as cliCommands from './commands'
1010
import constants from './constants'
11-
import { logSymbols } from './utils/color-or-markdown'
1211
import { AuthError, InputError } from './utils/errors'
12+
import { logSymbols } from './utils/log-symbols'
1313
import { meowWithSubcommands } from './utils/meow-with-subcommands'
1414

1515
const { rootPkgJsonPath } = constants

src/commands/login.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
import isInteractive from 'is-interactive'
21
import meow from 'meow'
32
import terminalLink from 'terminal-link'
43

4+
import isInteractive from '@socketregistry/is-interactive/index.cjs'
55
import { confirm, password, select } from '@socketsecurity/registry/lib/prompts'
66
import { Spinner } from '@socketsecurity/registry/lib/spinner'
77

src/commands/report/create.ts

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,10 +13,11 @@ import {
1313
handleApiCall,
1414
handleUnsuccessfulApiResponse
1515
} from '../../utils/api-helpers'
16-
import { ColorOrMarkdown, logSymbols } from '../../utils/color-or-markdown'
16+
import { ColorOrMarkdown } from '../../utils/color-or-markdown'
1717
import { InputError } from '../../utils/errors'
1818
import { getFlagListOutput } from '../../utils/formatting'
19-
import { createDebugLogger } from '../../utils/misc'
19+
import { logSymbols } from '../../utils/log-symbols'
20+
import { createDebugLogger } from '../../utils/logger'
2021
import { getPackageFiles } from '../../utils/path-resolve'
2122
import { setupSdk } from '../../utils/sdk'
2223

@@ -167,7 +168,7 @@ async function setupCommand(
167168
return
168169
}
169170
const { dryRun } = cli.flags
170-
const debugLog = createDebugLogger(!dryRun || (cli.flags['debug'] as boolean))
171+
const debugLog = createDebugLogger(!dryRun || !!cli.flags['debug'])
171172

172173
// TODO: Allow setting a custom cwd and/or configFile path?
173174
const cwd = process.cwd()

src/commands/scan/create.ts

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@ import {
1414
} from '../../utils/api-helpers'
1515
import { AuthError } from '../../utils/errors'
1616
import { getFlagListOutput } from '../../utils/formatting'
17-
import { createDebugLogger } from '../../utils/misc'
1817
import { getPackageFilesFullScans } from '../../utils/path-resolve'
1918
import { getDefaultToken, setupSdk } from '../../utils/sdk'
2019

@@ -168,12 +167,10 @@ async function setupCommand(
168167
})
169168
}
170169
)
171-
const debugLog = createDebugLogger(false)
172170
const packagePaths = await getPackageFilesFullScans(
173171
cwd,
174172
cli.input,
175-
supportedFiles,
176-
debugLog
173+
supportedFiles
177174
)
178175
const { branch: branchName, repo: repoName } = cli.flags
179176
if (!repoName || !branchName || !packagePaths.length) {

0 commit comments

Comments
 (0)