vitest 0.17.1 → 0.19.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (37) hide show
  1. package/LICENSE.md +6 -6
  2. package/dist/browser.d.ts +1850 -0
  3. package/dist/browser.mjs +20 -0
  4. package/dist/{chunk-api-setup.c728e251.mjs → chunk-api-setup.0cf2c96a.mjs} +37 -11
  5. package/dist/{chunk-constants.27550afb.mjs → chunk-constants.38b43a44.mjs} +3 -3
  6. package/dist/{chunk-env-node.aa51c4cc.mjs → chunk-defaults.408a0cfe.mjs} +457 -455
  7. package/dist/{chunk-install-pkg.6f5930c3.mjs → chunk-install-pkg.6c6dc0c2.mjs} +11 -10
  8. package/dist/chunk-integrations-globals.803277be.mjs +24 -0
  9. package/dist/chunk-node-git.9058b82a.mjs +1139 -0
  10. package/dist/chunk-runtime-chain.1e1aabb3.mjs +2025 -0
  11. package/dist/{vendor-entry.1ad8a08d.mjs → chunk-runtime-error.d82dd2cf.mjs} +167 -183
  12. package/dist/{chunk-runtime-chain.6d23d202.mjs → chunk-runtime-hooks.db398170.mjs} +33 -2012
  13. package/dist/{chunk-runtime-mocker.34b9d585.mjs → chunk-runtime-mocker.dfdfd57b.mjs} +70 -22
  14. package/dist/{chunk-runtime-rpc.d986adb9.mjs → chunk-runtime-rpc.45d8ee19.mjs} +1 -1
  15. package/dist/{chunk-utils-global.4828c2e2.mjs → chunk-utils-global.2aa95025.mjs} +14 -9
  16. package/dist/{chunk-utils-source-map.a9047343.mjs → chunk-utils-source-map.8b066ce2.mjs} +2 -2
  17. package/dist/{chunk-vite-node-externalize.0fc8ed68.mjs → chunk-vite-node-externalize.a2813ad7.mjs} +1202 -2178
  18. package/dist/chunk-vite-node-utils.ad73f2ab.mjs +1433 -0
  19. package/dist/cli.mjs +11 -13
  20. package/dist/config.cjs +4 -1
  21. package/dist/config.d.ts +1 -0
  22. package/dist/config.mjs +4 -1
  23. package/dist/entry.mjs +54 -10
  24. package/dist/index.d.ts +126 -58
  25. package/dist/index.mjs +12 -9
  26. package/dist/node.d.ts +109 -58
  27. package/dist/node.mjs +12 -14
  28. package/dist/spy.mjs +102 -2
  29. package/dist/suite.mjs +13 -0
  30. package/dist/vendor-index.61438b77.mjs +335 -0
  31. package/dist/{vendor-index.a2a385d8.mjs → vendor-index.62ce5c33.mjs} +6 -338
  32. package/dist/{vendor-index.98e769c1.mjs → vendor-index.de788b6a.mjs} +7 -7
  33. package/dist/worker.mjs +6 -6
  34. package/package.json +20 -12
  35. package/dist/chunk-integrations-globals.3df36e26.mjs +0 -26
  36. package/dist/chunk-integrations-spy.674b628e.mjs +0 -102
  37. package/dist/chunk-vite-node-utils.0f776286.mjs +0 -9195
