yoggyd
Explore posts from serversany reason against using the deps.ts approach?
It seems that the
Deps.ts
approach is not recommended anymore since jsr - however I fail to see why. What's the benefit of using the import map and falling back into the package.json problems instead of having a Deps.ts file? The only thing I can see is that the module specifiers can thus be compatible with non-deno code...7 replies
how to disable no-window rule
adding it to "no-window" to deno.json.lint.exclude does not work.
While I can appreciate the sentiment behind this rule and using globalThis should be preferred there is apparently no way for globalThis to be extended in ambient contexts - i.e. when you're writing a library and want to attach something to globalThis without having to assert its type every time. So using window is afaik the only way to achieve this and having deno tell me "hey, window won't be available" is not helpful here... especially when I know that it will be available.
3 replies
how to use Untar without deprecated functions?
Untar
from std/archives requires an instance of Reader
- apparently most functions return some ReadableStream though. I only found a function in std/streams to convert a ReadableStream to a Reader. That function is deprecated though and will be removed in 1.0.0. What can I use instead? Or will the Untar
class take a ReadableStream in 1.0.0?
EDIT:
the deprecated function: https://deno.land/[email protected]/streams/mod.ts?s=readerFromStreamReader
the Untar
class: https://deno.land/[email protected]/archive/mod.ts?s=Untar2 replies