Skip to content

fix: remove deprecated maxRedirections option from types #4363

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Jul 30, 2025

Conversation

mcollina
Copy link
Member

Summary

  • Remove deprecated maxRedirections option from TypeScript type definitions
  • Update type tests to remove usage of the deprecated option
  • Preserve maxRedirections in redirect interceptor where it's still valid

Test plan

  • TypeScript type checking tests pass (npm run test:typescript)
  • Linting passes (npm run lint)
  • All references to maxRedirections removed from public API types
  • Redirect interceptor functionality preserved

🤖 Generated with Claude Code

The maxRedirections option was removed in v7 but still remained in
TypeScript type definitions. This removes it from:

- Agent.Options and Agent.DispatchOptions
- Dispatcher ConnectOptions, RequestOptions, and UpgradeOptions
- Client.Options and H2CClient.Options
- MockInterceptor.MockResponseCallbackOptions

Also updates corresponding type tests to remove usage of the
deprecated option. The redirect interceptor still supports
maxRedirections as that functionality remains available.

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <[email protected]>
Signed-off-by: Matteo Collina <[email protected]>
@mcollina mcollina requested review from metcoder95 and Uzlopak July 28, 2025 20:04
Copy link
Member

@metcoder95 metcoder95 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm, some nits left

Signed-off-by: Matteo Collina <[email protected]>
@mcollina
Copy link
Member Author

@metcoder95 good spot!

@mcollina mcollina merged commit 567a589 into main Jul 30, 2025
33 checks passed
@github-actions github-actions bot mentioned this pull request Jul 31, 2025
@JoshMock JoshMock mentioned this pull request Aug 7, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants