Skip to content

Commit 5323642

Browse files
committed
chore(release): 5.13.0
1 parent 4ef6437 commit 5323642

File tree

3 files changed

+19
-2
lines changed

3 files changed

+19
-2
lines changed

CHANGELOG.md

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,20 @@ All notable changes to this project will be documented in this file.
55
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
66
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
77

8+
## [5.13.0](https://github.com/SocketDev/socket-lib/releases/tag/v5.13.0) - 2026-04-05
9+
10+
### Added — http-request
11+
12+
- `readIncomingResponse()` — reads and buffers a Node.js `IncomingResponse` into an `HttpResponse` (#143)
13+
- Useful for converting raw responses from code that bypasses `httpRequest()` (e.g. multipart form-data uploads) into the standard `HttpResponse` interface
14+
- `IncomingResponse` type alias — disambiguates `IncomingMessage` as a client-side response
15+
- `IncomingRequest` type alias — disambiguates `IncomingMessage` as a server-side request
16+
17+
### Changed — http-request
18+
19+
- Internal `httpRequestAttempt` callbacks now use `IncomingResponse` type
20+
- `HttpResponse.rawResponse` type narrowed from `IncomingMessage` to `IncomingResponse`
21+
822
## [5.12.0](https://github.com/SocketDev/socket-lib/releases/tag/v5.12.0) - 2026-04-04
923

1024
### Added — http-request

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@socketsecurity/lib",
3-
"version": "5.12.0",
3+
"version": "5.13.0",
44
"packageManager": "pnpm@10.33.0",
55
"license": "MIT",
66
"description": "Core utilities and infrastructure for Socket.dev security tools",

test/unit/http-request.test.mts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2149,7 +2149,10 @@ abc123def456789012345678901234567890123456789012345678901234abcd
21492149
expect(response.ok).toBe(true)
21502150
expect(response.status).toBe(200)
21512151
expect(response.statusText).toBe('OK')
2152-
expect(response.json()).toEqual({ message: 'Hello, World!', status: 'success' })
2152+
expect(response.json()).toEqual({
2153+
message: 'Hello, World!',
2154+
status: 'success',
2155+
})
21532156
expect(response.headers['content-type']).toBe('application/json')
21542157
expect(response.rawResponse).toBe(msg)
21552158
})

0 commit comments

Comments
 (0)