[{"data":1,"prerenderedAt":733,"buildId":734},["ShallowReactive",2],{"page:\u002Fdocs\u002F5.x\u002Fcommunity\u002Fcontributing":3},{"id":4,"title":5,"body":6,"description":715,"extension":716,"frontmatter":717,"heading":722,"meta":724,"navigation":726,"order":720,"path":727,"seo":728,"sitemap":729,"source":730,"stem":731,"__hash__":732},"docs\u002Fdocs\u002F5.x\u002Fcommunity\u002Fcontributing.md","Contribute to Kubb - Set up, test, and open a PR",{"type":7,"value":8,"toc":695},"minimark",[9,38,43,108,113,270,274,281,484,488,491,608,612,680,684],[10,11,12,13,18,19,23,24,28,29,18,33,37],"p",{},"Check the open ",[14,15,17],"a",{"href":16},"https:\u002F\u002Fgithub.com\u002Fkubb-labs\u002Fkubb\u002Fissues","issues"," and ",[14,20,22],{"href":21},"https:\u002F\u002Fgithub.com\u002Fkubb-labs\u002Fkubb\u002Fpulls","pull requests"," first. Open an issue before an opinion-driven change. Each repository's ",[25,26,27],"code",{},"CONTRIBUTING.md"," has the full rules: ",[14,30,32],{"href":31},"https:\u002F\u002Fgithub.com\u002Fkubb-labs\u002Fkubb\u002Fblob\u002Fmain\u002FCONTRIBUTING.md","kubb-labs\u002Fkubb",[14,34,36],{"href":35},"https:\u002F\u002Fgithub.com\u002Fkubb-labs\u002Fplugins\u002Fblob\u002Fmain\u002FCONTRIBUTING.md","kubb-labs\u002Fplugins",".",[39,40,42],"h2",{"id":41},"what-lives-where","What lives where",[44,45,46,59],"table",{},[47,48,49],"thead",{},[50,51,52,56],"tr",{},[53,54,55],"th",{},"Repository",[53,57,58],{},"Holds",[60,61,62,83,97],"tbody",{},[50,63,64,70],{},[65,66,67],"td",{},[14,68,32],{"href":69},"https:\u002F\u002Fgithub.com\u002Fkubb-labs\u002Fkubb",[65,71,72,73,18,76,79,80],{},"The ",[25,74,75],{},"kubb",[25,77,78],{},"@kubb\u002F*"," core packages, and these docs in ",[25,81,82],{},"docs\u002F",[50,84,85,90],{},[65,86,87],{},[14,88,36],{"href":89},"https:\u002F\u002Fgithub.com\u002Fkubb-labs\u002Fplugins",[65,91,92,93,96],{},"The official ",[25,94,95],{},"@kubb\u002Fplugin-*"," packages, with a runnable example per plugin",[50,98,99,105],{},[65,100,101],{},[14,102,104],{"href":103},"https:\u002F\u002Fgithub.com\u002Fkubb-labs\u002Fplatform","kubb-labs\u002Fplatform",[65,106,107],{},"The kubb.dev site, its blog, and Kubb Studio",[109,110,112],"h3",{"id":111},"kubb-core","Kubb core",[44,114,115,124],{},[47,116,117],{},[50,118,119,122],{},[53,120,121],{},"Path",[53,123,58],{},[60,125,126,143,156,166,176,189,199,209,221,231,244,257],{},[50,127,128,133],{},[65,129,130],{},[25,131,132],{},"packages\u002Fcore\u002F",[65,134,135,136,139,140],{},"Plugin runtime, build loop, ",[25,137,138],{},"defineExtension",", ",[25,141,142],{},"createKubb",[50,144,145,150],{},[65,146,147],{},[25,148,149],{},"packages\u002Fkit\u002F",[65,151,152,153],{},"Authoring toolkit behind ",[25,154,155],{},"kubb\u002Fkit",[50,157,158,163],{},[65,159,160],{},[25,161,162],{},"packages\u002Fast\u002F",[65,164,165],{},"Universal AST and visitors",[50,167,168,173],{},[65,169,170],{},[25,171,172],{},"packages\u002Fadapter-oas\u002F",[65,174,175],{},"OpenAPI 2.0 and 3.x adapter",[50,177,178,186],{},[65,179,180,139,183],{},[25,181,182],{},"packages\u002Fparser-ts\u002F",[25,184,185],{},"parser-md\u002F",[65,187,188],{},"AST to TypeScript, TSX, and Markdown source",[50,190,191,196],{},[65,192,193],{},[25,194,195],{},"packages\u002Fplugin-barrel\u002F",[65,197,198],{},"Barrel file plugin",[50,200,201,206],{},[65,202,203],{},[25,204,205],{},"packages\u002Frenderer-jsx\u002F",[65,207,208],{},"JSX renderer",[50,210,211,216],{},[65,212,213],{},[25,214,215],{},"packages\u002Fcli\u002F",[65,217,72,218,220],{},[25,219,75],{}," CLI",[50,222,223,228],{},[65,224,225],{},[25,226,227],{},"packages\u002Fmcp\u002F",[65,229,230],{},"MCP server",[50,232,233,238],{},[65,234,235],{},[25,236,237],{},"packages\u002Fstudio\u002F",[65,239,240,241],{},"The Studio connection behind ",[25,242,243],{},"kubb studio",[50,245,246,251],{},[65,247,248],{},[25,249,250],{},"packages\u002Funplugin-kubb\u002F",[65,252,253],{},[14,254,256],{"href":255},"\u002Fdocs\u002F5.x\u002Fintegrations\u002Fbuild-tools","Build tool integrations",[50,258,259,264],{},[65,260,261],{},[25,262,263],{},"packages\u002Fkubb\u002F",[65,265,266,267],{},"The main package: public APIs and ",[25,268,269],{},"defineConfig",[39,271,273],{"id":272},"workflow","Workflow",[10,275,276,277,280],{},"Both repositories need Node.js 22.22 or later, pnpm 11 or later, and Git. Run ",[25,278,279],{},"corepack enable"," to get the pnpm version the repository pins.",[282,283,285,289,341,345,366,372,376,389,393,425,443,447,473,477],"steps",{"level":284},"3",[109,286,288],{"id":287},"_1-fork-and-clone","Fork and clone",[290,291,292,322],"code-group",{},[293,294,298],"pre",{"language":295,"filename":75,"code":296,"class":297},"shell","gh repo fork kubb-labs\u002Fkubb --clone\ncd kubb","highlights",[25,299,301,314,315],{"class":300},"language-shell",[302,303,306,310],"span",{"class":304,"style":305},"line","display: inline",[302,307,309],{"style":308},"color:#6f42c1;--hls-dark:#b392f0","gh ",[302,311,313],{"style":312},"color:#24292e;--hls-dark:#e1e4e8","repo fork kubb-labs\u002Fkubb --clone","\n",[302,316,317,320],{"class":304,"style":305},[302,318,319],{"style":308},"cd ",[302,321,75],{"style":312},[293,323,326],{"language":295,"filename":324,"code":325,"class":297},"plugins","gh repo fork kubb-labs\u002Fplugins --clone\ncd plugins",[25,327,328,314,335],{"class":300},[302,329,330,332],{"class":304,"style":305},[302,331,309],{"style":308},[302,333,334],{"style":312},"repo fork kubb-labs\u002Fplugins --clone",[302,336,337,339],{"class":304,"style":305},[302,338,319],{"style":308},[302,340,324],{"style":312},[109,342,344],{"id":343},"_2-install-dependencies","Install dependencies",[293,346,349],{"language":295,"filename":347,"code":348,"class":297},"Terminal","pnpm install\npnpm build",[25,350,351,314,359],{"class":300},[302,352,353,356],{"class":304,"style":305},[302,354,355],{"style":308},"pnpm ",[302,357,358],{"style":312},"install",[302,360,361,363],{"class":304,"style":305},[302,362,355],{"style":308},[302,364,365],{"style":312},"build",[10,367,368,371],{},[25,369,370],{},"pnpm build"," compiles every package so local packages resolve each other. Rerun it after you change package source.",[109,373,375],{"id":374},"_3-create-a-branch","Create a branch",[293,377,379],{"language":295,"filename":347,"code":378,"class":297},"git checkout -b feat\u002Fyour-feature-name",[25,380,381],{"class":300},[302,382,383,386],{"class":304,"style":305},[302,384,385],{"style":308},"git ",[302,387,388],{"style":312},"checkout -b feat\u002Fyour-feature-name",[109,390,392],{"id":391},"_4-iterate","Iterate",[293,394,396],{"language":295,"filename":347,"code":395,"class":297},"pnpm -F @kubb\u002Fcore start # rebuild one package on change\npnpm vitest run --config .\u002Fconfigs\u002Fvitest.config.ts packages\u002Fcore # test one package",[25,397,398,314,415],{"class":300},[302,399,400,402,405,408,411],{"class":304,"style":305},[302,401,355],{"style":308},[302,403,404],{"style":312},"-F ",[302,406,407],{"style":312},"@",[302,409,410],{"style":312},"kubb\u002Fcore start ",[302,412,414],{"style":413},"color:#6a737d;--hls-dark:#6a737d","# rebuild one package on change",[302,416,417,419,422],{"class":304,"style":305},[302,418,355],{"style":308},[302,420,421],{"style":312},"vitest run --config .\u002Fconfigs\u002Fvitest.config.ts packages\u002Fcore ",[302,423,424],{"style":413},"# test one package",[10,426,427,428,431,432,434,435,438,439,442],{},"Put each test next to its source file. List a new test file in ",[25,429,430],{},"configs\u002Ftest-registry.json",", with one sentence on what it covers. In ",[25,433,36],{},", test a folder such as ",[25,436,437],{},"packages\u002Fplugin-ts",", and run ",[25,440,441],{},"pnpm generate"," after a plugin change.",[109,444,446],{"id":445},"commits-and-changesets","Add a changeset",[10,448,449,450,453,454,456,457,460,461,465,466,469,470,37],{},"Run ",[25,451,452],{},"pnpm changeset"," when the change ships in a published package, including a package's ",[25,455,82],{}," folder, because kubb.dev reads it from the published version. Changes to ",[25,458,459],{},"docs\u002F5.x",", CI, and tests need none. Write ",[14,462,464],{"href":463},"https:\u002F\u002Fwww.conventionalcommits.org\u002F","Conventional Commits",", such as ",[25,467,468],{},"feat:"," or ",[25,471,472],{},"fix:",[109,474,476],{"id":475},"opening-a-pull-request","Open a pull request",[10,478,479,480,483],{},"Push to your fork and open a pull request against ",[25,481,482],{},"main",". Fill in the template, link the issue, and re-request review after each round of changes.",[39,485,487],{"id":486},"quality-gates","Quality gates",[10,489,490],{},"Run these before you push. CI runs them on every pull request that changes code.",[44,492,493,506],{},[47,494,495],{},[50,496,497,500,503],{},[53,498,499],{},"Command",[53,501,502],{},"Checks",[53,504,505],{},"CI job",[60,507,508,520,533,546,559,571,584,596],{},[50,509,510,514,517],{},[65,511,512],{},[25,513,370],{},[65,515,516],{},"Every package builds",[65,518,519],{},"Build",[50,521,522,527,530],{},[65,523,524],{},[25,525,526],{},"pnpm typecheck",[65,528,529],{},"Types in every package",[65,531,532],{},"Typecheck",[50,534,535,540,543],{},[65,536,537],{},[25,538,539],{},"pnpm test",[65,541,542],{},"The Vitest suites",[65,544,545],{},"Tests",[50,547,548,553,556],{},[65,549,550],{},[25,551,552],{},"pnpm lint",[65,554,555],{},"oxlint rules",[65,557,558],{},"Linting",[50,560,561,566,569],{},[65,562,563],{},[25,564,565],{},"pnpm test:registry",[65,567,568],{},"Every test file has a registry entry, and no entry points at a deleted file",[65,570,558],{},[50,572,573,578,581],{},[65,574,575],{},[25,576,577],{},"pnpm format",[65,579,580],{},"oxfmt formatting",[65,582,583],{},"autofix.ci formats the pull request",[50,585,586,591,594],{},[65,587,588],{},[25,589,590],{},"pnpm typecheck:examples",[65,592,593],{},"Plugins only: the examples type-check",[65,595,532],{},[50,597,598,602,605],{},[65,599,600],{},[25,601,441],{},[65,603,604],{},"Plugins only: generates the examples",[65,606,607],{},"Update generated examples, which opens a pull request with the changes",[39,609,611],{"id":610},"kubb-plugins","Write a plugin",[44,613,614,627],{},[47,615,616],{},[50,617,618,621,624],{},[53,619,620],{},"Kind",[53,622,623],{},"Where",[53,625,626],{},"How",[60,628,629,655],{},[50,630,631,634,637],{},[65,632,633],{},"Community plugin",[65,635,636],{},"Your own repository, on npm under a name you own",[65,638,639,643,644,648,649,37],{},[14,640,642],{"href":641},"\u002Fdocs\u002F5.x\u002Ftutorials\u002Fcreating-plugins","Create a Kubb plugin",", then ",[14,645,647],{"href":646},"\u002Fdocs\u002F5.x\u002Fhow-to\u002Fpublish-a-plugin","Publish a plugin",". Copy the layout of ",[14,650,652],{"href":651},"https:\u002F\u002Fgithub.com\u002Fkubb-labs\u002Fplugins\u002Ftree\u002Fmain\u002Fpackages\u002Fplugin-axios",[25,653,654],{},"plugin-axios",[50,656,657,660,669],{},[65,658,659],{},"Official plugin",[65,661,662,665,666],{},[25,663,664],{},"packages\u002Fplugin-\u003Cname>\u002F"," in kubb-labs\u002Fplugins, as ",[25,667,668],{},"@kubb\u002Fplugin-\u003Cname>",[65,670,671,675,676,37],{},[14,672,674],{"href":673},"https:\u002F\u002Fgithub.com\u002Fkubb-labs\u002Fplugins\u002Fissues\u002Fnew\u002Fchoose","Open an issue"," to agree on scope and name, then follow ",[14,677,679],{"href":678},"https:\u002F\u002Fgithub.com\u002Fkubb-labs\u002Fplugins\u002Fblob\u002Fmain\u002FCONTRIBUTING.md#adding-a-plugin","Adding a plugin",[39,681,683],{"id":682},"getting-help","Getting help",[10,685,686,687,690,691,37],{},"Open an ",[14,688,689],{"href":16},"issue"," or ask on ",[14,692,694],{"href":693},"https:\u002F\u002Fdiscord.gg\u002F4dQjA6vrWX","Discord",{"title":696,"searchDepth":697,"depth":697,"links":698},"",5,[699,704,712,713,714],{"id":41,"depth":700,"text":42,"children":701},2,[702],{"id":111,"depth":703,"text":112},3,{"id":272,"depth":700,"text":273,"children":705},[706,707,708,709,710,711],{"id":287,"depth":703,"text":288},{"id":343,"depth":703,"text":344},{"id":374,"depth":703,"text":375},{"id":391,"depth":703,"text":392},{"id":445,"depth":703,"text":446},{"id":475,"depth":703,"text":476},{"id":486,"depth":700,"text":487},{"id":610,"depth":700,"text":611},{"id":682,"depth":700,"text":683},"Find where Kubb code lives, set up the core or plugins repository, pass the quality gates, and open a pull request.","md",{"layout":718,"title":5,"description":715,"outline":719,"order":720,"navigation":721},"doc",[700,703],1,{"title":722,"icon":723},"Contributing","i-iconoir-git-branch",{"layout":718,"outline":725},[700,703],{"title":722,"icon":723},"\u002Fdocs\u002F5.x\u002Fcommunity\u002Fcontributing",{"title":5,"description":715},{"loc":727},"kubb-labs\u002Fkubb\u002Fdocs\u002F5.x\u002Fcommunity\u002Fcontributing.md","docs\u002F5.x\u002Fcommunity\u002Fcontributing","EQpomAeEfvznL_hq0NCvaK88nEXqSWdvyVkD1ELQt2c",1795727672051,"1b64b1eb-29b7-4f90-ad41-6f24721e1669"]