You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It’s recommended to instead use the deno check sub command to type check these modules if desired.
I'm hoping to use this discussion to help craft an expected deno task command for development. In my particular case, I had been building a web scraping tool https://github.com/andykais/grob that uses workers to isolate external web scraper code to specific permissions. My previous development workflow was essentially to run a file like so:
// registry.tsimport{GrobberRegistry}from'grob'constgrobbers=newGrobberRegistry({download_folder: './myfolder'})// behind the scenes this yaml manifest file points to a typescript module that is the scraper code I am developingawaitgrobbers.register('./grobbers/imgur.com/grob.yml')awaitgrobbers.start('https://imgur.com/gallery/NTwmL')
and then a deno task that looks like so: deno run --unstable --check --watch=./grobbers --allow-net --allow-read=. --allow-write=. ./registry.ts
Now though, it sounds like I need separate subprocesses for type checking the worker code separately. Would that look something like this?: deno check --watch ./grobbers/imgur.com/main.ts & deno run --unstable --check --watch=./grobbers --allow-net --allow-read=. --allow-write=. ./registry.ts
Ill share my two cents here that this feels a bit worse that before, since a typechecking error in the worker file no longer prevents the code from being executed. I dont really have all tools to execute typechecking programatically from deno either, though I could write a bash script wrapped in a file watcher like nodemon that synchronously runs deno check ... && deno run, but this will most definitely be slower. Anyways, I'm curious to hear how other people have approached this. Perhaps there is a better solution out there I haven't tried yet.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
Hi all, so I noticed in the past few releases worker type checking had been less consistent, and it looks like in 1.42 this became officially expected https://deno.com/blog/v1.42#type-checking-partway-through-application-execution-no-longer-occurs. If I want to type check workers/dynamic imports, this is now the official recommendation:
I'm hoping to use this discussion to help craft an expected deno task command for development. In my particular case, I had been building a web scraping tool https://github.com/andykais/grob that uses workers to isolate external web scraper code to specific permissions. My previous development workflow was essentially to run a file like so:
and then a deno task that looks like so:
deno run --unstable --check --watch=./grobbers --allow-net --allow-read=. --allow-write=. ./registry.ts
Now though, it sounds like I need separate subprocesses for type checking the worker code separately. Would that look something like this?:
deno check --watch ./grobbers/imgur.com/main.ts & deno run --unstable --check --watch=./grobbers --allow-net --allow-read=. --allow-write=. ./registry.ts
Ill share my two cents here that this feels a bit worse that before, since a typechecking error in the worker file no longer prevents the code from being executed. I dont really have all tools to execute typechecking programatically from deno either, though I could write a bash script wrapped in a file watcher like
nodemon
that synchronously runsdeno check ... && deno run
, but this will most definitely be slower. Anyways, I'm curious to hear how other people have approached this. Perhaps there is a better solution out there I haven't tried yet.Beta Was this translation helpful? Give feedback.
All reactions