@carllee1983/dbcli 1.55.0 → 1.55.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 +6 -0
- package/README.dev.md +1 -1
- package/dist/cli-runtime.mjs +2 -2
- package/dist/cli.mjs +2 -2
- package/package.json +2 -2
- package/scripts/postinstall-check-bun.mjs +26 -14
package/CHANGELOG.md
CHANGED
|
@@ -5,6 +5,12 @@ All notable changes to dbcli are documented here.
|
|
|
5
5
|
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
|
|
6
6
|
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
|
7
7
|
|
|
8
|
+
## [1.55.1] - 2026-08-13 - The Bun-missing warning actually reaches the user
|
|
9
|
+
|
|
10
|
+
### Fixed
|
|
11
|
+
|
|
12
|
+
- **v1.55.0's post-install check could never fail, and npm therefore never showed it.** Verified against the published package in `docker run --rm node:22`: `npm install -g @carllee1983/dbcli` printed `added 131 packages` and nothing else, and `dbcli --version` then died with `/usr/bin/env: 'bun': No such file or directory` — exactly the experience the check was added to prevent. Two causes stacked. npm hides lifecycle-script output unless the script exits non-zero (the message was there all along under `--foreground-scripts`), and the `postinstall` command ended in `|| exit 0`, which swallowed any exit code the check could produce. The trailing `|| exit 0` is gone, and `scripts/postinstall-check-bun.mjs` now exits 1 when Bun is missing **and** `npm_config_global` is `true`. A global install is the case whose entire point is a runnable `dbcli`, so it fails loudly with the reason, and npm rolls the `bin` back rather than leaving a dead executable on `PATH` (verified: `command -v dbcli` finds nothing afterwards). A dependency install is left alone — that is the `./agent-core` consumer, who needs no Bun, and it still exits 0 with the subpath export importable from Node. `tests/integration/runtime-contract.test.ts` pins both outcomes and asserts the published `postinstall` command contains no `exit 0` mask, since a check that cannot fail is indistinguishable from one that passes (#65).
|
|
13
|
+
|
|
8
14
|
## [1.55.0] - 2026-08-13 - Packaging: the declared runtime matches the artifact
|
|
9
15
|
|
|
10
16
|
### Removed
|
package/README.dev.md
CHANGED
|
@@ -108,7 +108,7 @@ Then ship a patch version with the fix. Prefer **deprecate** over **unpublish**
|
|
|
108
108
|
- **`prepublishOnly`:** `bun run build` so `dist/cli.mjs` matches current source.
|
|
109
109
|
- **`engines`:** Declares `bun >= 1.3.3` only. `node` was removed because the published bundles cannot run on Node: `dist/cli.mjs` dynamic-imports the extensionless `./cli-runtime` (Bun's resolver appends `.mjs`, Node's does not) and `dist/core.mjs` calls Bun globals. `tests/integration/runtime-contract.test.ts` fails if `engines.node` comes back without the bundles being fixed to match, and if `dist/agent-core.mjs` — the one entry point that is Node-importable — regresses. See `docs/adr/0008-dbcli-is-a-bun-program-and-engines-says-so.md`.
|
|
110
110
|
- **Shebang:** `scripts/build.ts` prepends `#!/usr/bin/env bun` to `dist/cli.mjs`; the `bin` field in `package.json` points at that file.
|
|
111
|
-
- **`postinstall`:** `scripts/postinstall-check-bun.mjs`
|
|
111
|
+
- **`postinstall`:** `scripts/postinstall-check-bun.mjs` reports a missing Bun — npm ignores `engines.bun`, so this is the only signal an npm-only machine gets before `dbcli` refuses to start. The command is `bun … || node …` so it runs under whichever runtime is present: Bun-only machines have no `node` to invoke it with, and a hard `node` dependency there would break the primary install path. It must **not** end in `|| exit 0`; v1.55.0 shipped with that mask and npm, which hides lifecycle output unless a script fails, therefore showed nothing at all. On a global install (`npm_config_global === 'true'`) a missing Bun exits 1, so the reason is printed and npm rolls the `bin` back; a dependency install only warns, because that is the `./agent-core` consumer. Both outcomes are pinned in `tests/integration/runtime-contract.test.ts`.
|
|
112
112
|
- **Live DB tests:** `tests/integration/live-db.test.ts` uses project `.dbcli` by default or `LIVE_DB_CONFIG_PATH` when you point at another config directory. Set `SKIP_INTEGRATION_TESTS=true` to skip all integration tests.
|
|
113
113
|
|
|
114
114
|
For contributor workflow and release process, see **[CONTRIBUTING.md](./CONTRIBUTING.md)** and the main **[README.md](./README.md)** Development section.
|
package/dist/cli-runtime.mjs
CHANGED
|
@@ -51,7 +51,7 @@ var package_default;
|
|
|
51
51
|
var init_package = __esm(() => {
|
|
52
52
|
package_default = {
|
|
53
53
|
name: "@carllee1983/dbcli",
|
|
54
|
-
version: "1.55.
|
|
54
|
+
version: "1.55.1",
|
|
55
55
|
description: "Database CLI for AI agents",
|
|
56
56
|
type: "module",
|
|
57
57
|
publishConfig: {
|
|
@@ -114,7 +114,7 @@ var init_package = __esm(() => {
|
|
|
114
114
|
"LICENSE"
|
|
115
115
|
],
|
|
116
116
|
scripts: {
|
|
117
|
-
postinstall: "bun scripts/postinstall-check-bun.mjs || node scripts/postinstall-check-bun.mjs
|
|
117
|
+
postinstall: "bun scripts/postinstall-check-bun.mjs || node scripts/postinstall-check-bun.mjs",
|
|
118
118
|
dev: "bun run src/cli.ts",
|
|
119
119
|
build: "bun run scripts/build.ts",
|
|
120
120
|
"build:determinism": "bun run scripts/check-build-determinism.ts",
|
package/dist/cli.mjs
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
// package.json
|
|
4
4
|
var package_default = {
|
|
5
5
|
name: "@carllee1983/dbcli",
|
|
6
|
-
version: "1.55.
|
|
6
|
+
version: "1.55.1",
|
|
7
7
|
description: "Database CLI for AI agents",
|
|
8
8
|
type: "module",
|
|
9
9
|
publishConfig: {
|
|
@@ -66,7 +66,7 @@ var package_default = {
|
|
|
66
66
|
"LICENSE"
|
|
67
67
|
],
|
|
68
68
|
scripts: {
|
|
69
|
-
postinstall: "bun scripts/postinstall-check-bun.mjs || node scripts/postinstall-check-bun.mjs
|
|
69
|
+
postinstall: "bun scripts/postinstall-check-bun.mjs || node scripts/postinstall-check-bun.mjs",
|
|
70
70
|
dev: "bun run src/cli.ts",
|
|
71
71
|
build: "bun run scripts/build.ts",
|
|
72
72
|
"build:determinism": "bun run scripts/check-build-determinism.ts",
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@carllee1983/dbcli",
|
|
3
|
-
"version": "1.55.
|
|
3
|
+
"version": "1.55.1",
|
|
4
4
|
"description": "Database CLI for AI agents",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"publishConfig": {
|
|
@@ -63,7 +63,7 @@
|
|
|
63
63
|
"LICENSE"
|
|
64
64
|
],
|
|
65
65
|
"scripts": {
|
|
66
|
-
"postinstall": "bun scripts/postinstall-check-bun.mjs || node scripts/postinstall-check-bun.mjs
|
|
66
|
+
"postinstall": "bun scripts/postinstall-check-bun.mjs || node scripts/postinstall-check-bun.mjs",
|
|
67
67
|
"dev": "bun run src/cli.ts",
|
|
68
68
|
"build": "bun run scripts/build.ts",
|
|
69
69
|
"build:determinism": "bun run scripts/check-build-determinism.ts",
|
|
@@ -31,19 +31,31 @@ function bunIsAvailable() {
|
|
|
31
31
|
}
|
|
32
32
|
}
|
|
33
33
|
|
|
34
|
+
// npm hides lifecycle-script output unless the script fails (verified on npm 10.9.8:
|
|
35
|
+
// a warning printed here is invisible without --foreground-scripts). So a global
|
|
36
|
+
// install — the one whose whole purpose is a working `dbcli` on PATH — exits non-zero
|
|
37
|
+
// to make the reason visible, and npm rolls the broken executable back. A local install
|
|
38
|
+
// stays silent and succeeds: that is the `./agent-core` consumer, who needs no Bun.
|
|
39
|
+
const isGlobalInstall = process.env.npm_config_global === 'true'
|
|
40
|
+
|
|
34
41
|
if (!bunIsAvailable()) {
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
42
|
+
const message = [
|
|
43
|
+
'',
|
|
44
|
+
'dbcli: Bun was not found on PATH.',
|
|
45
|
+
'',
|
|
46
|
+
" dbcli's executable runs under Bun (its shebang is `#!/usr/bin/env bun`), so it",
|
|
47
|
+
' cannot start until Bun 1.3.3+ is installed:',
|
|
48
|
+
'',
|
|
49
|
+
` ${BUN_INSTALL_HINT}`,
|
|
50
|
+
'',
|
|
51
|
+
' Then re-run the install. The ./agent-core subpath export is importable from',
|
|
52
|
+
' Node without Bun, and installing it as a project dependency does not need this.',
|
|
53
|
+
'',
|
|
54
|
+
].join('\n')
|
|
55
|
+
|
|
56
|
+
if (isGlobalInstall) {
|
|
57
|
+
console.error(message)
|
|
58
|
+
process.exit(1)
|
|
59
|
+
}
|
|
60
|
+
console.warn(message)
|
|
49
61
|
}
|