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

@pnpm/lifecycle

Package Overview
Dependencies
Maintainers
3
Versions
155
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@pnpm/lifecycle - npm Package Compare versions

Comparing version 7.0.1 to 7.0.2

3

lib/index.js

@@ -11,4 +11,5 @@ "use strict";

async function runPostinstallHooks(opts) {
var _a, _b;
const pkg = await read_package_json_1.fromDir(opts.pkgRoot);
const scripts = pkg && pkg.scripts || {};
const scripts = (_b = (_a = pkg) === null || _a === void 0 ? void 0 : _a.scripts, (_b !== null && _b !== void 0 ? _b : {}));
if (!scripts.install) {

@@ -15,0 +16,0 @@ await checkBindingGyp(opts.pkgRoot, scripts);

@@ -7,2 +7,3 @@ "use strict";

async function runLifecycleHook(stage, manifest, opts) {
var _a, _b;
const optional = opts.optional === true;

@@ -23,3 +24,3 @@ if (opts.stdio !== 'inherit') {

}
if (opts.args && opts.args.length && m.scripts && m.scripts[stage]) {
if (((_a = opts.args) === null || _a === void 0 ? void 0 : _a.length) && ((_b = m.scripts) === null || _b === void 0 ? void 0 : _b[stage])) {
m.scripts[stage] = `${m.scripts[stage]} ${opts.args.map((arg) => `"${arg}"`).join(' ')}`;

@@ -77,11 +78,3 @@ }

function getId(manifest) {
if (!manifest.name) {
// Using an empty string instead of undefined or null
// because this gets printed to the console
return '';
}
if (!manifest.version) {
return manifest.name;
}
return `${manifest.name}@${manifest.version}`;
return `${manifest.name || ''}@${manifest.version || ''}`;
}
{
"name": "@pnpm/lifecycle",
"version": "7.0.1",
"version": "7.0.2",
"description": "Package lifecycle hook runner",

@@ -5,0 +5,0 @@ "main": "lib/index.js",

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