@pnpm/config
Advanced tools
Comparing version 4.0.1 to 4.1.0
@@ -5,2 +5,3 @@ import { IncludedDependencies, Registries } from '@pnpm/types'; | ||
bail: boolean; | ||
color: 'always' | 'auto' | 'never'; | ||
cliArgs: Record<string, any>; | ||
@@ -69,2 +70,3 @@ useBetaCli: boolean; | ||
store?: string; | ||
virtualStoreDir?: string; | ||
verifyStoreIntegrity?: boolean; | ||
@@ -71,0 +73,0 @@ networkConcurrency?: number; |
@@ -10,2 +10,3 @@ "use strict"; | ||
const path = require("path"); | ||
const pathAbsolute = require("path-absolute"); | ||
const whichcb = require("which"); | ||
@@ -24,2 +25,3 @@ const findBestGlobalPrefixOnWindows_1 = require("./findBestGlobalPrefixOnWindows"); | ||
'child-concurrency': Number, | ||
'color': ['always', 'auto', 'never'], | ||
'dev': [null, true], | ||
@@ -77,2 +79,3 @@ 'fetching-concurrency': Number, | ||
'verify-store-integrity': Boolean, | ||
'virtual-store-dir': path, | ||
'workspace-concurrency': Number, | ||
@@ -126,2 +129,3 @@ 'workspace-prefix': String, | ||
'bail': true, | ||
'color': 'auto', | ||
'depth': (command[0] === 'list' || command[1] === 'list') ? 0 : Infinity, | ||
@@ -167,3 +171,3 @@ 'fetch-retries': 2, | ||
{}, | ||
...npmConfig.list.slice(3, pnpmConfig.workspacePrefix && pnpmConfig.workspacePrefix !== pnpmConfig.localPrefix ? 5 : 4), | ||
...npmConfig.list.slice(3, pnpmConfig.workspacePrefix && pnpmConfig.workspacePrefix !== pnpmConfig.localPrefix ? 5 : 4).reverse(), | ||
cliArgs, | ||
@@ -176,3 +180,3 @@ ]); // tslint:disable-line:no-any | ||
{ registry: 'https://registry.npmjs.org/' }, | ||
...npmConfig.list, | ||
...[...npmConfig.list].reverse(), | ||
cliArgs, | ||
@@ -196,2 +200,5 @@ { 'user-agent': pnpmConfig.userAgent }, | ||
: pnpmConfig['lockfileDirectory']; | ||
if (pnpmConfig.virtualStoreDir) { | ||
pnpmConfig.virtualStoreDir = pathAbsolute(pnpmConfig.virtualStoreDir, pnpmConfig.lockfileDirectory); | ||
} | ||
pnpmConfig.useLockfile = (() => { | ||
@@ -314,2 +321,15 @@ if (typeof pnpmConfig['lockfile'] === 'boolean') | ||
} | ||
if (typeof pnpmConfig['color'] === 'boolean') { | ||
switch (pnpmConfig['color']) { | ||
case true: | ||
pnpmConfig.color = 'always'; | ||
break; | ||
case false: | ||
pnpmConfig.color = 'never'; | ||
break; | ||
default: | ||
pnpmConfig.color = 'auto'; | ||
break; | ||
} | ||
} | ||
return { config: pnpmConfig, warnings }; | ||
@@ -316,0 +336,0 @@ }; |
{ | ||
"name": "@pnpm/config", | ||
"version": "4.0.1", | ||
"version": "4.1.0", | ||
"description": "Gets configuration options for pnpm", | ||
@@ -40,2 +40,3 @@ "main": "lib/index.js", | ||
"is-subdir": "1.1.1", | ||
"path-absolute": "1.0.1", | ||
"which": "2.0.1" | ||
@@ -46,3 +47,3 @@ }, | ||
"@types/mz": "0.0.32", | ||
"@types/which": "1.3.1", | ||
"@types/which": "1.3.2", | ||
"mz": "2.7.0", | ||
@@ -49,0 +50,0 @@ "rimraf": "3.0.0", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
23415
494
9
+ Addedpath-absolute@1.0.1
+ Addedpath-absolute@1.0.1(transitive)