Deno 1.16 Release Notes
deno.com
deno.com
I know someone's going to ask about permissions making the invocation process a pain, so here's my advice for that: embed the permissions flags in the shebang line!
Something worth noting is that Deno also has permission APIs that let you query the current permission status and interactively ask for more: https://deno.land/manual/runtime/permission_apis#request-per...
#!/usr/bin/env -S /usr/bin/deno run --allow-net=api.github.com
const jsonResponse = await fetch("https://api.github.com/users/denoland");
const jsonData = await jsonResponse.json();
console.log(jsonData);This makes sense. Thanks!
That said how is Deno being seen in relation to Node, iirc Deno is being made to correct on a lot of the issues Node originally had but I’m curious about adoption and how this is going to fit in the JS world where Node has become so cemented, what’s the killer feature to move those people over?
Or is that not the play, will this peacefully coexist?
- no hassle with `node_modules`
- no hassle with `npm install` and `npm ci`
- no hassle with `package-lock.json`
- no hassle with `node-gyp`
- no hassle with setting up Typescript
On the nice to have side I would mention:
- opinionated take on linting, testing and formatting
- possibility to compile into self-contained executables
That it can already do this is what brought me into doing some stuff with deno. It's just deno compile to make a self contained executable (don't forget permission flags). It's a bit large at over 40 MB, but honestly that's not something I'm going to care too much about given how straightforward and easy it is and since it's not that large.
The localStorage thing feels like a change in the security model. Unless I'm missing something, now without any permissions a program can save data between calls. I thought that without --allow anything it would be close to a pure function. I think it's easily worked around by specifying a temporary localstorage when running a program you want sandboxed more fully.