deno_std icon indicating copy to clipboard operation
deno_std copied to clipboard

deprecated functions in favor of streams API require better examples

Open scarf005 opened this issue 2 years ago • 4 comments

Is your feature request related to a problem? Please describe.

https://github.com/denoland/deno_std/blob/9b9be2a25a8ae7cb4ce3835b1c7a4a4170163e22/streams/read_all.ts#L31-L34

It is not clear for users how the old code should be migrated to use web streams API.

Describe the solution you'd like

Add detailed migration guide in form of code block

Describe alternatives you've considered

scarf005 avatar Dec 08 '23 12:12 scarf005

We probably need to create a comprehensive guide for migrating from Reader/Writer I/O to Web Stream based I/O, which includes the list of replacements of typical I/O operations such FS, Stdio, ChildProcess, etc.

And we should link to that document from the above deprecation note.

kt3k avatar Dec 20 '23 07:12 kt3k

Perhaps, we could use https://github.com/denoland/denobyexample.

iuioiua avatar Dec 20 '23 07:12 iuioiua

looks interesting. @iuioiua from my understanding we need to create some examples for below with code for both Reader/Writer I/O to Web Stream based I/O and how to migrate here https://github.com/denoland/denobyexample ?

comprehensive guide for migrating from Reader/Writer I/O to Web Stream based I/O, which includes the list of replacements of typical I/O operations such FS, Stdio, ChildProcess, etc.

muddlebee avatar Jan 16 '24 19:01 muddlebee

looks interesting. @iuioiua from my understanding we need to create some examples for below with code for both Reader/Writer I/O to Web Stream based I/O and how to migrate here https://github.com/denoland/denobyexample ?

comprehensive guide for migrating from Reader/Writer I/O to Web Stream based I/O, which includes the list of replacements of typical I/O operations such FS, Stdio, ChildProcess, etc.

Yes, that's correct. I'd be happy to guide someone through doing this. It's becoming more important that we do this as we approach the Deno Standard Library hitting stability.

iuioiua avatar Jan 17 '24 04:01 iuioiua