@williamthorsen/nmr-core 0.16.0 → 0.16.2
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/.meta/changelog.json +22 -0
- package/CHANGELOG.md +12 -0
- package/README.md +1 -15
- package/dist/esm/cli.d.ts +6 -0
- package/dist/esm/cli.js +9 -0
- package/package.json +8 -8
package/.meta/changelog.json
CHANGED
|
@@ -1,4 +1,26 @@
|
|
|
1
1
|
[
|
|
2
|
+
{
|
|
3
|
+
"version": "0.16.2",
|
|
4
|
+
"date": "2026-11-12",
|
|
5
|
+
"sections": [{ "title": "Notes", "audience": "dev", "items": [{ "description": "Forced version bump." }] }]
|
|
6
|
+
},
|
|
7
|
+
{
|
|
8
|
+
"version": "0.16.1",
|
|
9
|
+
"date": "2026-11-10",
|
|
10
|
+
"sections": [
|
|
11
|
+
{
|
|
12
|
+
"title": "♻️ Refactoring",
|
|
13
|
+
"audience": "dev",
|
|
14
|
+
"items": [
|
|
15
|
+
{
|
|
16
|
+
"description": "Replaces the duplicate `resolveStyles` modules in `release-kit` and `v11y-check` with `resolveCliStyles` from `@williamthorsen/nmr-core/cli`, which each package's `route.ts` calls with its own output-style environment variable. (#1248)",
|
|
17
|
+
"hash": "c5f4ac68360ce550a7e53006a2a633b79f179f5f",
|
|
18
|
+
"entry": 1
|
|
19
|
+
}
|
|
20
|
+
]
|
|
21
|
+
}
|
|
22
|
+
]
|
|
23
|
+
},
|
|
2
24
|
{
|
|
3
25
|
"version": "0.16.0",
|
|
4
26
|
"date": "2026-11-08",
|
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,18 @@
|
|
|
2
2
|
|
|
3
3
|
All notable changes to this project will be documented in this file.
|
|
4
4
|
|
|
5
|
+
## 0.16.2 — 2026-11-12
|
|
6
|
+
|
|
7
|
+
### Notes
|
|
8
|
+
|
|
9
|
+
- Forced version bump.
|
|
10
|
+
|
|
11
|
+
## 0.16.1 — 2026-11-10
|
|
12
|
+
|
|
13
|
+
### ♻️ Refactoring
|
|
14
|
+
|
|
15
|
+
- Replaces the duplicate `resolveStyles` modules in `release-kit` and `v11y-check` with `resolveCliStyles` from `@williamthorsen/nmr-core/cli`, which each package's `route.ts` calls with its own output-style environment variable. (#1248)
|
|
16
|
+
|
|
5
17
|
## 0.16.0 — 2026-11-08
|
|
6
18
|
|
|
7
19
|
### 🎉 Features
|
package/README.md
CHANGED
|
@@ -6,21 +6,7 @@ Shared utilities for node-monorepo-tools packages.
|
|
|
6
6
|
|
|
7
7
|
This package serves as the shared library foundation for the monorepo. For the nmr CLI tool, see [`@williamthorsen/nmr`](../nmr).
|
|
8
8
|
|
|
9
|
-
<!-- section:release-notes -->
|
|
10
|
-
## Release notes — v0.16.0 (2026-11-08)
|
|
11
|
-
|
|
12
|
-
### 🎉 Features
|
|
13
|
-
|
|
14
|
-
- Prefix handled error lines with the program's bin (#1190)
|
|
15
|
-
|
|
16
|
-
Changes the handled error lines that nmr, release-kit, and v11y-check write from `Error: <message>` to `<bin>: <message>`, so that a line in combined output names the program that wrote it. It covers usage errors as well, by upgrading `@williamthorsen/toolbelt.cli` to 0.8.0, whose router writes the same prefix.
|
|
17
|
-
|
|
18
|
-
### 🐛 Bug fixes
|
|
19
|
-
|
|
20
|
-
- Apply the git output limit to nmr's buffered git calls (#1188)
|
|
21
|
-
|
|
22
|
-
Fixes the issue that several of nmr's git calls ran with Node's default 1 MiB output buffer instead of nmr-core's 64 MiB git output limit, which made them fail with `ENOBUFS` once a repository's file listing grew large enough. Applies the limit to every buffered git call that nmr makes outside test code, including the call made on the host during a delegated run.
|
|
23
|
-
<!-- /section:release-notes -->
|
|
9
|
+
<!-- section:release-notes --><!-- /section:release-notes -->
|
|
24
10
|
|
|
25
11
|
## Installation
|
|
26
12
|
|
package/dist/esm/cli.d.ts
CHANGED
|
@@ -1,2 +1,8 @@
|
|
|
1
|
+
import { type ResolveStreamStylesOptions, type StreamStyles } from './terminal.js';
|
|
1
2
|
export type { Command, CommandInput, CommandNode, FlagDefinition, FlagSchema, Group, OperandDefinition, ParsedFlags, ParsedOperands, ParseErrorKind, ParseOptions, ParseResult, ParseSpec, PassthroughInput, RenderHelpOptions, RunCliOptions, Writer, } from '@williamthorsen/toolbelt.cli/candidate';
|
|
2
3
|
export { createCli, defineCommand, defineGroup, parseArgs, ParseError, readStreamText, renderHelp, runCli, UsageError, } from '@williamthorsen/toolbelt.cli/candidate';
|
|
4
|
+
/** The process state from which a CLI resolves its styles, as a router passes it to each command. */
|
|
5
|
+
export type CliStyleContext = Omit<ResolveStreamStylesOptions, 'argv' | 'envVar' | 'flag'>;
|
|
6
|
+
export type ResolveCliStylesOptions = CliStyleContext & Pick<ResolveStreamStylesOptions, 'envVar'>;
|
|
7
|
+
/** Resolves the style of each output stream, throwing a `UsageError` when `envVar` doesn't name a setting. */
|
|
8
|
+
export declare function resolveCliStyles(options: ResolveCliStylesOptions): StreamStyles;
|
package/dist/esm/cli.js
CHANGED
|
@@ -1 +1,10 @@
|
|
|
1
|
+
import { UsageError } from '@williamthorsen/toolbelt.cli/candidate';
|
|
2
|
+
import { describeInvalidOutputStyle, resolveStreamStyles, } from "./terminal.js";
|
|
1
3
|
export { createCli, defineCommand, defineGroup, parseArgs, ParseError, readStreamText, renderHelp, runCli, UsageError, } from '@williamthorsen/toolbelt.cli/candidate';
|
|
4
|
+
export function resolveCliStyles(options) {
|
|
5
|
+
const { invalid, styles } = resolveStreamStyles(options);
|
|
6
|
+
if (invalid !== undefined) {
|
|
7
|
+
throw new UsageError(describeInvalidOutputStyle(invalid));
|
|
8
|
+
}
|
|
9
|
+
return styles;
|
|
10
|
+
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@williamthorsen/nmr-core",
|
|
3
|
-
"version": "0.16.
|
|
3
|
+
"version": "0.16.2",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "Shared utilities for node-monorepo-tools packages",
|
|
6
6
|
"keywords": [
|
|
@@ -44,18 +44,18 @@
|
|
|
44
44
|
"dist"
|
|
45
45
|
],
|
|
46
46
|
"dependencies": {
|
|
47
|
-
"@williamthorsen/toolbelt.cli": "0.8.
|
|
48
|
-
"@williamthorsen/toolbelt.datetime": "4.1.
|
|
49
|
-
"@williamthorsen/toolbelt.errors": "0.9.
|
|
50
|
-
"@williamthorsen/toolbelt.filesystem": "0.10.
|
|
51
|
-
"@williamthorsen/toolbelt.packaging": "0.7.
|
|
47
|
+
"@williamthorsen/toolbelt.cli": "0.8.1",
|
|
48
|
+
"@williamthorsen/toolbelt.datetime": "4.1.2",
|
|
49
|
+
"@williamthorsen/toolbelt.errors": "0.9.1",
|
|
50
|
+
"@williamthorsen/toolbelt.filesystem": "0.10.1",
|
|
51
|
+
"@williamthorsen/toolbelt.packaging": "0.7.1",
|
|
52
52
|
"@williamthorsen/toolbelt.terminal": "0.3.0",
|
|
53
53
|
"diff": "9.0.0",
|
|
54
54
|
"yaml": "2.9.1"
|
|
55
55
|
},
|
|
56
56
|
"devDependencies": {
|
|
57
|
-
"@williamthorsen/toolbelt.testing": "0.8.
|
|
58
|
-
"@williamthorsen/toolbelt.vitest": "0.13.
|
|
57
|
+
"@williamthorsen/toolbelt.testing": "0.8.1",
|
|
58
|
+
"@williamthorsen/toolbelt.vitest": "0.13.3",
|
|
59
59
|
"vitest": "5.1.0"
|
|
60
60
|
},
|
|
61
61
|
"engines": {
|