File tree Expand file tree Collapse file tree 3 files changed +10
-2
lines changed Expand file tree Collapse file tree 3 files changed +10
-2
lines changed Original file line number Diff line number Diff line change 51
51
"is-git-dirty" : " ^1.0.0" ,
52
52
"json5" : " ^2.1.3" ,
53
53
"validate-npm-package-name" : " ^3.0.0" ,
54
+ "which" : " ^2.0.2" ,
54
55
"yargs" : " ^15.3.1"
55
56
},
56
57
"optionalDependencies" : {
72
73
"@types/inquirer" : " ^6.5.0" ,
73
74
"@types/json5" : " ^0.0.30" ,
74
75
"@types/validate-npm-package-name" : " ^3.0.0" ,
76
+ "@types/which" : " ^1.3.2" ,
75
77
"@types/yargs" : " ^15.0.4" ,
76
78
"commitlint" : " ^8.3.5" ,
77
79
"eslint" : " ^7.0.0" ,
Original file line number Diff line number Diff line change 1
1
import chalk from 'chalk' ;
2
2
import path from 'path' ;
3
3
import fs from 'fs-extra' ;
4
+ import which from 'which' ;
4
5
import spawn from 'cross-spawn' ;
5
6
import del from 'del' ;
6
7
import JSON5 from 'json5' ;
@@ -84,7 +85,7 @@ export default async function build({
84
85
( platform ( ) === 'win32' ? '.cmd' : '' ) ;
85
86
86
87
if ( ! ( await fs . pathExists ( tsc ) ) ) {
87
- tsc = spawn . sync ( 'which' , [ ' tsc'] ) . stdout . toString ( ) . trim ( ) ;
88
+ tsc = await which ( ' tsc') ;
88
89
89
90
report . warn (
90
91
`Using a global version of ${ chalk . blue (
Original file line number Diff line number Diff line change 1388
1388
resolved "https://registry.yarnpkg.com/@types/validate-npm-package-name/-/validate-npm-package-name-3.0.0.tgz#0bc835adc7d6f41cf96a59b591fe8699468f6fab"
1389
1389
integrity sha512-iFNNIrEaJH1lbPiyX+O/QyxSbKxrTjdNBVZGckt+iEL9So0hdZNBL68sOfHnt2txuUD8UJXvmKv/1DkgkebgUg==
1390
1390
1391
+ " @types/which@^1.3.2 " :
1392
+ version "1.3.2"
1393
+ resolved "https://registry.yarnpkg.com/@types/which/-/which-1.3.2.tgz#9c246fc0c93ded311c8512df2891fb41f6227fdf"
1394
+ integrity sha512-8oDqyLC7eD4HM307boe2QWKyuzdzWBj56xI/imSl2cpL+U3tCMaTAkMJ4ee5JBZ/FsOJlvRGeIShiZDAl1qERA==
1395
+
1391
1396
" @types/yargs-parser@* " :
1392
1397
version "15.0.0"
1393
1398
resolved "https://registry.yarnpkg.com/@types/yargs-parser/-/yargs-parser-15.0.0.tgz#cb3f9f741869e20cce330ffbeb9271590483882d"
@@ -6269,7 +6274,7 @@ which@^1.2.9:
6269
6274
dependencies :
6270
6275
isexe "^2.0.0"
6271
6276
6272
- which@^2.0.1 :
6277
+ which@^2.0.1, which@^2.0.2 :
6273
6278
version "2.0.2"
6274
6279
resolved "https://registry.yarnpkg.com/which/-/which-2.0.2.tgz#7c6a8dd0a636a0327e10b59c9286eee93f3f51b1"
6275
6280
integrity sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==
You can’t perform that action at this time.
0 commit comments