Skip to content

fix: restore metadata request timeout#274

Open
Perdolique wants to merge 1 commit into
antfu-collective:mainfrom
Perdolique:fix/metadata-request-timeout
Open

fix: restore metadata request timeout#274
Perdolique wants to merge 1 commit into
antfu-collective:mainfrom
Perdolique:fix/metadata-request-timeout

Conversation

@Perdolique

@Perdolique Perdolique commented May 24, 2026

Copy link
Copy Markdown
Contributor

🧭 Context

Package metadata requests could hang longer than expected in the interactive flow, especially when upstream package metadata APIs were slow or did not settle promptly after abort.

This change restores fast timeout handling, makes the timeout configurable, and avoids duplicate in-flight metadata fetches for the same package.

I'm getting this timeout problem almost every time with packages drizzle-orm, drizzle-kit and drizzle-seed. Each of them has almost a hundred dist-tags.

📚 Description

This PR adds a new CLI option, --request-timeout <ms>, and a matching config key, requestTimeout, for controlling how long taze waits for package metadata responses.

It also restores fast timeout handling, aborts slow requests, and deduplicates concurrent fetches for the same package so we do not hit the registry multiple times for identical data.

@Perdolique Perdolique marked this pull request as draft May 24, 2026 11:20
@Perdolique Perdolique force-pushed the fix/metadata-request-timeout branch from ecc536b to 34b6d37 Compare May 24, 2026 11:32
- 🐛 Add a configurable request timeout for package metadata fetches
- ⚡ Restore fast timeout handling while still aborting underlying requests
- ♻️ Dedupe concurrent package metadata lookups in resolves cache
- ✅ Add regression coverage for CLI, timeout, and dedupe flows
@Perdolique Perdolique force-pushed the fix/metadata-request-timeout branch from 34b6d37 to 3937271 Compare May 25, 2026 07:45
@Perdolique Perdolique marked this pull request as ready for review May 25, 2026 07:48
@firatciftci

Copy link
Copy Markdown
Contributor

The configurable timeout duration feature is quite important! I've been getting more and more timeouts while using taze, which then forces me to run the command multiple times to try to check everything, which is less than ideal.

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