diff --git a/.changeset/tidy-ravens-report.md b/.changeset/tidy-ravens-report.md deleted file mode 100644 index 0df0776..0000000 --- a/.changeset/tidy-ravens-report.md +++ /dev/null @@ -1,17 +0,0 @@ ---- -"@api-wrappers/api-core": patch ---- - -Fix request-lifecycle edge cases and share GraphQL envelope handling: - -- `buildUrl` now inserts query parameters before a URL fragment instead of after it. -- Multipart, URL-encoded, and binary request bodies no longer receive a default `content-type: application/json`, so `fetch` can set the correct value (including the multipart boundary). -- GraphQL envelope validation is shared by `client.graphql()` and `graphqlWithResponse()`; a non-array `errors` field now throws `ApiError` instead of silently succeeding, while `errors: null` is treated as a successful response. -- `graphqlWithResponse()` reports GraphQL application errors and malformed envelopes to plugin `onError` hooks via the new `BaseHttpClient.notifyError()`, matching `client.graphql()`. -- `Retry-After` parsing is centralized so the retry loop and the header rate-limit plugin agree on delay-seconds and HTTP-date formats. -- Caller aborts are no longer retried; retry backoff waits are cancellable. -- A per-request `timeoutMs` takes precedence over the timeout plugin and `ClientConfig.timeoutMs`; `createTimeoutPlugin` rejects non-positive timeouts. -- Response parse failures now notify plugins through `onError`. -- Cache keys vary on the request body and cacheable-method matching is case-insensitive. -- `ApiError` (and subclasses) expose response `headers` and final `url` details. -- `mergeHeaders` skips `null`/`undefined` values instead of stringifying them. diff --git a/CHANGELOG.md b/CHANGELOG.md index 3547dbc..99f50e5 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,23 @@ # Changelog +## 1.1.1 + +### Patch Changes + +- bedf643: Fix request-lifecycle edge cases and share GraphQL envelope handling: + + - `buildUrl` now inserts query parameters before a URL fragment instead of after it. + - Multipart, URL-encoded, and binary request bodies no longer receive a default `content-type: application/json`, so `fetch` can set the correct value (including the multipart boundary). + - GraphQL envelope validation is shared by `client.graphql()` and `graphqlWithResponse()`; a non-array `errors` field now throws `ApiError` instead of silently succeeding, while `errors: null` is treated as a successful response. + - `graphqlWithResponse()` reports GraphQL application errors and malformed envelopes to plugin `onError` hooks via the new `BaseHttpClient.notifyError()`, matching `client.graphql()`. + - `Retry-After` parsing is centralized so the retry loop and the header rate-limit plugin agree on delay-seconds and HTTP-date formats. + - Caller aborts are no longer retried; retry backoff waits are cancellable. + - A per-request `timeoutMs` takes precedence over the timeout plugin and `ClientConfig.timeoutMs`; `createTimeoutPlugin` rejects non-positive timeouts. + - Response parse failures now notify plugins through `onError`. + - Cache keys vary on the request body and cacheable-method matching is case-insensitive. + - `ApiError` (and subclasses) expose response `headers` and final `url` details. + - `mergeHeaders` skips `null`/`undefined` values instead of stringifying them. + ## 1.1.0 ### Minor Changes diff --git a/package.json b/package.json index 6793406..eed8bd1 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@api-wrappers/api-core", - "version": "1.1.0", + "version": "1.1.1", "description": "Shared TypeScript HTTP runtime for Api-Wrappers packages with typed requests, plugins, retries, timeouts, GraphQL, and custom transports.", "repository": { "type": "git",