[{"data":1,"prerenderedAt":462},["ShallowReactive",2],{"page:\u002Fdocs\u002F5.x\u002Freference\u002Fcommands\u002Fupdate":3},{"id":4,"title":5,"body":6,"description":444,"extension":445,"frontmatter":446,"heading":5,"meta":453,"navigation":455,"order":450,"path":456,"seo":457,"sitemap":458,"source":459,"stem":460,"__hash__":461},"docs\u002Fdocs\u002F5.x\u002Freference\u002Fcommands\u002Fupdate.md","kubb update",{"type":7,"value":8,"toc":433},"minimark",[9,34,39,42,64,123,126,135,162,165,177,218,221,224,236,240,290,294,341,345,365,375,386,390,424,428],[10,11,12,13,16,17,22,23,26,27,30,31,33],"p",{},"Run ",[14,15,5],"code",{}," to move installed extensions to the version the ",[18,19,21],"a",{"href":20},"\u002Fdocs\u002F5.x\u002Freference\u002Fregistry","Kubb registry"," pins. It shows each installed extension's version change and bump, asks which updates to install, and installs them with your project's package manager. Then it generates from ",[14,24,25],{},"kubb.config.ts"," with the new versions and summarizes the files that changed. With ",[14,28,29],{},"--yes",", it installs every update except majors, unless you name the extension. It does not change ",[14,32,25],{},".",[35,36,38],"h2",{"id":37},"usage","Usage",[10,40,41],{},"Update every installed extension the registry lists:",[43,44,48],"pre",{"language":45,"filename":46,"code":5,"class":47},"shell","Terminal","highlights",[14,49,51],{"class":50},"language-shell",[52,53,56,60],"span",{"class":54,"style":55},"line","display: inline",[52,57,59],{"style":58},"color:#6f42c1;--hls-dark:#b392f0","kubb ",[52,61,63],{"style":62},"color:#24292e;--hls-dark:#e1e4e8","update",[43,65,69],{"language":66,"filename":67,"code":68,"class":47},"text","Output","◇  Checked 3 extensions against the registry\n│  Extension         Current  Latest\n│  @kubb\u002Fplugin-ts   5.0.0    5.2.0       minor\n│  @kubb\u002Fplugin-zod  5.2.0    6.0.0       major · breaking\n│  @kubb\u002Fplugin-msw  5.4.2    up to date\n│\n◆  Select the updates to install\n│  ◼ @kubb\u002Fplugin-ts (5.0.0 → 5.2.0)\n│  ◻ @kubb\u002Fplugin-zod (5.2.0 → 6.0.0)\n│  ↑\u002F↓ to navigate • Space: select • Enter: confirm",[14,70,72,77,78,77,83,77,88,77,93,77,98,77,103,77,108,77,113,77,118],{"class":71},"language-text",[52,73,74],{"class":54,"style":55},[52,75,76],{"style":62},"◇  Checked 3 extensions against the registry","\n",[52,79,80],{"class":54,"style":55},[52,81,82],{"style":62},"│  Extension         Current  Latest",[52,84,85],{"class":54,"style":55},[52,86,87],{"style":62},"│  @kubb\u002Fplugin-ts   5.0.0    5.2.0       minor",[52,89,90],{"class":54,"style":55},[52,91,92],{"style":62},"│  @kubb\u002Fplugin-zod  5.2.0    6.0.0       major · breaking",[52,94,95],{"class":54,"style":55},[52,96,97],{"style":62},"│  @kubb\u002Fplugin-msw  5.4.2    up to date",[52,99,100],{"class":54,"style":55},[52,101,102],{"style":62},"│",[52,104,105],{"class":54,"style":55},[52,106,107],{"style":62},"◆  Select the updates to install",[52,109,110],{"class":54,"style":55},[52,111,112],{"style":62},"│  ◼ @kubb\u002Fplugin-ts (5.0.0 → 5.2.0)",[52,114,115],{"class":54,"style":55},[52,116,117],{"style":62},"│  ◻ @kubb\u002Fplugin-zod (5.2.0 → 6.0.0)",[52,119,120],{"class":54,"style":55},[52,121,122],{"style":62},"│  ↑\u002F↓ to navigate • Space: select • Enter: confirm",[10,124,125],{},"Minor and patch updates start selected. A major starts unselected, since it can break the generated code. The hint is the version change.",[10,127,128,129,131,132,134],{},"After the install, ",[14,130,5],{}," asks whether to regenerate now, since that rewrites the generated files. ",[14,133,29],{}," installs only. The summary starts with the outcome and duration, then lists the packages, the skipped updates, and the file changes:",[43,136,138],{"language":66,"filename":67,"code":137,"class":47},"✓ Update complete  2.16s\n\n  Packages  1 installed with pnpm · 1 skipped\n  Skipped   Plugin @kubb\u002Fplugin-zod 6.0.0  run kubb update plugin-zod later\n  Files     1 added · 1 modified · 0 deleted",[14,139,140,77,145,77,147,77,152,77,157],{"class":71},[52,141,142],{"class":54,"style":55},[52,143,144],{"style":62},"✓ Update complete  2.16s",[52,146],{"class":54,"style":55},[52,148,149],{"class":54,"style":55},[52,150,151],{"style":62},"  Packages  1 installed with pnpm · 1 skipped",[52,153,154],{"class":54,"style":55},[52,155,156],{"style":62},"  Skipped   Plugin @kubb\u002Fplugin-zod 6.0.0  run kubb update plugin-zod later",[52,158,159],{"class":54,"style":55},[52,160,161],{"style":62},"  Files     1 added · 1 modified · 0 deleted",[10,163,164],{},"List the updates without installing them:",[43,166,168],{"language":45,"filename":46,"code":167,"class":47},"kubb update --dry-run",[14,169,170],{"class":50},[52,171,172,174],{"class":54,"style":55},[52,173,59],{"style":58},[52,175,176],{"style":62},"update --dry-run",[43,178,180],{"language":66,"filename":67,"code":179,"class":47},"◇ Checked 2 extensions against the registry\n│  Extension         Current  Latest  \n│  @kubb\u002Fplugin-ts   5.0.0    5.2.0   minor\n│  @kubb\u002Fplugin-zod  5.2.0    6.0.0   major · breaking\n│\n◇ Updates available  138ms\n\nDry run: nothing was installed. Run kubb update to install them.",[14,181,182,77,187,77,192,77,197,77,202,77,206,77,211,77,213],{"class":71},[52,183,184],{"class":54,"style":55},[52,185,186],{"style":62},"◇ Checked 2 extensions against the registry",[52,188,189],{"class":54,"style":55},[52,190,191],{"style":62},"│  Extension         Current  Latest  ",[52,193,194],{"class":54,"style":55},[52,195,196],{"style":62},"│  @kubb\u002Fplugin-ts   5.0.0    5.2.0   minor",[52,198,199],{"class":54,"style":55},[52,200,201],{"style":62},"│  @kubb\u002Fplugin-zod  5.2.0    6.0.0   major · breaking",[52,203,204],{"class":54,"style":55},[52,205,102],{"style":62},[52,207,208],{"class":54,"style":55},[52,209,210],{"style":62},"◇ Updates available  138ms",[52,212],{"class":54,"style":55},[52,214,215],{"class":54,"style":55},[52,216,217],{"style":62},"Dry run: nothing was installed. Run kubb update to install them.",[10,219,220],{},"The preview exits with code 0 when the check succeeds, including when updates are available. It installs no packages and does not regenerate files.",[10,222,223],{},"Install the updates for two extensions without the prompt:",[43,225,227],{"language":45,"filename":46,"code":226,"class":47},"kubb update plugin-zod plugin-ts --yes",[14,228,229],{"class":50},[52,230,231,233],{"class":54,"style":55},[52,232,59],{"style":58},[52,234,235],{"style":62},"update plugin-zod plugin-ts --yes",[35,237,239],{"id":238},"arguments","Arguments",[241,242,243,259],"table",{},[244,245,246],"thead",{},[247,248,249,253,256],"tr",{},[250,251,252],"th",{},"Argument",[250,254,255],{},"Required",[250,257,258],{},"Description",[260,261,262],"tbody",{},[247,263,264,270,275],{},[265,266,267],"td",{},[14,268,269],{},"[ids...]",[265,271,272],{},[14,273,274],{},"false",[265,276,277,278,281,282,285,286,289],{},"Registry ids to update, as ",[14,279,280],{},"\u003Cowner>\u002F\u003Cslug>"," or a bare ",[14,283,284],{},"\u003Cslug>"," for ",[14,287,288],{},"kubb-labs\u002F\u003Cslug>",". Without ids, every installed extension the registry lists is checked.",[35,291,293],{"id":292},"options","Options",[241,295,296,308],{},[244,297,298],{},[247,299,300,303,306],{},[250,301,302],{},"Option",[250,304,305],{},"Default",[250,307,258],{},[260,309,310,324],{},[247,311,312,317,321],{},[265,313,314],{},[14,315,316],{},"--dry-run",[265,318,319],{},[14,320,274],{},[265,322,323],{},"List the available updates without installing them.",[247,325,326,334,338],{},[265,327,328,330,331],{},[14,329,29],{},", ",[14,332,333],{},"-y",[265,335,336],{},[14,337,274],{},[265,339,340],{},"Install every update without asking. A major is only installed when its id is named.",[35,342,344],{"id":343},"which-extensions-it-updates","Which extensions it updates",[10,346,347,349,350,353,354,357,358,361,362,364],{},[14,348,5],{}," checks the registry extensions listed in ",[14,351,352],{},"dependencies"," or ",[14,355,356],{},"devDependencies"," of the ",[14,359,360],{},"package.json"," in the current directory. An extension gets an update when its installed version is older than the pinned one, or when it is not installed. A version newer than the pin is left alone, so ",[14,363,5],{}," never downgrades.",[10,366,367,368,371,372,33],{},"An update that does not support your Kubb or Node.js version is skipped with ",[14,369,370],{},"Skipped \u003Cid>: \u003Creason>",". An extension pinned to a GitHub release installs as ",[14,373,374],{},"github:\u003Cowner>\u002F\u003Crepo>#\u003Ccommit>",[10,376,377,378,381,382,385],{},"An id that matches no installed extension prints ",[14,379,380],{},"\u003Cid> is not installed, or not in the registry."," and exits with code 1. The other ids still update. When nothing is outdated, the summary says ",[14,383,384],{},"Already up to date",". An incompatible update is reported as skipped.",[35,387,389],{"id":388},"environment-variables","Environment variables",[241,391,392,403],{},[244,393,394],{},[247,395,396,399,401],{},[250,397,398],{},"Variable",[250,400,305],{},[250,402,258],{},[260,404,405],{},[247,406,407,412,417],{},[265,408,409],{},[14,410,411],{},"KUBB_REGISTRY",[265,413,414],{},[14,415,416],{},"https:\u002F\u002Fkubb.dev\u002Fregistry",[265,418,419,420,33],{},"Base URL of the registry to read. See ",[18,421,423],{"href":422},"\u002Fdocs\u002F5.x\u002Freference\u002Fregistry#host-your-own-registry","Host your own registry",[35,425,427],{"id":426},"exit-codes","Exit codes",[10,429,430,432],{},[14,431,5],{}," exits with code 1 when an id is invalid or not installed, the registry index cannot be read or is invalid, or the install fails. It exits with code 0 when there is nothing to update and when you cancel at the prompt. A failed generation after installation produces a warning summary that distinguishes installed extensions from failed regeneration and does not change the exit code.",{"title":434,"searchDepth":435,"depth":435,"links":436},"",5,[437,439,440,441,442,443],{"id":37,"depth":438,"text":38},2,{"id":238,"depth":438,"text":239},{"id":292,"depth":438,"text":293},{"id":343,"depth":438,"text":344},{"id":388,"depth":438,"text":389},{"id":426,"depth":438,"text":427},"The update command moves installed Kubb extensions to the version the Kubb extension registry pins, or lists the available updates with --dry-run.","md",{"layout":447,"title":5,"description":444,"outline":448,"order":450,"navigation":451},"doc",[438,449],3,7,{"title":5,"icon":452},"i-iconoir-refresh-double",{"layout":447,"outline":454},[438,449],{"title":5,"icon":452},"\u002Fdocs\u002F5.x\u002Freference\u002Fcommands\u002Fupdate",{"title":5,"description":444},{"loc":456},"kubb-labs\u002Fkubb\u002Fdocs\u002F5.x\u002Freference\u002Fcommands\u002Fupdate.md","docs\u002F5.x\u002Freference\u002Fcommands\u002Fupdate","tXQ4GN8lUS6Qa4ddknu6qG8jDZyj5ppUV1SmSDuJZgs",1793615940825]