ava 6.4.0 → 6.4.1
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.
- package/lib/fork.js +5 -0
- package/lib/worker/base.js +9 -0
- package/lib/worker/channel.cjs +2 -0
- package/package.json +14 -11
package/lib/fork.js
CHANGED
|
@@ -104,6 +104,11 @@ export default function loadFork(file, options, execArgv = process.execArgv) {
|
|
|
104
104
|
}
|
|
105
105
|
|
|
106
106
|
switch (message.ava.type) {
|
|
107
|
+
case 'worker-finished': {
|
|
108
|
+
send({type: 'free-worker'});
|
|
109
|
+
break;
|
|
110
|
+
}
|
|
111
|
+
|
|
107
112
|
case 'ready-for-options': {
|
|
108
113
|
send({type: 'options', options});
|
|
109
114
|
break;
|
package/lib/worker/base.js
CHANGED
|
@@ -120,6 +120,15 @@ const run = async options => {
|
|
|
120
120
|
return;
|
|
121
121
|
}
|
|
122
122
|
|
|
123
|
+
channel.send({type: 'worker-finished'});
|
|
124
|
+
|
|
125
|
+
// Reference the channel until the worker is freed. This should prevent Node.js from terminating the child process
|
|
126
|
+
// prematurely, which has been witnessed on Windows. See discussion at
|
|
127
|
+
// <https://github.com/avajs/ava/issues/3390#issuecomment-3056119361>.
|
|
128
|
+
channel.ref();
|
|
129
|
+
await channel.workerFreed;
|
|
130
|
+
channel.unref();
|
|
131
|
+
|
|
123
132
|
nowAndTimers.setImmediate(() => {
|
|
124
133
|
const unhandled = currentlyUnhandled();
|
|
125
134
|
if (unhandled.length === 0) {
|
package/lib/worker/channel.cjs
CHANGED
|
@@ -107,7 +107,9 @@ handle.ref();
|
|
|
107
107
|
|
|
108
108
|
exports.options = selectAvaMessage(handle.channel, 'options').then(message => message.ava.options);
|
|
109
109
|
exports.peerFailed = selectAvaMessage(handle.channel, 'peer-failed');
|
|
110
|
+
exports.workerFreed = selectAvaMessage(handle.channel, 'free-worker');
|
|
110
111
|
exports.send = handle.send.bind(handle);
|
|
112
|
+
exports.ref = handle.ref.bind(handle);
|
|
111
113
|
exports.unref = handle.unref.bind(handle);
|
|
112
114
|
|
|
113
115
|
let channelCounter = 0;
|
package/package.json
CHANGED
|
@@ -1,9 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "ava",
|
|
3
|
-
"version": "6.4.
|
|
3
|
+
"version": "6.4.1",
|
|
4
4
|
"description": "Node.js test runner that lets you develop with confidence.",
|
|
5
5
|
"license": "MIT",
|
|
6
|
-
"repository":
|
|
6
|
+
"repository": {
|
|
7
|
+
"type": "git",
|
|
8
|
+
"url": "git+https://github.com/avajs/ava.git"
|
|
9
|
+
},
|
|
7
10
|
"homepage": "https://avajs.dev",
|
|
8
11
|
"bin": {
|
|
9
12
|
"ava": "entrypoints/cli.mjs"
|
|
@@ -84,16 +87,16 @@
|
|
|
84
87
|
],
|
|
85
88
|
"dependencies": {
|
|
86
89
|
"@vercel/nft": "^0.29.4",
|
|
87
|
-
"acorn": "^8.
|
|
90
|
+
"acorn": "^8.15.0",
|
|
88
91
|
"acorn-walk": "^8.3.4",
|
|
89
92
|
"ansi-styles": "^6.2.1",
|
|
90
93
|
"arrgv": "^1.0.2",
|
|
91
94
|
"arrify": "^3.0.0",
|
|
92
95
|
"callsites": "^4.2.0",
|
|
93
|
-
"cbor": "^10.0.
|
|
96
|
+
"cbor": "^10.0.9",
|
|
94
97
|
"chalk": "^5.4.1",
|
|
95
98
|
"chunkd": "^2.0.1",
|
|
96
|
-
"ci-info": "^4.
|
|
99
|
+
"ci-info": "^4.3.0",
|
|
97
100
|
"ci-parallel-vars": "^1.0.1",
|
|
98
101
|
"cli-truncate": "^4.0.0",
|
|
99
102
|
"code-excerpt": "^4.0.0",
|
|
@@ -101,7 +104,7 @@
|
|
|
101
104
|
"concordance": "^5.0.4",
|
|
102
105
|
"currently-unhandled": "^0.4.1",
|
|
103
106
|
"debug": "^4.4.1",
|
|
104
|
-
"emittery": "^1.
|
|
107
|
+
"emittery": "^1.2.0",
|
|
105
108
|
"figures": "^6.1.0",
|
|
106
109
|
"globby": "^14.1.0",
|
|
107
110
|
"ignore-by-default": "^2.1.0",
|
|
@@ -126,19 +129,19 @@
|
|
|
126
129
|
},
|
|
127
130
|
"devDependencies": {
|
|
128
131
|
"@ava/test": "github:avajs/test",
|
|
129
|
-
"@ava/typescript": "^
|
|
132
|
+
"@ava/typescript": "^6.0.0",
|
|
130
133
|
"@sindresorhus/tsconfig": "^5.1.1",
|
|
131
|
-
"@types/node": "^22.
|
|
134
|
+
"@types/node": "^22.16.3",
|
|
132
135
|
"ansi-escapes": "^7.0.0",
|
|
133
136
|
"c8": "^10.1.3",
|
|
134
137
|
"execa": "^9.6.0",
|
|
135
|
-
"expect": "^
|
|
136
|
-
"sinon": "^
|
|
138
|
+
"expect": "^30.0.4",
|
|
139
|
+
"sinon": "^21.0.0",
|
|
137
140
|
"tap": "^21.1.0",
|
|
138
141
|
"tempy": "^3.1.0",
|
|
139
142
|
"tsd": "^0.32.0",
|
|
140
143
|
"typescript": "~5.8.3",
|
|
141
|
-
"xo": "^1.
|
|
144
|
+
"xo": "^1.1.1",
|
|
142
145
|
"zen-observable": "^0.10.0"
|
|
143
146
|
},
|
|
144
147
|
"peerDependencies": {
|