Skip to content

Commit 95e562b

Browse files
committed
Bump to v1.9.0
1 parent 8e5e3e4 commit 95e562b

2 files changed

Lines changed: 16 additions & 1 deletion

File tree

CHANGELOG.md

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,21 @@ All notable changes to this project will be documented in this file.
44

55
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/).
66

7+
## [1.9.0](https://github.com/SocketDev/socket-sdk-js/releases/tag/v1.9.0) - 2025-10-03
8+
9+
### Changed
10+
- **BREAKING**: Improved `SocketSdkResult` type compatibility - success and error results now have symmetric properties (`data`, `error`, `cause`) with explicit `undefined` types for better TypeScript narrowing
11+
- **BREAKING**: Removed `CResult` type (CLI-specific) in favor of SDK-appropriate `SocketSdkGenericResult` type for `getApi()` and `sendApi()` methods
12+
- Updated `getApi()` and `sendApi()` to use `SocketSdkGenericResult` with consistent HTTP status codes instead of CLI exit codes
13+
- All result types now use `success` discriminant with `status` (HTTP code), `data`, `error`, and `cause` properties on both branches
14+
15+
### Migration Guide
16+
- If using `getApi()` or `sendApi()` with `throws: false`, update from `CResult` to `SocketSdkGenericResult`
17+
- Change `.ok` checks to `.success`
18+
- Change `.code` to `.status` (now contains HTTP status code)
19+
- Change `.message` to `.error`
20+
- Both success and error branches now have all properties - check discriminant first with `if (result.success)`
21+
722
## [1.8.6](https://github.com/SocketDev/socket-sdk-js/releases/tag/v1.8.6) - 2025-10-02
823

924
### Changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@socketsecurity/sdk",
3-
"version": "1.8.6",
3+
"version": "1.9.0",
44
"license": "MIT",
55
"description": "SDK for the Socket API client",
66
"author": {

0 commit comments

Comments
 (0)