package.json
Файл манифеста пакета. Он содержит все метаданные пакета, включая зависимости, заголовок, автора и т.д. Это стандарт для всех основных пакетных менеджеров Node.JS, включая pnpm.
engines
Вы можете указать версию Node и pnpm, на которой работает ваш программный продукт:
{
"engines": {
"node": ">=10",
"pnpm": ">=3"
}
}
Во время локальной разработки pnpm всегда выдает сообщение об ошибке, если его версия не совпадает с версией, указанной в поле engines.
Если только пользователь не установил флаг конфигурации engine-strict (см. .npmrc), это поле носит исключительно рекомендательный характер и будет выдавать предупреждения только тогда, когда ваш пакет установлен как зависимость.
dependenciesMeta
Additional meta information used for dependencies declared inside dependencies, optionalDependencies, and devDependencies.
dependenciesMeta.*.injected
If this is set to true for a local dependency, the package will be hard linked to the virtual store (node_modules/.pnpm) and symlinked from the virtual store to the modules directory.
If this is set to false or not set for a local dependency, the package will be symlinked directly from its location in the workspace to the module directory.
For instance, the following package.json in a workspace will create a symlink to button in the node_modules directory of card:
{
"name": "card",
"dependencies": {
"button": "workspace:1.0.0"
}
}