Skip to content

包管理器

JavaScript 包管理工具。

主流包管理器

npm

  • 简介: Node.js 默认包管理器
  • 链接: https://www.npmjs.com/
  • 特点:
    • 最大的包注册表
    • Node.js 内置
    • 生态成熟
    • 工作区支持

pnpm

  • 简介: 快速、节省磁盘空间的包管理器
  • 链接: https://pnpm.io/
  • 特点:
    • 节省磁盘空间(硬链接)
    • 速度快
    • 严格的依赖管理
    • Monorepo 支持优秀

Yarn

  • 简介: 快速、可靠、安全的依赖管理
  • 链接: https://yarnpkg.com/
  • 特点:
    • 离线模式
    • 确定性安装
    • 工作区支持
    • Plug'n'Play 模式

Bun

  • 简介: 极速的 JavaScript 运行时和包管理器
  • 链接: https://bun.sh/
  • 特点:
    • 速度极快
    • 内置打包器
    • 兼容 npm 包
    • 一体化工具

包发布工具

np

release-it

semantic-release

版本管理

Changesets

Lerna

依赖分析

npm-check-updates

depcheck

npm-check

私有仓库

Verdaccio

  • 简介: 轻量级私有 npm 代理
  • 链接: https://verdaccio.org/
  • 特点:
    • 易于部署
    • 缓存代理
    • 私有包托管

npm Enterprise

镜像源

nrm

yrm

常用镜像源

淘宝镜像

bash
https://registry.npmmirror.com/

腾讯云镜像

bash
https://mirrors.cloud.tencent.com/npm/

华为云镜像

bash
https://mirrors.huaweicloud.com/repository/npm/