@pnpm/config
Advanced tools
Comparing version 12.3.3 to 12.4.0
# @pnpm/config | ||
## 12.4.0 | ||
### Minor Changes | ||
- 25f6968d4: Add `workspace-concurrency` based on CPU cores amount, just set `workspace-concurrency` as zero or negative, the concurrency limit is set as `max((amount of cores) - abs(workspace-concurrency), 1)` | ||
- 5aaf3e3fa: New setting added: stateDir. | ||
## 12.3.3 | ||
@@ -4,0 +11,0 @@ |
@@ -77,2 +77,4 @@ import { Project, ProjectsGraph, Registries } from '@pnpm/types'; | ||
alwaysAuth?: boolean; | ||
cacheDir: string; | ||
stateDir: string; | ||
storeDir?: string; | ||
@@ -79,0 +81,0 @@ virtualStoreDir?: string; |
@@ -41,2 +41,4 @@ "use strict"; | ||
const findBestGlobalPrefix_1 = __importDefault(require("./findBestGlobalPrefix")); | ||
const dirs_1 = require("./dirs"); | ||
const concurrency_1 = require("./concurrency"); | ||
const npmDefaults = npm_conf_1.default.defaults; | ||
@@ -349,2 +351,8 @@ async function which(cmd) { | ||
} | ||
if (!pnpmConfig.cacheDir) { | ||
pnpmConfig.cacheDir = dirs_1.getCacheDir(process); | ||
} | ||
if (!pnpmConfig.stateDir) { | ||
pnpmConfig.stateDir = dirs_1.getStateDir(process); | ||
} | ||
if (pnpmConfig['hoist'] === false) { | ||
@@ -428,2 +436,3 @@ delete pnpmConfig.hoistPattern; | ||
} | ||
pnpmConfig.workspaceConcurrency = concurrency_1.getWorkspaceConcurrency(pnpmConfig.workspaceConcurrency); | ||
return { config: pnpmConfig, warnings }; | ||
@@ -430,0 +439,0 @@ }; |
{ | ||
"name": "@pnpm/config", | ||
"version": "12.3.3", | ||
"version": "12.4.0", | ||
"description": "Gets configuration options for pnpm", | ||
@@ -5,0 +5,0 @@ "main": "lib/index.js", |
714
42264