@@RustIsWinning Leave it to someone with a Rust logo and a Rust icon to say some crap like this. U derdogs no matter what. God forbid other tools have uses. 🙄
Man, I can't believe this. I don't need karma, jasmine, nodemon, as dependencies. This is great first step. Great job node js team, Keep rocking. One day I will commit to nodejs.
@@Ahmedhkad it creates a config hell, and upgrading is hard. Good defaults are better. Most of the people who use karma test runner don't know what their config does. People simply copy paste config either internally or from online
Brother.. man, my jaw started dropping when the debugger was talked about and then when the sqllite features were brought up I had to reach down and pick my jaw up off the floor. Amazing features coming! thanks, my friend :)
Please tell me why you think, that native support for TS for example is so important for you? If you want to achieve a functionality like "IDE checks types" and "Node just strips types and runs JS to make it faster " you can achieve the same with TS compilation with SWC
11:58 «it should give me all the different files, let's give it a quick run, and it looks like it uses a generator, so we get the next one, which is the first one, and we run this again, and it returned us a promise, it looks like the glob itself isn't a promise, but getting next one is, so we now throw an await right here, remove there, and viola, we got the value» My exact JavaScript experience.
The reason the method is called 'it' is to help allow the test method be named better.. eg, `it('should use default parameters', ....)` and `it('should fail with a negative number', ...)`
I bet in 3 years from now, this is still all experimental just like all the other stuff that has been stuck in the experimental state. So for a production app, it's just a tease of "what it could have been", and we'll just continue doing things the old way. --experimental-modules anyone? Yea that's been stuck in experimental for over 5 years, and would super useful for so many people. Other one that comes to mind is "--experimental-json-modules", like cmon, finish something before making other never to be finished features.
Isn’t the flags you mentioned are all deprecated and replaced with modern non experimental features? ESM is supported with no flag, json can be loaded with loaders which are RC now
Great to see that Node finally gets features that have been available in it's competitors (like Deno or Bun) for years. There was no reason for Node not to have them, except for it's dev team being rigid. Now it will be harder for alternative runtimes to compete
SQLite right inside... excellent I tried the WASM module a few times to get the same. Ended up using Pouchdb and Loki database if I remember correctly.
6:37, you should _probably_ place your glob in a set of single or double quotes (but single quotes doesn't need escaping in JSON). I don't think it makes a difference on Windows, but it does on Linux/MacOS (Or Windows running WSL). Why? in any unix shell (sh, bash, zsh, fish, etc.) the shell expands the glob, meaning node will not see the glob, it will be launched with a specific list of files; those that match the glob at the time you launch. When does this matter? When you run tests in watch mode, and you add a new test file, node will not run that file. I haven't used node's test runner, but the above is true for how mocha behaves (i.e. it will pickup new test files, if you wrap the glob in quotes); I assume it would be the same for node's build in test runner.
The above btw, also highlights one of the reasons you should always start with a failing test; so you know that the new test is actually being picked up by the test runner.
Worked with bun in a recent project, sometimes the server just doesn’t response on hot restart, lot of other issues too but yea it’s really fast, you can observe when you do filesystem ops
Really great video. Well done. And you're really a good speaker. But, don't hate me, I find your facecam overlay just a little bit to large. Anyway, content counts, and that is great. Just thought I speak my mind ...
Wow, these significant and highly intelligent changes are going to revolutionize DX for every JavaScript developer. That's why I adore JavaScript everywhere, forever. 😊🚀
Like your vids, alil bit speedy for me but I can live with it. Just about Wepsocket client I didn't get you about that 'cause you can listen to socket in node since a long time. Client webapp add is just fine and a cool one to node I totally agree but I did'nt get the point about integrating server in node... Good work Kyle, keep on, watching you...
There isn't enough info on the built in test runner. Took me awhile how to figure out how to get setup stuff running. But once I did it's pretty good. Super fast. Experimental sqlite is pretty bare bones right now. I spent a bit of time making a wrapper around it for transactions and such.
Node dont support Typescript, it just strip type annotations like you can do in Typescript. It also calls strip types. Just that you dont need a build step anymore to just remove the type annotations.
so cool these built-in features added. before, installing tools like tsc, jest or so and make them work correctly is really painful and time wasting, although these features may keep experimental for centries
Using type: "module" still kind of sucks because other tools, like Jest, haven't fully adopted it, and they force you to use the experimental flag, and there's not actually a way to pass that to the debugger in VS Code whenever you try to debug a test. I haven't figured out how to do it, anyways. In any case, it all worked better to just use Babel and Webpack to transpile it to Node's default JavaScript syntax.
Most typescript project files are not working with the strip-types feature. e.g.: x TypeScript import equals declaration is not supported in strip-only mode ,-[5:1] 2 | * This is not a production server yet! 3 | * This is only a minimal backend to get started. 4 | */ 5 | import compression = require('compression');
Just use bun or maybe Demo (but without jsr). Node has this problem that every interesting feature is either experimental or you need to remember to enable it or whatever. In bun everything just works. I was initially skeptical but after trying it out and using it for one production app I am not looking back at the node. It's just not worth the effort
Deno and bun remind me of yarn: node/npm sucks for a while, then some people create some new and better tool, and then forces node/npm to evolve/absorb the new tool
I dunno about pnpm. Never used it. In my experience, npm and node 12 was such a pain. Installs always crashedwith node gyp errors. all of errors went away though when we upgraded to node 20 and npm version 10. It was a miracle that we were able to develop locally and deploy our app with different package json versions…
As a junior React/Next.js developer, I am also planning to learn backend development. I have two options in mind: 1)Utilize my existing JavaScript knowledge to learn Node.js. 2)Learn Golang, which is much faster, highly in demand, and used in larger projects. Does anyone have any suggestions?
I would suggest learning Go, as it is being chosen more often than any other languages for new services nowadays. I use node at work, and sometimes hear from my pm if I could use Go for new services because of the fact that it also ustilizes less server resources, hence money. So I am also planning to start learning it!
@@criley7755 so does it work like ts-node/tsc? How about deno/bun? If it doesn't, then it is a limitation when compared to the alternatives. In the end I feel that this aspect should be further explored so besides the invalid types aspect, what other aspects would we be letting go if we were to stick to node.js directly.
Running ESM in my project was not all that easy to be honest. Jest refused to work with that at first, because it didn't like "import" in my files. Probably there would be less problems if it was in TypeScript instead of just JavaScript
I don't think everyone is paying attention. *Deno is solving real-world problems that still exist in Node.js. Deno has vastly better multi-threading features* Node is too little too late.
@@bhavikjain7350 well, Bun is a drop-in replacement for Node so you can just start using it for your existing Node projects right now, and the projects will just run way faster, then you can take your time and learn APIs specific to Bun.
Node really shows how important competition is. They were stalled for quite some time until Bun (and Deno) started kicking their ass
@@Lu-Die-MilchQ True but only one runtime can win which is Deno 🦕
@@RustIsWinning Leave it to someone with a Rust logo and a Rust icon to say some crap like this. U derdogs no matter what. God forbid other tools have uses. 🙄
@@RustIsWinningbrother is bouncing on it
@@nel_tu_ I'm bouncing on what?
@@nel_tu_ yea ignore him. He is a troll.
Man, I can't believe this.
I don't need karma, jasmine, nodemon, as dependencies. This is great first step.
Great job node js team, Keep rocking. One day I will commit to nodejs.
Why its great!, are dependencies bad?
@@Ahmedhkad it creates a config hell, and upgrading is hard. Good defaults are better. Most of the people who use karma test runner don't know what their config does. People simply copy paste config either internally or from online
@@Ahmedhkad yeah, you don't need to bloat your application with dozens of third party packages, it makes maintaining the project long term a headache
Brother.. man, my jaw started dropping when the debugger was talked about and then when the sqllite features were brought up I had to reach down and pick my jaw up off the floor. Amazing features coming! thanks, my friend :)
I need this humor
this is not new, i use it for years.
@@zeocamo good for you :) it's new to me, sorry i'm just a newb and glad you took time to reply to me.
Thank bun, they had all of this and more over a year ago
It's crazy that Node js didn't support those important featuress before
Please tell me why you think, that native support for TS for example is so important for you? If you want to achieve a functionality like "IDE checks types" and "Node just strips types and runs JS to make it faster " you can achieve the same with TS compilation with SWC
@@user-abc855 less dependencies = less problems and less sources of potential security threats
I love that it works as a single executable binary now. Been shipping binaries for months now
11:58 «it should give me all the different files, let's give it a quick run, and it looks like it uses a generator, so we get the next one, which is the first one, and we run this again, and it returned us a promise, it looks like the glob itself isn't a promise, but getting next one is, so we now throw an await right here, remove there, and viola, we got the value»
My exact JavaScript experience.
Ahaha
The reason the method is called 'it' is to help allow the test method be named better.. eg, `it('should use default parameters', ....)` and `it('should fail with a negative number', ...)`
I bet in 3 years from now, this is still all experimental just like all the other stuff that has been stuck in the experimental state. So for a production app, it's just a tease of "what it could have been", and we'll just continue doing things the old way. --experimental-modules anyone? Yea that's been stuck in experimental for over 5 years, and would super useful for so many people. Other one that comes to mind is "--experimental-json-modules", like cmon, finish something before making other never to be finished features.
Isn’t the flags you mentioned are all deprecated and replaced with modern non experimental features?
ESM is supported with no flag, json can be loaded with loaders which are RC now
SO much overdue quality of life stuff! Great summary thanks
Top level await...
Finally. Cannot tell you how that frustrated me in many projects.
Excited that node is catching up but honestly not going to use all these experimental features until they are no longer experimental.
node.js never sucked, dude
Jackson guitars actually do, though
lets be real though, if deno wasnt forcing their hand they wouldnt be trying
Bro got into beef
Do you mean Bun? @@irlshrek
@@sachamorgese7280 nope, before bun even came out node was put under pressure by deno
0:14 are you sure about that?
Great to see that Node finally gets features that have been available in it's competitors (like Deno or Bun) for years. There was no reason for Node not to have them, except for it's dev team being rigid. Now it will be harder for alternative runtimes to compete
Noob here, is Deno better than NodeJS?
@@pomademahalIt is good but I believe there it no "better" choice. However I would be waiting for Deno 2.0 before coding something for Deno
@@pomademahal o mercado usa node, não adianta
The less dependencies the better! Amazing features!
The `fs/promises` thing was there for ages, is it more that they modernized all their standard libraries that used to take a callback?
SQLite right inside... excellent
I tried the WASM module a few times to get the same. Ended up using Pouchdb and Loki database if I remember correctly.
Great improvement from node.js. Thanks for the video :)
Which node version introduced these features. Expected this info to be in the description.
Which shampoo or conditioner do you use?
Gonne piggy back on this comment to follow up with: Any chance we hear a couple guitar tunes any time soon?
I think he uses Just for Men (with perfect genes).
shampoo++
Shampoo Simplified
I just use cheap Dove men's shampoo
Great content! Nodejs is great. Getting better and better 👍🏽
Very nice content. It would have been even nicer to get the version of Node in which each feature have been added
Now they need to add a tagged expression for SQL queries. I have my own but it would be wonderful to have it built it.
Once you’ve used bun, which just works without any config, it’s difficult to go back.
Precisely.
There's absolutely no going back
Yes but many frameworks aren't supported by bun.
the companys don't use Bun lol
Hasn't the recent Redis debacle illustrated once again why you never hitch your wagon to a tech stack controlled by venture capitalists?
6:37, you should _probably_ place your glob in a set of single or double quotes (but single quotes doesn't need escaping in JSON). I don't think it makes a difference on Windows, but it does on Linux/MacOS (Or Windows running WSL). Why? in any unix shell (sh, bash, zsh, fish, etc.) the shell expands the glob, meaning node will not see the glob, it will be launched with a specific list of files; those that match the glob at the time you launch. When does this matter? When you run tests in watch mode, and you add a new test file, node will not run that file. I haven't used node's test runner, but the above is true for how mocha behaves (i.e. it will pickup new test files, if you wrap the glob in quotes); I assume it would be the same for node's build in test runner.
The above btw, also highlights one of the reasons you should always start with a failing test; so you know that the new test is actually being picked up by the test runner.
When are you launching Nodejs simplified
Great video Kyle. 👌
Great video! Love NodeJs and hope they continue to improve it 🦾
Remember to add to your run script --experimental-sqlite flag for the node:sqlite to work
Excellent! Thx for posting
The most valuable clip I can see...
Amazed at the built 8n SQLite 🎉
Really useful. Thanks!
I think you could improve readability by enlarging your font (most screen space is unused now) - think of smartphone users. Thanks for the videos
Node is awesome, thank you for keeping us updated!
This is awesome!
you are amazing bro
nice~ i love node and bun both
it also got the greatest ever (and the last npm command) npm install bun .
Worked with bun in a recent project, sometimes the server just doesn’t response on hot restart, lot of other issues too but yea it’s really fast, you can observe when you do filesystem ops
Nice! Thank you for compiling all these features! How did you find all the new features?
Really great video. Well done. And you're really a good speaker. But, don't hate me, I find your facecam overlay just a little bit to large. Anyway, content counts, and that is great. Just thought I speak my mind ...
Thank you so much, how great it is!!!
Wow, these significant and highly intelligent changes are going to revolutionize DX for every JavaScript developer. That's why I adore JavaScript everywhere, forever. 😊🚀
Bruder was zum Teufel habe ich gerade gelesen, die Menschheit existiert nicht mehr
Like your vids, alil bit speedy for me but I can live with it. Just about Wepsocket client I didn't get you about that 'cause you can listen to socket in node since a long time. Client webapp add is just fine and a cool one to node I totally agree but I did'nt get the point about integrating server in node...
Good work Kyle, keep on, watching you...
Excellent video! Which node version these experimental features will get officially merged?
Great video. Would be great if you listed the NodeJS version number somewhere.
Just saw it... 22.7.0
Maybe I missed it somewhere, but it would be useful to mention the Node.js version at the beginning. Great video though!
I've recently migrated to the bun but It seems node is finally taking this race seriously
Deno is winning the race tho 🦕
@@RustIsWinningpeople like you are the reason people hate rust. grow up brother
@@brandond_ I do not care. Cry more 😂
@@RustIsWinning it's really funny how embarrassing you are to yourself lmao
@@brandond_ I still do not care what you think. Enjoy your segfaulting runtime haha
How does node handle enums when stripping out the types? Since it's not really a type, it could also be used as a value that maps both directions.
It doesn't. The flag only strips types. If you use any TS only feature it throws an error.
Can we get a detailed video on WebSocket support?
When would it be available for production use? Any updates on it?
Node was always the 🐐
nice video!!! what about absolute paths? is there any quick fix?
Lots of nice features there, debugging is certainly welcome. Typeshit I try to avoid as I prefer vanilla JS always.
Ts is nice when configure to allow you to use what parts you want when you want.
There isn't enough info on the built in test runner. Took me awhile how to figure out how to get setup stuff running. But once I did it's pretty good. Super fast. Experimental sqlite is pretty bare bones right now. I spent a bit of time making a wrapper around it for transactions and such.
Could I ask what font you used for the editor, it looks smooth!
The default VSCode font.
Node dont support Typescript, it just strip type annotations like you can do in Typescript.
It also calls strip types.
Just that you dont need a build step anymore to just remove the type annotations.
I need SQLite for my project now, cause trying to bundle the right version per OS is a huge pain in my cli app
so cool these built-in features added. before, installing tools like tsc, jest or so and make them work correctly is really painful and time wasting, although these features may keep experimental for centries
Kyle, please do more Node videos! Amazing video!
0:38 why they choose too long flags?
why not -est or -E just like Deno?
coz its not Deno
WebSocket is web api on the client side, now nodejs implemented it. It's already has WS module so no need to do anything more.
Can't wait for plain datetimes in Node
Using type: "module" still kind of sucks because other tools, like Jest, haven't fully adopted it, and they force you to use the experimental flag, and there's not actually a way to pass that to the debugger in VS Code whenever you try to debug a test. I haven't figured out how to do it, anyways. In any case, it all worked better to just use Babel and Webpack to transpile it to Node's default JavaScript syntax.
Most typescript project files are not working with the strip-types feature. e.g.:
x TypeScript import equals declaration is not supported in strip-only mode
,-[5:1]
2 | * This is not a production server yet!
3 | * This is only a minimal backend to get started.
4 | */
5 | import compression = require('compression');
node typescript support is awesome. but node still requires file extension like .ts or .js for relative import.
From which Node version is this avilable?
On Node 22 and for the Typescript make sure you are in the very latest version of Node 22
That is really cool.
Still they did not added the builtin file upload feature.
Just use bun or maybe Demo (but without jsr). Node has this problem that every interesting feature is either experimental or you need to remember to enable it or whatever. In bun everything just works. I was initially skeptical but after trying it out and using it for one production app I am not looking back at the node. It's just not worth the effort
Bun is the best. I tried it and did't want to turn back. It runs so fast and uses less ram.
Deno better 🦕
I love you thanks kile
Okay, node gradually winning my soul outta php😂😂
deno still a better option
Node is great.
Deno and bun remind me of yarn: node/npm sucks for a while, then some people create some new and better tool, and then forces node/npm to evolve/absorb the new tool
@@wahoobeans did that even happen tho? Why is everyone still recommending pnpm or other alternatives?
I dunno about pnpm. Never used it. In my experience, npm and node 12 was such a pain. Installs always crashedwith node gyp errors. all of errors went away though when we upgraded to node 20 and npm version 10. It was a miracle that we were able to develop locally and deploy our app with different package json versions…
As a junior React/Next.js developer, I am also planning to learn backend development. I have two options in mind:
1)Utilize my existing JavaScript knowledge to learn Node.js.
2)Learn Golang, which is much faster, highly in demand, and used in larger projects.
Does anyone have any suggestions?
I would suggest learning Go, as it is being chosen more often than any other languages for new services nowadays. I use node at work, and sometimes hear from my pm if I could use Go for new services because of the fact that it also ustilizes less server resources, hence money. So I am also planning to start learning it!
Go for Nodejs, there is high market demand for Nodejs developers
Cool, but you should have explored the limitation of the TS further.
It's not a limitation. It strips out the types to give you actual JavaScript.
@@criley7755 so does it work like ts-node/tsc? How about deno/bun? If it doesn't, then it is a limitation when compared to the alternatives.
In the end I feel that this aspect should be further explored so besides the invalid types aspect, what other aspects would we be letting go if we were to stick to node.js directly.
@@bicatuBecause all of them strip types under the hood lol
fs/promise has been there for a long time tho 🤔
Running ESM in my project was not all that easy to be honest. Jest refused to work with that at first, because it didn't like "import" in my files.
Probably there would be less problems if it was in TypeScript instead of just JavaScript
I don't think everyone is paying attention. *Deno is solving real-world problems that still exist in Node.js. Deno has vastly better multi-threading features*
Node is too little too late.
What version of node is being talked about?
I think we should just sit one day and see just how many things are --experimental
Amazing
What is node version?
wow ok, but will someone fix the performance and size of nodejs someday?
I don't think I want a WebSocketServer implemented in node by default. Maybe I am wrong but it looks like too much overhead
Node never sucked, devs just like to feel smart by hating whats popular
I wish terms like "test coverage" would fall out of the lexicon already.
It's useful to detect edge cases. It's a tool, and like all tools, it isn't inherently good or bad.
Nice. But I'll still use Bun due to ts support and other stuff :)
I kinda see typescript support in Node as enshitfication. Well at least they do not force us to use it. Not yet.
Talk to the COBOL programers about being a language old and out of date :)
Sooo coool
Node or springboot ?
Needs more Semicolons
**/ as a glob would match all test files in node modules aswell. There are no node modules here. Just be careful with that.
Nodejs never sucked. It’s the goat
Deno better 🦕
The goat or a goat. Kidding 😂
so it's getting some of bun features?
I've been using Bun since version 1.1, It's so good that I can't go back to Node anymore.
I want to shift to bun now, listened a lot about it being great! Please suggest a path/roadmap to get started on bun
@@bhavikjain7350 What roadmap? Just read the docs. That's all you need.
@@bhavikjain7350 well, Bun is a drop-in replacement for Node so you can just start using it for your existing Node projects right now, and the projects will just run way faster, then you can take your time and learn APIs specific to Bun.
I looove segfaults
@@RustIsWinningusername checks out
fs/promises has been around for more than 3 years now. Love other points tho!