kubb update
Run kubb update to move installed extensions to the version the Kubb registry pins. It lists the updates, asks for confirmation, and installs them. It does not change kubb.config.ts.
Usage
Update every installed extension the registry lists:
kubb updateList the updates without installing them:
kubb update --checkUpdate two extensions without the confirmation:
kubb update plugin-zod plugin-ts --yesArguments
| Argument | Required | Description |
|---|---|---|
[ids...] | false | Registry ids to update, as <owner>/<slug> or a bare <slug> for kubb-labs/<slug>. Without ids, every installed extension the registry lists is checked. |
Options
| Option | Default | Description |
|---|---|---|
--check | false | List the available updates without installing them. |
--yes, -y | false | Skip the confirmation. |
What it does
- Fetches
<registry>/index.json. Entries that fail validation are skipped. - Matches each entry's
artifact.packageagainst thedependenciesanddevDependenciesinpackage.jsonof the current directory. - Reads the installed version of each match from
node_modules. An entry gets an update when the installed version is older than the pinned one, or when the package is not installed. A version newer than the pin is left alone, sokubb updatenever downgrades. - Checks each update's manifest
compatibilityagainst the running Kubb and Node.js versions. An incompatible update is skipped withSkipped <id>: <reason>. - Prints one line per update,
<package> <installed> -> <pinned>. With--check, it stops here. - Asks
Install <n> updates?unless you pass--yes, then installs every<package>@<version>in one run of the package manager.
An id that matches no installed extension prints <id> is not installed, or not in the registry. and the other ids still update. When nothing is outdated, the CLI prints Every installed extension is up to date.
The package manager is detected the same way as in kubb add.
Environment variables
| Variable | Default | Description |
|---|---|---|
KUBB_REGISTRY | https://kubb.dev/registry | Base URL of the registry to read. See Host your own registry. |
Exit codes
kubb update exits with code 1 when an id is invalid, the registry index cannot be read or is invalid, or the install fails. It exits with code 0 when there is nothing to update, with --check, and when you cancel at the prompt.
See also
kubb add: install an extension from the registrykubb list: show installed extensions and available updates- Extension registry: how a record pins one npm version