Skip to content

Conversation

@jdalton
Copy link
Contributor

@jdalton jdalton commented Jan 25, 2026

Summary

Release v3.3.0 with new SDK convenience methods, alphabetical code organization, and updated dependencies.

Changes

New Features

  • New SDK convenience methods for OpenAPI v3.3.0 endpoints:

    • batchOrgPackageFetch(orgSlug, components, options) - Organization-scoped PURL batch lookup with security policy label support
    • exportOpenVEX(orgSlug, id, options) - Export vulnerability exploitability data as OpenVEX v0.2.0 documents (includes patch data and reachability analysis)
    • getOrgAlertFullScans(orgSlug, options) - List full scans associated with specific alerts
    • rescanFullScan(orgSlug, fullScanId, options) - Rescan existing full scans with shallow (policy reapplication) or deep (dependency resolution rerun) modes
  • Repository endpoints now support optional workspace parameter:

    • createRepository(orgSlug, params, { workspace })
    • deleteRepository(orgSlug, repoSlug, { workspace })
    • getRepository(orgSlug, repoSlug, { workspace })
    • updateRepository(orgSlug, repoSlug, { workspace })

Dependencies

  • Updated @socketsecurity/lib to v5.5.3
  • TypeScript: Auto-generated strict types from OpenAPI schema for improved type safety
  • TypeScript: All optional properties now explicitly include | undefined for better null checking
  • Synced OpenAPI type definitions with latest API specification

Test Plan

  • ✅ All 479 tests passing
  • ✅ Added 13 new tests for new API methods
  • ✅ TypeScript compilation successful
  • ✅ All linting checks passed
  • ✅ No functionality changes from alphabetical reorganization

Commits

  1. feat(sdk): add convenience methods for new API endpoints - New SDK methods
  2. refactor: organize methods alphabetically in .ts files - Code organization
  3. chore(release): bump version to 3.3.0 - Version bump

Add SDK convenience methods for new API endpoints introduced in OpenAPI v3.3.0:

- batchOrgPackageFetch(orgSlug, components, options): Organization-scoped PURL batch lookup with security policy label support
- rescanFullScan(orgSlug, fullScanId, options): Rescan existing full scans with shallow or deep modes
- exportOpenVEX(orgSlug, id, options): Export vulnerability exploitability data as OpenVEX v0.2.0 documents
- getOrgAlertFullScans(orgSlug, options): List full scans associated with specific alerts

All methods follow existing SDK patterns with:
- Comprehensive JSDoc documentation with examples
- Proper TypeScript type safety using OpenAPI operation types
- Full unit test coverage with success and error cases
- Alphabetical method placement in source code
Reorganize all methods in TypeScript files to be sorted alphabetically,
with private methods at the top and public/exported methods below.

Files modified:
- src/socket-sdk-class.ts: Reorganized 12 private methods and 70 public async methods
- src/utils.ts: Reorganized 9 exported functions (1 private at top)
- src/http-client.ts: Reorganized 14 exported functions
- src/promise-queue.ts: Reorganized 5 class methods

All reorganizations preserved:
- Complete method implementations
- JSDoc comments
- Decorators
- Type annotations
- Coverage ignore comments

No functionality changes - only method ordering.
Add async delay before cleanup in afterEach hooks to prevent race
condition on Windows where temp directory is removed while upload
requests are still reading files.

The issue occurred because:
- Windows file I/O has different timing characteristics than Unix
- Temp directory cleanup happened synchronously without waiting for
  async upload operations to complete
- This caused ENOENT errors when upload tried to read already-deleted files

Fix:
- Import setTimeout as sleep from node:timers/promises
- Add await sleep(10) before rmSync in all upload test afterEach hooks
- Matches existing pattern from first describe block that was already working
- Allows async file operations to complete before cleanup

Fixes Windows CI test failure:
"should handle server rejection before upload completes"
@jdalton jdalton enabled auto-merge (rebase) January 25, 2026 23:34
@jdalton jdalton merged commit 294be4c into main Jan 26, 2026
8 checks passed
@jdalton jdalton deleted the version-3.3.0 branch January 26, 2026 14:51
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.

3 participants