Skip to content

Commit 214c504

Browse files
skogingazu
authored andcommittedJun 20, 2018
fix(compatibility): Windows compatible spawn with 'cross-spawn' (#5)
1 parent fac3e30 commit 214c504

File tree

3 files changed

+18
-3
lines changed

3 files changed

+18
-3
lines changed
 

‎lib/can-npm-publish.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
// MIT © 2018 azu
22
"use strict";
3-
const spawn = require("child_process").spawn;
3+
const spawn = require("cross-spawn");
44
const readPkg = require("read-pkg");
55
const validatePkgName = require("validate-npm-package-name");
66
/**

‎package.json

+1
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@
3737
"postcommit": "git reset"
3838
},
3939
"dependencies": {
40+
"cross-spawn": "^6.0.5",
4041
"meow": "^4.0.0",
4142
"read-pkg": "^3.0.0",
4243
"validate-npm-package-name": "^3.0.0"

‎yarn.lock

+16-2
Original file line numberDiff line numberDiff line change
@@ -163,6 +163,16 @@ cross-spawn@^5.0.1:
163163
shebang-command "^1.2.0"
164164
which "^1.2.9"
165165

166+
cross-spawn@^6.0.5:
167+
version "6.0.5"
168+
resolved "https://registry.yarnpkg.com/cross-spawn/-/cross-spawn-6.0.5.tgz#4a5ec7c64dfae22c3a14124dbacdee846d80cbc4"
169+
dependencies:
170+
nice-try "^1.0.4"
171+
path-key "^2.0.1"
172+
semver "^5.5.0"
173+
shebang-command "^1.2.0"
174+
which "^1.2.9"
175+
166176
currently-unhandled@^0.4.1:
167177
version "0.4.1"
168178
resolved "https://registry.yarnpkg.com/currently-unhandled/-/currently-unhandled-0.4.1.tgz#988df33feab191ef799a61369dd76c17adf957ea"
@@ -621,6 +631,10 @@ ms@2.0.0:
621631
version "2.0.0"
622632
resolved "https://registry.yarnpkg.com/ms/-/ms-2.0.0.tgz#5608aeadfc00be6c2901df5f9861788de0d597c8"
623633

634+
nice-try@^1.0.4:
635+
version "1.0.4"
636+
resolved "https://registry.yarnpkg.com/nice-try/-/nice-try-1.0.4.tgz#d93962f6c52f2c1558c0fbda6d512819f1efe1c4"
637+
624638
normalize-package-data@^2.3.2, normalize-package-data@^2.3.4:
625639
version "2.4.0"
626640
resolved "https://registry.yarnpkg.com/normalize-package-data/-/normalize-package-data-2.4.0.tgz#12f95a307d58352075a04907b84ac8be98ac012f"
@@ -724,7 +738,7 @@ path-is-inside@^1.0.2:
724738
version "1.0.2"
725739
resolved "https://registry.yarnpkg.com/path-is-inside/-/path-is-inside-1.0.2.tgz#365417dede44430d1c11af61027facf074bdfc53"
726740

727-
path-key@^2.0.0:
741+
path-key@^2.0.0, path-key@^2.0.1:
728742
version "2.0.1"
729743
resolved "https://registry.yarnpkg.com/path-key/-/path-key-2.0.1.tgz#411cadb574c5a140d3a4b1910d40d80cc9f40b40"
730744

@@ -802,7 +816,7 @@ rxjs@^5.4.2:
802816
dependencies:
803817
symbol-observable "1.0.1"
804818

805-
"semver@2 || 3 || 4 || 5":
819+
"semver@2 || 3 || 4 || 5", semver@^5.5.0:
806820
version "5.5.0"
807821
resolved "https://registry.yarnpkg.com/semver/-/semver-5.5.0.tgz#dc4bbc7a6ca9d916dee5d43516f0092b58f7b8ab"
808822

0 commit comments

Comments
 (0)