Skip to content

Commit d078f9f

Browse files
committed
chore: bump version to 4.0.0
1 parent 9e46471 commit d078f9f

File tree

3 files changed

+23
-3
lines changed

3 files changed

+23
-3
lines changed

CHANGELOG.md

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,26 @@ 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+
## [4.0.0](https://github.com/SocketDev/socket-sdk-js/releases/tag/v4.0.0) - 2026-04-06
8+
9+
### Breaking Changes
10+
11+
- **HTTP client refactored**: All HTTP methods (`createGetRequest`, `createDeleteRequest`, `createRequestWithJson`, `createUploadRequest`) now return `HttpResponse` from `@socketsecurity/lib/http-request` instead of Node.js `IncomingMessage`
12+
- **`ResponseError.response`**: Changed from `IncomingMessage` to `HttpResponse` — access status via `.status`/`.statusText` instead of `.statusCode`/`.statusMessage`
13+
- **Removed exports**: `getHttpModule` and `getResponse` are no longer exported from the public API
14+
- **Removed `PromiseQueue`**: The `PromiseQueue` class has been removed entirely
15+
16+
### Changed
17+
18+
- Migrated HTTP internals to `@socketsecurity/lib/http-request` (`httpRequest` + `readIncomingResponse`), reducing code duplication and consolidating response handling
19+
- Batch PURL NDJSON parsing now uses buffered text split instead of `readline` streaming
20+
- Retry logic improved: all 4xx client errors now bail immediately (previously only 401/403)
21+
- Updated `@socketsecurity/lib` from 5.11.4 to 5.15.0
22+
23+
### Fixed
24+
25+
- Security: bumped `vite` override to 7.3.2, added `defu` override >=6.1.6
26+
727
## [3.5.0](https://github.com/SocketDev/socket-sdk-js/releases/tag/v3.5.0) - 2026-04-03
828

929
### Added

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": "3.5.0",
3+
"version": "4.0.0",
44
"description": "SDK for the Socket API client",
55
"homepage": "https://github.com/SocketDev/socket-sdk-js",
66
"license": "MIT",

src/socket-sdk-class.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1853,8 +1853,8 @@ export class SocketSdk {
18531853
const response = await httpRequest(url, {
18541854
method: 'GET',
18551855
headers: this.#reqOptions.headers as Record<string, string>,
1856-
timeout: this.#reqOptions.timeout,
18571856
stream: true,
1857+
timeout: this.#reqOptions.timeout,
18581858
})
18591859

18601860
if (!isResponseOk(response)) {
@@ -3766,8 +3766,8 @@ export class SocketSdk {
37663766
const response = await httpRequest(url, {
37673767
method: 'GET',
37683768
headers: this.#reqOptions.headers as Record<string, string>,
3769-
timeout: this.#reqOptions.timeout,
37703769
stream: needsStream,
3770+
timeout: this.#reqOptions.timeout,
37713771
...(!needsStream && { maxResponseSize: MAX_STREAM_SIZE }),
37723772
})
37733773

0 commit comments

Comments
 (0)