File: remove-cross-spawn.patch

package info (click to toggle)
node-yarnpkg 4.1.0%2Bdfsg-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 24,752 kB
  • sloc: javascript: 38,953; ansic: 26,035; cpp: 7,247; sh: 2,829; makefile: 724; perl: 493
file content (47 lines) | stat: -rw-r--r-- 1,829 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
Replaced cross-spawn with spawn from node:child_process
--- a/packages/yarnpkg-core/sources/execUtils.ts
+++ b/packages/yarnpkg-core/sources/execUtils.ts
@@ -1,6 +1,5 @@
 import {PortablePath, npath, ppath, BufferEncodingOrBuffer} from '@yarnpkg/fslib';
-import {ChildProcess}                                       from 'child_process';
-import crossSpawn                                           from 'cross-spawn';
+import {ChildProcess, spawn}                                from 'child_process';
 import {Readable, Writable}                                 from 'stream';
 
 import {Configuration}                                      from './Configuration';
@@ -96,7 +95,7 @@
   if (hasFd(stderr))
     stdio[2] = stderr;
 
-  const child = crossSpawn(fileName, args, {
+  const child = spawn(fileName, args, {
     cwd: npath.fromPortablePath(cwd),
     env: {
       ...env,
@@ -185,7 +184,7 @@
   if (typeof env.PWD !== `undefined`)
     env = {...env, PWD: nativeCwd};
 
-  const subprocess = crossSpawn(fileName, args, {
+  const subprocess = spawn(fileName, args, {
     cwd: nativeCwd,
     env,
     stdio,
--- a/packages/yarnpkg-shell/sources/pipe.ts
+++ b/packages/yarnpkg-shell/sources/pipe.ts
@@ -1,5 +1,4 @@
-import {ChildProcess}                               from 'child_process';
-import crossSpawn                                   from 'cross-spawn';
+import {ChildProcess, spawn}                               from 'child_process';
 import {PassThrough, Readable, Transform, Writable} from 'stream';
 import {StringDecoder}                              from 'string_decoder';
 
@@ -52,7 +51,7 @@
       ? `pipe`
       : stdio[2];
 
-    const child = crossSpawn(name, args, {...spawnOpts, stdio: [
+    const child = spawn(name, args, {...spawnOpts, stdio: [
       stdin,
       stdout,
       stderr,