@pnpm/config
Advanced tools
Comparing version 3.0.0 to 3.1.0
export default function getScopeRegistries(rawNpmConfig: Object): {}; | ||
export declare function normalizeRegistry(registry: string): string; |
@@ -7,3 +7,3 @@ "use strict"; | ||
if (configKey[0] === '@' && configKey.endsWith(':registry')) { | ||
registries[configKey.substr(0, configKey.indexOf(':'))] = rawNpmConfig[configKey]; | ||
registries[configKey.substr(0, configKey.indexOf(':'))] = normalizeRegistry(rawNpmConfig[configKey]); | ||
} | ||
@@ -14,2 +14,6 @@ } | ||
exports.default = getScopeRegistries; | ||
function normalizeRegistry(registry) { | ||
return registry.endsWith('/') ? registry : `${registry}/`; | ||
} | ||
exports.normalizeRegistry = normalizeRegistry; | ||
//# sourceMappingURL=getScopeRegistries.js.map |
@@ -6,2 +6,3 @@ import { PnpmConfigs } from './PnpmConfigs'; | ||
cliArgs: object; | ||
command?: string[] | undefined; | ||
packageManager: { | ||
@@ -8,0 +9,0 @@ name: string; |
@@ -49,2 +49,3 @@ "use strict"; | ||
'reporter': String, | ||
'resolution-strategy': ['fast', 'fewer-dependencies'], | ||
'shamefully-flatten': Boolean, | ||
@@ -70,2 +71,3 @@ 'shared-workspace-lockfile': Boolean, | ||
const cliArgs = opts && opts.cliArgs || {}; | ||
const command = opts.command || []; | ||
// This is what npm does as well, overriding process.execPath with the resolved location of Node. | ||
@@ -84,7 +86,10 @@ // The value of process.execPath is changed only for the duration of config initialization. | ||
catch (err) { } // tslint:disable-line:no-empty | ||
const workspaceManifestLocation = await findUp(WORKSPACE_MANIFEST_FILENAME, { | ||
cwd: cliArgs['prefix'] || process.cwd(), | ||
}); | ||
const workspaceManifestLocation = cliArgs['global'] // tslint:disable-line | ||
? null | ||
: await findUp(WORKSPACE_MANIFEST_FILENAME, { | ||
cwd: cliArgs['prefix'] || process.cwd(), | ||
}); | ||
const npmConfig = loadNpmConf(cliArgs, exports.types, { | ||
'bail': true, | ||
'depth': command[command.length - 1] === 'list' ? 0 : Infinity, | ||
'fetch-retries': 2, | ||
@@ -101,2 +106,3 @@ 'fetch-retry-factor': 10, | ||
'registry': npmDefaults.registry, | ||
'resolution-strategy': 'fast', | ||
'shared-workspace-shrinkwrap': true, | ||
@@ -123,3 +129,3 @@ 'shrinkwrap': npmDefaults.shrinkwrap, | ||
pnpmConfig.rawNpmConfig = Object.assign.apply(Object, npmConfig.list.reverse().concat([cliArgs])); | ||
pnpmConfig.registries = Object.assign({ default: pnpmConfig.registry || 'https://registry.npmjs.org/' }, getScopeRegistries_1.default(pnpmConfig.rawNpmConfig)); | ||
pnpmConfig.registries = Object.assign({ default: getScopeRegistries_1.normalizeRegistry(pnpmConfig.registry || 'https://registry.npmjs.org/') }, getScopeRegistries_1.default(pnpmConfig.rawNpmConfig)); | ||
const npmGlobalPrefix = pnpmConfig.rawNpmConfig['pnpm-prefix'] || | ||
@@ -126,0 +132,0 @@ (process.platform === 'win32' && process.env.APPDATA |
@@ -70,3 +70,4 @@ import { Registries } from '@pnpm/types'; | ||
useLockfile: boolean; | ||
resolutionStrategy: 'fast' | 'fewer-dependencies'; | ||
registries: Registries; | ||
} |
{ | ||
"name": "@pnpm/config", | ||
"version": "3.0.0", | ||
"version": "3.1.0", | ||
"description": "Gets configs for pnpm", | ||
@@ -34,3 +34,3 @@ "main": "lib/index.js", | ||
"@pnpm/types": "3.0.0", | ||
"@types/node": "11.9.5", | ||
"@types/node": "*", | ||
"@types/which": "1.3.1", | ||
@@ -55,4 +55,4 @@ "@zkochan/npm-conf": "1.2.4", | ||
"ts-node": "8.0.3", | ||
"tslint": "5.13.1", | ||
"typescript": "3.3.3333" | ||
"tslint": "5.14.0", | ||
"typescript": "3.3.4000" | ||
}, | ||
@@ -59,0 +59,0 @@ "mos": { |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
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
25843
325
+ Added@types/node@22.10.6(transitive)
+ Addedundici-types@6.20.0(transitive)
- Removed@types/node@11.9.5(transitive)
Updated@types/node@*