Skip to content

Conversation

BlackAsLight
Copy link
Contributor

This pull request marks the AbortStream class for deprecation in place of .pipeThrough's options to accept an AbortSignal: https://developer.mozilla.org/en-US/docs/Web/API/ReadableStream/pipeThrough#signal

Old Code:

import { AbortStream } from "jsr:@std/streams/unstable-abort-stream";

const controller = new AbortController();

const readable = (await Deno.open("deno.json"))
  .readable
  .pipeThrough(new CompressionStream("gzip"))
  .pipeThrough(new AbortStream(controller.signal));

New Code:

const controller = new AbortController();

const readable = (await Deno.open("deno.json"))
  .readable
  .pipeThrough(new CompressionStream("gzip"), { signal: controller.signal });

@BlackAsLight BlackAsLight changed the title deprecate(streams): AbortStream deprecation(streams): AbortStream Aug 15, 2025
Copy link

codecov bot commented Aug 15, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 94.18%. Comparing base (6b92bff) to head (5ca7525).
⚠️ Report is 3 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #6799      +/-   ##
==========================================
- Coverage   94.19%   94.18%   -0.02%     
==========================================
  Files         590      590              
  Lines       42577    42577              
  Branches     6718     6716       -2     
==========================================
- Hits        40107    40102       -5     
- Misses       2421     2426       +5     
  Partials       49       49              

☔ 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.

@BlackAsLight BlackAsLight changed the title deprecation(streams): AbortStream deprecation(streams): AbortStrea Aug 15, 2025
@BlackAsLight BlackAsLight changed the title deprecation(streams): AbortStrea deprecation(streams): AbortStream Aug 15, 2025
@kt3k kt3k changed the title deprecation(streams): AbortStream deprecation(streams/unstable): AbortStream Aug 18, 2025
Copy link
Member

@kt3k kt3k left a comment

Choose a reason for hiding this comment

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

LGTM. Nice

@kt3k kt3k merged commit 840057c into denoland:main Aug 18, 2025
22 of 23 checks passed
@BlackAsLight BlackAsLight deleted the abort_stream branch August 18, 2025 06:49
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.

2 participants