@wirecat/cli-base 0.125.0 → 0.125.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/CHANGELOG.md +10 -0
- package/dist/release/index.d.ts +1 -0
- package/dist/release/index.js +4 -3
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -8,6 +8,16 @@ Versions before 0.8.0 are in the [git tags](https://github.com/WireCatLabs/cli-b
|
|
|
8
8
|
Every entry says what changed as a caller sees it, why, and what to watch for — the rules are
|
|
9
9
|
[`docs/dev/CONVENTIONS.md`](docs/dev/CONVENTIONS.md#the-changelog).
|
|
10
10
|
|
|
11
|
+
## 0.125.1 — 21.11.2026
|
|
12
|
+
|
|
13
|
+
### Fixed
|
|
14
|
+
|
|
15
|
+
- **`packContents` reads npm's JSON from stdout only.** It parsed stdout and stderr together, so a warning npm prints
|
|
16
|
+
after the JSON broke the check with `Unexpected non-whitespace character after JSON`. pnpm 11 passes `npm_config_*`
|
|
17
|
+
variables to scripts, npm warns `Unknown env config "manage-package-manager-versions"`, and notion-cli's
|
|
18
|
+
`pnpm smoke` failed in `bin/release`. A failing `npm pack` still shows both streams. `run` now also returns
|
|
19
|
+
`stdout`.
|
|
20
|
+
|
|
11
21
|
## 0.125.0 — 19.11.2026
|
|
12
22
|
|
|
13
23
|
### Added
|
package/dist/release/index.d.ts
CHANGED
|
@@ -18,6 +18,7 @@ export declare const releaseCheck: (checks: readonly Check[], { version, log }:
|
|
|
18
18
|
export declare const run: (root: string, command: string, args: readonly string[]) => {
|
|
19
19
|
ok: boolean;
|
|
20
20
|
output: string;
|
|
21
|
+
stdout: string;
|
|
21
22
|
};
|
|
22
23
|
/** A check that passes when the command exits 0, and otherwise shows the last 15 lines it printed. */
|
|
23
24
|
export declare const command: (root: string, name: string, ...args: string[]) => () => string[];
|
package/dist/release/index.js
CHANGED
|
@@ -31,7 +31,7 @@ export const releaseCheck = (checks, { version, log }) => {
|
|
|
31
31
|
export const run = (root, command, args) => {
|
|
32
32
|
const done = spawnSync(command, args, { cwd: root, encoding: "utf8", maxBuffer: 64 * 1024 * 1024 });
|
|
33
33
|
const output = `${done.stdout ?? ""}${done.stderr ?? ""}${done.error ? String(done.error) : ""}`;
|
|
34
|
-
return { ok: done.status === 0, output };
|
|
34
|
+
return { ok: done.status === 0, output, stdout: done.stdout ?? "" };
|
|
35
35
|
};
|
|
36
36
|
/** A check that passes when the command exits 0, and otherwise shows the last 15 lines it printed. */
|
|
37
37
|
export const command = (root, name, ...args) => () => {
|
|
@@ -49,10 +49,11 @@ export const packProblems = (paths, allowed, said) => paths
|
|
|
49
49
|
.filter((path) => !allowed.some((entry) => (entry.endsWith("/") ? path.startsWith(entry) : path === entry)))
|
|
50
50
|
.map((path) => `npm pack: ${path} would ship — only ${said} may`);
|
|
51
51
|
export const packContents = (root, allowed, said) => () => {
|
|
52
|
-
const { ok, output } = run(root, "npm", ["pack", "--dry-run", "--json", "--ignore-scripts"]);
|
|
52
|
+
const { ok, output, stdout } = run(root, "npm", ["pack", "--dry-run", "--json", "--ignore-scripts"]);
|
|
53
53
|
if (!ok)
|
|
54
54
|
return [output.trim()];
|
|
55
|
-
|
|
55
|
+
// npm warns on stderr, after the JSON too: `Unknown env config` for the npm_config_* that pnpm 11 passes on.
|
|
56
|
+
const [packed] = JSON.parse(stdout);
|
|
56
57
|
return packProblems((packed?.files ?? []).map(({ path }) => path), allowed, said);
|
|
57
58
|
};
|
|
58
59
|
const VERSION = /export const VERSION = "([^"]*)"/;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@wirecat/cli-base",
|
|
3
|
-
"version": "0.125.
|
|
3
|
+
"version": "0.125.1",
|
|
4
4
|
"description": "The parts every command line tool needs: output modes, terminal rendering, error model, exit codes, credentials, clocks",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"author": "Viacheslav Ptsarev",
|