fix: improve socket fix error messages for misplaced IDs and missing directories#1199
Merged
Martin Torp (mtorp) merged 2 commits intov1.xfrom Apr 14, 2026
Merged
Conversation
…directories Detect when a GHSA/CVE/PURL identifier is passed as a positional argument instead of with --id and show a helpful suggestion. Also validate the target directory exists before making API calls. Bump version to 1.1.83.
Benjamin Barslev Nielsen (barslev)
approved these changes
Apr 14, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
socket fixinstead of with--id, and show a helpful "Did you mean" suggestionTest plan
./sd fix GHSA-xhpv-hc6g-r9c6→ shows "Did you mean: socket fix --id GHSA-xhpv-hc6g-r9c6"./sd fix CVE-2021-23337→ shows "Did you mean: socket fix --id CVE-2021-23337"./sd fix pkg:npm/lodash@4.17.20→ shows "Did you mean: socket fix --id pkg:npm/lodash@4.17.20"./sd fix /nonexistent/directory→ shows "Target directory does not exist: /nonexistent/directory"Note
High Risk
High risk because this PR replaces the package/build/CI tooling (new Rollup configs, new bins/exports, new lint/typecheck setup, and new GitHub workflows), which can easily affect distribution artifacts and publishing. It also changes
socket fixargument validation/behavior, so regressions could block fix flows in CI and local usage.Overview
Major toolchain + packaging overhaul. Replaces the previous JS-based CLI packaging with a pnpm + Rollup-based build system (new
.config/rollup.*, Babel/TS configs,bin/*entrypoints, updatedpackage.jsonexports/files/engines, pnpm overrides/patches, and new formatter/linter configs likeeslint.config.js,biome.json,oxlint).CI/CD changes. Removes the old Dependabot + reusable workflows and adds explicit GitHub Actions workflows for lint/typecheck/test, E2E, and npm publishing with provenance and Socket firewall shims.
User-facing
socket fiximprovements. Adds early validation that rejects positional GHSA/CVE/PURL arguments with a “Did you mean: socket fix --id …” hint, and checks that the target directory exists before making API calls; updates tests and bumps version to1.1.83with corresponding changelog entry.Reviewed by Cursor Bugbot for commit 7f8d472. Configure here.