
Npm Deep Dive
Description
Book Introduction
Secrets of the JavaScript Ecosystem, From npm to Monorepo!
JavaScript is more than just a programming language; it has created a vast ecosystem utilized by developers around the world.
However, it is not easy to properly understand the workings of npm and package.json, various bundling tools and module systems that we use every day, and even the monorepo environment.
This book provides essential practical knowledge by solving the complex puzzles of the JavaScript ecosystem one by one.
"npm Deep Dive" goes beyond simply listing usage methods; it delves into the operating principles and selection criteria for each tool and concept.
It systematically organizes the core of the JavaScript ecosystem, including the basic principles of npm and semantic versioning, the differences between CommonJS and ESModule and how to use them, a comparison of the latest bundling tools such as Webpack, Rollup, and Vite and their practical applications, and even how to manage large-scale projects using monorepos.
For beginners, it helps you understand complex concepts step by step, while for experienced developers, it helps you understand and utilize JavaScript on a deeper level with tips and strategies that can be applied immediately in practice.
Through this book, you will freely explore the JavaScript ecosystem, create a better development environment, and gain knowledge that is difficult to understand through regular web service development.
JavaScript is more than just a programming language; it has created a vast ecosystem utilized by developers around the world.
However, it is not easy to properly understand the workings of npm and package.json, various bundling tools and module systems that we use every day, and even the monorepo environment.
This book provides essential practical knowledge by solving the complex puzzles of the JavaScript ecosystem one by one.
"npm Deep Dive" goes beyond simply listing usage methods; it delves into the operating principles and selection criteria for each tool and concept.
It systematically organizes the core of the JavaScript ecosystem, including the basic principles of npm and semantic versioning, the differences between CommonJS and ESModule and how to use them, a comparison of the latest bundling tools such as Webpack, Rollup, and Vite and their practical applications, and even how to manage large-scale projects using monorepos.
For beginners, it helps you understand complex concepts step by step, while for experienced developers, it helps you understand and utilize JavaScript on a deeper level with tips and strategies that can be applied immediately in practice.
Through this book, you will freely explore the JavaScript ecosystem, create a better development environment, and gain knowledge that is difficult to understand through regular web service development.
- You can preview some of the book's contents.
Preview
index
▣ Chapter 1: npm and Semantic Versioning
1.1 Definition and History of npm
__1.1.1 npm's history and background
__1.1.2 Key features of npm
__1.1.3 Useful sites related to npm
__1.1.4 Summary
1.2 What is a significant version?
__1.2.1 Background and definition of the emergence of the significant version
__1.2.2 Concrete specification of the semantic version
__1.2.3 Semantic version grammar
__1.2.4 Semantic version used by Node.js and npm
__1.2.5 Summary
1.3 The Light and Dark Side of Semantic Versioning and the npm Ecosystem
__1.3.1 left-pad: What happens when a utility package that tens of millions of packages depend on disappears?
__1.3.2 everthing: You're saying that packages can't be deleted if they're dependencies? So what if we had all JavaScript packages as dependencies?
__1.3.3 is-promise: A situation caused by an incorrect minor version update
__1.3.4 colors.js and faker.js: Prematurely updating the version of a component or a sub-component can be detrimental.
__1.3.5 Event-Stream Incident: How Secure Is Open Source?
__1.3.6 Things to consider when using semantic versioning and npm
__1.3.7 Summary
▣ Chapter 2: Digging into package.json and npm
2.1 Review package.json
__2.1.1 package.json
__2.1.2 Key fields of package.json
__2.1.3 Creating package.json
__2.1.4 Looking at npm config and .npmrc
__2.1.5 Summary
2.2 What are dependencies?
__2.2.1 npm version and special symbols used in versions
__2.2.2 dependencies
__2.2.3 devDependencies
__2.2.4 peerDependencies
__2.2.5 peerDependenciesMeta
__2.2.6 Summary
2.3 Main npm commands
__2.3.1 npm run
__2.3.2 npm install and npm ci
__2.3.3 npm update
__2.3.4 npm dedupe
__2.3.5 npm ls
__2.3.6 npm explain
__2.3.7 npm audit
__2.3.8 npm publish
__2.3.9 npm deprecate
__2.3.10 npm outdated
__2.3.11 npm view
__2.3.12 Summary
2.4 What happens when you run npm install
__2.4.1 The Core of Dependency Tree Analysis @npmcli/arborist
__2.4.2 Package for installing the package, pacote
__2.4.3 Examining node_modules
__2.4.4 Summary
2.5 What is node_modules?
__2.5.1 The Role of node_modules
__2.5.2 Structure of node_modules
__2.5.3 Symbolic Links
__2.5.4 Summary
2.6 bin field and npx
__2.6.1 CLI package
__2.6.2 bin field
__2.6.3 npx
__2.6.4 Summary
▣ Chapter 3: yarn and pnpm, rivals to npm
3.1 Problems and Limitations of npm
__3.1.1 Ghost Dependencies
__3.1.2 Disk I/O load
__3.1.3 node_modules are too huge
__3.1.4 Lock files vulnerable to change
__3.1.5 Summary
3.2 yarn: A package manager for fast and reliable package management.
__3.2.1 Introduction and History of Yarn
__3.2.2 Features
__3.2.3 Summary
3.3 pnpm: A package manager that brings innovation in disk space saving and installation speed.
__3.3.1 Introduction and History of pnpm
__3.3.2 Features
__3.3.3 Summary
3.4 Comparison of npm, yarn, and pnpm
__3.4.1 Workspace
__3.4.2 Command Comparison
__3.4.3 Benchmark Test
__3.4.4 Summary
▣ Chapter 4: CommonJS and ESModule
4.1 History of JavaScript Modularization
__4.1.1 Background on JavaScript Modularization
__4.1.2 JavaScript before modularization
__4.1.3 Several attempts at JavaScript modules
__4.1.4 Today's JavaScript Module System
__4.1.5 Summary
4.2 What is CommonJS?
__4.2.1 Background of the Birth of CommonJS
__4.2.2 CommonJS Specification
__4.2.3 CommonJS in Node.js
__4.2.4 Building the source code with CommonJS
__4.2.5 Summary
4.3 What is ESModule?
__4.3.1 Background and Introduction of ESModule
__4.3.2 Features of ESModule
__4.3.3 ESModule in Node.js
__4.3.4 Summary
4.4 How does Node.js find packages in node_modules?
__4.4.1 Module interpretation algorithm
__4.4.2 How to load a module with a module name specifier
__4.4.3 Summary
4.5 CommonJS vs. ESModule: Which is the Right Answer?
__4.5.1 Why open source packages support both CommonJS and ESModule
__4.5.2 Developing a dual package that supports both CommonJS and ESModule
__4.5.3 Developing a Pure ESModule Package
__4.5.4 CommonJS and ESModule, which is the right answer?
__4.5.5 Summary
▣ Chapter 5: Transpiling and Polyfilling
5.1 Babel, a tool that helps with transpiling
__5.1.1 The Need for Babel
__5.1.2 How Babel Works
__5.1.3 Trying out Babel
__5.1.4 Summary
5.2 Core-js, a tool to help with polyfilling
__5.2.1 What is core-js?
__5.2.2 Babel and core-js
__5.2.3 Summary
5.3 What are the best polyfills and transpilers?
__5.3.1 Specifying the supported environment
__5.3.2 Summary
5.4 Alternatives to Babel and core-js
__5.4.1 TypeScript Compiler
__5.4.2 SWC(Speedy Web Compiler)
__5.4.3 es-shims
__5.4.4 polyfill.js
__5.4.5 Summary
▣ Chapter 6: Exploring JavaScript Bundling Tools
6.1 What is bundling and why is it needed?
__6.1.1 History of Bundling
__6.1.2 The Role of Bundling
__6.1.3 Summary
6.2 Webpack, the standard for web service bundles
__6.2.1 Introduction to Webpack and its main features
__6.2.2 Basic concepts and operating principles of Webpack
__6.2.3 Creating a Simple Webpack Service
__6.2.4 Summary
6.3 Rollup, the leader in package bundles
__6.3.1 Background and introduction of rollup
__6.3.2 Basic concepts and features of rollup
__6.3.3 Summary
6.4 The emerging powerhouse of bundled tools, Bit
__6.4.1 Background and introduction of the beat
__6.4.2 Basic concepts and characteristics of bits
__6.4.3 Key fields required for setup
__6.4.4 Summary
▣ Chapter 7: Creating Your Own JavaScript Package
7.1 Creating Your Own npm Package
__7.1.1 Checklist for Package Development
__7.1.2 Project Environment Settings
__7.1.3 Writing actual code and test code
__7.1.4 Setting up an environment for bundling and transpiling
__7.1.5 Writing simple test code
__7.1.6 Building a CI Pipeline Using GitHub Actions
__7.1.7 Deployment using changesets
__7.1.8 Summary
7.2 Creating Your Own CLI Package
__7.2.1 Planning the CLI package to be created
__7.2.2 Project Environment Settings
__7.2.3 Writing the actual code
__7.2.4 Check the results
__7.2.5 Use after deployment
__7.2.6 Useful packages for creating CLIs
__7.2.7 Summary
▣ Chapter 8: Managing Both Services and Libraries with a Monorepo
8.1 Monorepo and Turborepo
__8.1.1 What is a monorepo?
__8.1.2 npm workspace
__8.1.3 Turborepo, a tool for configuring monorepos
__8.1.4 Summary
8.2 Creating Your Own Monorepo Project
__8.2.1 Introduction to the Design System
__8.2.2 Configuring pnpm workspaces and turborepo
__8.2.3 Implementing a shared package
__8.2.4 @ndive/design-tokens implementation
__8.2.5 @ndive/design-components implementation
__8.2.6 @ndive/design-tracker implementation
__8.2.7 Writing an Application
__8.2.8 Deployment Overview
__8.2.9 Summary
▣ Chapter 9: Tools and Tips to Help You Develop Packages
9.1 Tools to help you develop packages
__9.1.1 Another way to upload a package JSR
__9.1.2 A tool to perform complex bundle processes at once, t sup
__9.1.3 Standard cosmiconfig configuration file
__9.1.4 Tinybench, a tool for performance analysis
__9.1.5 jscodeshift helps with easy code migration
__9.1.6 Summary
9.2 Tips to Help You Develop Packages
__9.2.1 ESModule, not optional but required
__9.2.2 Writing package.json correctly
__9.2.3 Applying the correct transpilation and polyfill
__9.2.4 Add dependencies carefully
__9.2.5 Test code and benchmark tests that give confidence to the code
__9.2.6 How to write proper documentation
__9.2.7 Summary
1.1 Definition and History of npm
__1.1.1 npm's history and background
__1.1.2 Key features of npm
__1.1.3 Useful sites related to npm
__1.1.4 Summary
1.2 What is a significant version?
__1.2.1 Background and definition of the emergence of the significant version
__1.2.2 Concrete specification of the semantic version
__1.2.3 Semantic version grammar
__1.2.4 Semantic version used by Node.js and npm
__1.2.5 Summary
1.3 The Light and Dark Side of Semantic Versioning and the npm Ecosystem
__1.3.1 left-pad: What happens when a utility package that tens of millions of packages depend on disappears?
__1.3.2 everthing: You're saying that packages can't be deleted if they're dependencies? So what if we had all JavaScript packages as dependencies?
__1.3.3 is-promise: A situation caused by an incorrect minor version update
__1.3.4 colors.js and faker.js: Prematurely updating the version of a component or a sub-component can be detrimental.
__1.3.5 Event-Stream Incident: How Secure Is Open Source?
__1.3.6 Things to consider when using semantic versioning and npm
__1.3.7 Summary
▣ Chapter 2: Digging into package.json and npm
2.1 Review package.json
__2.1.1 package.json
__2.1.2 Key fields of package.json
__2.1.3 Creating package.json
__2.1.4 Looking at npm config and .npmrc
__2.1.5 Summary
2.2 What are dependencies?
__2.2.1 npm version and special symbols used in versions
__2.2.2 dependencies
__2.2.3 devDependencies
__2.2.4 peerDependencies
__2.2.5 peerDependenciesMeta
__2.2.6 Summary
2.3 Main npm commands
__2.3.1 npm run
__2.3.2 npm install and npm ci
__2.3.3 npm update
__2.3.4 npm dedupe
__2.3.5 npm ls
__2.3.6 npm explain
__2.3.7 npm audit
__2.3.8 npm publish
__2.3.9 npm deprecate
__2.3.10 npm outdated
__2.3.11 npm view
__2.3.12 Summary
2.4 What happens when you run npm install
__2.4.1 The Core of Dependency Tree Analysis @npmcli/arborist
__2.4.2 Package for installing the package, pacote
__2.4.3 Examining node_modules
__2.4.4 Summary
2.5 What is node_modules?
__2.5.1 The Role of node_modules
__2.5.2 Structure of node_modules
__2.5.3 Symbolic Links
__2.5.4 Summary
2.6 bin field and npx
__2.6.1 CLI package
__2.6.2 bin field
__2.6.3 npx
__2.6.4 Summary
▣ Chapter 3: yarn and pnpm, rivals to npm
3.1 Problems and Limitations of npm
__3.1.1 Ghost Dependencies
__3.1.2 Disk I/O load
__3.1.3 node_modules are too huge
__3.1.4 Lock files vulnerable to change
__3.1.5 Summary
3.2 yarn: A package manager for fast and reliable package management.
__3.2.1 Introduction and History of Yarn
__3.2.2 Features
__3.2.3 Summary
3.3 pnpm: A package manager that brings innovation in disk space saving and installation speed.
__3.3.1 Introduction and History of pnpm
__3.3.2 Features
__3.3.3 Summary
3.4 Comparison of npm, yarn, and pnpm
__3.4.1 Workspace
__3.4.2 Command Comparison
__3.4.3 Benchmark Test
__3.4.4 Summary
▣ Chapter 4: CommonJS and ESModule
4.1 History of JavaScript Modularization
__4.1.1 Background on JavaScript Modularization
__4.1.2 JavaScript before modularization
__4.1.3 Several attempts at JavaScript modules
__4.1.4 Today's JavaScript Module System
__4.1.5 Summary
4.2 What is CommonJS?
__4.2.1 Background of the Birth of CommonJS
__4.2.2 CommonJS Specification
__4.2.3 CommonJS in Node.js
__4.2.4 Building the source code with CommonJS
__4.2.5 Summary
4.3 What is ESModule?
__4.3.1 Background and Introduction of ESModule
__4.3.2 Features of ESModule
__4.3.3 ESModule in Node.js
__4.3.4 Summary
4.4 How does Node.js find packages in node_modules?
__4.4.1 Module interpretation algorithm
__4.4.2 How to load a module with a module name specifier
__4.4.3 Summary
4.5 CommonJS vs. ESModule: Which is the Right Answer?
__4.5.1 Why open source packages support both CommonJS and ESModule
__4.5.2 Developing a dual package that supports both CommonJS and ESModule
__4.5.3 Developing a Pure ESModule Package
__4.5.4 CommonJS and ESModule, which is the right answer?
__4.5.5 Summary
▣ Chapter 5: Transpiling and Polyfilling
5.1 Babel, a tool that helps with transpiling
__5.1.1 The Need for Babel
__5.1.2 How Babel Works
__5.1.3 Trying out Babel
__5.1.4 Summary
5.2 Core-js, a tool to help with polyfilling
__5.2.1 What is core-js?
__5.2.2 Babel and core-js
__5.2.3 Summary
5.3 What are the best polyfills and transpilers?
__5.3.1 Specifying the supported environment
__5.3.2 Summary
5.4 Alternatives to Babel and core-js
__5.4.1 TypeScript Compiler
__5.4.2 SWC(Speedy Web Compiler)
__5.4.3 es-shims
__5.4.4 polyfill.js
__5.4.5 Summary
▣ Chapter 6: Exploring JavaScript Bundling Tools
6.1 What is bundling and why is it needed?
__6.1.1 History of Bundling
__6.1.2 The Role of Bundling
__6.1.3 Summary
6.2 Webpack, the standard for web service bundles
__6.2.1 Introduction to Webpack and its main features
__6.2.2 Basic concepts and operating principles of Webpack
__6.2.3 Creating a Simple Webpack Service
__6.2.4 Summary
6.3 Rollup, the leader in package bundles
__6.3.1 Background and introduction of rollup
__6.3.2 Basic concepts and features of rollup
__6.3.3 Summary
6.4 The emerging powerhouse of bundled tools, Bit
__6.4.1 Background and introduction of the beat
__6.4.2 Basic concepts and characteristics of bits
__6.4.3 Key fields required for setup
__6.4.4 Summary
▣ Chapter 7: Creating Your Own JavaScript Package
7.1 Creating Your Own npm Package
__7.1.1 Checklist for Package Development
__7.1.2 Project Environment Settings
__7.1.3 Writing actual code and test code
__7.1.4 Setting up an environment for bundling and transpiling
__7.1.5 Writing simple test code
__7.1.6 Building a CI Pipeline Using GitHub Actions
__7.1.7 Deployment using changesets
__7.1.8 Summary
7.2 Creating Your Own CLI Package
__7.2.1 Planning the CLI package to be created
__7.2.2 Project Environment Settings
__7.2.3 Writing the actual code
__7.2.4 Check the results
__7.2.5 Use after deployment
__7.2.6 Useful packages for creating CLIs
__7.2.7 Summary
▣ Chapter 8: Managing Both Services and Libraries with a Monorepo
8.1 Monorepo and Turborepo
__8.1.1 What is a monorepo?
__8.1.2 npm workspace
__8.1.3 Turborepo, a tool for configuring monorepos
__8.1.4 Summary
8.2 Creating Your Own Monorepo Project
__8.2.1 Introduction to the Design System
__8.2.2 Configuring pnpm workspaces and turborepo
__8.2.3 Implementing a shared package
__8.2.4 @ndive/design-tokens implementation
__8.2.5 @ndive/design-components implementation
__8.2.6 @ndive/design-tracker implementation
__8.2.7 Writing an Application
__8.2.8 Deployment Overview
__8.2.9 Summary
▣ Chapter 9: Tools and Tips to Help You Develop Packages
9.1 Tools to help you develop packages
__9.1.1 Another way to upload a package JSR
__9.1.2 A tool to perform complex bundle processes at once, t sup
__9.1.3 Standard cosmiconfig configuration file
__9.1.4 Tinybench, a tool for performance analysis
__9.1.5 jscodeshift helps with easy code migration
__9.1.6 Summary
9.2 Tips to Help You Develop Packages
__9.2.1 ESModule, not optional but required
__9.2.2 Writing package.json correctly
__9.2.3 Applying the correct transpilation and polyfill
__9.2.4 Add dependencies carefully
__9.2.5 Test code and benchmark tests that give confidence to the code
__9.2.6 How to write proper documentation
__9.2.7 Summary
Detailed image

Publisher's Review
★What this book covers★
◎ npm, node_modules, and the principles of semantic versioning
◎ History and differences between CommonJS and ESModule
◎ Comparison and selection of Webpack, Rollup, and Vite bundling tools
◎ Transpilers and Polyfills: How to Use Babel and Core-js
◎ How to efficiently manage large-scale projects in a monorepo environment
◎ How to create your own npm package and CLI tool
If you want to understand the past, present, and future of the JavaScript ecosystem, this book will be your guide.
Solve your past worries and grow into a more productive and professional developer!
◎ npm, node_modules, and the principles of semantic versioning
◎ History and differences between CommonJS and ESModule
◎ Comparison and selection of Webpack, Rollup, and Vite bundling tools
◎ Transpilers and Polyfills: How to Use Babel and Core-js
◎ How to efficiently manage large-scale projects in a monorepo environment
◎ How to create your own npm package and CLI tool
If you want to understand the past, present, and future of the JavaScript ecosystem, this book will be your guide.
Solve your past worries and grow into a more productive and professional developer!
GOODS SPECIFICS
- Date of issue: June 12, 2025
- Page count, weight, size: 1,012 pages | 188*240*41mm
- ISBN13: 9791158396077
You may also like
카테고리
korean
korean