@pnpm/config
Advanced tools
Comparing version 12.2.0 to 12.3.0
# @pnpm/config | ||
## 12.3.0 | ||
### Minor Changes | ||
- 84ec82e05: New setting added: `use-node-version`. When set, pnpm will install the specified version of Node.js and use it for running any lifecycle scripts. | ||
- c2a71e4fd: New CLI option added: `use-stderr`. When set, all the output is written to stderr. | ||
- 84ec82e05: New settings are returned: pnpmExecPath and pnpmHomeDir. | ||
## 12.2.0 | ||
@@ -4,0 +12,0 @@ |
@@ -29,2 +29,4 @@ import { Project, ProjectsGraph, Registries } from '@pnpm/types'; | ||
stream?: boolean; | ||
pnpmExecPath: string; | ||
pnpmHomeDir: string; | ||
production?: boolean; | ||
@@ -63,2 +65,4 @@ fetchRetries?: number; | ||
enablePrePostScripts?: boolean; | ||
useNodeVersion?: string; | ||
useStderr?: boolean; | ||
httpProxy?: string; | ||
@@ -65,0 +69,0 @@ httpsProxy?: string; |
@@ -112,4 +112,6 @@ "use strict"; | ||
'use-beta-cli': Boolean, | ||
'use-node-version': String, | ||
'use-running-store-server': Boolean, | ||
'use-store-server': Boolean, | ||
'use-stderr': Boolean, | ||
'verify-store-integrity': Boolean, | ||
@@ -395,2 +397,17 @@ 'virtual-store-dir': String, | ||
pnpmConfig.enablePnp = pnpmConfig['nodeLinker'] === 'pnp'; | ||
if (process['pkg'] != null) { | ||
// If the pnpm CLI was bundled by vercel/pkg then we cannot use the js path for npm_execpath | ||
// because in that case the js is in a virtual filesystem inside the executor. | ||
// Instead, we use the path to the exe file. | ||
pnpmConfig.pnpmExecPath = process.execPath; | ||
pnpmConfig.pnpmHomeDir = path_1.default.dirname(pnpmConfig.pnpmExecPath); | ||
} | ||
else if (require.main != null) { | ||
pnpmConfig.pnpmExecPath = require.main.filename; | ||
pnpmConfig.pnpmHomeDir = path_1.default.dirname(pnpmConfig.pnpmExecPath); | ||
} | ||
else { | ||
pnpmConfig.pnpmExecPath = process.cwd(); | ||
pnpmConfig.pnpmHomeDir = process.cwd(); | ||
} | ||
if (opts.checkUnknownSetting) { | ||
@@ -397,0 +414,0 @@ const settingKeys = Object.keys({ |
{ | ||
"name": "@pnpm/config", | ||
"version": "12.2.0", | ||
"version": "12.3.0", | ||
"description": "Gets configuration options for pnpm", | ||
@@ -38,3 +38,3 @@ "main": "lib/index.js", | ||
"devDependencies": { | ||
"@pnpm/prepare": "0.0.21", | ||
"@pnpm/prepare": "0.0.23", | ||
"@types/ramda": "0.27.39", | ||
@@ -41,0 +41,0 @@ "@types/which": "^2.0.0", |
54964
16
644