Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: moxystudio/node-cross-spawn
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: v7.0.0
Choose a base ref
...
head repository: moxystudio/node-cross-spawn
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: v7.0.1
Choose a head ref
  • 5 commits
  • 5 files changed
  • 3 contributors

Commits on Oct 6, 2019

  1. Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
    Copy the full SHA
    cfd49c9 View commit details

Commits on Oct 7, 2019

  1. chore: update deps

    André Cruz authored and satazor committed Oct 7, 2019
    Copy the full SHA
    9c7de59 View commit details
  2. chore: fix eslint config

    André Cruz authored and satazor committed Oct 7, 2019
    Copy the full SHA
    2998699 View commit details
  3. Copy the full SHA
    fb5e12c View commit details
  4. chore(release): 7.0.1

    satazor committed Oct 7, 2019
    Copy the full SHA
    aa7f227 View commit details
Showing with 93 additions and 42 deletions.
  1. +7 −0 CHANGELOG.md
  2. +6 −2 lib/util/resolveCommand.js
  3. +76 −35 package-lock.json
  4. +3 −3 package.json
  5. +1 −2 test/.eslintrc
7 changes: 7 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -2,6 +2,13 @@

All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.

### [7.0.1](https://github.com/moxystudio/node-cross-spawn/compare/v7.0.0...v7.0.1) (2019-10-07)


### Bug Fixes

* **core:** support worker threads ([#127](https://github.com/moxystudio/node-cross-spawn/issues/127)) ([cfd49c9](https://github.com/moxystudio/node-cross-spawn/commit/cfd49c9))

## [7.0.0](https://github.com/moxystudio/node-cross-spawn/compare/v6.0.5...v7.0.0) (2019-09-03)


8 changes: 6 additions & 2 deletions lib/util/resolveCommand.js
Original file line number Diff line number Diff line change
@@ -7,10 +7,12 @@ const pathKey = require('path-key')();
function resolveCommandAttempt(parsed, withoutPathExt) {
const cwd = process.cwd();
const hasCustomCwd = parsed.options.cwd != null;
// Worker threads do not have process.chdir()
const shouldSwitchCwd = hasCustomCwd && process.chdir !== undefined;

// If a custom `cwd` was specified, we need to change the process cwd
// because `which` will do stat calls but does not support a custom cwd
if (hasCustomCwd) {
if (shouldSwitchCwd) {
try {
process.chdir(parsed.options.cwd);
} catch (err) {
@@ -28,7 +30,9 @@ function resolveCommandAttempt(parsed, withoutPathExt) {
} catch (e) {
/* Empty */
} finally {
process.chdir(cwd);
if (shouldSwitchCwd) {
process.chdir(cwd);
}
}

// If we successfully resolved, ensure that an absolute path is returned
111 changes: 76 additions & 35 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "cross-spawn",
"version": "7.0.0",
"version": "7.0.1",
"description": "Cross platform child_process#spawn and child_process#spawnSync",
"keywords": [
"spawn",
@@ -53,8 +53,8 @@
},
"dependencies": {
"path-key": "^3.1.0",
"shebang-command": "^1.2.0",
"which": "^1.2.9"
"shebang-command": "^2.0.0",
"which": "^2.0.1"
},
"devDependencies": {
"@commitlint/cli": "^8.1.0",
3 changes: 1 addition & 2 deletions test/.eslintrc
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
{
"root": true,
"extends": [
"eslint-config-moxy/es8",
"eslint-config-moxy/es9",
"eslint-config-moxy/addons/node",
"eslint-config-moxy/addons/object-spread",
"eslint-config-moxy/addons/jest"
]
}