@socketsecurity/lib 5.11.4 → 5.12.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -5,6 +5,23 @@ All notable changes to this project will be documented in this file.
5
5
  The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
6
6
  and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
7
7
 
8
+ ## [5.12.0](https://github.com/SocketDev/socket-lib/releases/tag/v5.12.0) - 2026-04-04
9
+
10
+ ### Added — http-request
11
+
12
+ - Lifecycle hooks (`onRequest`/`onResponse`) on `HttpRequestOptions` (#133)
13
+ - Fire per-attempt — retries and redirects each trigger separate hook calls
14
+ - `HttpHooks`, `HttpHookRequestInfo`, `HttpHookResponseInfo` types exported
15
+ - `maxResponseSize` option to reject responses exceeding a byte limit
16
+ - Works through redirects, `httpJson`, and `httpText`
17
+ - `rawResponse` property on `HttpResponse` exposing the underlying `IncomingMessage`
18
+ - `enrichErrorMessage()` exported for reusable error enrichment
19
+
20
+ ### Changed — http-request
21
+
22
+ - Error messages now include HTTP method and URL for easier debugging
23
+ - `HttpResponse.headers` type changed from `Record<string, string | string[] | undefined>` to `IncomingHttpHeaders`
24
+
8
25
  ## [5.11.4](https://github.com/SocketDev/socket-lib/releases/tag/v5.11.4) - 2026-03-28
9
26
 
10
27
  ### Changed