@pnpm/config
Advanced tools
Comparing version 4.0.0-0 to 4.0.0-1
@@ -59,2 +59,3 @@ "use strict"; | ||
'shamefully-flatten': Boolean, | ||
'shamefully-hoist': Boolean, | ||
'shared-workspace-lockfile': Boolean, | ||
@@ -92,2 +93,13 @@ 'shared-workspace-shrinkwrap': Boolean, | ||
} | ||
if (cliArgs['hoist'] === false) { | ||
if (cliArgs['shamefully-hoist'] === true) { | ||
throw new error_1.default('CONFIG_CONFLICT_HOIST', '--shamefully-hoist cannot be used with --no-hoist'); | ||
} | ||
if (cliArgs['shamefully-flatten'] === true) { | ||
throw new error_1.default('CONFIG_CONFLICT_HOIST', '--shamefully-flatten cannot be used with --no-hoist'); | ||
} | ||
if (cliArgs['hoist-pattern']) { | ||
throw new error_1.default('CONFIG_CONFLICT_HOIST', '--hoist-pattern cannot be used with --no-hoist'); | ||
} | ||
} | ||
// This is what npm does as well, overriding process.execPath with the resolved location of Node. | ||
@@ -129,2 +141,3 @@ // The value of process.execPath is changed only for the duration of config initialization. | ||
'save-peer': false, | ||
'shamefully-hoist': false, | ||
'shared-workspace-shrinkwrap': true, | ||
@@ -272,4 +285,5 @@ 'shrinkwrap': npmDefaults.shrinkwrap, | ||
if (pnpmConfig['shamefullyFlatten']) { | ||
warnings.push('The "shamefully-flatten" setting is deprecated. Use "hoist-pattern=*" instead.'); | ||
warnings.push('The "shamefully-flatten" setting is deprecated. Use "shamefully-hoist", "hoist" or "hoist-pattern" instead. Since v4, hoisting is on by default for all dependencies.'); | ||
pnpmConfig.hoistPattern = '*'; | ||
pnpmConfig.shamefullyHoist = true; | ||
} | ||
@@ -279,2 +293,5 @@ if (pnpmConfig['hoist'] === false) { | ||
} | ||
else if (pnpmConfig.independentLeaves === true) { | ||
throw new error_1.default('CONFIG_CONFLICT_INDEPENDENT_LEAVES_AND_HOIST', '"independent-leaves=true" can only be used when hoisting is off, so "hoist=false"'); | ||
} | ||
return { configs: pnpmConfig, warnings }; | ||
@@ -281,0 +298,0 @@ }; |
{ | ||
"name": "@pnpm/config", | ||
"version": "4.0.0-0", | ||
"version": "4.0.0-1", | ||
"description": "Gets configs for pnpm", | ||
@@ -5,0 +5,0 @@ "main": "lib/index.js", |
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
21095
428