mirror of
https://github.com/facebook/docusaurus.git
synced 2025-07-22 19:17:46 +02:00
5 lines
No EOL
32 KiB
JavaScript
5 lines
No EOL
32 KiB
JavaScript
"use strict";(self.webpackChunkwebsite=self.webpackChunkwebsite||[]).push([["37251"],{16688:function(e,n,s){s.d(n,{Z:()=>r});let r={copyButtonCopied:"copyButtonCopied_wDuR",copyButtonIcons:"copyButtonIcons_gMWc",copyButtonIcon:"copyButtonIcon_GXfb",copyButtonSuccessIcon:"copyButtonSuccessIcon_ktUX"}},61475:function(e,n,s){s.d(n,{Z:()=>r});let r={wordWrapButtonIcon:"wordWrapButtonIcon___5r",wordWrapButtonEnabled:"wordWrapButtonEnabled_nam_"}},62081:function(e,n,s){s.d(n,{Z:()=>r});let r={buttonGroup:"buttonGroup_KXnS"}},58683:function(e,n,s){s.d(n,{Z:()=>r});let r={codeBlockContainer:"codeBlockContainer_jDV4"}},18314:function(e,n,s){s.d(n,{Z:()=>r});let r={codeBlock:"codeBlock_Gebt",codeBlockStandalone:"codeBlockStandalone_i_cY",codeBlockLines:"codeBlockLines_FJaf",codeBlockLinesWithNumbering:"codeBlockLinesWithNumbering_FU9Q"}},13112:function(e,n,s){s.d(n,{Z:()=>r});let r={codeBlockContent:"codeBlockContent_cKMj",codeBlockTitle:"codeBlockTitle_U6Q0",codeBlock:"codeBlock_QST6"}},61562:function(e,n,s){s.d(n,{Z:()=>r});let r={codeLine:"codeLine_qRmp",codeLineNumber:"codeLineNumber_dS_J",codeLineContent:"codeLineContent_XF5l"}},43335:function(e,n,s){s.d(n,{Z:()=>r});let r={playgroundContainer:"playgroundContainer_TDLX"}},7512:function(e,n,s){s.d(n,{Z:()=>r});let r={playgroundEditor:"playgroundEditor_uqZ4"}},926:function(e,n,s){s.d(n,{Z:()=>r});let r={playgroundHeader:"playgroundHeader_h_Hu"}},25562:function(e,n,s){s.d(n,{Z:()=>r});let r={playgroundPreview:"playgroundPreview_u2xE"}},98010:function(e,n,s){s.r(n),s.d(n,{assets:()=>l,contentTitle:()=>a,default:()=>h,frontMatter:()=>o,metadata:()=>r,toc:()=>u});var r=s(83442),t=s(85893),i=s(80980),c=s(21143);let o={},a="Release process",l={},u=[{value:"Semantic versioning",id:"semantic-versioning",level:2},{value:"Major versions",id:"major-versions",level:3},{value:"Minor versions",id:"minor-versions",level:3},{value:"Patch versions",id:"patch-versions",level:3},{value:"Versions",id:"versions",level:2},{value:"Public API surface",id:"public-api-surface",level:2},{value:"Core public API",id:"core-public-api",level:3},{value:"Theming public API",id:"theming-public-api",level:3}];function d(e){let n={a:"a",admonition:"admonition",code:"code",h1:"h1",h2:"h2",h3:"h3",header:"header",li:"li",p:"p",strong:"strong",ul:"ul",...(0,i.a)(),...e.components};return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(n.header,{children:(0,t.jsx)(n.h1,{id:"release-process",children:"Release process"})}),"\n",(0,t.jsxs)(n.p,{children:["Let's see how Docusaurus handles ",(0,t.jsx)(n.strong,{children:"versioning, releases and breaking changes"}),"."]}),"\n",(0,t.jsx)(n.admonition,{type:"info",children:(0,t.jsx)(n.p,{children:"This topic is particularly important for highly customized sites that may have difficulties to upgrade."})}),"\n",(0,t.jsx)(n.h2,{id:"semantic-versioning",children:"Semantic versioning"}),"\n",(0,t.jsxs)(n.p,{children:["Docusaurus versioning is based on the ",(0,t.jsx)(n.code,{children:"major.minor.patch"})," scheme and respects ",(0,t.jsx)(n.a,{href:"https://semver.org/",children:"Semantic Versioning"}),"."]}),"\n",(0,t.jsx)(n.p,{children:"Respecting Semantic Versioning is important for multiple reasons:"}),"\n",(0,t.jsxs)(n.ul,{children:["\n",(0,t.jsxs)(n.li,{children:["It ",(0,t.jsx)(n.strong,{children:"guarantees simple minor version upgrades"}),", as long as you only use the ",(0,t.jsx)(n.a,{href:"/community/release-process#public-api-surface",children:"public API"})]}),"\n",(0,t.jsx)(n.li,{children:"It follows front-end ecosystem conventions"}),"\n",(0,t.jsx)(n.li,{children:"A new major version is an opportunity to thoroughly document breaking changes"}),"\n",(0,t.jsx)(n.li,{children:"A new major/minor version is an opportunity to communicate new features through a blog post"}),"\n"]}),"\n",(0,t.jsx)(n.h3,{id:"major-versions",children:"Major versions"}),"\n",(0,t.jsxs)(n.p,{children:["The ",(0,t.jsx)(n.code,{children:"major"})," version number is incremented on ",(0,t.jsx)(n.strong,{children:"every breaking change"}),"."]}),"\n",(0,t.jsx)(n.p,{children:"Whenever a new major version is released, we publish:"}),"\n",(0,t.jsxs)(n.ul,{children:["\n",(0,t.jsxs)(n.li,{children:["a blog post with feature highlights, major bug fixes, ",(0,t.jsx)(n.strong,{children:"breaking changes, and upgrade instructions"}),"."]}),"\n",(0,t.jsx)(n.li,{children:"an exhaustive changelog entry"}),"\n"]}),"\n",(0,t.jsx)(n.admonition,{type:"tip",children:(0,t.jsxs)(n.p,{children:["Read our ",(0,t.jsx)(n.a,{href:"#public-api-surface",children:"public API surface"})," section to clearly understand what we consider as a breaking change."]})}),"\n",(0,t.jsx)(n.h3,{id:"minor-versions",children:"Minor versions"}),"\n",(0,t.jsxs)(n.p,{children:["The ",(0,t.jsx)(n.code,{children:"minor"})," version number is incremented on every significant retro-compatible change."]}),"\n",(0,t.jsx)(n.p,{children:"Whenever a new minor version is released, we publish:"}),"\n",(0,t.jsxs)(n.ul,{children:["\n",(0,t.jsx)(n.li,{children:"a blog post with a list of feature highlights and major bug fixes"}),"\n",(0,t.jsx)(n.li,{children:"an exhaustive changelog entry"}),"\n"]}),"\n",(0,t.jsx)(n.admonition,{type:"tip",children:(0,t.jsxs)(n.p,{children:["If you only use our ",(0,t.jsx)(n.a,{href:"#public-api-surface",children:"public API surface"}),", you should be able to upgrade in no time!"]})}),"\n",(0,t.jsx)(n.h3,{id:"patch-versions",children:"Patch versions"}),"\n",(0,t.jsxs)(n.p,{children:["The ",(0,t.jsx)(n.code,{children:"patch"})," version number is incremented on bugfixes releases."]}),"\n",(0,t.jsx)(n.p,{children:"Whenever a new patch version is released, we publish:"}),"\n",(0,t.jsxs)(n.ul,{children:["\n",(0,t.jsx)(n.li,{children:"an exhaustive changelog entry"}),"\n"]}),"\n",(0,t.jsx)(n.h2,{id:"versions",children:"Versions"}),"\n","\n",(0,t.jsx)(n.p,{children:"The Docusaurus team uses a simple development process and only works on a single major version and a single Git branch at a same time:"}),"\n",(0,t.jsxs)(n.ul,{children:["\n",(0,t.jsxs)(n.li,{children:[(0,t.jsxs)(n.strong,{children:["Docusaurus ",c._q]}),": the ",(0,t.jsx)(n.strong,{children:"stable"})," version, on the ",(0,t.jsx)(c.FI,{})," branch."]}),"\n"]}),"\n",(0,t.jsxs)(n.admonition,{title:"How we will ship the next version",type:"note",children:[(0,t.jsxs)(n.p,{children:["Once we are ready ship ",(0,t.jsxs)(n.strong,{children:["Docusaurus ",c._q+1]}),", we will:"]}),(0,t.jsxs)(n.ul,{children:["\n",(0,t.jsxs)(n.li,{children:["create a ",(0,t.jsx)(c.Zl,{})," branch"]}),"\n",(0,t.jsxs)(n.li,{children:["merge breaking changes on the ",(0,t.jsx)(c.FI,{})," branch"]}),"\n",(0,t.jsxs)(n.li,{children:["release that new version directly from the ",(0,t.jsx)(c.FI,{})," branch"]}),"\n"]})]}),"\n",(0,t.jsxs)(n.admonition,{title:"Security fixes policy",type:"warning",children:[(0,t.jsxs)(n.p,{children:["After a new stable version has been released, the former stable version will continue to receive support for ",(0,t.jsx)(n.strong,{children:"major security issues"})," for ",(0,t.jsx)(n.strong,{children:"3 months"}),"."]}),(0,t.jsxs)(n.p,{children:["In practice, we will backport security fixes to the ",(0,t.jsx)(c.Zl,{})," branch. Otherwise, all features will be frozen and non-critical bugs will not be fixed."]}),(0,t.jsx)(n.p,{children:"It is recommended to upgrade within that time frame to the new stable version."})]}),"\n",(0,t.jsx)(n.h2,{id:"public-api-surface",children:"Public API surface"}),"\n",(0,t.jsxs)(n.p,{children:["Docusaurus commits to respecting Semantic Versioning. This means that whenever changes occur in Docusaurus public APIs and break backward compatibility, we will increment the ",(0,t.jsx)(n.code,{children:"major"})," version number."]}),"\n",(0,t.jsx)(n.admonition,{type:"tip",children:(0,t.jsxs)(n.p,{children:["Docusaurus guarantees public API retro-compatibility across ",(0,t.jsx)(n.code,{children:"minor"})," versions. Unless you use internal APIs, ",(0,t.jsx)(n.code,{children:"minor"})," version upgrades should be easy."]})}),"\n",(0,t.jsx)(n.p,{children:"We will outline what accounts as the public API surface."}),"\n",(0,t.jsx)(n.h3,{id:"core-public-api",children:"Core public API"}),"\n",(0,t.jsx)(n.p,{children:"\u2705 Our public API includes:"}),"\n",(0,t.jsxs)(n.ul,{children:["\n",(0,t.jsx)(n.li,{children:"Docusaurus config"}),"\n",(0,t.jsx)(n.li,{children:"Docusaurus client APIs"}),"\n",(0,t.jsx)(n.li,{children:"Docusaurus CLI"}),"\n",(0,t.jsx)(n.li,{children:"Preset options"}),"\n",(0,t.jsx)(n.li,{children:"Plugin options"}),"\n",(0,t.jsx)(n.li,{children:"Plugin lifecycle APIs"}),"\n",(0,t.jsx)(n.li,{children:"Theme config"}),"\n",(0,t.jsx)(n.li,{children:"Core plugins route component props"}),"\n",(0,t.jsxs)(n.li,{children:[(0,t.jsx)(n.code,{children:"@docusaurus/types"})," TypeScript types","\n",(0,t.jsxs)(n.ul,{children:["\n",(0,t.jsx)(n.li,{children:"We still retain the freedom to make types stricter (which may break type-checking)."}),"\n"]}),"\n"]}),"\n"]}),"\n",(0,t.jsxs)(n.p,{children:["\u274C Our public API ",(0,t.jsx)(n.strong,{children:"excludes"}),":"]}),"\n",(0,t.jsxs)(n.ul,{children:["\n",(0,t.jsxs)(n.li,{children:["Docusaurus config ",(0,t.jsx)(n.code,{children:"future"})]}),"\n",(0,t.jsxs)(n.li,{children:["All features prefixed by ",(0,t.jsx)(n.code,{children:"experimental_"})," or ",(0,t.jsx)(n.code,{children:"unstable_"})]}),"\n",(0,t.jsxs)(n.li,{children:["All features prefixed by ",(0,t.jsx)(n.code,{children:"v<MajorVersion>_"})," (",(0,t.jsx)(n.code,{children:"v6_"})," ",(0,t.jsx)(n.code,{children:"v7_"}),", etc.)"]}),"\n"]}),"\n",(0,t.jsx)(n.admonition,{type:"tip",children:(0,t.jsx)(n.p,{children:"For non-theme APIs, any documented API is considered public (and will be stable); any undocumented API is considered internal."})}),"\n",(0,t.jsxs)(n.p,{children:['An API being "stable" means if you increment the patch or minor version of your Docusaurus installation without any other change, running ',(0,t.jsx)(n.code,{children:"docusaurus start"})," or ",(0,t.jsx)(n.code,{children:"docusaurus build"})," should not throw an error."]}),"\n",(0,t.jsx)(n.h3,{id:"theming-public-api",children:"Theming public API"}),"\n",(0,t.jsx)(n.p,{children:"Docusaurus has a very flexible theming system:"}),"\n",(0,t.jsxs)(n.ul,{children:["\n",(0,t.jsx)(n.li,{children:"You can use custom CSS"}),"\n",(0,t.jsxs)(n.li,{children:["You can ",(0,t.jsx)(n.a,{href:"/docs/swizzling",children:"swizzle"})," any React theme component"]}),"\n"]}),"\n",(0,t.jsx)(n.p,{children:"This system also implicitly creates a very large API surface. To be able to move fast and improve Docusaurus, we can't guarantee retro-compatibility."}),"\n",(0,t.jsx)(n.p,{children:"\u2705 Our public theming API includes:"}),"\n",(0,t.jsxs)(n.ul,{children:["\n",(0,t.jsx)(n.li,{children:(0,t.jsx)(n.a,{href:"/docs/styling-layout#theme-class-names",children:"Theme class names"})}),"\n",(0,t.jsxs)(n.li,{children:[(0,t.jsx)(n.a,{href:"/docs/styling-layout#styling-your-site-with-infima",children:"Infima"})," class names and CSS variables"]}),"\n",(0,t.jsxs)(n.li,{children:["React components that are ",(0,t.jsx)(n.a,{href:"/docs/swizzling#what-is-safe-to-swizzle",children:"safe to swizzle"})]}),"\n",(0,t.jsx)(n.li,{children:"The theme user experience"}),"\n",(0,t.jsx)(n.li,{children:"Browser support"}),"\n"]}),"\n",(0,t.jsxs)(n.admonition,{type:"tip",children:[(0,t.jsx)(n.p,{children:"You may not be able to achieve your site customization through this public API."}),(0,t.jsxs)(n.p,{children:["In this case, please ",(0,t.jsx)(n.a,{href:"https://github.com/facebook/docusaurus/discussions/5468",children:"report your customization use case"})," and we will figure out how to expand our public API."]})]}),"\n",(0,t.jsxs)(n.p,{children:["\u274C Our public theming API ",(0,t.jsx)(n.strong,{children:"excludes"}),":"]}),"\n",(0,t.jsxs)(n.ul,{children:["\n",(0,t.jsx)(n.li,{children:"The DOM structure"}),"\n",(0,t.jsxs)(n.li,{children:["CSS module class names with a hash suffix (usually targeted with ",(0,t.jsx)(n.code,{children:"[class*='myClassName']"})," selectors)"]}),"\n",(0,t.jsxs)(n.li,{children:["React components that are ",(0,t.jsx)(n.a,{href:"/docs/swizzling#what-is-safe-to-swizzle",children:"unsafe or forbidden to swizzle"})]}),"\n",(0,t.jsxs)(n.li,{children:["React components that import from ",(0,t.jsx)(n.code,{children:"@docusaurus/theme-common/internal"})]}),"\n",(0,t.jsx)(n.li,{children:"The exact visual appearance of the theme"}),"\n"]}),"\n",(0,t.jsxs)(n.admonition,{type:"note",children:[(0,t.jsxs)(n.p,{children:["When ",(0,t.jsx)(n.a,{href:"/docs/swizzling",children:"swizzling"})," safe components, you might encounter components that import undocumented APIs from ",(0,t.jsx)(n.code,{children:"@docusaurus/theme-common"})," (without the ",(0,t.jsx)(n.code,{children:"/internal"})," subpath)."]}),(0,t.jsx)(n.p,{children:'We still maintain retro-compatibility on those APIs (hence they are marked as "safe"), but we don\'t encourage a direct usage.'})]})]})}function h(e={}){let{wrapper:n}={...(0,i.a)(),...e.components};return n?(0,t.jsx)(n,{...e,children:(0,t.jsx)(d,{...e})}):d(e)}},5343:function(e,n,s){s.d(n,{Z:()=>i});var r=s(85893);s(67294);var t=s(90496);function i(e){let{className:n,...s}=e;return(0,r.jsx)("button",{type:"button",...s,className:(0,t.Z)("clean-btn",n)})}},2556:function(e,n,s){s.d(n,{Z:()=>m});var r=s(85893),t=s(67294),i=s(90496),c=s(44771),o=s(77827),a=s(88568),l=s(5343),u=s(31660),d=s(87545),h=s(16688);function m(e){let{className:n}=e,{copyCode:s,isCopied:m}=function(){let{metadata:{code:e}}=(0,a.LS)(),[n,s]=(0,t.useState)(!1),r=(0,t.useRef)(void 0),i=(0,t.useCallback)(()=>{(0,c.Z)(e),s(!0),r.current=window.setTimeout(()=>{s(!1)},1e3)},[e]);return(0,t.useEffect)(()=>()=>window.clearTimeout(r.current),[]),{copyCode:i,isCopied:n}}();return(0,r.jsx)(l.Z,{"aria-label":m?(0,o.I)({id:"theme.CodeBlock.copied",message:"Copied",description:"The copied button label on code blocks"}):(0,o.I)({id:"theme.CodeBlock.copyButtonAriaLabel",message:"Copy code to clipboard",description:"The ARIA label for copy code blocks button"}),title:(0,o.I)({id:"theme.CodeBlock.copy",message:"Copy",description:"The copy button label on code blocks"}),className:(0,i.Z)(n,h.Z.copyButton,m&&h.Z.copyButtonCopied),onClick:s,children:(0,r.jsxs)("span",{className:h.Z.copyButtonIcons,"aria-hidden":"true",children:[(0,r.jsx)(u.Z,{className:h.Z.copyButtonIcon}),(0,r.jsx)(d.Z,{className:h.Z.copyButtonSuccessIcon})]})})}},93757:function(e,n,s){s.d(n,{Z:()=>u});var r=s(85893);s(67294);var t=s(90496),i=s(77827),c=s(88568),o=s(5343),a=s(67379),l=s(61475);function u(e){let{className:n}=e,{wordWrap:s}=(0,c.LS)();if(!(s.isEnabled||s.isCodeScrollable))return!1;let u=(0,i.I)({id:"theme.CodeBlock.wordWrapToggle",message:"Toggle word wrap",description:"The title attribute for toggle word wrapping button of code block lines"});return(0,r.jsx)(o.Z,{onClick:()=>s.toggle(),className:(0,t.Z)(n,s.isEnabled&&l.Z.wordWrapButtonEnabled),"aria-label":u,title:u,children:(0,r.jsx)(a.Z,{className:l.Z.wordWrapButtonIcon,"aria-hidden":"true"})})}},37457:function(e,n,s){s.d(n,{Z:()=>l});var r=s(85893);s(67294);var t=s(90496),i=s(56497),c=s(2556),o=s(93757),a=s(62081);function l(e){let{className:n}=e;return(0,r.jsx)(i.Z,{children:()=>(0,r.jsxs)("div",{className:(0,t.Z)(n,a.Z.buttonGroup),children:[(0,r.jsx)(o.Z,{}),(0,r.jsx)(c.Z,{})]})})}},62302:function(e,n,s){s.d(n,{Z:()=>l});var r=s(85893);s(67294);var t=s(90496),i=s(10099),c=s(55951),o=s(88568),a=s(58683);function l(e){let{as:n,...s}=e,l=(0,i.p)(),u=(0,o.QC)(l);return(0,r.jsx)(n,{...s,style:u,className:(0,t.Z)(s.className,a.Z.codeBlockContainer,c.k.common.codeBlock)})}},93002:function(e,n,s){s.d(n,{Z:()=>o});var r=s(85893);s(67294);var t=s(90496),i=s(62302),c=s(18314);function o(e){let{children:n,className:s}=e;return(0,r.jsx)(i.Z,{as:"pre",tabIndex:0,className:(0,t.Z)(c.Z.codeBlockStandalone,"thin-scrollbar",s),children:(0,r.jsx)("code",{className:c.Z.codeBlockLines,children:n})})}},97061:function(e,n,s){s.d(n,{Z:()=>a});var r=s(85893);s(67294);var t=s(26378),i=s(88568),c=s(63461),o=s(65802);function a(e){let n=function(e){let{prism:n}=(0,t.L)();return(0,i.MA)({code:e.children,className:e.className,metastring:e.metastring,magicComments:n.magicComments,defaultLanguage:n.defaultLanguage,language:e.language,title:e.title,showLineNumbers:e.showLineNumbers})}(e),s=(0,c.F)();return(0,r.jsx)(i.EF,{metadata:n,wordWrap:s,children:(0,r.jsx)(o.Z,{})})}},26965:function(e,n,s){s.d(n,{Z:()=>m});var r=s(85893),t=s(67294),i=s(90496),c=s(88568),o=s(10099),a=s(7316),l=s(32028),u=s(18314);let d=t.forwardRef((e,n)=>(0,r.jsx)("pre",{ref:n,tabIndex:0,...e,className:(0,i.Z)(e.className,u.Z.codeBlock,"thin-scrollbar")}));function h(e){let{metadata:n}=(0,c.LS)();return(0,r.jsx)("code",{...e,className:(0,i.Z)(e.className,u.Z.codeBlockLines,void 0!==n.lineNumbersStart&&u.Z.codeBlockLinesWithNumbering),style:{...e.style,counterReset:void 0===n.lineNumbersStart?void 0:`line-count ${n.lineNumbersStart-1}`}})}function m(e){let{className:n}=e,{metadata:s,wordWrap:t}=(0,c.LS)(),u=(0,o.p)(),{code:m,language:p,lineNumbersStart:x,lineClassNames:f}=s;return(0,r.jsx)(a.y$,{theme:u,code:m,language:p,children:e=>{let{className:s,style:c,tokens:o,getLineProps:a,getTokenProps:u}=e;return(0,r.jsx)(d,{ref:t.codeBlockRef,className:(0,i.Z)(n,s),style:c,children:(0,r.jsx)(h,{children:o.map((e,n)=>(0,r.jsx)(l.Z,{line:e,getLineProps:a,getTokenProps:u,classNames:f[n],showLineNumbers:void 0!==x},n))})})}})}},65802:function(e,n,s){s.d(n,{Z:()=>d});var r=s(85893);s(67294);var t=s(90496),i=s(88568),c=s(62302),o=s(923),a=s(26965),l=s(37457),u=s(13112);function d(e){let{className:n}=e,{metadata:s}=(0,i.LS)();return(0,r.jsxs)(c.Z,{as:"div",className:(0,t.Z)(n,s.className),children:[s.title&&(0,r.jsx)("div",{className:u.Z.codeBlockTitle,children:(0,r.jsx)(o.Z,{children:s.title})}),(0,r.jsxs)("div",{className:u.Z.codeBlockContent,children:[(0,r.jsx)(a.Z,{}),(0,r.jsx)(l.Z,{})]})]})}},76458:function(e,n,s){s.d(n,{Z:()=>t});var r=s(85893);function t(e){let{line:n,token:s,...t}=e;return(0,r.jsx)("span",{...t})}s(67294)},32028:function(e,n,s){s.d(n,{Z:()=>o});var r=s(85893);s(67294);var t=s(90496),i=s(76458),c=s(61562);function o(e){let{line:n,classNames:s,showLineNumbers:o,getLineProps:a,getTokenProps:l}=e,u=function(e){let n=1===e.length&&"\n"===e[0].content?e[0]:void 0;return n?[{...n,content:""}]:e}(n),d=a({line:u,className:(0,t.Z)(s,o&&c.Z.codeLine)}),h=u.map((e,n)=>{let s=l({token:e});return(0,r.jsx)(i.Z,{...s,line:u,token:e,children:s.children},n)});return(0,r.jsxs)("span",{...d,children:[o?(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)("span",{className:c.Z.codeLineNumber}),(0,r.jsx)("span",{className:c.Z.codeLineContent,children:h})]}):h,(0,r.jsx)("br",{})]})}},923:function(e,n,s){s.d(n,{Z:()=>r});function r(e){let{children:n}=e;return n}},8110:function(e,n,s){s.d(n,{Z:()=>a});var r=s(85893),t=s(67294),i=s(71607),c=s(93002),o=s(97061);function a(e){let{children:n,...s}=e,a=(0,i.Z)(),l=t.Children.toArray(n).some(e=>(0,t.isValidElement)(e))?n:Array.isArray(n)?n.join(""):n,u="string"==typeof l?o.Z:c.Z;return(0,r.jsx)(u,{...s,children:l},String(a))}},31660:function(e,n,s){s.d(n,{Z:()=>t});var r=s(85893);function t(e){return(0,r.jsx)("svg",{viewBox:"0 0 24 24",...e,children:(0,r.jsx)("path",{fill:"currentColor",d:"M19,21H8V7H19M19,5H8A2,2 0 0,0 6,7V21A2,2 0 0,0 8,23H19A2,2 0 0,0 21,21V7A2,2 0 0,0 19,5M16,1H4A2,2 0 0,0 2,3V17H4V3H16V1Z"})})}s(67294)},87545:function(e,n,s){s.d(n,{Z:()=>t});var r=s(85893);function t(e){return(0,r.jsx)("svg",{viewBox:"0 0 24 24",...e,children:(0,r.jsx)("path",{fill:"currentColor",d:"M21,7L9,19L3.5,13.5L4.91,12.09L9,16.17L19.59,5.59L21,7Z"})})}s(67294)},67379:function(e,n,s){s.d(n,{Z:()=>t});var r=s(85893);function t(e){return(0,r.jsx)("svg",{viewBox:"0 0 24 24",...e,children:(0,r.jsx)("path",{fill:"currentColor",d:"M4 19h6v-2H4v2zM20 5H4v2h16V5zm-3 6H4v2h13.25c1.1 0 2 .9 2 2s-.9 2-2 2H15v-2l-3 3l3 3v-2h2c2.21 0 4-1.79 4-4s-1.79-4-4-4z"})})}s(67294)},63461:function(e,n,s){s.d(n,{F:()=>i});var r=s(67294),t=s(9219);function i(){let[e,n]=(0,r.useState)(!1),[s,i]=(0,r.useState)(!1),c=(0,r.useRef)(null),o=(0,r.useCallback)(()=>{let s=c.current.querySelector("code");e?s.removeAttribute("style"):(s.style.whiteSpace="pre-wrap",s.style.overflowWrap="anywhere"),n(e=>!e)},[c,e]),a=(0,r.useCallback)(()=>{let{scrollWidth:e,clientWidth:n}=c.current;i(e>n||c.current.querySelector("code").hasAttribute("style"))},[c]),[l,u]=(0,r.useState)(),d=(0,r.useCallback)(()=>{u(c.current?.closest("[role=tabpanel][hidden]"))},[c,u]);return(0,r.useEffect)(()=>{d()},[d]),(0,t.I)(l,e=>{e.forEach(e=>{"attributes"===e.type&&"hidden"===e.attributeName&&(a(),d())})},{attributes:!0,characterData:!1,childList:!1,subtree:!1}),(0,r.useEffect)(()=>{a()},[e,a]),(0,r.useEffect)(()=>(window.addEventListener("resize",a,{passive:!0}),()=>{window.removeEventListener("resize",a)}),[a]),{codeBlockRef:c,isEnabled:e,isCodeScrollable:s,toggle:o}}},9219:function(e,n,s){s.d(n,{I:()=>c});var r=s(67294),t=s(50923);let i={attributes:!0,characterData:!0,childList:!0,subtree:!0};function c(e,n){let s=arguments.length>2&&void 0!==arguments[2]?arguments[2]:i,c=(0,t.zX)(n),o=(0,t.Ql)(s);(0,r.useEffect)(()=>{let n=new MutationObserver(c);return e&&n.observe(e,o),()=>n.disconnect()},[e,c,o])}},10099:function(e,n,s){s.d(n,{p:()=>i});var r=s(45245),t=s(26378);function i(){let{prism:e}=(0,t.L)(),{colorMode:n}=(0,r.I)(),s=e.theme,i=e.darkTheme||s;return"dark"===n?i:s}},88568:function(e,n,s){s.d(n,{EF:()=>g,LS:()=>b,MA:()=>x,QC:()=>f});var r=s(85893),t=s(67294),i=s(90496),c=s(6324),o=s.n(c),a=s(50923);let l=/title=(?<quote>["'])(?<title>.*?)\1/,u=/\{(?<range>[\d,-]+)\}/,d={js:{start:"\\/\\/",end:""},jsBlock:{start:"\\/\\*",end:"\\*\\/"},jsx:{start:"\\{\\s*\\/\\*",end:"\\*\\/\\s*\\}"},bash:{start:"#",end:""},html:{start:"\x3c!--",end:"--\x3e"}},h={...d,lua:{start:"--",end:""},wasm:{start:"\\;\\;",end:""},tex:{start:"%",end:""},vb:{start:"['\u2018\u2019]",end:""},vbnet:{start:"(?:_\\s*)?['\u2018\u2019]",end:""},rem:{start:"[Rr][Ee][Mm]\\b",end:""},f90:{start:"!",end:""},ml:{start:"\\(\\*",end:"\\*\\)"},cobol:{start:"\\*>",end:""}},m=Object.keys(d);function p(e,n){let s=e.map(e=>{let{start:s,end:r}=h[e];return`(?:${s}\\s*(${n.flatMap(e=>[e.line,e.block?.start,e.block?.end].filter(Boolean)).join("|")})\\s*${r})`}).join("|");return RegExp(`^\\s*(?:${s})\\s*$`)}function x(e){var n,s,r;let t=(s=(n={language:e.language,defaultLanguage:e.defaultLanguage,className:e.className}).language??function(e){if(!e)return;let n=e.split(" ").find(e=>e.startsWith("language-"));return n?.replace(/language-/,"")}(n.className)??n.defaultLanguage,s?.toLowerCase()??"text"),{lineClassNames:c,code:a}=function(e,n){let s=e.replace(/\r?\n$/,"");return function(e,n){let{metastring:s,magicComments:r}=n;if(s&&u.test(s)){let n=s.match(u).groups.range;if(0===r.length)throw Error(`A highlight range has been given in code block's metastring (\`\`\` ${s}), but no magic comment config is available. Docusaurus applies the first magic comment entry's className for metastring ranges.`);let t=r[0].className;return{lineClassNames:Object.fromEntries(o()(n).filter(e=>e>0).map(e=>[e-1,[t]])),code:e}}return null}(s,{...n})??function(e,n){let{language:s,magicComments:r}=n;if(void 0===s)return{lineClassNames:{},code:e};let t=function(e,n){switch(e){case"js":case"javascript":case"ts":case"typescript":return p(["js","jsBlock"],n);case"jsx":case"tsx":return p(["js","jsBlock","jsx"],n);case"html":return p(["js","jsBlock","html"],n);case"python":case"py":case"bash":return p(["bash"],n);case"markdown":case"md":return p(["html","jsx","bash"],n);case"tex":case"latex":case"matlab":return p(["tex"],n);case"lua":case"haskell":return p(["lua"],n);case"sql":return p(["lua","jsBlock"],n);case"wasm":return p(["wasm"],n);case"vb":case"vba":case"visual-basic":return p(["vb","rem"],n);case"vbnet":return p(["vbnet","rem"],n);case"batch":return p(["rem"],n);case"basic":return p(["rem","f90"],n);case"fsharp":return p(["js","ml"],n);case"ocaml":case"sml":return p(["ml"],n);case"fortran":return p(["f90"],n);case"cobol":return p(["cobol"],n);default:return p(m,n)}}(s,r),i=e.split(/\r?\n/),c=Object.fromEntries(r.map(e=>[e.className,{start:0,range:""}])),a=Object.fromEntries(r.filter(e=>e.line).map(e=>{let{className:n,line:s}=e;return[s,n]})),l=Object.fromEntries(r.filter(e=>e.block).map(e=>{let{className:n,block:s}=e;return[s.start,n]})),u=Object.fromEntries(r.filter(e=>e.block).map(e=>{let{className:n,block:s}=e;return[s.end,n]}));for(let e=0;e<i.length;){let n=i[e].match(t);if(!n){e+=1;continue}let s=n.slice(1).find(e=>void 0!==e);a[s]?c[a[s]].range+=`${e},`:l[s]?c[l[s]].start=e:u[s]&&(c[u[s]].range+=`${c[u[s]].start}-${e-1},`),i.splice(e,1)}let d={};return Object.entries(c).forEach(e=>{let[n,{range:s}]=e;o()(s).forEach(e=>{d[e]??=[],d[e].push(n)})}),{code:i.join("\n"),lineClassNames:d}}(s,{...n})}(e.code,{metastring:e.metastring,magicComments:e.magicComments,language:t}),d=function(e){let{className:n,language:s}=e;return(0,i.Z)(n,s&&!n?.includes(`language-${s}`)&&`language-${s}`)}({className:e.className,language:t}),h=(r=e.metastring,(r?.match(l)?.groups.title??"")||e.title),x=function(e){let{showLineNumbers:n,metastring:s}=e;if("boolean"==typeof n)return n?1:void 0;if("number"==typeof n)return n;let r=s?.split(" ").find(e=>e.startsWith("showLineNumbers"));if(r)return r.startsWith("showLineNumbers=")?parseInt(r.replace("showLineNumbers=",""),10):1}({showLineNumbers:e.showLineNumbers,metastring:e.metastring});return{codeInput:e.code,code:a,className:d,language:t,title:h,lineNumbersStart:x,lineClassNames:c}}function f(e){let n={color:"--prism-color",backgroundColor:"--prism-background-color"},s={};return Object.entries(e.plain).forEach(e=>{let[r,t]=e,i=n[r];i&&"string"==typeof t&&(s[i]=t)}),s}let j=(0,t.createContext)(null);function g(e){let{metadata:n,wordWrap:s,children:i}=e,c=(0,t.useMemo)(()=>({metadata:n,wordWrap:s}),[n,s]);return(0,r.jsx)(j.Provider,{value:c,children:i})}function b(){let e=(0,t.useContext)(j);if(null===e)throw new a.i6("CodeBlockContextProvider");return e}},5626:function(e,n,s){s.d(n,{Z:()=>c});var r=s(85893);s(67294);var t=s(8110),i=s(80483);function c(e){return e.live?(0,r.jsx)(i.Z,{...e}):(0,r.jsx)(t.Z,{...e})}},80483:function(e,n,s){s.d(n,{Z:()=>c});var r=s(85893);s(67294);var t=s(35010),i=s(62529);function c(e){return(0,r.jsx)(t.Z,{scope:i.Z,...e})}},57829:function(e,n,s){s.d(n,{Z:()=>i});var r=s(85893);s(67294);var t=s(43335);function i(e){let{children:n}=e;return(0,r.jsx)("div",{className:t.Z.playgroundContainer,children:n})}},49522:function(e,n,s){s.d(n,{Z:()=>l});var r=s(85893);s(67294);var t=s(62905),i=s(71607),c=s(77827),o=s(83372),a=s(7512);function l(){let e=(0,i.Z)();return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(o.Z,{children:(0,r.jsx)(c.Z,{id:"theme.Playground.liveEditor",description:"The live editor label of the live codeblocks",children:"Live Editor"})}),(0,r.jsx)(t.uz,{className:a.Z.playgroundEditor},String(e))]})}},83372:function(e,n,s){s.d(n,{Z:()=>c});var r=s(85893);s(67294);var t=s(90496),i=s(926);function c(e){let{children:n}=e;return(0,r.jsx)("div",{className:(0,t.Z)(i.Z.playgroundHeader),children:n})}},45188:function(e,n,s){s.d(n,{Z:()=>o});var r=s(85893);s(67294);var t=s(26378),i=s(67191),c=s(49522);function o(){let{playgroundPosition:e}=(0,t.L)().liveCodeBlock;return(0,r.jsx)(r.Fragment,{children:"top"===e?(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(i.Z,{}),(0,r.jsx)(c.Z,{})]}):(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(c.Z,{}),(0,r.jsx)(i.Z,{})]})})}},67191:function(e,n,s){s.d(n,{Z:()=>m});var r=s(85893);s(67294);var t=s(62905),i=s(56497),c=s(12565),o=s(83176),a=s(77827),l=s(83372),u=s(25562);function d(){return(0,r.jsx)("div",{children:"Loading..."})}function h(){return(0,r.jsx)(i.Z,{fallback:(0,r.jsx)(d,{}),children:()=>(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(o.Z,{fallback:e=>(0,r.jsx)(c.Ac,{...e}),children:(0,r.jsx)(t.i5,{})}),(0,r.jsx)(t.IF,{})]})})}function m(){return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(l.Z,{children:(0,r.jsx)(a.Z,{id:"theme.Playground.result",description:"The result label of the live codeblocks",children:"Result"})}),(0,r.jsx)("div",{className:u.Z.playgroundPreview,children:(0,r.jsx)(h,{})})]})}},9002:function(e,n,s){s.d(n,{Z:()=>o});var r=s(85893);s(67294);var t=s(62905),i=s(10099);let c=e=>`${e};`;function o(e){let{code:n,children:s,...o}=e,a=(0,i.p)(),l=o.metastring?.includes("noInline")??!1;return(0,r.jsx)(t.nu,{noInline:l,theme:a,...o,code:n?.replace(/\n$/,""),transformCode:o.transformCode??c,children:s})}},35010:function(e,n,s){s.d(n,{Z:()=>o});var r=s(85893);s(67294);var t=s(9002),i=s(57829),c=s(45188);function o(e){let{children:n,transformCode:s,...o}=e;return(0,r.jsx)(i.Z,{children:(0,r.jsx)(t.Z,{code:n,...o,children:(0,r.jsx)(c.Z,{})})})}},56497:function(e,n,s){s.d(n,{Z:()=>i});var r=s(85893);s(67294);var t=s(71607);function i(e){let{children:n,fallback:s}=e;return(0,t.Z)()?(0,r.jsx)(r.Fragment,{children:n?.()}):s??null}},21143:function(e,n,s){s.d(n,{FI:()=>g,FS:()=>v,Hc:()=>y,I1:()=>p,SR:()=>x,UM:()=>b,Zl:()=>j,_q:()=>u,mC:()=>h,rv:()=>Z});var r=s(85893),t=s(67294),i=s(99887),c=s(38514),o=s(77827),a=s(35363),l=s(14547);let u=parseInt(s(6646)["0"].split(".")[0],10),d=t.createContext(null);function h(e){let{children:n}=e,[s,i]=(0,t.useState)(null),c=(0,t.useRef)(!0);return(0,t.useEffect)(()=>(c.current=!0,()=>{c.current=!1}),[]),(0,t.useEffect)(()=>{fetch("https://registry.npmjs.org/@docusaurus/core").then(e=>e.json()).then(e=>{if(!c.current)return;let n=Object.keys(e.versions).at(-1),s=e.time[n];i({name:n,time:s})})},[]),(0,r.jsx)(d.Provider,{value:s,children:n})}function m(){let e=(0,i.J)("default").preferredVersion?.name,n=(0,c.gB)("default"),s=(n.find(e=>"current"!==e.name)??n[0]).name;return e&&"current"!==e?e:s}function p(){let e=(0,t.useContext)(d);return e?(0,r.jsx)("span",{children:(0,r.jsx)(o.Z,{description:"The hint text for the current canary version tag.",values:{canaryVersionName:(0,r.jsx)("b",{children:e.name})},children:"Current: {canaryVersionName}"})}):(0,r.jsx)("span",{children:(0,r.jsx)(o.Z,{description:"An example canary version tag when the actual version can't be fetched.",children:"Example: 0.0.0-4922"})})}function x(){let e=m();return(0,r.jsx)("span",{children:e})}function f(e){let{branch:n}=e;return(0,r.jsx)(a.Z,{to:`https://github.com/facebook/docusaurus/tree/${n}`,children:(0,r.jsx)("code",{children:n})})}function j(){return(0,r.jsx)("code",{children:`docusaurus-v${u}`})}function g(){return(0,r.jsx)(f,{branch:"main"})}function b(e){let{children:n}=e;return(0,t.useContext)(d)?null:n}function v(e){let{children:n}=e;return(0,t.useContext)(d)?n:null}function y(){let e=(0,t.useContext)(d)?.name??"0.0.0-4922",n=m();return(0,r.jsx)(l.Z,{language:"diff",children:`- "@docusaurus/core": "^${n}",
|
|
- "@docusaurus/preset-classic": "^${n}",
|
|
+ "@docusaurus/core": "${e}",
|
|
+ "@docusaurus/preset-classic": "${e}",
|
|
`})}function Z(){let e=(0,t.useContext)(d)?.time;return e?(0,r.jsx)(o.Z,{values:{time:(0,r.jsx)("b",{children:new Date(e).toLocaleString()})},children:"The latest canary version that's available on npm is published at {time}."}):null}},14547:function(e,n,s){s.d(n,{Z:()=>i});var r=s(85893);s(67294);var t=s(5626);function i(e){return(0,r.jsx)(t.Z,{...e})}},63627:function(e,n,s){s.r(n),s.d(n,{ButtonExample:()=>t});var r=s(85893);function t(e){return(0,r.jsx)("button",{type:"button",...e,style:{backgroundColor:"white",color:"black",border:"solid red",borderRadius:20,padding:10,cursor:"pointer",...e.style}})}s(67294)},62529:function(e,n,s){s.d(n,{Z:()=>i});var r=s(67294),t=s(63627);let i={React:r,...r,...t}},83442:function(e){e.exports=JSON.parse('{"id":"release-process","title":"Release process","description":"Let\'s see how Docusaurus handles versioning, releases and breaking changes.","source":"@site/community/5-release-process.mdx","sourceDirName":".","slug":"/release-process","permalink":"/community/release-process","draft":false,"unlisted":false,"editUrl":"https://github.com/facebook/docusaurus/edit/main/website/community/5-release-process.mdx","tags":[],"version":"current","lastUpdatedBy":"S\xe9bastien Lorber","lastUpdatedAt":1751542800000,"sidebarPosition":5,"frontMatter":{},"sidebar":"community","previous":{"title":"Canary releases","permalink":"/community/canary"}}')},6646:function(e){e.exports=["3.8.1"]}}]); |