Yarn v1.13.0 发布,Facebook 的 JavaScript 包管理器

  

Yarn v1.13.0 发布了,这是一个 Facebook 推出的 JavaScript 包管理器。该版本主要是修复了 bug,但也包括功能改进和新增功能,具体如下

  • Implements a new package.json field: peerDependenciesMeta #6671 - Maël Nison

  • Adds an optional settings to peerDependenciesMeta to silence missing peer dependency warnings #6671 - Maël Nison

  • Implements yarn policies set-version [range]. Check the documentation for usage & tips. #6673 - Maël Nison

  • Fixes a resolution issue when a package had an invalid main entry #6682 - Maël Nison

  • Decreases the size of the generated $PATH environment variable for a better Windows support #6683 - Rowan Lonsdale

  • Fixes postinstall scripts for third-party packages when they were referencing a binary from their own dependencies #6712 - Maël Nison

  • Fixes yarn audit exit code overflow #6748 - Andrey Vetlugin

  • Stops automatically unplugging packages with postinstall script when running under --ignore-scripts #6820 - Maël Nison

  • Adds transparent support for the resolve package when using Plug'n'Play #6816 - Maël Nison

  • Properly reports the error codes when the npm registry throws 500's #6817 - Maël Nison

Yarn 是 Facebook 推出的 JavaScript 包管理器,旨在提供 npm 之外的另一种选择方案。Yarn 具有极佳的伸缩性,可以支持成千上万个直接或间接的包依赖。Yarn 的设计初衷是保证稳定性、弹性和高性能。

那么 Yarn 和 npm 有什么不同呢?两者最大的不同在于安装包的方式,Yarn 用到了 lockfiles 和确定性算法。Lockfile 会把安装的包版本进行锁定,保证了 node_modules 目录在不同设备上的安装结果是一致的,同时支持并行操作,大大加快安装进程。此外,Yarn 还声明同时兼容 npm 和 Bower,支持两个仓库混合使用,同时支持包的离线安装(只要你曾经安装过这个包)。

Yarn 1.0 的发布时间是 2017 年 9 月,可点此查看更新内容。

Yarn 1.13.0 源码下载 https://github.com/yarnpkg/yarn/releases/tag/v1.13.0


猜你喜欢

转载自www.oschina.net/news/102821/yarn-v-1-13-0-released