Skip to content

BREAKING(async/unstable): change Lazy.peek() return type, add AbortSignal support#7084

Open
tomas-zijdemans wants to merge 4 commits intodenoland:mainfrom
tomas-zijdemans:lazy-improve
Open

BREAKING(async/unstable): change Lazy.peek() return type, add AbortSignal support#7084
tomas-zijdemans wants to merge 4 commits intodenoland:mainfrom
tomas-zijdemans:lazy-improve

Conversation

@tomas-zijdemans
Copy link
Copy Markdown
Contributor

@tomas-zijdemans tomas-zijdemans commented Apr 4, 2026

  • AbortSignal support added to get()
  • Fixed a subtle bug where get() silently swallowed rejections by attaching a handler directly to the returned promise, suppressing unhandledrejection for uncaught callers.
  • peek() now returns  a discriminated union matching the Channel.tryReceive() convention. This resolves the type-level ambiguity when T includes undefined.

  • Error-reset semantic documented 

@github-actions github-actions bot added the async label Apr 4, 2026
@codecov
Copy link
Copy Markdown

codecov bot commented Apr 4, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 94.41%. Comparing base (1cd63ca) to head (47a1e6a).

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #7084   +/-   ##
=======================================
  Coverage   94.41%   94.41%           
=======================================
  Files         630      630           
  Lines       50490    50508   +18     
  Branches     8949     8953    +4     
=======================================
+ Hits        47669    47688   +19     
  Misses       2249     2249           
+ Partials      572      571    -1     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@tomas-zijdemans tomas-zijdemans changed the title BREAKING(async/unstable): refactor Lazy API refactor(async/unstable): Add AbortSignal support to Lazy.get() Apr 4, 2026
@tomas-zijdemans tomas-zijdemans changed the title refactor(async/unstable): Add AbortSignal support to Lazy.get() BREAKING(async/unstable): Add AbortSignal support to Lazy.get() Apr 4, 2026
@tomas-zijdemans tomas-zijdemans changed the title BREAKING(async/unstable): Add AbortSignal support to Lazy.get() BREAKING(async/unstable): change Lazy.peek() return type, add AbortSignal support Apr 4, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant