pnpm has long been a fantastic option for folks looking to save disk space and CPU cycles (or for its great monorepo support) while maintaining most of what makes npm great. v9.0 drops Node 16 and 17 compatibility, honors the packageManager field in package.json, makes some default config changes, and adopts Lockfile v9.
PNPM
Please open Telegram to view this post
VIEW IN TELEGRAM
β€7 3π1π€©1
Please open Telegram to view this post
VIEW IN TELEGRAM
const arr = ['a', 'b', 'c'];
arr[-1] = 'd';
console.log(arr.length);
Please open Telegram to view this post
VIEW IN TELEGRAM
π28 8β€7π€5
Works with React, Angular, Svelte, Vue or plain old JS/TS. Handles all sorts of things from Sankey diagrams to maps, graphs, chord diagrams, and traditional line/area charts. The v1.4 release adds support for annotating visualizations in a flexible way. Thereβs a gallery of examples (with code) if you want to dig in.
F5, INC.
Please open Telegram to view this post
VIEW IN TELEGRAM
π7β€3 3
const obj = { a: 1 };
const { b } = obj;
console.log(b);
Please open Telegram to view this post
VIEW IN TELEGRAM
π8
π30π€12π€£3π€©2 2
When Ryan created Node, JavaScript had no packages or standard module system. npm and CommonJS took off, and tools like Yarn or pnpm extended npm in certain areas, but in today's ES modules era, itβs time for a transformation. JSR is not merely a new npm, but a shift in how packages are distributed, tailored for the modern era.
RYAN DAHL
Please open Telegram to view this post
VIEW IN TELEGRAM
β€8π4 4
const promise1 = new Promise((resolve, reject) => {
setTimeout(() => resolve(10), 500);
});
const promise2 = new Promise((resolve, reject) => {
setTimeout(() => reject('Error'), 1000);
});
Promise.allSettled([promise1, promise2])
.then(results => console.log(results))
.catch(error => console.error(error));
Please open Telegram to view this post
VIEW IN TELEGRAM
β€16 5π3
console.log('Start');
setTimeout(() => console.log('Timeout 1'), 0);
setTimeout(() => console.log('Timeout 2'), 0);
console.log('End');
Please open Telegram to view this post
VIEW IN TELEGRAM
π11β€2
What is the output?
Anonymous Quiz
9%
Start, End, Timeout 2, Timeout 1
36%
Start, Timeout 1, Timeout 2, End
6%
Start, Timeout 2, Timeout 1, End
49%
Start, End, Timeout 1, Timeout 2
π27π€15 7β€6π€£4
On the Node side, if youβre writing an ECMAScript module, you can now use named imports from TypeScriptβs npm package.
MICROSOFT
Please open Telegram to view this post
VIEW IN TELEGRAM
π13β€6π€©1 1
We're officially 1 year old! π
Together, we've laughed, learned, and shared countless moments that have made this past year truly productive. Your passion fuels our commitment to delivering content that inspires, entertains, and connects us all.
Thank you for being a part of our journey. Here's to an even brighter future together!
βοΈ Check out our emoji pack here
β‘οΈ Boost us in Telegram
π€ Collaboration
Together, we've laughed, learned, and shared countless moments that have made this past year truly productive. Your passion fuels our commitment to delivering content that inspires, entertains, and connects us all.
Thank you for being a part of our journey. Here's to an even brighter future together!
Please open Telegram to view this post
VIEW IN TELEGRAM
console.log('Start');
setTimeout(() => {
console.log('Timeout 1');
Promise.resolve().then(() => console.log('Promise 1'));
}, 0);
Promise.resolve().then(() => {
console.log('Promise 2');
setTimeout(() => console.log('Timeout 2'), 0);
});
console.log('End');
Please open Telegram to view this post
VIEW IN TELEGRAM
What is the output?
Anonymous Quiz
19%
"Start" "Promise 1" "Timeout 1" "Promise 2" "Timeout 2" "End"
12%
"Start" "Promise 2" "Promise 1" "Timeout 1" "Timeout 2" "End"
12%
"Start" "Promise 2" "Timeout 1" "Promise 1" "Timeout 2" "End"
57%
"Start" "End" "Promise 2" "Timeout 1" "Promise 1" "Timeout 2"
π€14π9
The latest major version of Node is here. Note that itβs a βCurrentβ release for now, so gets all the newest features first, but is due to become Node's main active LTS release this October. As an even numbered release, Node 22 should be around and maintained for a long time, most likely out to 2027 or so (see image above).
Please open Telegram to view this post
VIEW IN TELEGRAM
β€10π3 3
console.log('Start');
setTimeout(() => console.log('Timeout'), 0);
Promise.resolve().then(() => console.log('Promise'));
function foo() {
console.log('Function call');
}
foo();
console.log('End');
Please open Telegram to view this post
VIEW IN TELEGRAM
β€5π2π€2 2