Skip to content

Remove pure JS (non native) io functions from Deno namespace #9795

@lucacasonato

Description

@lucacasonato

I propose we remove the following APIs from the Deno namespace, and move them to std:

Types:

  • Deno.Reader
  • Deno.Writer
  • Deno.ReaderSync
  • Deno.WriterSync
  • Deno.Closer

Functions:

Timeline

I suggest we mark all the APIs we want to remove with @deprecated, and add a deno lint diagnostic for when these APIs are used. In Deno 2.0 we can then remove these APIs.

Reasoning

Code which does not actually require native syscalls should not use Deno namespace APIs as this makes the code incompatible with browsers, even though there is no need for that to be the case. An example of this: https://deno.land/std@0.90.0/io/streams.ts. This uses Deno APIs, even though no native calls are preformed, making this code unusable in a web browser for no good reason.

Metadata

Metadata

Assignees

Labels

breaking changea change or feature that breaks existing semanticsfeatnew feature (which has been agreed to/accepted)public APIrelated to "Deno" namespace in JS

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions