Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@pnpm/config

Package Overview
Dependencies
Maintainers
3
Versions
315
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@pnpm/config - npm Package Compare versions

Comparing version 4.0.0-2 to 4.0.0-3

lib/Config.d.ts

8

lib/index.d.ts

@@ -1,6 +0,6 @@

import { PnpmConfigs } from './PnpmConfigs';
export { PnpmConfigs };
import { Config } from './Config';
export { Config };
export declare const types: any;
declare const _default: (opts: {
cliArgs: object;
cliArgs: Record<string, any>;
command?: string[] | undefined;

@@ -12,3 +12,3 @@ packageManager: {

}) => Promise<{
configs: PnpmConfigs;
config: Config;
warnings: string[];

@@ -15,0 +15,0 @@ }>;

@@ -152,5 +152,2 @@ "use strict";

process.execPath = originalExecPath;
if (!cliArgs['user-agent']) {
cliArgs['user-agent'] = `${packageManager.name}/${packageManager.version} npm/? node/${process.version} ${process.platform} ${process.arch}`;
}
const pnpmConfig = Object.keys(exports.types) // tslint:disable-line

@@ -163,4 +160,18 @@ .reduce((acc, configKey) => {

}, {});
pnpmConfig.rawNpmConfig = Object.assign.apply(Object, npmConfig.list.reverse().concat([cliArgs]));
pnpmConfig.registries = Object.assign({ default: getScopeRegistries_1.normalizeRegistry(pnpmConfig.registry || 'https://registry.npmjs.org/') }, getScopeRegistries_1.default(pnpmConfig.rawNpmConfig));
pnpmConfig.localConfig = Object.assign.apply(Object, [
{},
...npmConfig.list.slice(3, pnpmConfig.workspacePrefix && pnpmConfig.workspacePrefix !== pnpmConfig.localPrefix ? 5 : 4),
cliArgs,
]); // tslint:disable-line:no-any
pnpmConfig.userAgent = pnpmConfig.localConfig['user-agent']
? pnpmConfig.localConfig['user-agent']
: `${packageManager.name}/${packageManager.version} npm/? node/${process.version} ${process.platform} ${process.arch}`;
const defaultRegistry = getScopeRegistries_1.normalizeRegistry(pnpmConfig.registry || 'https://registry.npmjs.org/');
pnpmConfig.rawNpmConfig = Object.assign.apply(Object, [
{ registry: defaultRegistry },
...npmConfig.list,
cliArgs,
{ 'user-agent': pnpmConfig.userAgent },
]); // tslint:disable-line:no-any
pnpmConfig.registries = Object.assign({ default: defaultRegistry }, getScopeRegistries_1.default(pnpmConfig.rawNpmConfig));
const npmGlobalPrefix = pnpmConfig.rawNpmConfig['pnpm-prefix'] ||

@@ -295,3 +306,3 @@ (process.platform !== 'win32'

}
return { configs: pnpmConfig, warnings };
return { config: pnpmConfig, warnings };
};

@@ -298,0 +309,0 @@ async function findWorkspacePrefix(prefix) {

{
"name": "@pnpm/config",
"version": "4.0.0-2",
"description": "Gets configs for pnpm",
"version": "4.0.0-3",
"description": "Gets configuration options for pnpm",
"main": "lib/index.js",

@@ -6,0 +6,0 @@ "typings": "lib/index.d.ts",

# @pnpm/config
> Gets configs for pnpm
> Gets configution options for pnpm

@@ -18,5 +18,5 @@ <!--@shields('npm')-->

```ts
import getConfigs from '@pnpm/config'
import getConfig from '@pnpm/config'
getConfigs().then(pnpmConfigs => console.log(pnpmConfigs))
getConfig().then(pnpmConfig => console.log(pnpmConfig))
```

@@ -23,0 +23,0 @@

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc