Repository navigation
Prepare Clearfetch 2.0.0 release - #53
Merged
Merged
Conversation
Race pending response hooks against cancellation and observe late rejections. Retain caller abort forwarding for raw response bodies without strongly retaining abandoned requests. Cover hook settlement, native streaming cancellation, and garbage collection; document the response handoff contract.
Give established cancellation precedence over existing clearfetch errors while preserving the abort reason as the cause. Add fetch, parser, and retry-backoff regressions and record the behavior in the changelog.
Remove JSON intersections and preserve response-mode covariance for clients and extracted methods. Add broad overloads for dynamic request options while retaining precise literal overloads. Cover source and packed declarations across supported TypeScript versions and document the annotation compatibility change.
- Stop pending hooks on caller abort while preserving timeout start semantics. - Preserve abort causes and observe late hook rejections without running later hooks. - Add cancellation regressions and document the hook lifecycle behavior.
- Recover client and request onError lists independently during normalization failures. - Keep valid client observers and preserve the original configuration error. - Cover malformed options through request and get, and document recovery behavior.
Remove the deprecated normalized-options export with source, declaration, and packed-package regressions. Add migration guidance for the breaking type changes and document cancellation and diagnostic boundaries. Align package versions, changelog, and release procedures while retaining existing runtime support and package-size budgets.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Prepare Clearfetch 2.0.0 to correct client response-mode typing and make cancellation reliable through pending hooks and raw response body reads. The major version communicates the TypeScript compatibility changes; runtime support and zero runtime dependencies remain unchanged.
Breaking changes
HttpClienttype. For example, useHttpClient<'text'>instead ofHttpClientforcreateClient({ responseType: 'text' }), or let inference preserve the mode.NormalizedRequestOptionspublic export.MIGRATION.mdexplains the appropriate public request, client-default, and hook-option types.Other changes
AbortRequestError.causeand valid client error observers when request configuration is malformed.Validation
One initial focused cancellation run stalled and was terminated. The full suite subsequently passed, including the final staged run; the affected four-file selection also passed 12 bounded repetitions. No source defect was established, and the initial stall remains unexplained.
Hosted CI and dependency review are separate merge gates. This PR does not tag or publish: after merge and passing checks, create the annotated v2.0.0 tag on main and verify npm integrity/provenance and the matching GitHub Release through the existing workflow.