m4rc3l05
Deno v2 deno install not installing all dep files
without --cached-only it does work, i get the downloading log and it finishes ok. it just feels weird that it has do download more stuff after a deno install has been issued, am i wrong on this assumption?
8 replies
Getting the width and height of an image
From a simple jsr search i got this package https://jsr.io/@retraigo/image-size
Do not know if we have a native way of doing this on deno...
5 replies
Deno v2 deno install not installing all dep files
Another version of the above issue and a bit more weird i think is, i have this deno project:
Where if i run
deno install && deno run --cached-only main.ts
all goes well but if i do deno install && deno compile --cached-only main.ts
i get the error
What could be triggering this inconsistencies? i am expecting that both deno run --cached-only and deno compile --cached only to be able to run successfully.8 replies
How to check if stdin is a file?
The idea would be to have what pino-pretty does but with deno apis, but then i noticed this issue with the deprecations and started to wonder how would i do it without nodejs apis for deno v2.
So currently not possible then?
20 replies
How to check if stdin is a file?
stdin.isTerminal() does not seem to be what i want, given the example from pino-pretty https://github.com/pinojs/pino-pretty/blob/master/bin.js#L86, they check if stdin is terminal and if stdin is a file and if both are false it means that we are piping to the script and we should do nothing on the first sigint and exit on the next one, allowing to wait for the process being piped to close before closing it self, as explained in https://github.com/pinojs/pino/pull/358#issuecomment-366185875
the
stdin.isTerminal()
answares the 2 point, but the 1 remain still remains, how do we check it in deno v2 without using deprecated methos? currently i am doing !Deno.stdin.isTerminal() && !Deno.fstatSync(Deno.stdin.rid).isFile
bu this will not work for v2 right?20 replies