Release 1.1
From the last minor release (1.0), many things have happened.
This release includes new features and many small fixes and refactors that improve the library’s overall quality. We took a huge step toward making Fx-Fetch much more agnostic to the runtime environment by making the tsconfig DOM agnostic.
Try it out
Section titled “Try it out”npm install fx-fetch@1.1.0pnpm add fx-fetch@1.1.0bun add fx-fetch@1.1.0deno install npm:fx-fetch@1.1.0Changelog since 1.0
Section titled “Changelog since 1.0”🚀 Features
Section titled “🚀 Features”- Implement
readJsonWithStandardSchemaV1function for JSON response validation with Standard Schema (5468cb0) - Add
notOkEitherfunction to encapsulateResponseandNotOkErrorin Either type (8588a8e)
📐 Refactor
Section titled “📐 Refactor”- Make tsconfig dom agnostic (a596483)
- Add unit tests for
readJsonWithStandardSchemaV1function (ce0f0e8) - Add unit tests for
Response.notOkEitherfunction (8598fa8) - Add unit tests for dual api cases (a1044fb)
- Make tsconfig dom agnostic (7138fc6)
- Improve tree shaking ability (8407731)
- Use verbatimModuleSyntax (2a3ca15)
- Simplify tsconfig.json for better module handling (bd9d487)
- Add missing toParts function to convert Request to its constituent parts (cc9b330)
- Add topLevelNamedReexports to TypeScript plugin configuration (50516fa)
- Improve tree shaking ability (#38)
- Add deprecation notice for
Response.Response.Optionstype (a2a1ded) - replace generic Error with IllegalArgumentException in response handling functions (804d6f2)
🩹 Fixes
Section titled “🩹 Fixes”- Update dual function to validate request type in
deleteHeader(a345190) - Update dual function to validate response type in
deleteHeader(57c4e66) - Update dual function to validate url type in
deleteSearchParam(0a4e4f1) - Correct TaggedError tag for MalformedReadableStreamError (de78128)
- Throw RuntimeException for unknown fetch errors (0913ecc)
- Update example in toJsHeaders documentation for clarity and consistency (0f0e467)
- Fix formatting of the URL credentials. (83b8925)
- Fix the implementation of Url.deleteSearchParam and the dual API (d8cfa34)
- Implementation of readBodyAsBytesOrThrow fixed. It now returns a Uint8Array, as intended. (4be1460)
- Add missing dual api to fetchStream function (f2050eb)
❤️ Thank You
Section titled “❤️ Thank You”- Adam Josefus @adamjosefus