.npmrc

pnpm 从命令行、环境变量和 .npmrc 文件中获取其配置。

pnpm config 命令可用于更新和编辑 用户和全局 .npmrc 文件的内容。

四个相关文件分别为:

  • 每个项目的配置文件(/path/to/my/project/.npmrc
  • 每个工作区的配置文件(包含 pnpm-workspace.yaml 文件的目录)
  • 每位用户的配置文件( ~/.npmrc
  • 全局配置文件( /etc/npmrc

所有 .npmrc 文件都遵循 INI-formatted 列表,包含 key = value 参数。

依赖提升设置

hoist

  • 默认值: true
  • 类型: boolean

true,所有依赖项都被提升到 node_modules/.pnpm。 这使得 node_modules所有包都可以访问 未列出的依赖项。

hoist-pattern

  • 默认值: [‘*‘]
  • 类型: string[]

告诉 pnpm 哪些包应该被提升到 node_modules/.pnpm。 在默认情况下,所有的包都是被提升的,但是如果你知道只有一些有缺陷的包有幻影依赖关系, 您可以使用此选项来只提升有幻影依赖关系的包(推荐)。

例如:

  1. hoist-pattern[]=*eslint*
  2. hoist-pattern[]=*babel*

从 v7.12.0 开始, 你可以使用 ! pattern 排除提升。

例如:

  1. hoist-pattern[]=*types*
  2. hoist-pattern[]=!@types/react

public-hoist-pattern

  • 默认值: [‘*eslint*‘, ‘*prettier*‘]
  • 类型: string[]

不同于 hoist-pattern 会把依赖提升到一个虚拟存储中的隐藏的模块目录中,public-hoist-pattern 将匹配的依赖提升至根模块目录中。 提升至根模块目录中意味着应用代码可以访问到幻影依赖,即使他们对解析策略做了不当的修改。

当处理一些有缺陷的可插拔工具不能正确解析依赖关系时,此设置很有用。

例如:

  1. public-hoist-pattern[]=*plugin*

注意:设置 shamefully-hoisttrue 与设置 public-hoist-pattern* 是一样的。

从 v7.12.0 开始, 你可以使用 ! pattern 排除提升。

例如:

  1. public-hoist-pattern[]=*types*
  2. public-hoist-pattern[]=!@types/react

shamefully-hoist

  • 默认值: false
  • 类型:Boolean

默认情况下,pnpm 创建一个半严格的 node_modules,这意味着依赖项可以访问未声明的依赖项,但 node_modules 之外的模块不行。 通过这种布局,生态系统中的大多数的包都可以正常工作。 但是,如果某些工具仅在提升的依赖项位于根目录的 node_modules 时才有效,您可以将其设置为 true 来为您提升它们。

Node 模块设置

store-dir

  • 默认值:
    • 如果设置了 $XDG_DATA_HOME 环境变量,则为 $XDG_DATA_HOME/pnpm/store
    • 在 Windows 上: ~/AppData/Local/pnpm/store
    • 在 macOS 上: ~/Library/pnpm/store
    • 在 Linux 上: ~/.local/share/pnpm/store
  • 类型:path

所有包被保存在磁盘上的位置。

该存储应始终位于进行安装的同一磁盘上,因此每个磁盘将有一个存储。 如果在使用磁盘中具有主目录,存储目录就会创建在这里。 如果磁盘上没有主目录,那么将在文件系统的根目录中创建该存储。 例如,如果安装发生在挂载在 /mnt 的文件系统上,那么存储将在 /mnt/.pnpm-store 处创建。 Windows 系统上也是如此。

可以从不同的磁盘设置同一个存储,但在这种情况下,pnpm 将复制包而不是硬链接它们,因为硬链接只能发生在同一文件系统上。

modules-dir

  • 默认值:node_modules
  • 类型:path

将安装依赖项的目录(而不是 node_modules)。

node-linker

  • 默认值:isolated
  • 类型: isolated, hoisted, pnp

定义应该使用什么链接器来安装 Node 包。

  • isolated - 依赖项从虚拟存储 node_modules/.pnpm 中建立符号链接
  • hoisted - 创建一个没有符号链接的扁平的 node_modules。 与 npm 或 Yarn Classic 创建 node_modules 一致。 当使用此设置时,Yarn 的一个库用于提升。 使用此设置的正当理由:
    1. 您的工具不适用于符号链接。 React Native 项目很可能只有在你使用提升的 node_modules 才能工作。
    2. 您的项目会被部署到 serverless 服务提供商。 一些 serverless 提供商(例如 AWS Lambda)不支持符号链接。 此问题的另一种解决方案是在部署之前打包您的应用程序。
    3. 如果你想用 “bundledDependencies” 发布你的包。
    4. 如果您使用 --preserve-symlinks 标志运行 Node.js。
  • pnp - 没有 node_modules。 Plug’n’Play 是一种 Yarn Berry 使用的创新的 Node 依赖策略。 当使用 pnp 作为您的链接器时,建议同时将 symlink 设置为 false
  • 默认值: true
  • 类型:Boolean

symlink 设置为 false 时,pnpm 创建一个没有任何符号链接的虚拟存储目录。 与 node-linker=pnp 一起是一个有用的设置。

enable-modules-dir

  • 默认值: true
  • 类型:Boolean

false 时,pnpm 不会将任何文件写入模块目录(node_modules)。 这对于在用户空间的文件系统 (FUSE) 中挂载模块目录时很有用。 有一个实验性 CLI 允许您在 FUSE 中挂载模块目录:@pnpm/mount-modules

virtual-store-dir

  • 默认值:node_modules/.pnpm
  • 类型:path

带有指向存储的链接的目录。 所有直接和间接依赖项都链接到此目录中。

这是一个有用的设置,可以解决 Windows 上长路径的问题。 如果您有一些路径很长的依赖项,您可以选择将虚拟存储放在驱动器的根目录中(例如 C:\my-project-store)。

或者您可以将虚拟存储设置为 .pnpm 并将其添加到 .gitignore。 这将使堆栈跟踪更清晰,因为依赖项的路径将会提高一个目录层级。

注意: 虚拟存储不能在多个项目之间共享。 每个项目都应该有自己的虚拟存储(除了在工作空间中被共享的根目录)。

package-import-method

  • 默认值:auto
  • 类型:auto, hardlink, copy, clone, clone-or-copy

控制从存储中导入包的方式(如果要禁用 node_modules中的符号链接,则需要更改 节点链接器 设置,而不是此设置)。

  • auto - 尝试从存储克隆包。 如果不支持克隆则从存储硬链接包。 如果克隆和链接都不支持,则回退到复制
  • hardlink - 从存储硬链接包
  • clone-or-copy - 尝试从存储中克隆包。 如果不支持克隆则回退到复制。
  • copy - 从存储复制包
  • clone - 从商店克隆(也称为 copy-on-write 或参考链接)包

克隆是将包写入 node_modules 的最佳方式。 这是最快的方式,也是最安全的方式。 使用克隆时,您可以编辑 node_modules 中的文件,并且不会在中央内容可寻址存储中修改它们。

不幸的是,并非所有文件系统都支持克隆。 我们建议使用写时复制 (CoW) 文件系统(例如,在 Linux 上使用 Btrfs 而不是 Ext4)以获得最佳的 pnpm 体验。

.npmrc - 图1提示

尽管 macOS 支持克隆,但目前 Node.js 中存在错误 该错误阻止我们在 pnpm 中使用它。 如果您有解决方法的想法,请 到来帮助我们

modules-cache-max-age

  • 默认值: 10080 (以分钟为单位的 7 天)
  • 类型:number

孤立包应该从模块目录中被删除的时间(以分钟为单位)。 pnpm 在模块目录中保存了一个包的缓存。 切换分支或降级依赖项时,这会提高安装速度。

锁文件设置

lockfile

  • 默认值: true
  • 类型:Boolean

当设置为 false 时,pnpm 不会读取或生成 pnpm-lock.yaml 文件。

prefer-frozen-lockfile

  • 默认值: true
  • 类型:Boolean

当设置为 true 并且存在 pnpm-lock.yaml 满足 package.json 中的依赖关系时,执行无头安装。 因此无头安装会直接跳过解析依赖项,并且不会修改lockfile

lockfile-include-tarball-url

添加于:v7.6.0

  • 默认值: false
  • 类型:Boolean

将包的 tarball 的完整 URL 添加到 pnpm-lock.yaml中的每个条目。

use-lockfile-v6

添加于:v7.24.0

  • 默认值: false
  • 类型:Boolean

使用新版 v6 lockfile 格式,这将是 pnpm v8 中的默认格式。 这种新格式更具可读性,因为它不使用 hash 来缩短长依赖路径。

注册源 & 身份验证设置

registry

npm包注册源地址 (包括末尾斜杠) 。

<scope>:registry

用于指定包的注册源范围 例如,设置 @babel:registry=https://example.com/packages/npm/ 将在您使用 pnpm add @babel/core 或任何 @babel 范围内的包时,该包将强制从 https://example.com/packages/npm 获取而不是默认注册源。

<URL>:_authToken

访问指定注册源时要使用的身份验证承载令牌。 示例:

  1. //registry.npmjs.org/:_authToken=xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx

您也可以使用环境变量。 示例:

  1. //registry.npmjs.org/:_authToken=${NPM_TOKEN}

或者,您可以直接使用环境变量,而不更改 .npmrc:

  1. npm_config_//registry.npmjs.org/:_authToken=xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx

<URL>:tokenHelper

令牌助手是输出身份验证令牌的可执行文件。 这可以用于 authToken 不是常量值而是定期刷新值的情况,其中脚本或其他工具可以使用现有的刷新令牌来获取新的访问令牌。

助手路径的配置必须是绝对路径,没有参数。 为了安全起见,只允许在用户 .npmrc设置此值。 否则,项目可以在项目的本地 .npmrc 放置一个值并运行任意可执行文件。

为默认注册表设置令牌助手:

  1. tokenHelper=/home/ivan/token-generator

为指定注册源设置令牌助手:

  1. //registry.corp.com:tokenHelper=/home/ivan/token-generator

请求设置

ca

  • 默认值:The npm CA certificate
  • 类型:String,Array 或 null

为与源服务器进行可信的 SSL 链接颁发的 CA 证书。 值应采用 PEM 格式(也称 “Base-64 encoded X.509 (.CER)”)。 示例:

  1. ca="-----BEGIN CERTIFICATE-----\nXXXX\nXXXX\n-----END CERTIFICATE-----"

设置为 null 时仅允许已知注册商,若指定 CA 证书将只信任指定的证书颁发机构。

通过指定一个证书数组,可以信任多个 CA:

  1. ca[]="..."
  2. ca[]="..."

更多信息可见 strict-ssl 设置

cafile

  • 默认值:null
  • 类型:path

包含一个或多个 CA 证书的文件路径。 类似于 ca 设置,但允许将一个或多个 CA 信息存储在文件中,而不是通过命令行指定。

cert

  • 默认值:null
  • 类型:String

访问注册源时传递的客户端证书。 值应为 PEM 格式(也称 “Base-64 encoded X.509 (.CER)”)。 示例:

  1. cert="-----BEGIN CERTIFICATE-----\nXXXX\nXXXX\n-----END CERTIFICATE-----"

它不是证书文件的路径(也没有 certfile 选项)。

key

  • 默认值:null
  • 类型:String

访问注册源时传递的客户端密钥。 值应采用 PEM 格式(也称 “Base-64 encoded X.509 (.CER)”)。 示例:

  1. key="-----BEGIN PRIVATE KEY-----\nXXXX\nXXXX\n-----END PRIVATE KEY-----"

它不是密钥文件的路径(也没有 keyfile 选项)。

这个设置含有敏感信息! 不要将其写入本地会提交到仓库的 .npmrc 文件。

git-shallow-hosts

  • 默认值: [‘github.com’, ‘gist.github.com’, ‘gitlab.com’, ‘bitbucket.com’, ‘bitbucket.org’]
  • 类型: string[]

当获取 Git 仓库中的依赖项时,如果域名在此设置中列出,pnpm 将使用浅克隆仅获取所需的提交,而不是所有历史记录。

https-proxy

  • 默认值:null
  • 类型:url

用于传出 HTTPS 请求的代理。 如果设置了 HTTPS_PROXYhttps_proxyHTTP_PROXYhttp_proxy 环境变量,将使用环境变量的值。

If your proxy URL contains a username and password, make sure to URL-encode them. 例如:

  1. https-proxy=https://use%21r:pas%2As@my.proxy:1234/foo

Do not encode the colon (:) between the username and password.

http-proxy

proxy

  • 默认值:null
  • 类型:url

A proxy to use for outgoing http requests. If the HTTP_PROXY or http_proxy environment variables are set, proxy settings will be honored by the underlying request library.

local-address

  • Default: undefined
  • Type: IP Address

The IP address of the local interface to use when making connections to the npm registry.

maxsockets

  • 默认值:network-concurrency x 3
  • 类型:Number

The maximum number of connections to use per origin (protocol/host/port combination).

noproxy

  • 默认值:null
  • 类型:String

A comma-separated string of domain extensions that a proxy should not be used for.

strict-ssl

  • 默认值: true
  • 类型:Boolean

Whether or not to do SSL key validation when making requests to the registry via HTTPS.

See also the ca option.

network-concurrency

  • 默认值:16
  • 类型:Number

Controls the maximum number of HTTP(S) requests to process simultaneously.

fetch-retries

  • 默认值:2
  • 类型:Number

How many times to retry if pnpm fails to fetch from the registry.

fetch-retry-factor

  • 默认值:10
  • 类型:Number

The exponential factor for retry backoff.

fetch-retry-mintimeout

  • Default: 10000 (10 seconds)
  • 类型:Number

The minimum (base) timeout for retrying requests.

fetch-retry-maxtimeout

  • 默认值:60000(1 分钟)
  • 类型:Number

The maximum fallback timeout to ensure the retry factor does not make requests too long.

fetch-timeout

  • 默认值:60000(1 分钟)
  • 类型:Number

The maximum amount of time to wait for HTTP requests to complete.

Peer Dependency 设置

auto-install-peers

  • 默认值: false
  • 类型:Boolean

When true, any missing non-optional peer dependencies are automatically installed.

strict-peer-dependencies

  • Default: false (was true from v7.0.0 until v7.13.5)
  • 类型:Boolean

If this is enabled, commands will fail if there is a missing or invalid peer dependency in the tree.

resolve-peers-from-workspace-root

Added in: v7.23.0

  • 默认值: false
  • 类型:Boolean

When enabled, dependencies of the root workspace project are used to resolve peer dependencies of any projects in the workspace. It is a useful feature as you can install your peer dependencies only in the root of the workspace, and you can be sure that all projects in the workspace use the same versions of the peer dependencies.

命令行设置

[no-]color

  • 默认值:auto
  • Type: auto, always, never

Controls colors in the output.

  • auto - output uses colors when the standard output is a terminal or TTY.
  • always - ignore the difference between terminals and pipes. You’ll rarely want this; in most scenarios, if you want color codes in your redirected output, you can instead pass a --color flag to the pnpm command to force it to use color codes. The default setting is almost always what you’ll want.
  • never - turns off colors. This is the setting used by --no-color.

loglevel

  • Default: info
  • Type: debug, info, warn, error

Any logs at or higher than the given level will be shown. You can instead pass --silent to turn off all output logs.

use-beta-cli

  • 默认值: false
  • 类型:Boolean

Experimental option that enables beta features of the CLI. This means that you may get some changes to the CLI functionality that are breaking changes, or potentially bugs.

recursive-install

  • 默认值: true
  • 类型:Boolean

If this is enabled, the primary behaviour of pnpm install becomes that of pnpm install -r, meaning the install is performed on all workspace or subdirectory packages.

Else, pnpm install will exclusively build the package in the current directory.

engine-strict

  • 默认值: false
  • 类型:Boolean

If this is enabled, pnpm will not install any package that claims to not be compatible with the current Node version.

Regardless of this configuration, installation will always fail if a project (not a dependency) specifies an incompatible version in its engines field.

npm-path

  • 类型:path

The location of the npm binary that pnpm uses for some actions, like publishing.

构建设置

ignore-scripts

  • 默认值: false
  • 类型:Boolean

不执行任何项目中 package.json 和它的依赖项中定义的任何脚本.

.npmrc - 图2注意

该标记不会阻止执行.pnpmfile.cjs

ignore-dep-scripts

Added in: v7.9.0

  • 默认值: false
  • 类型:Boolean

Do not execute any scripts of the installed packages. Scripts of the projects are executed.

child-concurrency

  • Default: 5
  • 类型:Number

The maximum number of child processes to allocate simultaneously to build node_modules.

side-effects-cache

  • 默认值: true
  • 类型:Boolean

Use and cache the results of (pre/post)install hooks.

side-effects-cache-readonly

  • 默认值: false
  • 类型:Boolean

Only use the side effects cache if present, do not create it for new packages.

unsafe-perm

  • 默认值:true, 如果以 root 身份运行则为 false
  • 类型:Boolean

Set to true to enable UID/GID switching when running package scripts. If set explicitly to false, then installing as a non-root user will fail.

Node.js 设置

use-node-version

  • Default: undefined
  • Type: semver

Specifies which exact Node.js version should be used for the project’s runtime. pnpm will automatically install the specified version of Node.js and use it for running pnpm run commands or the pnpm node command.

This may be used instead of .nvmrc and nvm. Instead of the following .nvmrc file:

  1. 16.16.0

Use this .npmrc file:

  1. use-node-version=16.16.0

node-version

  • Default: the value returned by node -v, without the v prefix
  • Type: semver

The Node.js version to use when checking a package’s engines setting.

If you want to prevent contributors of your project from adding new incompatible dependencies, use node-version and engine-strict in a .npmrc file at the root of the project:

  1. node-version=12.22.0
  2. engine-strict=true

This way, even if someone is using Node.js v16, they will not be able to install a new dependency that doesn’t support Node.js v12.22.0.

node-mirror:<releaseDir>

  • Default: https://nodejs.org/download/<releaseDir>/
  • Type: URL

Sets the base URL for downloading Node.js. The <releaseDir> portion of this setting can be any directory from https://nodejs.org/download: release, rc, nightly, v8-canary, etc.

Here is how pnpm may be configured to download Node.js from Node.js mirror in China:

  1. node-mirror:release=https://npmmirror.com/mirrors/node/
  2. node-mirror:rc=https://npmmirror.com/mirrors/node-rc/
  3. node-mirror:nightly=https://npmmirror.com/mirrors/node-nightly/

Workspace Settings

  • 默认值: true
  • 类型:true, false, deep

启用该选项,本地可用的 packages 将被链接到 <0>node_modules</0> 中而不是从配置源下载。 这在 monorepo 项目中使用起来将十分方便。 If you need local packages to also be linked to subdependencies, you can use the deep setting.

否则, packages 将全部从注册表下载并安装。 不过,工作空间的 packages 仍然可以通过 workspace: 范围协议被链接到。

prefer-workspace-packages

  • 默认值: false
  • 类型:Boolean

如果启用了此选项,工作空间中的本地 package 将优先于注册表,即使注册表中有了该 package 的新版本。

该设置只在工作空间未开启 save-workspace-protocol 时有效。

shared-workspace-lockfile

  • 默认值: true
  • 类型:Boolean

如果启用此选项,pnpm 会在工作空间的根目录中创建一个唯一的 pnpm-lock.yaml 文件。 这也意味着工作空间的packages的所有依赖项都将位于单个 node_modules 中。(同时软链接到它们packagesnode_modules 文件夹中用于 Node 的模块解析)。

此选项的好处:

  • 每个依赖都是一个单例
  • 在 monorepo 中的安装更快
  • 代码更改都在一个文件中、代码审查(Cr )减少

.npmrc - 图3注意

尽管所有依赖项都将硬链接到根 node_modules 中,但packages 只能访问 package.json 中声明的 ,因此 pnpm 的严格性得以保留。 这是上述软链接的效果。

save-workspace-protocol

  • 默认值: true
  • Type: true, false, rolling

This setting controls how dependencies that are linked from the workspace are added to package.json.

If foo@1.0.0 is in the workspace and you run pnpm add foo in another project of the workspace, below is how foo will be added to the dependencies field. The save-prefix setting also influences how the spec is created.

save-workspace-protocolsave-prefixspec
false‘’1.0.0
false‘~’~1.0.0
false‘^’^1.0.0
true‘’workspace:1.0.0
true‘~’workspace:~1.0.0
true‘^’workspace:^1.0.0
rolling‘’workspace:*
rolling‘~’workspace:~
rolling‘^’workspace:^

include-workspace-root

添加于:v7.4.0

  • 默认值: false
  • 类型:Boolean

When executing commands recursively in a workspace, execute them on the root workspace project as well.

其它设置

use-running-store-server

  • 默认值: false
  • 类型:Boolean

Only allows installation with a store server. If no store server is running, installation will fail.

save-prefix

  • Default: ‘^’
  • 类型:String

Configure how versions of packages installed to a package.json file get prefixed.

For example, if a package has version 1.2.3, by default its version is set to ^1.2.3 which allows minor upgrades for that package, but after pnpm config set save-prefix='~' it would be set to ~1.2.3 which only allows patch upgrades.

This setting is ignored when the added package has a range specified. For instance, pnpm add foo@2 will set the version of foo in package.json to 2, regardless of the value of save-prefix.

tag

  • Default: latest
  • 类型:String

If you pnpm add a package and you don’t provide a specific version, then it will install the package at the version registered under the tag from this setting.

This also sets the tag that is added to the package@version specified by the pnpm tag command if no explicit tag is given.

global-dir

  • 默认值:
    • If the $XDG_DATA_HOME env variable is set, then $XDG_DATA_HOME/pnpm/global
    • On Windows: ~/AppData/Local/pnpm/global
    • On macOS: ~/Library/pnpm/global
    • On Linux: ~/.local/share/pnpm/global
  • 类型:path

Specify a custom directory to store global packages.

global-bin-dir

  • 默认值:
    • If the $XDG_DATA_HOME env variable is set, then $XDG_DATA_HOME/pnpm
    • On Windows: ~/AppData/Local/pnpm
    • On macOS: ~/Library/pnpm
    • On Linux: ~/.local/share/pnpm
  • 类型:path

Allows to set the target directory for the bin files of globally installed packages.

state-dir

  • 默认值:
    • If the $XDG_STATE_HOME env variable is set, then $XDG_STATE_HOME/pnpm
    • On Windows: ~/AppData/Local/pnpm-state
    • On macOS: ~/.pnpm-state
    • On Linux: ~/.local/state/pnpm
  • 类型:path

The directory where pnpm creates the pnpm-state.json file that is currently used only by the update checker.

cache-dir

  • 默认值:
    • If the $XDG_CACHE_HOME env variable is set, then $XDG_CACHE_HOME/pnpm
    • On Windows: ~/AppData/Local/pnpm-cache
    • On macOS: ~/Library/Caches/pnpm
    • On Linux: ~/.cache/pnpm
  • 类型:path

The location of the package metadata cache.

use-stderr

  • 默认值: false
  • 类型:Boolean

When true, all the output is written to stderr.

update-notifier

  • 默认值: true
  • 类型:Boolean

Set to false to suppress the update notification when using an older version of pnpm than the latest.

prefer-symlinked-executables

添加于:v7.6.0

  • Default: true, when node-linker is set to hoisted and the system is POSIX
  • 类型:Boolean

Create symlinks to executables in node_modules/.bin instead of command shims. This setting is ignored on Windows, where only command shims work.

verify-store-integrity

Added in: v7.7.0

  • 默认值: true
  • 类型:Boolean

By default, if a file in the store has been modified, the content of this file is checked before linking it to a project’s node_modules. If verify-store-integrity is set to false, files in the content-addressable store will not be checked during installation.

ignore-compatibility-db

Added in: v7.9.0

  • 默认值: false
  • 类型:Boolean

During installation the dependencies of some packages are automatically patched. If you want to disable this, set this config to false.

The patches are applied from Yarn’s @yarnpkg/extensions package.

resolution-mode

Added in: v7.10.0

  • Default: highest
  • Type: highest, time-based, lowest-direct (added in: v7.27.0)

When resolution-mode is set to time-based, dependencies will be resolved the following way:

  1. Direct dependencies will be resolved to their lowest versions. So if there is foo@^1.1.0 in the dependencies, then 1.1.0 will be installed.
  2. Subdependencies will be resolved from versions that were published before the last direct dependency was published.

With this resolution mode installations with warm cache are faster. It also reduces the chance of subdependency hijacking as subdependencies will be updated only if direct dependencies are updated.

This resolution mode works only with npm’s full metadata. So it is slower in some scenarios. However, if you use Verdaccio v5.15.1 or newer, you may set the registry-supports-time-field setting to true, and it will be really fast.

When resolution-mode is set to lowest-direct, direct dependencies will be resolved to their lowest versions.

registry-supports-time-field

Added in: v7.10.0

  • 默认值: false
  • 类型:Boolean

Set this to true if the registry that you are using returns the “time” field in the abbreviated metadata. As of now, only Verdaccio from v5.15.1 supports this.

extend-node-path

新增于:v7.25.0

  • 默认值: true
  • 类型:Boolean

When false, the NODE_PATH environment variable is not set in the command shims.