Node.js Package Management - Thomas Hunter II

Published: 11 November 2021
on channel: UtahJS
210
8

This talk discusses package management in Node.js. It clearly defines terms that are often confused among Node.js developers such as module, package, and dependency. It covers concepts like the dependency tree, why the logical and physical trees shouldn't be the same, how npm and yarn use de-duplication to reduce storage, how pnpm uses symlinks to reduce storage even more, and how SemVer comes into play. It also covers module resolution, how `require()` works, and how modules are stored in an in-memory cache. Finally, it covers some best practices and tools to simplify package management with Node.js projects.

Basics: How do dependencies work?
Let's Define some Terms
Dependency Installation
Packages are Versioned
Dependency Tree: Where do those dependencies go?
Logical Dependency Tree
Physical Dependency Tree, Naive
Physical Dependency Tree, De-duplicated
Determining Physical Tree is Complex
Another Dependency Tree Approach: pnpm
Install Determinism
Module Resolution: How does `require()` work?
Overview of `require()`
Module Resolution Examples
Require Cache
Best Practices: What's the best way to use this stuff?
Deployment and Workflow
Requiring Packages
Security Concerns

https://www.utahjs.com


Watch video Node.js Package Management - Thomas Hunter II online, duration hours minute second in high quality that is uploaded to the channel UtahJS 11 November 2021. Share the link to the video on social media so that your subscribers and friends will also watch this video. This video clip has been viewed 210 times and liked it 8 visitors.