The creator of Node.js from some time has been working in a new project called Deno, the first stable version of this project should be published in 3 days on May 13.
The project is defined as
Deno is a JavaScript/TypeScript runtime with secure defaults and a great developer experience.
From the official repo we can summarize some of the main features:
- Supports TypeScript out of the box.
-
Has built-in utilities.: It include a dependency inspector(
deno info
), code formatter(deno fmt
), test runner(deno test
), bundler(deno bundle
), documentation generator(deno doc
), debugger - Ships a single executable.
- Scripts can be bundled into a single javascript file.
-
Secure by default: This mean that unlike Node when we run our applications they by default don't have access to the file system, network or enviroment, for that we need enable them using some flags as command line options to allow access for example
deno --allow-read=/etc
Some difference with Node are:
- Deno doesn't use
npm
, it uses modules referenced as URLs or file paths - Deno doesn't use
package.json
in its module resolution algorithm. - All async actions in Deno return a promise. Thus Deno provides different APIs than Node.
- Explicit permissions.
- Deno always dies on uncaught errors.
- Uses
ES Modules
and doesn't supportrequire()
.
This and more information can be found on the official repo I expose it here just in order to show a quick resume. So now that we know main features, and differences what are your thoughts regarding it.
Will you give a try it in upcoming projects ?
Do you think it will cause a huge change in the Node community
In your opinion what is the best feature
What your dislike most about it
Above I share some of the main question that I hear when I talk about it with some fellows at work. I'll be glad to read your opinions in the comments.
Thanks in advance
Top comments (24)
I'm pretty excited by the premise
It sounds like deno is going to be
npm
incompatible (just by its name!); not sure if yarn would support it. So my larger question, what would be the options for deno in terms of:I also hope folks picked up on the fact that
deno
isnode
switched around πThanks!
I think that we won't need some dependencies management basing in the fact that they are defined at the
import
statements using urls, which serves to identify them.As deno has a bundler out of the box the intention should be that developers use this bundler and not third party options (Webpack, Parcel, Rollup), the same principle can by applied for testing , linting and formatting
Good question about different versions in the system, but the platform is shipped as a single executable so isn't hard build some tool like nvm
Thanks for your comment
Well, if you want to see a resource for ES6 import-compatible libraries (compatible with Deno), Pika looks like the best option right now.
I would like to see example nestJS app on deno π¦
Me too
This is exciting
I am pretty much in agreement with Ben Awad's opinion in his video. Technically Deno is pretty cool, and I like TypeScript and Rust, but unless Deno has a blessed dependency management strategy and a good compatibility story with Nodejs and npm, I don't see it growing out of the niche easily.
Unfortunately, Deno is born out of Ryan Dahl's regrets about Nodejs, which means it would be hard for him to accept the same perceived warts back in.
EDIT: Or, if some huge communities decide to migrate to Deno entirely such as Angular, React or Vue, then that would boost Deno right out of niche too.
I saw the video and I also agree with him , mainly the fact about the incompatibility between existing libraries and the new deno apis, it seem that this can be a issue in which the community will play a huge roll
"node" was brilliant from a marketing standpoint, I'm not so sure about "deno". I get it, deno is the letters in node rearranged. deno sounds friendly to me. When you have to convince devops to uptake a tool, "deno" sounds like a toy compared to "node" which sounds like it just belongs.
You'd be surprised how much naming really matters.
FWIW I like deno a lot. I appreciate some of the problems it solves and with Microsoft acquiring npm I want to move on. I honestly hope deno is the future.
It's great for software itself; it's moving the ecosystem forward with new ideas. I like that.
Now, if this picks up, it'll certainly take 3 or 4 years for serious adoption - no company will be willing to switch their entire engineering to a whole new platform.
If this picks up pace, then, it will really be - one language for everything. With Node.js, you always had Node.js specific things (like their callback style for async actions, require(), exports etc.).
Promises for async methods - the best difference IMO.
i have few questions.
1) It doesn't have a centralized package management like package.json.
Q) Imagine you have two developers who install whatever they wish to get the work done. Does one need to check all those files to get the list of what dependencies are installed?
2)Secure by default. No file, network, or environment access, unless explicitly enabled.
Q) Is this a big thing? then do other languages have this feature by default? can't we manage by using user groups in unix based systems?
3)Supports TypeScript out of the box.
Q) can add type script support if i need whats the big deal?
4)Ships only a single executable file.
Q) i use linux and never had any problems like this can anyone explain why this is a big usp
5)Has built-in utilities like a dependency inspector (deno info) and a code formatter (deno fmt).
Q) npm, eslint and prettier => node + some scripts?
6)Has a set of reviewed (audited) standard modules that are guaranteed to work with Deno: deno.land/std
Q) does this mean all those tons of code on github which work with node are dead?
I really like to think Deno will become the next big thing in the JS ecosystem....
I have to admit, if the above pan out, there's a good chance I might hate it less than I hate Node.js/Node.JS/Node/NodeJS/justStopALready.