@@ -0,0 +1,335 @@
1
+ import { c as commonjsGlobal } from './vendor-_commonjsHelpers.4da45ef5.mjs';
2
+ import assert$1 from 'assert';
3
+ import require$$2 from 'events';
4
+
5
+ var onetime$1 = {exports: {}};
6
+
7
+ var mimicFn$2 = {exports: {}};
8
+
9
+ const mimicFn$1 = (to, from) => {
10
+ for (const prop of Reflect.ownKeys(from)) {
11
+ Object.defineProperty(to, prop, Object.getOwnPropertyDescriptor(from, prop));
12
+ }
13
+
14
+ return to;
15
+ };
16
+
17
+ mimicFn$2.exports = mimicFn$1;
18
+ // TODO: Remove this for the next major release
19
+ mimicFn$2.exports.default = mimicFn$1;
20
+
21
+ const mimicFn = mimicFn$2.exports;
22
+
23
+ const calledFunctions = new WeakMap();
24
+
25
+ const onetime = (function_, options = {}) => {
26
+ if (typeof function_ !== 'function') {
27
+ throw new TypeError('Expected a function');
28
+ }
29
+
30
+ let returnValue;
31
+ let callCount = 0;
32
+ const functionName = function_.displayName || function_.name || '<anonymous>';
33
+
34
+ const onetime = function (...arguments_) {
35
+ calledFunctions.set(onetime, ++callCount);
36
+
37
+ if (callCount === 1) {
38
+ returnValue = function_.apply(this, arguments_);
39
+ function_ = null;
40
+ } else if (options.throw === true) {
41
+ throw new Error(`Function \`${functionName}\` can only be called once`);
42
+ }
43
+
44
+ return returnValue;
45
+ };
46
+
47
+ mimicFn(onetime, function_);
48
+ calledFunctions.set(onetime, callCount);
49
+
50
+ return onetime;
51
+ };
52
+
53
+ onetime$1.exports = onetime;
54
+ // TODO: Remove this for the next major release
55
+ onetime$1.exports.default = onetime;
56
+
57
+ onetime$1.exports.callCount = function_ => {
58
+ if (!calledFunctions.has(function_)) {
59
+ throw new Error(`The given function \`${function_.name}\` is not wrapped by the \`onetime\` package`);
60
+ }
61
+
62
+ return calledFunctions.get(function_);
63
+ };
64
+
65
+ var signalExit = {exports: {}};
66
+
67
+ var signals$1 = {exports: {}};
68
+
69
+ var hasRequiredSignals;
70
+
71
+ function requireSignals () {
72
+ if (hasRequiredSignals) return signals$1.exports;
73
+ hasRequiredSignals = 1;
74
+ (function (module) {
75
+ // This is not the set of all possible signals.
76
+ //
77
+ // It IS, however, the set of all signals that trigger
78
+ // an exit on either Linux or BSD systems. Linux is a
79
+ // superset of the signal names supported on BSD, and
80
+ // the unknown signals just fail to register, so we can
81
+ // catch that easily enough.
82
+ //
83
+ // Don't bother with SIGKILL. It's uncatchable, which
84
+ // means that we can't fire any callbacks anyway.
85
+ //
86
+ // If a user does happen to register a handler on a non-
87
+ // fatal signal like SIGWINCH or something, and then
88
+ // exit, it'll end up firing `process.emit('exit')`, so
89
+ // the handler will be fired anyway.
90
+ //
91
+ // SIGBUS, SIGFPE, SIGSEGV and SIGILL, when not raised
92
+ // artificially, inherently leave the process in a
93
+ // state from which it is not safe to try and enter JS
94
+ // listeners.
95
+ module.exports = [
96
+ 'SIGABRT',
97
+ 'SIGALRM',
98
+ 'SIGHUP',
99
+ 'SIGINT',
100
+ 'SIGTERM'
101
+ ];
102
+
103
+ if (process.platform !== 'win32') {
104
+ module.exports.push(
105
+ 'SIGVTALRM',
106
+ 'SIGXCPU',
107
+ 'SIGXFSZ',
108
+ 'SIGUSR2',
109
+ 'SIGTRAP',
110
+ 'SIGSYS',
111
+ 'SIGQUIT',
112
+ 'SIGIOT'
113
+ // should detect profiler and enable/disable accordingly.
114
+ // see #21
115
+ // 'SIGPROF'
116
+ );
117
+ }
118
+
119
+ if (process.platform === 'linux') {
120
+ module.exports.push(
121
+ 'SIGIO',
122
+ 'SIGPOLL',
123
+ 'SIGPWR',
124
+ 'SIGSTKFLT',
125
+ 'SIGUNUSED'
126
+ );
127
+ }
128
+ } (signals$1));
129
+ return signals$1.exports;
130
+ }
131
+
132
+ // Note: since nyc uses this module to output coverage, any lines
133
+ // that are in the direct sync flow of nyc's outputCoverage are
134
+ // ignored, since we can never get coverage for them.
135
+ // grab a reference to node's real process object right away
136
+ var process$1 = commonjsGlobal.process;
137
+
138
+ const processOk = function (process) {
139
+ return process &&
140
+ typeof process === 'object' &&
141
+ typeof process.removeListener === 'function' &&
142
+ typeof process.emit === 'function' &&
143
+ typeof process.reallyExit === 'function' &&
144
+ typeof process.listeners === 'function' &&
145
+ typeof process.kill === 'function' &&
146
+ typeof process.pid === 'number' &&
147
+ typeof process.on === 'function'
148
+ };
149
+
150
+ // some kind of non-node environment, just no-op
151
+ /* istanbul ignore if */
152
+ if (!processOk(process$1)) {
153
+ signalExit.exports = function () {
154
+ return function () {}
155
+ };
156
+ } else {
157
+ var assert = assert$1;
158
+ var signals = requireSignals();
159
+ var isWin = /^win/i.test(process$1.platform);
160
+
161
+ var EE = require$$2;
162
+ /* istanbul ignore if */
163
+ if (typeof EE !== 'function') {
164
+ EE = EE.EventEmitter;
165
+ }
166
+
167
+ var emitter;
168
+ if (process$1.__signal_exit_emitter__) {
169
+ emitter = process$1.__signal_exit_emitter__;
170
+ } else {
171
+ emitter = process$1.__signal_exit_emitter__ = new EE();
172
+ emitter.count = 0;
173
+ emitter.emitted = {};
174
+ }
175
+
176
+ // Because this emitter is a global, we have to check to see if a
177
+ // previous version of this library failed to enable infinite listeners.
178
+ // I know what you're about to say. But literally everything about
179
+ // signal-exit is a compromise with evil. Get used to it.
180
+ if (!emitter.infinite) {
181
+ emitter.setMaxListeners(Infinity);
182
+ emitter.infinite = true;
183
+ }
184
+
185
+ signalExit.exports = function (cb, opts) {
186
+ /* istanbul ignore if */
187
+ if (!processOk(commonjsGlobal.process)) {
188
+ return function () {}
189
+ }
190
+ assert.equal(typeof cb, 'function', 'a callback must be provided for exit handler');
191
+
192
+ if (loaded === false) {
193
+ load();
194
+ }
195
+
196
+ var ev = 'exit';
197
+ if (opts && opts.alwaysLast) {
198
+ ev = 'afterexit';
199
+ }
200
+
201
+ var remove = function () {
202
+ emitter.removeListener(ev, cb);
203
+ if (emitter.listeners('exit').length === 0 &&
204
+ emitter.listeners('afterexit').length === 0) {
205
+ unload();
206
+ }
207
+ };
208
+ emitter.on(ev, cb);
209
+
210
+ return remove
211
+ };
212
+
213
+ var unload = function unload () {
214
+ if (!loaded || !processOk(commonjsGlobal.process)) {
215
+ return
216
+ }
217
+ loaded = false;
218
+
219
+ signals.forEach(function (sig) {
220
+ try {
221
+ process$1.removeListener(sig, sigListeners[sig]);
222
+ } catch (er) {}
223
+ });
224
+ process$1.emit = originalProcessEmit;
225
+ process$1.reallyExit = originalProcessReallyExit;
226
+ emitter.count -= 1;
227
+ };
228
+ signalExit.exports.unload = unload;
229
+
230
+ var emit = function emit (event, code, signal) {
231
+ /* istanbul ignore if */
232
+ if (emitter.emitted[event]) {
233
+ return
234
+ }
235
+ emitter.emitted[event] = true;
236
+ emitter.emit(event, code, signal);
237
+ };
238
+
239
+ // { <signal>: <listener fn>, ... }
240
+ var sigListeners = {};
241
+ signals.forEach(function (sig) {
242
+ sigListeners[sig] = function listener () {
243
+ /* istanbul ignore if */
244
+ if (!processOk(commonjsGlobal.process)) {
245
+ return
246
+ }
247
+ // If there are no other listeners, an exit is coming!
248
+ // Simplest way: remove us and then re-send the signal.
249
+ // We know that this will kill the process, so we can
250
+ // safely emit now.
251
+ var listeners = process$1.listeners(sig);
252
+ if (listeners.length === emitter.count) {
253
+ unload();
254
+ emit('exit', null, sig);
255
+ /* istanbul ignore next */
256
+ emit('afterexit', null, sig);
257
+ /* istanbul ignore next */
258
+ if (isWin && sig === 'SIGHUP') {
259
+ // "SIGHUP" throws an `ENOSYS` error on Windows,
260
+ // so use a supported signal instead
261
+ sig = 'SIGINT';
262
+ }
263
+ /* istanbul ignore next */
264
+ process$1.kill(process$1.pid, sig);
265
+ }
266
+ };
267
+ });
268
+
269
+ signalExit.exports.signals = function () {
270
+ return signals
271
+ };
272
+
273
+ var loaded = false;
274
+
275
+ var load = function load () {
276
+ if (loaded || !processOk(commonjsGlobal.process)) {
277
+ return
278
+ }
279
+ loaded = true;
280
+
281
+ // This is the number of onSignalExit's that are in play.
282
+ // It's important so that we can count the correct number of
283
+ // listeners on signals, and don't wait for the other one to
284
+ // handle it instead of us.
285
+ emitter.count += 1;
286
+
287
+ signals = signals.filter(function (sig) {
288
+ try {
289
+ process$1.on(sig, sigListeners[sig]);
290
+ return true
291
+ } catch (er) {
292
+ return false
293
+ }
294
+ });
295
+
296
+ process$1.emit = processEmit;
297
+ process$1.reallyExit = processReallyExit;
298
+ };
299
+ signalExit.exports.load = load;
300
+
301
+ var originalProcessReallyExit = process$1.reallyExit;
302
+ var processReallyExit = function processReallyExit (code) {
303
+ /* istanbul ignore if */
304
+ if (!processOk(commonjsGlobal.process)) {
305
+ return
306
+ }
307
+ process$1.exitCode = code || /* istanbul ignore next */ 0;
308
+ emit('exit', process$1.exitCode, null);
309
+ /* istanbul ignore next */
310
+ emit('afterexit', process$1.exitCode, null);
311
+ /* istanbul ignore next */
312
+ originalProcessReallyExit.call(process$1, process$1.exitCode);
313
+ };
314
+
315
+ var originalProcessEmit = process$1.emit;
316
+ var processEmit = function processEmit (ev, arg) {
317
+ if (ev === 'exit' && processOk(commonjsGlobal.process)) {
318
+ /* istanbul ignore else */
319
+ if (arg !== undefined) {
320
+ process$1.exitCode = arg;
321
+ }
322
+ var ret = originalProcessEmit.apply(this, arguments);
323
+ /* istanbul ignore next */
324
+ emit('exit', process$1.exitCode, null);
325
+ /* istanbul ignore next */
326
+ emit('afterexit', process$1.exitCode, null);
327
+ /* istanbul ignore next */
328
+ return ret
329
+ } else {
330
+ return originalProcessEmit.apply(this, arguments)
331
+ }
332
+ };
333
+ }
334
+
335
+ export { onetime$1 as o, signalExit as s };
@@ -1,342 +1,10 @@
1
- import { c as commonjsGlobal } from './vendor-_commonjsHelpers.4da45ef5.mjs';
2
- import assert$1 from 'assert';
3
- import require$$2 from 'events';
4
1
  import childProcess from 'child_process';
