Comparing version 4.1.0 to 4.0.3
@@ -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 @@ |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
55590
985
651