🚀 Big News: Socket Acquires Coana to Bring Reachability Analysis to Every Appsec Team.Learn more
Socket
Book a DemoInstallSign in
Socket

libnpmexec

Package Overview
Dependencies
Maintainers
7
Versions
84
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

to
7.0.4

8

lib/index.js

@@ -248,5 +248,8 @@ 'use strict'

if (!yes) {
const missingPackages = add.map(a => `${a.replace(/@$/, '')}`)
// set -n to always say no
if (yes === false) {
throw new Error('canceled')
// Error message lists missing package(s) when process is canceled
/* eslint-disable-next-line max-len */
throw new Error(`npx canceled due to missing packages and no YES option: ${JSON.stringify(missingPackages)}`)
}

@@ -261,4 +264,3 @@

} else {
const addList = add.map(a => ` ${a.replace(/@$/, '')}`)
.join('\n') + '\n'
const addList = missingPackages.join('\n') + '\n'
const prompt = `Need to install the following packages:\n${

@@ -265,0 +267,0 @@ addList

@@ -1,2 +0,1 @@

const chalk = require('chalk')
const ciInfo = require('ci-info')

@@ -9,8 +8,2 @@ const runScript = require('@npmcli/run-script')

const nocolor = {
reset: s => s,
bold: s => s,
dim: s => s,
}
const run = async ({

@@ -29,4 +22,2 @@ args,

const script = call || args.shift() || scriptShell
const color = !!flatOptions.color
const colorize = color ? chalk : nocolor

@@ -54,10 +45,10 @@ // do the fakey runScript dance

locationMsg = locationMsg || ` at location:\n${colorize.dim(runPath)}`
locationMsg = locationMsg || ` at location:\n${flatOptions.chalk.dim(runPath)}`
output(`${
colorize.reset('\nEntering npm script environment')
flatOptions.chalk.reset('\nEntering npm script environment')
}${
colorize.reset(locationMsg)
flatOptions.chalk.reset(locationMsg)
}${
colorize.bold('\nType \'exit\' or ^D when finished\n')
flatOptions.chalk.bold('\nType \'exit\' or ^D when finished\n')
}`)

@@ -64,0 +55,0 @@ }

{
"name": "libnpmexec",
"version": "5.0.17",
"version": "7.0.4",
"files": [

@@ -10,3 +10,3 @@ "bin/",

"engines": {
"node": "^14.17.0 || ^16.13.0 || >=18.0.0"
"node": "^16.14.0 || >=18.0.0"
},

@@ -46,3 +46,2 @@ "description": "npm exec (npx) programmatic API",

"tap": {
"color": true,
"files": "test/*.js",

@@ -57,17 +56,16 @@ "nyc-arg": [

"@npmcli/mock-registry": "^1.0.0",
"@npmcli/template-oss": "4.14.1",
"@npmcli/template-oss": "4.19.0",
"bin-links": "^4.0.1",
"chalk": "^5.2.0",
"just-extend": "^6.2.0",
"just-safe-set": "^4.2.1",
"minify-registry-metadata": "^3.0.0",
"tap": "^16.3.4"
"tap": "^16.3.8"
},
"dependencies": {
"@npmcli/arborist": "^6.2.9",
"@npmcli/run-script": "^6.0.0",
"chalk": "^4.1.0",
"ci-info": "^3.7.1",
"npm-package-arg": "^10.1.0",
"@npmcli/arborist": "^7.2.1",
"@npmcli/run-script": "^7.0.2",
"ci-info": "^4.0.0",
"npm-package-arg": "^11.0.1",
"npmlog": "^7.0.1",
"pacote": "^15.0.8",
"pacote": "^17.0.4",
"proc-log": "^3.0.0",

@@ -81,5 +79,5 @@ "read": "^2.0.0",

"//@npmcli/template-oss": "This file is partially managed by @npmcli/template-oss. Edits may be overwritten.",
"version": "4.14.1",
"version": "4.19.0",
"content": "../../scripts/template-oss/index.js"
}
}

@@ -34,3 +34,3 @@ # libnpmexec

- `npxCache`: The path location to where the npx cache folder is placed **String**
- `color`: Output should use color? **Boolean**, defaults to `false`
- `chalk`: Chalk instance to use for colors? **Required**
- `localBin`: Location to the `node_modules/.bin` folder of the local project to start scanning for bin files **String**, defaults to `./node_modules/.bin`. **libexec** will walk up the directory structure looking for `node_modules/.bin` folders in parent folders that might satisfy the current `arg` and will use that bin if found.

@@ -37,0 +37,0 @@ - `locationMsg`: Overrides "at location" message when entering interactive mode **String**