GitShow/denoland/std
denoland

std

The Deno Standard Library

by denoland
denojavascripttypescript
Star on GitHubForkWebsitenpm

TypeScript

3.6k stars679 forks599 contributorsActive · 3w agoSince 2018release-2026.07.30MIT

Meet the team

See all 599 on GitHub →
iuioiua
iuioiua895 contributions
kt3k
kt3k694 contributions
timreichen
timreichen423 contributions
bartlomieju
bartlomieju261 contributions
ry
ry169 contributions
denobot
denobot159 contributions
tomas-zijdemans
tomas-zijdemans138 contributions
caspervonb
caspervonb100 contributions

Languages

View on GitHub →
TypeScript96.5%
JavaScript3.3%
Rust0.2%

Commit activity

Last 12 weeks · 60 commits

Full graph →

Community health

4 of 6 standards met

Community profile →
87
✓README✓License✓Contributing✓Code of Conduct○Issue Template○PR Template

Recent PRs & issues

Active · Last activity 3w ago
See all on GitHub →
tomas-zijdemans
feat(http/unstable): add `isRetriableFetchError`OpenPR

Adds , the missing predicate for 's hook. It recognizes transient fetch failures without substring-matching arbitrary error messages. Implements the predicate half of #7296. The parser half is #7299. Retriable cases The predicate checks the thrown value and up to 8 objects in its chain, cycle-safe: a , or an with an integer from 100 through 599, when the status is 408, 429, or 5xx an whose is a known transient network code: or (Bun), or the errno-style , , , , (Bun and Node.js, including the of undici's ) a from APIs such as a with an exact known failed-fetch message: on Node.js and Deno 2.9+, one of the three browser strings, or the prefix from older Deno releases stays false. Abort is caller intent, so retrying it is a bug. Design notes 1. This uses instead of . That helper rejects unregistered codes such as Cloudflare's 520-526. A 522 test guards this. 2. Modern Deno throws , not , since denoland/deno#35618. The older prefix stays because pre-2.9 Deno remains in the CI matrix. 3. Bun does not throw yet (alignment is in flight in oven-sh/bun#35988 and oven-sh/bun#35998). Bun 1.4 throws TypeErrors identified by , with messages that cannot be exact-matched: the DNS failure embeds the hostname. Hence the code allowlist, verified against real Bun 1.4 fetch failures. Deterministic codes such as stay excluded, and a test guards non-string codes. Review notes Message matching is case-sensitive. That excludes deterministic Deno policy failures such as . A cross-runtime test closes an ephemeral local port, fetches it, and checks the real transport error. The test also runs under Node and Bun, the first test registered there. Errors that store a on , including ky/got-style errors, are outside this API. The remaining failure () is unrelated: a Bun 1.4.0 regression in construction that also reproduces on . Testing and pass, and (Bun 1.4.0) passes this module's tests. The new module has 19 tests with 100% line and branch coverage.

tomas-zijdemans · 2d ago
tomas-zijdemans
feat(async/unstable): add onRetry option to `retry()`OpenPR

Adds an unstable callback to so callers can log or measure retries without abusing . Stable stays untouched. Why runs before the attempts-remaining check, so it also sees the terminal failure that becomes . It cannot tell whether another attempt will follow. can. It fires after the retry decision is final, immediately before the backoff sleep. API is the 1-based number of the failed attempt. is the post-jitter delay passed to the sleep. The callback is synchronous. Its return value is ignored, and a throw stops retrying. It never fires for the terminal failure, an error rejected by , or an already-aborted signal. The callback observes a retry but cannot veto it or change its delay. Review and testing follows the unstable-first pattern previously used for and . Ten tests cover arguments, timing, terminal failure, rejected errors, and abort behavior. passes.

tomas-zijdemans · 2d ago
tomas-zijdemans
proposal(http): add `isRetriableFetchError` and a `Retry-After` parserOpenIssue

Is your feature request related to a problem? Please describe. grew an hook for exactly this job (#6196, stabilized in #6944), but std ships nothing to put in it. The JSDoc even shows users how to hand-roll the predicate: define your own , check (the "Only retry on specific error types" example in ). In the wild that copy-paste goes worse. A work codebase I maintain rolls this predicate in three places, each one matching substrings in ("429", "throttl", "timeout"). That false-positives the moment a payload containing "429" ends up in an error message. Everyone writing a fetch retry loop rebuilds this, and most versions are wrong in a different way. Describe the solution you'd like Two small unstable APIs in . Implementation: #7298 adds #7299 adds 1. A predicate for retry's hook Walks the value and its chain (depth-bounded, cycle-safe) and returns for: a thrown with status 408, 429, or any 5xx, including nonstandard codes such as Cloudflare's 522 an with an integer property in 100-599, using the same status test. This covers the class in 's own docs and other errors with a direct property a named , i.e. what throws a matching a known failed-fetch message ( on modern Deno, Node.js, and Bun, plus browser messages), or the prefix from older Deno releases. Never arbitrary substring search, for the reason above Everything else is , including : abort is caller intent, and retrying a cancelled request is a bug. False negatives are the safe direction, since the caller sees the original error immediately. Usage: 2. A parser Handles both RFC 9110 §10.2.3 forms (delta-seconds and HTTP-date), returns milliseconds to wait, when missing or unparseable. It takes the raw value from , with no dependency on the catalog. #7239 removes that catalog. Useful on its own today, and a prerequisite for ever honoring the header. Honoring it needs a per-attempt delay hook on , which would be a separate if this lands. Nothing here touches stable behavior. Why and not The substance is all HTTP: status classification, header parsing, fetch error shapes. Since is structurally , nothing here imports . No circular dependency, and stays free of domain knowledge. Describe alternatives you've considered Status quo: keep pointing users at the docs example. That example is how the substring heuristics happen. for the status check. (#7132) is still unstable. Direct integration can follow once it stabilizes. The structural check covers errors with a direct property today.

tomas-zijdemans · 2d ago
Structured data for AI agents

Repository: denoland/std. Description: The Deno Standard Library Stars: 3557, Forks: 679. Primary language: TypeScript. Languages: TypeScript (96.5%), JavaScript (3.3%), Rust (0.2%). License: MIT. Homepage: https://jsr.io/@std Topics: deno, javascript, typescript. Latest release: release-2026.07.30 (3w ago). Open PRs: 72, open issues: 243. Last activity: 3w ago. Community health: 87%. Top contributors: iuioiua, kt3k, timreichen, bartlomieju, ry, denobot, tomas-zijdemans, caspervonb, nayeemrmn, kitsonk and others.

·@ofershap

Replace github.com with gitshow.dev