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

libnpmexec

Package Overview
Dependencies
Maintainers
7
Versions
75
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

libnpmexec - npm Package Compare versions

Comparing version 4.0.10 to 4.0.11

29

lib/index.js

@@ -66,2 +66,5 @@ 'use strict'

const manifest = await getManifest(spec, flatOptions)
if (spec.type === 'directory') {
return { manifest }
}
const nodesByManifest = tree.inventory.query('packageName', manifest.name)

@@ -93,6 +96,6 @@ for (const node of nodesByManifest) {

scriptShell = isWindows ? process.env.ComSpec || 'cmd' : 'sh',
yes = undefined,
...flatOptions
} = opts
let yes = opts.yes
const run = () => runScript({

@@ -134,2 +137,12 @@ args,

// Resolve any directory specs so that the npx directory is unique to the
// resolved directory, not the potentially relative one (i.e. "npx .")
for (const i in packages) {
const pkg = packages[i]
const spec = npa(pkg)
if (spec.type === 'directory') {
packages[i] = spec.fetchSpec
}
}
const localArb = new Arborist({ ...flatOptions, path })

@@ -159,2 +172,6 @@ const localTree = await localArb.loadActual()

if (spec.type === 'directory') {
yes = true
}
args[0] = getBinFromManifest(commandManifest)

@@ -183,3 +200,11 @@

const hash = crypto.createHash('sha512')
.update(packages.sort((a, b) => a.localeCompare(b, 'en')).join('\n'))
.update(packages.map(p => {
// Keeps the npx directory unique to the resolved directory, not the
// potentially relative one (i.e. "npx .")
const spec = npa(p)
if (spec.type === 'directory') {
return spec.fetchSpec
}
return p
}).sort((a, b) => a.localeCompare(b, 'en')).join('\n'))
.digest('hex')

@@ -186,0 +211,0 @@ .slice(0, 16)

@@ -76,2 +76,3 @@ const chalk = require('chalk')

stdio: 'inherit',
scriptShell,
})

@@ -78,0 +79,0 @@ } finally {

2

package.json
{
"name": "libnpmexec",
"version": "4.0.10",
"version": "4.0.11",
"files": [

@@ -5,0 +5,0 @@ "bin/",

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