Repository navigation
Tags
Tags
fix(deps): update dependency @octokit/types to v18 (#834) * fix(deps): update dependency @octokit/types to v18 * bump --------- Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> Co-authored-by: wolfy1339 <webmaster@wolfy1339.com>
fix(deps): update dependency json-with-bigint and undici [security] (#… …830) * chore(deps): update dependency undici to v7.29.0 [security] * fix: bump json-with-bigint --------- Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> Co-authored-by: wolfy1339 <webmaster@wolfy1339.com>
fix(deps): update dependency @octokit/types to v17 (#828) * fix(deps): update dependency @octokit/types to v17 * bump deps * fix coverage --------- Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> Co-authored-by: wolfy1339 <webmaster@wolfy1339.com>
fix: don't decode application/octet-stream as text when charset is ut… …f-8 (#823) getResponseData() treats any response carrying charset=utf-8 as text, even application/octet-stream — the canonical "arbitrary binary" media type (RFC 2046). Binary content (e.g. a raw binary file fetched with mediaType: { format: "raw" }) is therefore run through response.text() and mangled instead of being returned as an ArrayBuffer. Exclude application/octet-stream from the charset-based text branch so it falls through to arrayBuffer(). Genuinely textual responses (text/* and other charset=utf-8 types such as application/vnd.github.v3.raw) are unaffected. Refs #751
fix: handle primitive JSON error bodies without throwing (#820) When an HTTP error response has `content-type: application/json` but the JSON body is a primitive (`null`, a number, a boolean), `toErrorMessage()` threw a raw `TypeError` from `"message" in data` before `RequestError` was constructed, so callers lost the `status`, `request`, and `response` fields. Guard the object-shaped branch with `typeof data === "object" && data !== null` so primitives fall through to the generic `Unknown error: ...` message and a proper `RequestError` is thrown. Also widen the parameter type to `unknown`, which reflects that the parsed body can be any JSON value. Fixes #819
fix: use `json-with-bigint` instead of built-in JSON methods in order… … to properly support int64's (#798) * Refactor JSON response handling in fetch-wrapper * Add text variable for JSON response parsing Initialize text variable for JSON response handling. * Update src/fetch-wrapper.ts * Apply suggestions from code review * switch to json-with-bigint * Add test * properly serialises request bodies that contain int64 (BigInt) * remove test * bump endpoints
PreviousNext