Socket
Socket
Sign inDemoInstall

zx

Package Overview
Dependencies
Maintainers
2
Versions
146
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

zx - npm Package Compare versions

Comparing version 7.1.0-dev.cfa0fba to 7.1.0

5

build/core.js

@@ -20,3 +20,3 @@ // Copyright 2021 Google LLC

import which from 'which';
import { errnoMessage, exitCodeInfo, formatCmd, noop, parseDuration, psTree, quote, } from './util.js';
import { errnoMessage, exitCodeInfo, formatCmd, noop, parseDuration, psTree, quote, quotePowerShell, } from './util.js';
const processCwd = Symbol('processCwd');

@@ -46,3 +46,4 @@ const storage = new AsyncLocalStorage();

if (process.platform == 'win32') {
defaults.shell = true;
defaults.shell = which.sync('powershell.exe');
defaults.quote = quotePowerShell;
}

@@ -49,0 +50,0 @@ else {

1

build/util.d.ts

@@ -7,2 +7,3 @@ import psTreeModule from 'ps-tree';

export declare function quote(arg: string): string;
export declare function quotePowerShell(arg: string): string;
export declare function exitCodeInfo(exitCode: number | null): string | undefined;

@@ -9,0 +10,0 @@ export declare function errnoMessage(errno: number | undefined): string;

@@ -41,2 +41,8 @@ // Copyright 2022 Google LLC

}
export function quotePowerShell(arg) {
if (/^[a-z0-9/_.\-]+$/i.test(arg) || arg === '') {
return arg;
}
return `'` + arg.replace(/'/g, "''") + `'`;
}
export function exitCodeInfo(exitCode) {

@@ -43,0 +49,0 @@ return {

{
"name": "zx",
"version": "7.1.0-dev.cfa0fba",
"version": "7.1.0",
"description": "A tool for writing better scripts.",

@@ -5,0 +5,0 @@ "type": "module",

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