@osdlc/command-seam 0.0.1-stage → 0.4.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.
- package/CHANGELOG.md +38 -51
- package/CONTRIBUTING.md +4 -1
- package/README.md +2 -2
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,55 +1,43 @@
|
|
|
1
1
|
# Changelog
|
|
2
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
|
-
- `forwardedExitCode()`: `128 + signal number` for `forwardedSignal()`, or
|
|
42
|
-
`undefined`. A host that sets its own exit code keeps this one over it.
|
|
43
|
-
- `liveProcessGroups()`: the pids of the groups currently registered. A group
|
|
44
|
-
stays registered until it is empty, also after its run settles or its
|
|
45
|
-
leader exits, so a forwarded signal still kills a background member or one
|
|
46
|
-
waiting for the `SIGKILL` follow-up. The host's normal exit kills only the
|
|
47
|
-
groups whose run is still in flight, so a daemon a settled run left behind
|
|
48
|
-
keeps running.
|
|
49
|
-
- `unref` on the managed-process runner's options: the parent can exit while
|
|
50
|
-
the (usually `processGroup`) child keeps running. Such a group is not tracked
|
|
51
|
-
by `installGroupSignalForwarding`: a signal to the parent does not reach it
|
|
52
|
-
and the parent's exit does not `SIGKILL` it.
|
|
3
|
+
## 0.4.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- e30f155: **Breaking:** the package is now `@osdlc/command-seam`, renamed from `@sksizer/command-seam`. The repository moved from `sksizer/sdlc` to [osdlc/osdlc](https://github.com/osdlc/osdlc).
|
|
8
|
+
|
|
9
|
+
To move, replace `@sksizer/command-seam` with `@osdlc/command-seam` in `package.json` and in every import, including `@osdlc/command-seam/testing`. `@sksizer/command-seam` gets no further releases.
|
|
10
|
+
- e30f155: Add process-group signal forwarding and `unref` on the managed-process runner. These exports are experimental (see the README's Stability section).
|
|
11
|
+
|
|
12
|
+
- `installGroupSignalForwarding(opts?)`, with options type
|
|
13
|
+
`GroupSignalForwardingOptions`: opt-in. While a group started with
|
|
14
|
+
`processGroup: true` (async and managed runners) is live, `SIGINT`,
|
|
15
|
+
`SIGTERM` and `SIGHUP` send `SIGTERM` to every group, `SIGKILL` after
|
|
16
|
+
`graceMs` (default 1000), then exit with `128 + signal number`. A repeat
|
|
17
|
+
signal escalates to `SIGKILL` at once; an `exit` handler `SIGKILL`s groups
|
|
18
|
+
whose run is still in flight. Listeners are attached only while a group is
|
|
19
|
+
starting or live, ahead of the host's own. A host with its own listener,
|
|
20
|
+
`process.once` included, keeps the exit; its groups still get `SIGKILL`
|
|
21
|
+
after `graceMs`, or on exit if sooner and the run is in flight. Returns an
|
|
22
|
+
uninstall function. POSIX only; a no-op on Windows. `SIGKILL` of the host
|
|
23
|
+
still orphans its groups. When forwarding owns the exit, a new
|
|
24
|
+
`processGroup: true` run after the first forwarded signal is refused: it
|
|
25
|
+
starts nothing and settles with `reason: 'abort'`. The uninstall function
|
|
26
|
+
resets this.
|
|
27
|
+
- `forwardedSignal()`: the signal forwarded when forwarding owns the exit, or
|
|
28
|
+
`undefined`. A host that runs one command after another checks it to stop.
|
|
29
|
+
- `forwardedExitCode()`: `128 + signal number` for `forwardedSignal()`, or
|
|
30
|
+
`undefined`. A host that sets its own exit code keeps this one over it.
|
|
31
|
+
- `liveProcessGroups()`: the pids of the groups currently registered. A group
|
|
32
|
+
stays registered until it is empty, also after its run settles or its
|
|
33
|
+
leader exits, so a forwarded signal still kills a background member or one
|
|
34
|
+
waiting for the `SIGKILL` follow-up. The host's normal exit kills only the
|
|
35
|
+
groups whose run is still in flight, so a daemon a settled run left behind
|
|
36
|
+
keeps running.
|
|
37
|
+
- `unref` on the managed-process runner's options: the parent can exit while
|
|
38
|
+
the (usually `processGroup`) child keeps running. Such a group is not
|
|
39
|
+
tracked by `installGroupSignalForwarding`: a signal to the parent does not
|
|
40
|
+
reach it and the parent's exit does not `SIGKILL` it.
|
|
53
41
|
|
|
54
42
|
## [0.3.0] - 2026-10-15
|
|
55
43
|
|
|
@@ -324,5 +312,4 @@ entry.
|
|
|
324
312
|
exports. A breaking change to a stable export will be listed under
|
|
325
313
|
"Breaking".
|
|
326
314
|
|
|
327
|
-
[0.4.0]: https://github.com/osdlc/osdlc/tree/command-seam/v0.4.0/packages/ts/command-seam
|
|
328
315
|
[0.3.0]: https://github.com/sksizer/sdlc/tree/command-seam/v0.3.0/packages/command-seam
|
package/CONTRIBUTING.md
CHANGED
|
@@ -55,4 +55,7 @@ is installed.
|
|
|
55
55
|
code a user would write. The change is judged by how that code reads. See
|
|
56
56
|
[D-15](https://github.com/osdlc/osdlc/blob/main/packages/ts/command-seam/docs/planning/decisions/D-15-api-changes-start-from-consumer-code.md).
|
|
57
57
|
- Keep comments short. Say why, not what.
|
|
58
|
-
-
|
|
58
|
+
- For a change users can see, add a changeset: run `pnpm changeset` at the
|
|
59
|
+
repository root. Start a breaking change's summary with `**Breaking:**`.
|
|
60
|
+
Do not edit `CHANGELOG.md` or `version` by hand; the release writes them.
|
|
61
|
+
See [packages/README.md](https://github.com/osdlc/osdlc/blob/main/packages/README.md).
|
package/README.md
CHANGED
|
@@ -645,8 +645,8 @@ The package is at 0.x. Each export is stable or experimental.
|
|
|
645
645
|
- **Stable** exports are the runner contract: the runners, their options and
|
|
646
646
|
results, `CommandFailed`, and the helpers around them. The runners and
|
|
647
647
|
helpers are in use by other packages; a type that names their options or
|
|
648
|
-
results is stable with them. A breaking change to one is
|
|
649
|
-
|
|
648
|
+
results is stable with them. A breaking change to one is marked
|
|
649
|
+
**Breaking** in the CHANGELOG.
|
|
650
650
|
- **Experimental** exports are newer or have no user yet. Any release may
|
|
651
651
|
change or remove one. Each has an `@experimental` tag in its TSDoc.
|
|
652
652
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@osdlc/command-seam",
|
|
3
|
-
"version": "0.0
|
|
3
|
+
"version": "0.4.0",
|
|
4
4
|
"description": "Injectable subprocess runner for Node: capture, stream and managed-process runners, hard timeouts, failures as results.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"author": "SK Sizer",
|