5
2
  import path$3 from 'path';
3
+ import { c as commonjsGlobal } from './vendor-_commonjsHelpers.4da45ef5.mjs';
6
4
  import fs$1 from 'fs';
7
- import require$$0$2 from 'buffer';
5
+ import require$$0$1 from 'buffer';
8
6
  import require$$0 from 'stream';
9
- import require$$0$1 from 'util';
10
-
11
- var onetime$1 = {exports: {}};
12
-
13
- var mimicFn$2 = {exports: {}};
14
-
15
- const mimicFn$1 = (to, from) => {
16
- for (const prop of Reflect.ownKeys(from)) {
17
- Object.defineProperty(to, prop, Object.getOwnPropertyDescriptor(from, prop));
18
- }
19
-
20
- return to;
21
- };
22
-
23
- mimicFn$2.exports = mimicFn$1;
24
- // TODO: Remove this for the next major release
25
- mimicFn$2.exports.default = mimicFn$1;
26
-
27
- const mimicFn = mimicFn$2.exports;
28
-
29
- const calledFunctions = new WeakMap();
30
-
31
- const onetime = (function_, options = {}) => {
32
- if (typeof function_ !== 'function') {
33
- throw new TypeError('Expected a function');
34
- }
35
-
36
- let returnValue;
37
- let callCount = 0;
38
- const functionName = function_.displayName || function_.name || '<anonymous>';
39
-
40
- const onetime = function (...arguments_) {
41
- calledFunctions.set(onetime, ++callCount);
42
-
43
- if (callCount === 1) {
44
- returnValue = function_.apply(this, arguments_);
45
- function_ = null;
46
- } else if (options.throw === true) {
47
- throw new Error(`Function \`${functionName}\` can only be called once`);
48
- }
49
-
50
- return returnValue;
51
- };
52
-
53
- mimicFn(onetime, function_);
54
- calledFunctions.set(onetime, callCount);
55
-
56
- return onetime;
57
- };
58
-
59
- onetime$1.exports = onetime;
60
- // TODO: Remove this for the next major release
61
- onetime$1.exports.default = onetime;
62
-
63
- onetime$1.exports.callCount = function_ => {
64
- if (!calledFunctions.has(function_)) {
65
- throw new Error(`The given function \`${function_.name}\` is not wrapped by the \`onetime\` package`);
66
- }
67
-
68
- return calledFunctions.get(function_);
69
- };
70
-
71
- var signalExit = {exports: {}};
72
-
73
- var signals$1 = {exports: {}};
74
-
75
- var hasRequiredSignals;
76
-
77
- function requireSignals () {
78
- if (hasRequiredSignals) return signals$1.exports;
79
- hasRequiredSignals = 1;
80
- (function (module) {
81
- // This is not the set of all possible signals.
82
- //
83
- // It IS, however, the set of all signals that trigger
84
- // an exit on either Linux or BSD systems. Linux is a
85
- // superset of the signal names supported on BSD, and
86
- // the unknown signals just fail to register, so we can
87
- // catch that easily enough.
88
- //
89
- // Don't bother with SIGKILL. It's uncatchable, which
90
- // means that we can't fire any callbacks anyway.
91
- //
92
- // If a user does happen to register a handler on a non-
93
- // fatal signal like SIGWINCH or something, and then
94
- // exit, it'll end up firing `process.emit('exit')`, so
95
- // the handler will be fired anyway.
96
- //
97
- // SIGBUS, SIGFPE, SIGSEGV and SIGILL, when not raised
98
- // artificially, inherently leave the process in a
99
- // state from which it is not safe to try and enter JS
100
- // listeners.
101
- module.exports = [
102
- 'SIGABRT',
103
- 'SIGALRM',
104
- 'SIGHUP',
105
- 'SIGINT',
106
- 'SIGTERM'
107
- ];
108
-
109
- if (process.platform !== 'win32') {
110
- module.exports.push(
111
- 'SIGVTALRM',
112
- 'SIGXCPU',
113
- 'SIGXFSZ',
114
- 'SIGUSR2',
115
- 'SIGTRAP',
116
- 'SIGSYS',
117
- 'SIGQUIT',
118
- 'SIGIOT'
119
- // should detect profiler and enable/disable accordingly.
120
- // see #21
121
- // 'SIGPROF'
122
- );
123
- }
124
-
125
- if (process.platform === 'linux') {
126
- module.exports.push(
127
- 'SIGIO',
128
- 'SIGPOLL',
129
- 'SIGPWR',
130
- 'SIGSTKFLT',
131
- 'SIGUNUSED'
132
- );
133
- }
134
- } (signals$1));
135
- return signals$1.exports;
136
- }
137
-
138
- // Note: since nyc uses this module to output coverage, any lines
139
- // that are in the direct sync flow of nyc's outputCoverage are
140
- // ignored, since we can never get coverage for them.
141
- // grab a reference to node's real process object right away
142
- var process$1 = commonjsGlobal.process;
143
-
144
- const processOk = function (process) {
145
- return process &&
146
- typeof process === 'object' &&
147
- typeof process.removeListener === 'function' &&
148
- typeof process.emit === 'function' &&
149
- typeof process.reallyExit === 'function' &&
150
- typeof process.listeners === 'function' &&
151
- typeof process.kill === 'function' &&
152
- typeof process.pid === 'number' &&
153
- typeof process.on === 'function'
154
- };
155
-
156
- // some kind of non-node environment, just no-op
157
- /* istanbul ignore if */
158
- if (!processOk(process$1)) {
159
- signalExit.exports = function () {
160
- return function () {}
161
- };
162
- } else {
163
- var assert = assert$1;
164
- var signals = requireSignals();
165
- var isWin$2 = /^win/i.test(process$1.platform);
166
-
167
- var EE = require$$2;
168
- /* istanbul ignore if */
169
- if (typeof EE !== 'function') {
170
- EE = EE.EventEmitter;
171
- }
172
-
173
- var emitter;
174
- if (process$1.__signal_exit_emitter__) {
175
- emitter = process$1.__signal_exit_emitter__;
176
- } else {
177
- emitter = process$1.__signal_exit_emitter__ = new EE();
178
- emitter.count = 0;
179
- emitter.emitted = {};
180
- }
181
-
182
- // Because this emitter is a global, we have to check to see if a
183
- // previous version of this library failed to enable infinite listeners.
184
- // I know what you're about to say. But literally everything about
185
- // signal-exit is a compromise with evil. Get used to it.
186
- if (!emitter.infinite) {
187
- emitter.setMaxListeners(Infinity);
188
- emitter.infinite = true;
189
- }
190
-
191
- signalExit.exports = function (cb, opts) {
192
- /* istanbul ignore if */
193
- if (!processOk(commonjsGlobal.process)) {
194
- return function () {}
195
- }
196
- assert.equal(typeof cb, 'function', 'a callback must be provided for exit handler');
197
-
198
- if (loaded === false) {
199
- load();
200
- }
201
-
202
- var ev = 'exit';
203
- if (opts && opts.alwaysLast) {
204
- ev = 'afterexit';
205
- }
206
-
207
- var remove = function () {
208
- emitter.removeListener(ev, cb);
209
- if (emitter.listeners('exit').length === 0 &&
210
- emitter.listeners('afterexit').length === 0) {
211
- unload();
212
- }
213
- };
214
- emitter.on(ev, cb);
215
-
216
- return remove
217
- };
218
-
219
- var unload = function unload () {
220
- if (!loaded || !processOk(commonjsGlobal.process)) {
221
- return
222
- }
223
- loaded = false;
224
-
225
- signals.forEach(function (sig) {
226
- try {
227
- process$1.removeListener(sig, sigListeners[sig]);
228
- } catch (er) {}
229
- });
230
- process$1.emit = originalProcessEmit;
231
- process$1.reallyExit = originalProcessReallyExit;
232
- emitter.count -= 1;
233
- };
234
- signalExit.exports.unload = unload;
235
-
236
- var emit = function emit (event, code, signal) {
237
- /* istanbul ignore if */
238
- if (emitter.emitted[event]) {
239
- return
240
- }
241
- emitter.emitted[event] = true;
242
- emitter.emit(event, code, signal);
243
- };
244
-
245
- // { <signal>: <listener fn>, ... }
246
- var sigListeners = {};
247
- signals.forEach(function (sig) {
248
- sigListeners[sig] = function listener () {
249
- /* istanbul ignore if */
250
- if (!processOk(commonjsGlobal.process)) {
251
- return
252
- }
253
- // If there are no other listeners, an exit is coming!
254
- // Simplest way: remove us and then re-send the signal.
255
- // We know that this will kill the process, so we can
256
- // safely emit now.
257
- var listeners = process$1.listeners(sig);
258
- if (listeners.length === emitter.count) {
259
- unload();
260
- emit('exit', null, sig);
261
- /* istanbul ignore next */
262
- emit('afterexit', null, sig);
263
- /* istanbul ignore next */
264
- if (isWin$2 && sig === 'SIGHUP') {
265
- // "SIGHUP" throws an `ENOSYS` error on Windows,
266
- // so use a supported signal instead
267
- sig = 'SIGINT';
268
- }
269
- /* istanbul ignore next */
270
- process$1.kill(process$1.pid, sig);
271
- }
272
- };
273
- });
274
-
275
- signalExit.exports.signals = function () {
276
- return signals
277
- };
278
-
279
- var loaded = false;
280
-
281
- var load = function load () {
282
- if (loaded || !processOk(commonjsGlobal.process)) {
283
- return
284
- }
285
- loaded = true;
286
-
287
- // This is the number of onSignalExit's that are in play.
288
- // It's important so that we can count the correct number of
289
- // listeners on signals, and don't wait for the other one to
290
- // handle it instead of us.
291
- emitter.count += 1;
292
-
293
- signals = signals.filter(function (sig) {
294
- try {
295
- process$1.on(sig, sigListeners[sig]);
296
- return true
297
- } catch (er) {
298
- return false
299
- }
300
- });
301
-
302
- process$1.emit = processEmit;
303
- process$1.reallyExit = processReallyExit;
304
- };
305
- signalExit.exports.load = load;
306
-
307
- var originalProcessReallyExit = process$1.reallyExit;
308
- var processReallyExit = function processReallyExit (code) {
309
- /* istanbul ignore if */
310
- if (!processOk(commonjsGlobal.process)) {
311
- return
312
- }
313
- process$1.exitCode = code || /* istanbul ignore next */ 0;
314
- emit('exit', process$1.exitCode, null);
315
- /* istanbul ignore next */
316
- emit('afterexit', process$1.exitCode, null);
317
- /* istanbul ignore next */
318
- originalProcessReallyExit.call(process$1, process$1.exitCode);
319
- };
320
-
321
- var originalProcessEmit = process$1.emit;
322
- var processEmit = function processEmit (ev, arg) {
323
- if (ev === 'exit' && processOk(commonjsGlobal.process)) {
324
- /* istanbul ignore else */
325
- if (arg !== undefined) {
326
- process$1.exitCode = arg;
327
- }
328
- var ret = originalProcessEmit.apply(this, arguments);
329
- /* istanbul ignore next */
330
- emit('exit', process$1.exitCode, null);
331
- /* istanbul ignore next */
332
- emit('afterexit', process$1.exitCode, null);
333
- /* istanbul ignore next */
334
- return ret
335
- } else {
336
- return originalProcessEmit.apply(this, arguments)
337
- }
338
- };
339
- }
7
+ import util from 'util';
340
8
 
341
9
  var crossSpawn = {exports: {}};
342
10
 
@@ -1021,9 +689,9 @@ var bufferStream$1 = options => {
1021
689
  return stream;
1022
690
  };
1023
691
 
1024
- const {constants: BufferConstants} = require$$0$2;
692
+ const {constants: BufferConstants} = require$$0$1;
1025
693
  const stream = require$$0;
1026
- const {promisify} = require$$0$1;
694
+ const {promisify} = util;
1027
695
  const bufferStream = bufferStream$1;
1028
696
 
1029
697
  const streamPipelinePromisified = promisify(stream.pipeline);
@@ -1122,4 +790,4 @@ var mergeStream = function (/*streams...*/) {
1122
790
  }
1123
791
  };
1124
792
 
1125
- export { crossSpawn as c, getStream$1 as g, mergeStream as m, onetime$1 as o, pathKey$1 as p, signalExit as s };
793
+ export { crossSpawn as c, getStream$1 as g, mergeStream as m, pathKey$1 as p };