Socket
Socket
Sign inDemoInstall

execa

Package Overview
Dependencies
Maintainers
2
Versions
57
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

execa - npm Package Compare versions

Comparing version 4.1.0 to 4.0.3

4

index.d.ts

@@ -428,3 +428,3 @@ /// <reference types="node"/>

```
import execa = require('execa');
import execa from 'execa';

@@ -503,3 +503,3 @@ (async () => {

```
import execa = require('execa');
import execa from 'execa';

@@ -506,0 +506,0 @@ (async () => {

@@ -237,8 +237,4 @@ 'use strict';

const stdio = normalizeStdio.node(options);
const defaultExecArgv = process.execArgv.filter(arg => !arg.startsWith('--inspect'));
const {
nodePath = process.execPath,
nodeOptions = defaultExecArgv
} = options;
const {nodePath = process.execPath, nodeOptions = process.execArgv} = options;

@@ -245,0 +241,0 @@ return execa(

@@ -12,19 +12,25 @@ 'use strict';

// Handle `execa.command()`
const parseCommand = command => {
const tokens = [];
for (const token of command.trim().split(SPACES_REGEXP)) {
// Allow spaces to be escaped by a backslash if not meant as a delimiter
const previousToken = tokens[tokens.length - 1];
if (previousToken && previousToken.endsWith('\\')) {
// Merge previous token with current one
tokens[tokens.length - 1] = `${previousToken.slice(0, -1)} ${token}`;
} else {
tokens.push(token);
}
// Allow spaces to be escaped by a backslash if not meant as a delimiter
const handleEscaping = (tokens, token, index) => {
if (index === 0) {
return [token];
}
return tokens;
const previousToken = tokens[tokens.length - 1];
if (previousToken.endsWith('\\')) {
return [...tokens.slice(0, -1), `${previousToken.slice(0, -1)} ${token}`];
}
return [...tokens, token];
};
// Handle `execa.command()`
const parseCommand = command => {
return command
.trim()
.split(SPACES_REGEXP)
.reduce(handleEscaping, []);
};
module.exports = {

@@ -31,0 +37,0 @@ joinCommand,

{
"name": "execa",
"version": "4.1.0",
"version": "4.0.3",
"description": "Process execution for humans",

@@ -5,0 +5,0 @@ "license": "MIT",

@@ -8,8 +8,2 @@ <img src="media/logo.svg" width="400">

---
Netlify is looking for a senior/expert Node.js backend engineer to join a fully remote, international, diverse (44% women and non-binary) and friendly team. This is for the team where one of the co-maintainers [@ehmicky](https://github.com/ehmicky) is working. The job description is [here](https://boards.greenhouse.io/netlify/jobs/4832483002).
---
## Why

@@ -16,0 +10,0 @@

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