Skip to content

fix: improve socket fix error messages for misplaced IDs and missing directories#1199

Merged
Martin Torp (mtorp) merged 2 commits intov1.xfrom
fix/fix-cmd-error-messages
Apr 14, 2026
Merged

fix: improve socket fix error messages for misplaced IDs and missing directories#1199
Martin Torp (mtorp) merged 2 commits intov1.xfrom
fix/fix-cmd-error-messages

Conversation

@mtorp
Copy link
Copy Markdown
Contributor

@mtorp Martin Torp (mtorp) commented Apr 14, 2026

Summary

  • Detect when a vulnerability ID (GHSA, CVE, or PURL) is passed as a positional argument to socket fix instead of with --id, and show a helpful "Did you mean" suggestion
  • Validate the target directory exists before making API calls, showing a clear error instead of a confusing "Need at least one file to be uploaded" API error
  • Bump version to 1.1.83

Test 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"
  • Type check passes
  • Lint passes
  • Integration tests updated and passing

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 fix argument 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, updated package.json exports/files/engines, pnpm overrides/patches, and new formatter/linter configs like eslint.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 fix improvements. 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 to 1.1.83 with corresponding changelog entry.

Reviewed by Cursor Bugbot for commit 7f8d472. Configure here.

…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.
@mtorp Martin Torp (mtorp) enabled auto-merge (squash) April 14, 2026 12:24
@mtorp Martin Torp (mtorp) merged commit b6c0ea4 into v1.x Apr 14, 2026
12 checks passed
@mtorp Martin Torp (mtorp) deleted the fix/fix-cmd-error-messages branch April 14, 2026 12:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants