@bensandee/tooling 0.76.0 → 0.78.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/README.md +31 -0
- package/dist/bin.mjs +4282 -1165
- package/package.json +16 -15
- package/tooling.schema.json +8 -1
package/README.md
CHANGED
|
@@ -137,6 +137,26 @@ All other keys -- `allowBuilds`, custom entries -- are preserved verbatim throug
|
|
|
137
137
|
|
|
138
138
|
Opt out entirely with `"pnpmWorkspace": false` in `.tooling.json`; the generator then never inspects or writes the file.
|
|
139
139
|
|
|
140
|
+
### mise.toml
|
|
141
|
+
|
|
142
|
+
`repo:sync` manages `mise.toml` with the same narrow contract: it owns `tools.node` and `tools.pnpm` by key and carries every other key, table, and comment through untouched, editing the file textually rather than reserializing it.
|
|
143
|
+
|
|
144
|
+
**On a fresh file**, it writes the spec's two-key form: `[tools]`, `node` seeded from the `engines.node` floor, `pnpm` copied from `packageManager` with the `pnpm@` prefix stripped.
|
|
145
|
+
|
|
146
|
+
**On an existing file**, `tools.node` is written only when the key is absent -- once present, it is Renovate's `mise` manager that moves it, in-major only (see the Renovate rule below). `tools.pnpm` is rewritten whenever it differs from `packageManager`; that difference is exactly the drift `repo:sync --check` reports.
|
|
147
|
+
|
|
148
|
+
**Refused, not silently repaired:**
|
|
149
|
+
|
|
150
|
+
- `tools.node` or `tools.pnpm` written as a table (e.g. `node = { version = "..." }`) -- `repo:sync` owns these two keys as plain string pins only.
|
|
151
|
+
- `tools.node` pinned below `engines.node`'s floor.
|
|
152
|
+
- A file that fails to parse as TOML.
|
|
153
|
+
|
|
154
|
+
Any other key -- `java`, `[env]`, `[tasks.*]`, an `http:*` archive-tool table -- is left exactly as found.
|
|
155
|
+
|
|
156
|
+
`tooling:check` (part of `pnpm check`) additionally asserts the declared toolchain is actually installed and active: it warns (does not fail) when `mise` is not on `PATH`, and fails when a declared tool is not installed, or when the live `node`/`pnpm` on `PATH` (or `JAVA_HOME`, when `java` is declared) disagrees with the pin -- the fix in every failing case is to activate mise (`eval "$(mise activate bash)"` or `mise exec`) before running checks.
|
|
157
|
+
|
|
158
|
+
Renovate moves the pinned `node` version, but only within its current major -- a `packageRules` entry in the shared `default.json` preset disables major-version updates for `matchManagers: ["mise"], matchPackageNames: ["node"]`, since an exact pin with no upper bound in `engines.node` would otherwise be offered every new major.
|
|
159
|
+
|
|
140
160
|
### packageManager force-bump
|
|
141
161
|
|
|
142
162
|
`repo:sync` rewrites `package.json#packageManager` when an existing value is `pnpm@<N>.x` with `N < 11`, setting it to the tooling's pinned pnpm version (currently `11.1.1`). This is delivered through `repo:sync` rather than Renovate because the mandated `pnpm-workspace.yaml` keys (`blockExoticSubdeps`) require pnpm 11+. Within-major bumps (`pnpm@11.x -> 11.y`) remain Renovate's job; non-pnpm package managers (yarn, npm) are out of scope.
|
|
@@ -501,6 +521,17 @@ Available override fields:
|
|
|
501
521
|
| `detectPackageTypes` | boolean | `true` |
|
|
502
522
|
| `pnpmWorkspace` | `false` | Set to `false` to opt out of `pnpm-workspace.yaml` management |
|
|
503
523
|
|
|
524
|
+
## Environment file
|
|
525
|
+
|
|
526
|
+
Set `BST_ENV_FILE` to the path of an env file and every `bst` command loads it before anything else runs -- a way to feed tokens to the tools from one annotated file without exporting them into your shell:
|
|
527
|
+
|
|
528
|
+
```bash
|
|
529
|
+
# in your shell profile
|
|
530
|
+
export BST_ENV_FILE=/home/you/.secrets.env
|
|
531
|
+
```
|
|
532
|
+
|
|
533
|
+
The file takes `KEY=value` lines, `#` comments, blank lines, and an optional `export ` prefix. A variable already set in the environment always wins over the file, so a container's `-e` or a shell export is never overridden. Unset, no file is touched; set to a file that cannot be read, the command fails before it starts (under `--json`, as the usual `{ok: false}` document). Name the file so it ends in `.env`: the bst-hook then keeps an agent session from reading or writing it while the tools still load it. This is a development convenience -- a production container should receive every variable through `docker run -e` and leave `BST_ENV_FILE` unset.
|
|
534
|
+
|
|
504
535
|
## Debug logging
|
|
505
536
|
|
|
506
537
|
All CLI commands support a `--verbose` flag for detailed debug output. Alternatively, set `TOOLING_DEBUG=true` as an environment variable -- useful in CI workflows:
|