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

@zkochan/cmd-shim

Package Overview
Dependencies
Maintainers
1
Versions
30
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@zkochan/cmd-shim - npm Package Compare versions

Comparing version 5.1.0 to 5.1.1

41

index.js

@@ -226,3 +226,12 @@ 'use strict';

// )
let cmd = nodePath ? `@SET NODE_PATH=${nodePath}\r\n` : '';
let cmd = '@SETLOCAL\r\n';
if (nodePath) {
cmd += `\
@IF NOT DEFINED NODE_PATH (\r
@SET NODE_PATH=${nodePath}\r
) ELSE (\r
@SET NODE_PATH=%NODE_PATH%;${nodePath}\r
)\r
`;
}
if (longProg) {

@@ -233,3 +242,2 @@ cmd += `\

) ELSE (\r
@SETLOCAL\r
@SET PATHEXT=%PATHEXT:;.JS;=;%\r

@@ -295,6 +303,13 @@ ${prog} ${args} ${target} ${progArgs}%*\r

`;
const env = opts.nodePath ? `export NODE_PATH="${shNodePath}"\n` : '';
if (opts.nodePath) {
sh += `\
if [ -z "$NODE_PATH" ]; then
export NODE_PATH="${shNodePath}"
else
export NODE_PATH="$NODE_PATH:${shNodePath}"
fi
`;
}
if (shLongProg) {
sh += `\
${env}\
if [ -x ${shLongProg} ]; then

@@ -309,3 +324,2 @@ exec ${shLongProg} ${args} ${shTarget} ${progArgs}"$@"

sh += `\
${env}\
${shProg} ${args} ${shTarget} ${progArgs}"$@"

@@ -380,4 +394,6 @@ exit $?

$exe=""
${opts.nodePath ? `$env_node_path=$env:NODE_PATH
$env:NODE_PATH="${nodePath}"
${opts.nodePath ? `\
$pathsep=":"
$env_node_path=$env:NODE_PATH
$new_node_path="${nodePath}"
` : ''}\

@@ -388,2 +404,3 @@ if ($PSVersionTable.PSVersion -lt "6.0" -or $IsWindows) {

$exe=".exe"
${opts.nodePath ? ' $pathsep=";"\n' : ''}\
}`;

@@ -393,4 +410,10 @@ if (opts.nodePath) {

else {
$env:NODE_PATH="${shNodePath}"
}`;
$new_node_path="${shNodePath}"
}
if ([string]::IsNullOrEmpty($env_node_path)) {
$env:NODE_PATH=$new_node_path
} else {
$env:NODE_PATH="$env_node_path$pathsep$new_node_path"
}
`;
}

@@ -397,0 +420,0 @@ if (pwshLongProg) {

{
"name": "@zkochan/cmd-shim",
"version": "5.1.0",
"description": "Used in pnpm for command line application support",
"author": {
"name": "Zoltan Kochan",
"email": "zoltan.kochan@gmail.com",
"url": "http://kochan.io"
},
"scripts": {
"clean": "tsc --build --clean",
"build": "tsc --build --verbose --listEmittedFiles",
"pretest:unit": "tsc --build test --verbose --listEmittedFiles",
"test:unit": "jest",
"test": "pnpm run build && standard && pnpm run test:unit && mos test",
"md": "mos",
"prepublishOnly": "pnpm run build"
},
"files": [
"index.d.ts",
"index.d.ts.map",
"index.js",
"index.js.map"
],
"repository": {
"type": "git",
"url": "https://github.com/pnpm/cmd-shim.git"
},
"license": "BSD-2-Clause",
"dependencies": {
"is-windows": "^1.0.2"
},
"devDependencies": {
"@types/is-windows": "^1.0.0",
"@types/jest": "^26.0.20",
"@types/node": "^14.14.20",
"jest": "^26.6.3",
"memfs": "^3.2.0",
"mock-fs": "^4.13.0",
"mos": "^1.3.1",
"mos-plugin-readme": "^1.0.4",
"standard": "^14.3.4",
"typescript": "^4.1.3"
},
"engines": {
"node": ">=10.13"
},
"mos": {
"plugins": [
"readme"
]
},
"standard": {
"env": {
"jest": true
}
},
"jest": {
"testEnvironment": "node"
}
"name": "@zkochan/cmd-shim",
"version": "5.1.1",
"description": "Used in pnpm for command line application support",
"author": {
"name": "Zoltan Kochan",
"email": "zoltan.kochan@gmail.com",
"url": "http://kochan.io"
},
"files": [
"index.d.ts",
"index.d.ts.map",
"index.js",
"index.js.map"
],
"repository": {
"type": "git",
"url": "https://github.com/pnpm/cmd-shim.git"
},
"license": "BSD-2-Clause",
"dependencies": {
"is-windows": "^1.0.2"
},
"devDependencies": {
"@types/is-windows": "^1.0.0",
"@types/jest": "^26.0.20",
"@types/node": "^14.14.20",
"jest": "^26.6.3",
"memfs": "^3.2.0",
"mock-fs": "^4.13.0",
"mos": "^1.3.1",
"mos-plugin-readme": "^1.0.4",
"standard": "^14.3.4",
"typescript": "^4.1.3"
},
"engines": {
"node": ">=10.13"
},
"mos": {
"plugins": [
"readme"
]
},
"standard": {
"env": {
"jest": true
}
},
"jest": {
"testEnvironment": "node"
},
"scripts": {
"clean": "tsc --build --clean",
"build": "tsc --build --verbose --listEmittedFiles",
"pretest:unit": "tsc --build test --verbose --listEmittedFiles",
"test:unit": "jest",
"test": "pnpm run build && standard && pnpm run test:unit && mos test",
"md": "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