From f745080c21bd420c6a370f62915d97c88d4503d8 Mon Sep 17 00:00:00 2001 From: jdalton Date: Tue, 18 Nov 2025 14:25:16 -0800 Subject: [PATCH 1/3] Fix dlx test expectations to match pinned version format Update test package specs to use exact version '1.0.0' instead of '~1.0.0' to align with commit 62b3aead which removed tilde prefix from coana version specification. --- src/utils/dlx.test.mts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/utils/dlx.test.mts b/src/utils/dlx.test.mts index 150dd7fa9..c8fcf0562 100644 --- a/src/utils/dlx.test.mts +++ b/src/utils/dlx.test.mts @@ -66,7 +66,7 @@ describe('utils/dlx', () => { it('should place --silent before dlx for pnpm', async () => { const packageSpec: DlxPackageSpec = { name: '@coana-tech/cli', - version: '~1.0.0', + version: '1.0.0', } await spawnDlx(packageSpec, ['run', '/some/path'], { @@ -125,7 +125,7 @@ describe('utils/dlx', () => { it('should place --silent after --yes for npm', async () => { const packageSpec: DlxPackageSpec = { name: '@coana-tech/cli', - version: '~1.0.0', + version: '1.0.0', } await spawnDlx(packageSpec, ['run', '/some/path'], { From 7f7a945d86c0cd880d014e1dcceb7357867587fa Mon Sep 17 00:00:00 2001 From: jdalton Date: Tue, 18 Nov 2025 14:30:42 -0800 Subject: [PATCH 2/3] Fix mock-fs test failure caused by broken symlinks Add cleanup function to remove broken symlinks in node_modules before loading with mock-fs. This prevents ENOENT errors when mock-fs tries to stat broken symlinks during directory traversal. The broken symlinks were in @socketbin packages pointing to non-existent directories, which caused mockFs.load() to fail. --- src/utils/path-resolve.test.mts | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) diff --git a/src/utils/path-resolve.test.mts b/src/utils/path-resolve.test.mts index 4156aeaa6..d0fdbb397 100644 --- a/src/utils/path-resolve.test.mts +++ b/src/utils/path-resolve.test.mts @@ -1,3 +1,4 @@ +import { existsSync, lstatSync, readdirSync, rmSync } from 'node:fs' import path from 'node:path' import { fileURLToPath } from 'node:url' @@ -23,6 +24,36 @@ const __dirname = path.dirname(__filename) const rootNmPath = path.join(__dirname, '../..', NODE_MODULES) const mockFixturePath = normalizePath(path.join(__dirname, 'mock')) const mockNmPath = normalizePath(rootNmPath) + +// Remove broken symlinks in node_modules before loading to prevent mock-fs errors. +function cleanupBrokenSymlinks(dirPath: string): void { + try { + if (!existsSync(dirPath)) { + return + } + const entries = readdirSync(dirPath, { withFileTypes: true }) + for (const entry of entries) { + const fullPath = path.join(dirPath, entry.name) + try { + if (entry.isSymbolicLink() && !existsSync(fullPath)) { + // Symlink exists but target does not, remove it. + rmSync(fullPath, { force: true }) + } else if (entry.isDirectory()) { + // Recursively check subdirectories. + cleanupBrokenSymlinks(fullPath) + } + } catch { + // Ignore errors for individual entries. + } + } + } catch { + // If we cannot read the directory, skip cleanup. + } +} + +// Clean up broken symlinks before loading node_modules. +cleanupBrokenSymlinks(rootNmPath) + const mockedNmCallback = mockFs.load(rootNmPath) function mockTestFs(config: FileSystem.DirectoryItems) { From 34c9c4ad4c800f75885f56f5c5fc809066cceee2 Mon Sep 17 00:00:00 2001 From: jdalton Date: Tue, 18 Nov 2025 14:21:23 -0800 Subject: [PATCH 3/3] Bump version to 1.1.30 --- CHANGELOG.md | 9 +++++++++ package.json | 2 +- 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 6597be631..d727cedde 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,15 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/). +## [1.1.30](https://github.com/SocketDev/socket-cli/releases/tag/v1.1.30) - 2025-11-18 + +### Changed +- Enhanced `SOCKET_CLI_COANA_LOCAL_PATH` to support compiled Coana CLI binaries alongside Node.js script files + +### Fixed +- Resolved PR creation workflow to properly recreate pull requests after closing or merging +- Corrected API token selection to honor `SOCKET_CLI_API_TOKEN` environment variable in package alert requests + ## [1.1.29](https://github.com/SocketDev/socket-cli/releases/tag/v1.1.29) - 2025-11-16 ### Added diff --git a/package.json b/package.json index 817a1747b..a96d3ed11 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "socket", - "version": "1.1.29", + "version": "1.1.30", "description": "CLI for Socket.dev", "homepage": "https://github.com/SocketDev/socket-cli", "license": "MIT AND OFL-1.1",