You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.
# 启用严格的引擎检查
# 当设置为 true 时, npm 会严格检查项目的 package.json 文件中的 engines 字段,
# 确保当前环境的 Node.js 和 npm 版本符合指定的要求。如果不符合, npm 将抛出错误并阻止安装依赖。
engine-strict = true
# 启用“羞耻地提升”( shameful hoisting)
# 在 yarn 中,默认情况下,依赖项会被提升到顶层 node_modules 目录中,以减少嵌套层级。
# 但是, 某些情况下, yarn 会避免提升一些依赖项,以防止潜在的冲突。
# 设置为 true 时, yarn 会忽略这些规则,尽可能地将所有依赖项提升到顶层,即使这样做可能会导致冲突。
# 这种做法被称为“羞耻地提升”,因为它可能会引入不稳定的依赖关系。
shamefully-hoist = true
# 禁用严格的 peer 依赖检查
# 当设置为 false 时, npm 或 yarn 不会因为 peer 依赖版本不匹配而抛出错误或警告。
# peer 依赖通常用于插件系统,确保插件和主库的版本兼容性。
# 设置为 false 可以避免因 peer 依赖版本不匹配而导致的安装失败,但可能会引入潜在的兼容性问题。
strict-peer-dependencies = false
# 指定 npm 或 yarn 使用的注册表( registry)
# 默认情况下, npm 和 yarn 使用官方的 npm 注册表 (https://registry.npmjs.org)。
# 通过设置此选项,可以切换到其他镜像源,例如国内的 npmmirror, 以加快包的下载速度。
# 这里指定了使用 https://registry.npmmirror.com 作为注册表,适用于中国大陆用户。
registry = https://registry.npmmirror.com