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 3.0.0-0 to 3.0.0-1

53

lib/index.js
"use strict";
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
return new (P || (P = Promise))(function (resolve, reject) {
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
function step(result) { result.done ? resolve(result.value) : new P(function (resolve) { resolve(result.value); }).then(fulfilled, rejected); }
step((generator = generator.apply(thisArg, _arguments || [])).next());
});
};
Object.defineProperty(exports, "__esModule", { value: true });

@@ -31,2 +23,3 @@ const loadNpmConf = require("@zkochan/npm-conf");

'filter': [String, Array],
'frozen-lockfile': Boolean,
'frozen-shrinkwrap': Boolean,

@@ -42,2 +35,5 @@ 'global-path': path,

'lock-stale-duration': Number,
'lockfile': Boolean,
'lockfile-directory': path,
'lockfile-only': Boolean,
'network-concurrency': Number,

@@ -49,2 +45,3 @@ 'offline': Boolean,

'port': Number,
'prefer-frozen-lockfile': Boolean,
'prefer-frozen-shrinkwrap': Boolean,

@@ -55,4 +52,4 @@ 'prefer-offline': Boolean,

'reporter': String,
'scope': String,
'shamefully-flatten': Boolean,
'shared-workspace-lockfile': Boolean,
'shared-workspace-shrinkwrap': Boolean,

@@ -73,3 +70,3 @@ 'shrinkwrap-directory': path,

const WORKSPACE_MANIFEST_FILENAME = 'pnpm-workspace.yaml';
exports.default = (opts) => __awaiter(this, void 0, void 0, function* () {
exports.default = async (opts) => {
const packageManager = opts && opts.packageManager || { name: 'pnpm', version: 'undefined' };

@@ -84,3 +81,3 @@ const cliArgs = opts && opts.cliArgs || {};

try {
const node = yield which(process.argv[0]);
const node = await which(process.argv[0]);
if (node.toUpperCase() !== process.execPath.toUpperCase()) {

@@ -91,3 +88,3 @@ process.execPath = node;

catch (err) { } // tslint:disable-line:no-empty
const workspaceManifestLocation = yield findUp(WORKSPACE_MANIFEST_FILENAME, {
const workspaceManifestLocation = await findUp(WORKSPACE_MANIFEST_FILENAME, {
cwd: cliArgs['prefix'] || process.cwd(),

@@ -138,2 +135,20 @@ });

pnpmConfig.globalPrefix = path.join(npmGlobalPrefix, 'pnpm-global');
pnpmConfig.shrinkwrapDirectory = typeof pnpmConfig['lockfileDirectory'] === 'undefined'
? pnpmConfig.shrinkwrapDirectory
: pnpmConfig['lockfileDirectory'];
pnpmConfig.shrinkwrap = typeof pnpmConfig['lockfile'] === 'undefined'
? pnpmConfig.shrinkwrap
: pnpmConfig['lockfile'];
pnpmConfig.shrinkwrapOnly = typeof pnpmConfig['lockfileOnly'] === 'undefined'
? pnpmConfig.shrinkwrapOnly
: pnpmConfig['lockfileOnly'];
pnpmConfig.frozenShrinkwrap = typeof pnpmConfig['frozenLockfile'] === 'undefined'
? pnpmConfig.frozenShrinkwrap
: pnpmConfig['frozenLockfile'];
pnpmConfig.preferFrozenShrinkwrap = typeof pnpmConfig['preferFrozenLockfile'] === 'undefined'
? pnpmConfig.preferFrozenShrinkwrap
: pnpmConfig['preferFrozenLockfile'];
pnpmConfig.sharedWorkspaceShrinkwrap = typeof pnpmConfig['sharedWorkspaceLockfile'] === 'undefined'
? pnpmConfig.sharedWorkspaceShrinkwrap
: pnpmConfig['sharedWorkspaceLockfile'];
if (pnpmConfig.global) {

@@ -159,5 +174,5 @@ const independentLeavesSuffix = pnpmConfig.independentLeaves ? '_independent_leaves' : '';

if (pnpmConfig.sharedWorkspaceShrinkwrap) {
if (opts.cliArgs['shared-workspace-shrinkwrap']) {
const err = new Error('Configuration conflict. "shared-workspace-shrinkwrap" may not be used with "global"');
err['code'] = 'ERR_PNPM_CONFIG_CONFLICT_SHARED_WORKSPACE_SHRINKWRAP_WITH_GLOBAL'; // tslint:disable-line:no-string-literal
if (opts.cliArgs['shared-workspace-lockfile'] || opts.cliArgs['shared-workspace-shrinkwrap']) {
const err = new Error('Configuration conflict. "shared-workspace-lockfile" may not be used with "global"');
err['code'] = 'ERR_PNPM_CONFIG_CONFLICT_SHARED_WORKSPACE_LOCKFILE_WITH_GLOBAL'; // tslint:disable-line:no-string-literal
throw err;

@@ -168,5 +183,5 @@ }

if (pnpmConfig.shrinkwrapDirectory) {
if (opts.cliArgs['shrinkwrap-directory']) {
const err = new Error('Configuration conflict. "shrinkwrap-directory" may not be used with "global"');
err['code'] = 'ERR_PNPM_CONFIG_CONFLICT_SHRINKWRAP_DIRECTORY_WITH_GLOBAL'; // tslint:disable-line:no-string-literal
if (opts.cliArgs['lockfile-directory'] || opts.cliArgs['shrinkwrap-directory']) {
const err = new Error('Configuration conflict. "lockfile-directory" may not be used with "global"');
err['code'] = 'ERR_PNPM_CONFIG_CONFLICT_LOCKFILE_DIRECTORY_WITH_GLOBAL'; // tslint:disable-line:no-string-literal
throw err;

@@ -207,3 +222,3 @@ }

return pnpmConfig;
});
};
//# sourceMappingURL=index.js.map

@@ -18,3 +18,2 @@ import { Registries } from '@pnpm/types';

saveOptional?: boolean;
scope: string;
production?: boolean;

@@ -21,0 +20,0 @@ development?: boolean;

{
"name": "@pnpm/config",
"version": "3.0.0-0",
"version": "3.0.0-1",
"description": "Gets configs for pnpm",

@@ -24,3 +24,3 @@ "main": "lib/index.js",

"engines": {
"node": ">=6"
"node": ">=8"
},

@@ -36,3 +36,3 @@ "author": "Zoltan Kochan <z@kochan.io> (https://www.kochan.io/)",

"@types/camelcase": "4.1.0",
"@types/node": "10.12.18",
"@types/node": "11.9.5",
"@types/which": "1.3.1",

@@ -54,7 +54,7 @@ "@zkochan/npm-conf": "1.2.2",

"rimraf": "2.6.3",
"tape": "4.9.2",
"tape": "4.10.1",
"tempy": "0.2.1",
"ts-node": "6.2.0",
"tslint": "5.12.1",
"typescript": "3.2.4"
"tslint": "5.13.1",
"typescript": "3.3.3333"
},

@@ -61,0 +61,0 @@ "mos": {

Sorry, the diff of this file is not supported yet

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