Skip to content

Proposal: deprecate @std/io #7258

Description

@tomas-zijdemans

Summary

I propose we formally deprecate @std/io: @deprecated tags on every export with a migration target, a notice in the module docs and README, and JSR archival once the one real migration gap closes. This isn't a new decision. When #5003 was closed, the stated plan was to stop stabilizing the package and "nudge people to use @std/streams instead", with a detailed follow-up issue to come. That issue never landed. Today nothing in the package tells users any of this.

Current state

Migration targets

Export Replacement
Buffer Buffer from @std/streams
copy readable.pipeTo(writable)
iterateReader ReadableStream is async iterable
readAll toBytes from @std/streams
toReadableStream / toWritableStream / readerFromStreamReader Deno 2 resources expose .readable / .writable natively
writeAll ReadableStream.from([data]).pipeTo(writable, { preventClose: true })
readAllSync / writeAllSync none yet, see below

The sync gap

Web streams are async only, so readAllSync and writeAllSync have no replacement today. #6284 tracks the main use case (fully written sync output to stdout/stderr), and the suggested fix lives in the runtime, not std. I'd deprecate everything now, point the sync functions' @deprecated notes at #6284, and gate removal and JSR archival on that resolving.

Proposed steps

  1. Add @deprecated tags to all exports with the targets above. Happy to send the PR.
  2. Add the deprecation notice to the module doc and the README package table.
  3. Once What's happening with writeAll and writeAllSync? #6284 resolves: archive on JSR and remove from the workspace.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions