Skip to content

Commit 30a5cec

Browse files
committed
fix(deps): update @socketsecurity/lib to v5.5.3 and add signal-exit v4 compatibility patches
- Update @socketsecurity/lib from 5.5.2 to 5.5.3 - Add signal-exit override to force v4.1.0 everywhere - Add execa@2.1.0 and execa@5.1.1 patches for signal-exit v4 compatibility - Update ink@6.3.1 patch to use named import for signal-exit v4 - Fixes "onExit3/onExit4 is not a function" errors when using cdxgen command
1 parent 511c56d commit 30a5cec

File tree

11 files changed

+101
-63
lines changed

11 files changed

+101
-63
lines changed

package.json

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "socket-cli-monorepo",
33
"version": "0.0.0",
4-
"packageManager": "pnpm@10.28.0",
4+
"packageManager": "pnpm@10.28.1",
55
"private": true,
66
"engines": {
77
"node": ">=24.10.0",
@@ -188,6 +188,7 @@
188188
"semver": "catalog:",
189189
"set-function-length": "catalog:",
190190
"shell-quote": "catalog:",
191+
"signal-exit": "4.1.0",
191192
"side-channel": "catalog:",
192193
"string_decoder": "catalog:",
193194
"string-width": "catalog:",
@@ -205,6 +206,8 @@
205206
"@npmcli/run-script@9.1.0": "patches/@npmcli__run-script@9.1.0.patch",
206207
"@npmcli/run-script@10.0.3": "patches/@npmcli__run-script@10.0.3.patch",
207208
"@sigstore/sign@4.1.0": "patches/@sigstore__sign@4.1.0.patch",
209+
"execa@2.1.0": "patches/execa@2.1.0.patch",
210+
"execa@5.1.1": "patches/execa@5.1.1.patch",
208211
"ink@6.3.1": "patches/ink@6.3.1.patch",
209212
"node-gyp@11.5.0": "patches/node-gyp@11.5.0.patch",
210213
"node-gyp@12.1.0": "patches/node-gyp@12.1.0.patch"

packages/cli/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@
8888
"@socketsecurity/lib": "catalog:",
8989
"@socketsecurity/registry": "catalog:",
9090
"@socketsecurity/sdk": "catalog:",
91-
"@types/react": "^19.2.8",
91+
"@types/react": "^19.2.9",
9292
"ajv-dist": "catalog:",
9393
"ansi-regex": "catalog:",
9494
"brace-expansion": "catalog:",

packages/cli/test/unit/commands/scan/handle-create-new-scan.test.mts

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -144,11 +144,9 @@ describe('handleCreateNewScan', () => {
144144
})
145145

146146
it('creates scan successfully with found files', async () => {
147-
// biome-ignore lint/correctness/noUnusedVariables: imported for mocking.
148147
const { fetchSupportedScanFileNames } = await import(
149148
'../../../../src/commands/scan/fetch-supported-scan-file-names.mts'
150149
)
151-
// biome-ignore lint/correctness/noUnusedVariables: imported for mocking.
152150
const { getPackageFilesForScan } = await import(
153151
'../../../../src/utils/fs/path-resolve.mts'
154152
)
@@ -231,15 +229,12 @@ describe('handleCreateNewScan', () => {
231229
})
232230

233231
it('handles no eligible files found', async () => {
234-
// biome-ignore lint/correctness/noUnusedVariables: imported for mocking.
235232
const { fetchSupportedScanFileNames } = await import(
236233
'../../../../src/commands/scan/fetch-supported-scan-file-names.mts'
237234
)
238-
// biome-ignore lint/correctness/noUnusedVariables: imported for mocking.
239235
const { getPackageFilesForScan } = await import(
240236
'../../../../src/utils/fs/path-resolve.mts'
241237
)
242-
// biome-ignore lint/correctness/noUnusedVariables: imported for mocking.
243238
const { checkCommandInput } = await import(
244239
'../../../../src/utils/validation/check-input.mts'
245240
)

packages/cli/test/unit/commands/scan/handle-scan-view.test.mts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,6 @@ describe('handleScanView', () => {
4040
})
4141

4242
it('fetches and outputs scan view successfully', async () => {
43-
// biome-ignore lint/correctness/noUnusedVariables: imported for mocking.
4443
const { fetchScan } = await import(
4544
'../../../../../src/commands/scan/fetch-scan.mts'
4645
)
@@ -76,7 +75,6 @@ describe('handleScanView', () => {
7675
})
7776

7877
it('handles fetch failure', async () => {
79-
// biome-ignore lint/correctness/noUnusedVariables: imported for mocking.
8078
const { fetchScan } = await import(
8179
'../../../../../src/commands/scan/fetch-scan.mts'
8280
)

packages/cli/test/unit/utils/coana/extract-scan-id.test.mts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,6 @@ vi.mock('@socketsecurity/lib/fs', () => ({
3232
describe('coana utilities', () => {
3333
describe('extractTier1ReachabilityScanId', () => {
3434
it('extracts scan ID from valid socket facts file', async () => {
35-
// biome-ignore lint/correctness/noUnusedVariables: imported for mocking.
3635
const { readJsonSync } = vi.mocked(await import('@socketsecurity/lib/fs'))
3736
mockReadJsonSync.mockReturnValue({
3837
tier1ReachabilityScanId: 'scan-123-abc',

packages/cli/test/unit/utils/dlx/binary.test.mts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,11 @@ import path from 'node:path'
1616

1717
import { describe, expect, it } from 'vitest'
1818

19-
import { cleanDlxCache, getDlxCachePath, listDlxCache } from '@socketsecurity/lib/dlx/binary'
19+
import {
20+
cleanDlxCache,
21+
getDlxCachePath,
22+
listDlxCache,
23+
} from '@socketsecurity/lib/dlx/binary'
2024
import { normalizePath } from '@socketsecurity/lib/paths/normalize'
2125
import { getSocketHomePath } from '@socketsecurity/lib/paths/socket'
2226

patches/execa@2.1.0.patch

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
diff --git a/lib/kill.js b/lib/kill.js
2+
index dc1c77c38407a9157cfc847c78deaac17b8898bb..998d34578b1d3a360c2a0c7a2dc0acb6d5c15ea0 100644
3+
--- a/lib/kill.js
4+
+++ b/lib/kill.js
5+
@@ -1,6 +1,6 @@
6+
'use strict';
7+
const os = require('os');
8+
-const onExit = require('signal-exit');
9+
+const { onExit } = require('signal-exit');
10+
const pFinally = require('p-finally');
11+
12+
const DEFAULT_FORCE_KILL_TIMEOUT = 1000 * 5;

patches/execa@5.1.1.patch

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
diff --git a/lib/kill.js b/lib/kill.js
2+
index 287a14238ea9fa99b3a9c0bdaabd13df72230d78..998d34578b1d3a360c2a0c7a2dc0acb6d5c15ea0 100644
3+
--- a/lib/kill.js
4+
+++ b/lib/kill.js
5+
@@ -1,6 +1,6 @@
6+
'use strict';
7+
const os = require('os');
8+
-const onExit = require('signal-exit');
9+
+const { onExit } = require('signal-exit');
10+
11+
const DEFAULT_FORCE_KILL_TIMEOUT = 1000 * 5;
12+

patches/ink@6.3.1.patch

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,16 @@
1+
diff --git a/build/ink.js b/build/ink.js
2+
index 5c3dd7e8e3b3a77fe2bbf6e3e94d67f5820e2076..7a6d8e5f9d9c6f0da9b41f6b6d7f9e8e9a0a1b2b3 100644
3+
--- a/build/ink.js
4+
+++ b/build/ink.js
5+
@@ -4,7 +4,7 @@ import { throttle } from 'es-toolkit/compat';
6+
import ansiEscapes from 'ansi-escapes';
7+
import isInCi from 'is-in-ci';
8+
import autoBind from 'auto-bind';
9+
-import signalExit from 'signal-exit';
10+
+import { onExit as signalExit } from 'signal-exit';
11+
import patchConsole from 'patch-console';
12+
import { LegacyRoot } from 'react-reconciler/constants.js';
13+
import Yoga from 'yoga-layout';
114
diff --git a/build/reconciler.js b/build/reconciler.js
215
index dbcad54d70b0870a469eb5767bae375f6804eb36..c9013afef1c67e820dc3595a4b2d648d0456c2fb 100644
316
--- a/build/reconciler.js

0 commit comments

Comments
 (0)