@pnpm/config
Advanced tools
Comparing version 10.0.1 to 11.0.0
# @pnpm/config | ||
## 11.0.0 | ||
### Major Changes | ||
- 71aeb9a38: Remove proxy from the object returned by @pnpm/config. httpsProxy and httpProxy are returned instead. | ||
### Minor Changes | ||
- 915828b46: A new setting is returned by `@pnpm/config`: `npmGlobalBinDir`. | ||
`npmGlobalBinDir` is the global executable directory used by npm. | ||
This new config is used by `@pnpm/global-bin-dir` to find a suitable | ||
directory for the binstubs installed by pnpm globally. | ||
### Patch Changes | ||
- Updated dependencies [915828b46] | ||
- @pnpm/global-bin-dir@1.1.0 | ||
## 10.0.1 | ||
@@ -4,0 +23,0 @@ |
@@ -20,2 +20,3 @@ import { Project, ProjectsGraph, Registries } from '@pnpm/types'; | ||
bin?: string; | ||
npmGlobalBinDir: string; | ||
ignoreScripts?: boolean; | ||
@@ -52,2 +53,3 @@ save?: boolean; | ||
}; | ||
preferOffline?: boolean; | ||
sideEffectsCache?: boolean; | ||
@@ -59,5 +61,6 @@ sideEffectsCacheReadonly?: boolean; | ||
recursive?: boolean; | ||
proxy?: string; | ||
httpProxy?: string; | ||
httpsProxy?: string; | ||
localAddress?: string; | ||
noProxy?: string | boolean; | ||
cert?: string; | ||
@@ -105,7 +108,8 @@ key?: string; | ||
globalPrefix?: string; | ||
proxy?: string; | ||
lockfileDirectory?: string; | ||
preferFrozenShrinkwrap?: boolean; | ||
sharedWorkspaceShrinkwrap?: boolean; | ||
shrinkwrapDirectory?: string; | ||
shrinkwrapOnly?: boolean; | ||
preferFrozenShrinkwrap?: boolean; | ||
sharedWorkspaceShrinkwrap?: boolean; | ||
} |
@@ -82,3 +82,3 @@ "use strict"; | ||
exports.default = async (opts) => { | ||
var _a, _b, _c, _d, _e, _f, _g; | ||
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k; | ||
const packageManager = (_a = opts.packageManager) !== null && _a !== void 0 ? _a : { name: 'pnpm', version: 'undefined' }; | ||
@@ -174,2 +174,5 @@ const cliOptions = (_b = opts.cliOptions) !== null && _b !== void 0 ? _b : {}; | ||
: findBestGlobalPrefixOnWindows_1.default(npmConfig.globalPrefix, process.env)); | ||
pnpmConfig.npmGlobalBinDir = process.platform === 'win32' | ||
? npmGlobalPrefix | ||
: path.resolve(npmGlobalPrefix, 'bin'); | ||
pnpmConfig.globalDir = pnpmConfig.globalDir ? npmGlobalPrefix : path.join(npmGlobalPrefix, 'pnpm-global'); | ||
@@ -203,3 +206,3 @@ pnpmConfig.lockfileDir = (_g = (_f = pnpmConfig.lockfileDir) !== null && _f !== void 0 ? _f : pnpmConfig.lockfileDirectory) !== null && _g !== void 0 ? _g : pnpmConfig.shrinkwrapDirectory; | ||
? cliOptions.dir : path.resolve(cliOptions.dir, 'bin')) | ||
: global_bin_dir_1.default(); | ||
: global_bin_dir_1.default([pnpmConfig.npmGlobalBinDir]); | ||
pnpmConfig.allowNew = true; | ||
@@ -308,4 +311,18 @@ pnpmConfig.ignoreCurrentPrefs = true; | ||
} | ||
if (!pnpmConfig.httpsProxy) { | ||
pnpmConfig.httpsProxy = (_h = pnpmConfig.proxy) !== null && _h !== void 0 ? _h : getProcessEnv('https_proxy'); | ||
} | ||
if (!pnpmConfig.httpProxy) { | ||
pnpmConfig.httpProxy = (_k = (_j = pnpmConfig.httpsProxy) !== null && _j !== void 0 ? _j : getProcessEnv('http_proxy')) !== null && _k !== void 0 ? _k : getProcessEnv('proxy'); | ||
} | ||
if (!pnpmConfig.noProxy) { | ||
pnpmConfig.noProxy = getProcessEnv('no_proxy'); | ||
} | ||
return { config: pnpmConfig, warnings }; | ||
}; | ||
function getProcessEnv(env) { | ||
return process.env[env] || | ||
process.env[env.toUpperCase()] || | ||
process.env[env.toLowerCase()]; | ||
} | ||
//# sourceMappingURL=index.js.map |
{ | ||
"name": "@pnpm/config", | ||
"version": "10.0.1", | ||
"version": "11.0.0", | ||
"description": "Gets configuration options for pnpm", | ||
@@ -36,3 +36,3 @@ "main": "lib/index.js", | ||
"@pnpm/error": "1.2.0", | ||
"@pnpm/global-bin-dir": "^1.0.1", | ||
"@pnpm/global-bin-dir": "^1.1.0", | ||
"@pnpm/types": "6.2.0", | ||
@@ -39,0 +39,0 @@ "@zkochan/npm-conf": "2.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
Environment variable access
Supply chain riskPackage accesses environment variables, which may be a sign of credential stuffing or data theft.
Found 2 instances 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
26327
491
5
Updated@pnpm/global-bin-dir@^1.1.0