跳至主要內容

The year 2022 for pnpm

· One min read
Zoltan Kochan
pnpm 的首席維護者

現在是年底了, 是一個艱難的一年 如你所知道的,我生活在烏克蘭,所以由於俄羅斯對我們的發起的戰爭,比起前些年使得這個項目更難被去領導。 儘管如此,對 pnpm 來說依然是一個好年頭。 我們新增了很多新用戶、貢獻者,而且我們也實現了很多很讚的功能。

(上圖由 Midjourney 生成。 老虎象徵虎年)

使用方法

下載統計

我今年的目標是在下載量上擊敗Lerna。 We were able to achieve this goal in August:

2022 年 pnpm 的下載量是 比 2021 年多5倍

訪問Docs統計

我們從 Google 分析收集了一些訪問 docs 的客觀的數據。 在 2022 年,有時我們每周有超過 2 萬名獨立的訪客。 這比 2021 年多了 10 倍!

GitHub上的星星統計

我們的 主要 GitHub 儲存庫 今年收獲近 +7000 顆星。

我們的貢獻者

今年我們有很多新的活躍貢獻者。 這些是在 2022 年合併至少一項 PR 的人:

特色功能

Supporting a symlinkless hoisted node_modules (since v6.25.0)

Right at the beginning of 2022, we have added support for the "traditional" hoisted (a.k.a flat node_modules). We use Yarn's hoisting algorithm to create a proper hoisted node_modules. This new setting has basically made pnpm compatible with all Node.js stack that are compatible with npm CLI.

To use the hoisted node_modules directory structure, use the node-linker=hoisted setting in an .npmrc file.

Side effects cache (since v7.0.0)

Since v7, side-effect-cache is enabled by default, so dependencies that should be built are only built once on a machine. This improves installation speed by a lot in projects that have dependencies with build scripts.

Dependencies patching (since v7.4.0)

The pnpm patch command have been added for patching dependencies in your node_modules.

Time-based resolution strategy (since v7.10.0)

A new resolution mode was added to pnpm, which should make updating dependencies more secure. You can change the resolution mode with the resolution-mode setting.

Listing licenses of dependencies (since v7.17.0)

You may now use the pnpm licenses list command to check the licenses of the installed packages.