Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 0 additions & 9 deletions .changeset/fast-cli-startup.md

This file was deleted.

5 changes: 0 additions & 5 deletions .changeset/fix-dts-build-ts7.md

This file was deleted.

12 changes: 12 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,17 @@
# politty

## 0.11.5

### Patch Changes

- 3835069: Add Node.js on-disk compile cache (V8 code cache) support for faster warm starts.

- `runMain` now enables the compile cache automatically (Node.js >= 22.8.0; silent no-op otherwise), so dynamically imported modules such as `lazy()` subcommands skip recompilation. Note this is on by default: CLIs built with politty start writing cache files to `${XDG_CACHE_HOME:-$HOME/.cache}/<command name>/node-compile-cache` (the same XDG convention as the shell-completion workers) on end users' machines. `NODE_COMPILE_CACHE` always takes precedence; opt out or override via the new `MainOptions.compileCache` option (`false` | custom directory).
- New dependency-free `politty/compile-cache` subpath exporting `enableCompileCache`, for the bin-shim pattern that caches the whole CLI graph (ESM static imports are compiled before any code runs, so full coverage requires enabling the cache in a minimal shim that loads the real entry with a dynamic import). See "Faster Startup (Compile Cache)" in docs/recipes.md.
- New `politty generate-shim` CLI command (and `generateCompileCacheShim` export) that generates one bin shim per `bin` entry as part of a `postbuild`/`prepack` script. Output paths default to the package's `bin` paths and program names to the `bin` names; `--entry` is repeatable for multi-bin packages (paired in declaration order, or with `--out` paths of the same count) and can be omitted when a conventional built module (`./cli.js`, `./index.js`, ...) sits next to the shim. Refuses to overwrite files it did not generate, and the generated shim starts the CLI without the cache when `politty` is not resolvable at runtime (e.g. fully bundled CLIs) instead of failing.

- 56fdde5: Fix `.d.ts` generation broken by the TypeScript 7 upgrade. TypeScript 7 (tsgo) has no JS compiler API, so rolldown-plugin-dts's default tsc-based DTS generation crashed the build (and the Release workflow). tsdown now generates declarations with the tsgo binary from `@typescript/native-preview`; the emitted declarations are equivalent to the previous tsc output.

## 0.11.4

### Patch Changes
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "politty",
"version": "0.11.4",
"version": "0.11.5",
"description": "A lightweight CLI framework inspired by citty with zod v4 registry integration for type-safe metadata management",
"keywords": [
"argument-parser",
Expand Down
Loading