r/javascript • u/feross WebTorrent, Standard • Oct 18 '22
Node v19.0.0 (Current)
https://nodejs.org/en/blog/release/v19.0.055
u/zombarista Oct 18 '22
RIP nodemon
23
u/pilafmon Oct 18 '22
...and
node-fetch7
u/wojtekmaj Oct 19 '22
Side note: globally available fetch (experimental) is actually available since 18.0.0.
https://nodejs.org/en/blog/announcements/v18-release-announce/#fetch-experimental
3
u/Xunnamius Oct 19 '22
node-fetch will be around until at least 2024 (node 16 eol), and will likely remain useful for several years after for older code bases.
The king is dead, long live the king!
27
u/Capitalpunishment0 Oct 18 '22
Wow, that --watch flag got me interested.
Am I right in thinking that it's more or less a [native] substitute to nodemonand, to some extent, Quokka? If so, that'd be really neat for my one-off scripting.
Would also be great for beginners in the early stages of their projects.
Apparently it's also available for the latest Node 18. I wonder if I should upgrade mine...
40
10
u/PositivelyAwful Oct 19 '22
Dumb question, but CommonJS is still the "standard" even going into Node 19 right? Or should I switch over to ESM for new projects?
3
u/FormerGameDev Oct 19 '22
hmm. i installed it in windows, and now i no longer have a node executeable.
edit: installing, then doing a install repair fixed it
1
u/Guisseppi Oct 19 '22
do we still need to add .mjs to use ESM or can we just be normal again
1
u/reart57847 Oct 19 '22
no need for that extension if
"type": "module"in package.json1
u/Guisseppi Oct 19 '22
Half measures, this was already true in Node 18 and not what I meant by “normal”
1
u/GibbyCanes Oct 30 '22
Exactly! how tf is moving the single letter I had to add to the file extension to a new required parameter in a JSON file helpful?
and do I still have to add “ node --es-module-specifier-resolution=node main.js” when I call these “type”:”modules”? Because if so I still maintain that this is worse than just making me change extensions.
and what’s all this nonsense about removing the experimental flag because I can achieve the same outcome with “custom loaders?” does node do that or is that just more shit I have to configure?
2
-28
u/Breakpoint Oct 18 '22
tl;dr?
103
Oct 18 '22
Node v19.0.0 (Current)
11
u/gonzofish Oct 18 '22
I mean it’s right there in that title
15
7
3
0
Oct 18 '22
[deleted]
48
u/halkeye Oct 18 '22
Ooh --watch is exciting. I've been using nodemon for a while now and it's just ackward enough that I've always wanted more.
16
u/sir-shoelace Oct 18 '22
Yeah having native watch will be huge. Nodemon is pretty good but just to be able to run mode with watch natively without any other packages will be great, especially for small projects where you don’t want to have a package.json
34
u/dep Oct 18 '22
cries into node 12 stack