Skip to content

Commit 978c0e1

Browse files
authored
chore: bump version to v8.7.0 (#1265)
1 parent 7e3df2b commit 978c0e1

File tree

4 files changed

+20
-6
lines changed

4 files changed

+20
-6
lines changed

docs/process-promise.md

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -255,6 +255,13 @@ setTimeout(() => p.kill('SIGINT'), 100)
255255
await p
256256
```
257257

258+
Killing the expired process raises an error:
259+
260+
```js
261+
const p = await $`sleep 999`
262+
p.kill() // Error: Too late to kill the process.
263+
```
264+
258265
## `abort()`
259266

260267
Terminates the process via an `AbortController` signal.
@@ -278,6 +285,16 @@ const res = fetch('https://example.com', {signal})
278285
p.abort('reason')
279286
```
280287

288+
The process may be aborted while executing, the method raises an error otherwise:
289+
290+
```js
291+
const p = $({nothrow: true})`sleep 999`
292+
p.abort() // ok
293+
294+
await p
295+
p.abort() // Error: Too late to abort the process.
296+
```
297+
281298
## `stdio()`
282299
Specifies a standard input-output for the process.
283300

package-lock.json

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "zx",
3-
"version": "8.6.3",
3+
"version": "8.7.0",
44
"description": "A tool for writing better scripts",
55
"type": "module",
66
"main": "./build/index.cjs",

test/smoke/win32.test.js

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -69,9 +69,6 @@ _describe('win32', () => {
6969

7070
test('ps detects self process', async () => {
7171
const [root] = await ps.lookup({ pid: process.pid })
72-
console.log('process.pid:', process.pid)
73-
console.log('process list', JSON.stringify(await ps.lookup(), null, 2))
74-
7572
assert.equal(root.pid, process.pid)
7673
})
7774

0 commit comments

Comments
 (0)