Skip to content

Commit 2a4e41c

Browse files
committed
feat!: migrate patch command to @socketsecurity/socket-patch@1.2.0
BREAKING CHANGE: Replace custom built-in patch implementation with external @socketsecurity/socket-patch package, following the same integration pattern as Coana and SFW. Changes: - Add socket-patch@1.2.0 to external-tools.json - Create socket-patch spawn utility (src/utils/socket-patch/spawn.mts) - Add SOCKET_CLI_SOCKET_PATCH_LOCAL_PATH environment variable support - Replace 30+ custom patch files with simple wrapper that delegates to socket-patch - Move old custom implementation to patch-old/ for reference - Add INLINED_SOCKET_CLI_SOCKET_PATCH_VERSION to env constants BREAKING CHANGE: External tool version getters now throw errors instead of returning empty strings when versions are missing from external-tools.json. This affects getCoanaVersion(), getSwfVersion(), and getSocketPatchVersion(). Benefits: - Consistent external tool integration pattern across CLI - Reduces maintenance burden (socket-patch maintained separately) - Users get socket-patch updates without CLI releases - Simplified codebase (~30 files → 1 wrapper) Ported from v1.x commits: - 44655ac: Use @socketsecurity/socket-patch for patch command (#987) - dfe019d: feat: update @socketsecurity/socket-patch to v1.2.0 (#1030)
1 parent 3712e70 commit 2a4e41c

39 files changed

+250
-37
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/).
88

99
### Changed
1010
- Updated Coana CLI to v14.12.148.
11+
- Updated to @socketsecurity/socket-patch@1.2.0.
1112

1213
### Fixed
1314
- Prevent heap overflow in large monorepo scans by using streaming-based filtering to avoid accumulating all file paths in memory before filtering.

packages/cli/external-tools.json

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,12 @@
2424
"package": "socketsecurity",
2525
"version": "^2.2.15"
2626
},
27+
"socket-patch": {
28+
"description": "Socket Patch CLI for applying security patches",
29+
"type": "npm",
30+
"package": "@socketsecurity/socket-patch",
31+
"version": "1.2.0"
32+
},
2733
"sfw": {
2834
"description": "Socket Firewall (sfw)",
2935
"type": "standalone",

packages/cli/src/commands/patch/PatchSelectorApp.tsx renamed to packages/cli/src/commands/patch-old/PatchSelectorApp.tsx

File renamed without changes.
File renamed without changes.

packages/cli/src/commands/patch/cmd-patch-cleanup.mts renamed to packages/cli/src/commands/patch-old/cmd-patch-cleanup.mts

File renamed without changes.

packages/cli/src/commands/patch/cmd-patch-discover.mts renamed to packages/cli/src/commands/patch-old/cmd-patch-discover.mts

File renamed without changes.

packages/cli/src/commands/patch/cmd-patch-download.mts renamed to packages/cli/src/commands/patch-old/cmd-patch-download.mts

File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

0 commit comments

Comments
 (0)