1"use strict";(self.webpackChunkshields_io=self.webpackChunkshields_io||[]).push([[14566],{76718(e,i,s){s.r(i),s.d(i,{contentTitle:()=>r,default:()=>c,frontMatter:()=>l,metadata:()=>n,toc:()=>o});const n=JSON.parse('{"type":"api","id":"git-hub-package-json-dev-peer-optional-dependency-version","title":"GitHub package.json dev/peer/optional dependency version","description":"","slug":"/git-hub-package-json-dev-peer-optional-dependency-version","frontMatter":{},"api":{"description":"\\nYou can help increase Shields.io\'s rate limit by\\n[authorizing the Shields.io GitHub application](https://img.shields.io/github-auth).\\nRead more about [how it works](/blog/token-pool).\\n","parameters":[{"name":"user","in":"path","required":true,"schema":{"type":"string"},"example":"gatsbyjs"},{"name":"repo","in":"path","required":true,"schema":{"type":"string"},"example":"gatsby"},{"name":"kind","in":"path","required":true,"schema":{"type":"string","enum":["dev","peer","optional"]},"example":"dev"},{"name":"packageName","in":"path","required":true,"schema":{"type":"string"},"example":"cross-env","description":"This may be the name of an unscoped package like `package-name` or a [scoped package](https://docs.npmjs.com/about-scopes) like `@author/package-name`"},{"name":"filename","in":"query","required":false,"schema":{"type":"string"},"example":"packages/gatsby-cli/package.json"},{"name":"style","in":"query","required":false,"description":"If not specified, the default style for this badge is \\"flat\\".","schema":{"type":"string","enum":["flat","flat-square","plastic","for-the-badge","social"]},"example":"flat"},{"name":"logo","in":"query","required":false,"description":"Icon slug from simple-icons. You can click the icon title on <a href=\\"https://simpleicons.org/\\" rel=\\"noopener noreferrer\\" target=\\"_blank\\">simple-icons</a> to copy the slug or they can be found in the <a href=\\"https://github.com/simple-icons/simple-icons/blob/master/slugs.md\\">slugs.md file</a> in the simple-icons repository. <a href=\\"/docs/logos\\">Further info</a>.","schema":{"type":"string"},"example":"appveyor"},{"name":"logoColor","in":"query","required":false,"description":"The color of the logo (hex, rgb, rgba, hsl, hsla and css named colors supported). Supported for simple-icons logos but not for custom logos.","schema":{"type":"string"},"example":"violet"},{"name":"logoSize","in":"query","required":false,"description":"Make icons adaptively resize by setting `auto`. Useful for some wider logos like `amd` and `amg`. Supported for simple-icons logos but not for custom logos.","schema":{"type":"string"},"example":"auto"},{"name":"label","in":"query","required":false,"description":"Override the default left-hand-side text (<a href=\\"https://developer.mozilla.org/en-US/docs/Glossary/percent-encoding\\">URL-Encoding</a> needed for spaces or special characters!)","schema":{"type":"string"},"example":"healthiness"},{"name":"labelColor","in":"query","required":false,"description":"Background color of the left part (hex, rgb, rgba, hsl, hsla and css named colors supported).","schema":{"type":"string"},"example":"abcdef"},{"name":"color","in":"query","required":false,"description":"Background color of the right part (hex, rgb, rgba, hsl, hsla and css named colors supported).","schema":{"type":"string"},"example":"fedcba"},{"name":"cacheSeconds","in":"query","required":false,"description":"HTTP cache lifetime (rules are applied to infer a default value on a per-badge basis, any values specified below the default will be ignored).","schema":{"type":"string"},"example":"3600"},{"name":"link","in":"query","required":false,"description":"Specify what clicking on the left/right of a badge should do. Note that this only works when integrating your badge in an `<object>` HTML tag, but not an `<img>` tag or a markup language.","style":"form","explode":true,"schema":{"type":"array","maxItems":2,"items":{"type":"string"}}}],"x-code-samples":[{"lang":"URL","label":"URL","source":"$url"},{"lang":"Markdown","label":"Markdown","source":""},{"lang":"reStructuredText","label":"rSt","source":".. image:: $url\\n :alt: GitHub package.json dev/peer/optional dependency version"},{"lang":"AsciiDoc","label":"AsciiDoc","source":"image:$url[GitHub package.json dev/peer/optional dependency version]"},{"lang":"HTML","label":"HTML","source":"<img alt=\\"GitHub package.json dev/peer/optional dependency version\\" src=\\"$url\\">"}],"method":"get","path":"/github/package-json/dependency-version/{user}/{repo}/{kind}/{packageName}","info":{"version":"1.0.0","title":"Platform & Version Support","license":{"name":"CC0"}},"postman":{"name":"GitHub package.json dev/peer/optional dependency version","description":{"content":"\\nYou can help increase Shields.io\'s rate limit by\\n[authorizing the Shields.io GitHub application](https://img.shields.io/github-auth).\\nRead more about [how it works](/blog/token-pool).\\n","type":"text/plain"}
1,"url":{"path":["github","package-json","dependency-version",":user",":repo",":kind",":packageName"],"host":["{{baseUrl}}"],"query":[{"disabled":false,"key":"filename","value":"<string>"},{"disabled":false,"description":{"content":"If not specified, the default style for this badge is \\"flat\\".","type":"text/plain"},"key":"style","value":"<string>"},{"disabled":false,"description":{"content":"Icon slug from simple-icons. You can click the icon title on <a href=\\"https://simpleicons.org/\\" rel=\\"noopener noreferrer\\" target=\\"_blank\\">simple-icons</a> to copy the slug or they can be found in the <a href=\\"https://github.com/simple-icons/simple-icons/blob/master/slugs.md\\">slugs.md file</a> in the simple-icons repository. <a href=\\"/docs/logos\\">Further info</a>.","type":"text/plain"},"key":"logo","value":"<string>"},{"disabled":false,"description":{"content":"The color of the logo (hex, rgb, rgba, hsl, hsla and css named colors supported). Supported for simple-icons logos but not for custom logos.","type":"text/plain"},"key":"logoColor","value":"<string>"},{"disabled":false,"description":{"content":"Make icons adaptively resize by setting `auto`. Useful for some wider logos like `amd` and `amg`. Supported for simple-icons logos but not for custom logos.","type":"text/plain"},"key":"logoSize","value":"<string>"},{"disabled":false,"description":{"content":"Override the default left-hand-side text (<a href=\\"https://developer.mozilla.org/en-US/docs/Glossary/percent-encoding\\">URL-Encoding</a> needed for spaces or special characters!)","type":"text/plain"},"key":"label","value":"<string>"},{"disabled":false,"description":{"content":"Background color of the left part (hex, rgb, rgba, hsl, hsla and css named colors supported).","type":"text/plain"},"key":"labelColor","value":"<string>"},{"disabled":false,"description":{"content":"Background color of the right part (hex, rgb, rgba, hsl, hsla and css named colors supported).","type":"text/plain"},"key":"color","value":"<string>"},{"disabled":false,"description":{"content":"HTTP cache lifetime (rules are applied to infer a default value on a per-badge basis, any values specified below the default will be ignored).","type":"text/plain"},"key":"cacheSeconds","value":"<string>"},{"disabled":false,"description":{"content":"Specify what clicking on the left/right of a badge should do. Note that this only works when integrating your badge in an `<object>` HTML tag, but not an `<img>` tag or a markup language.","type":"text/plain"},"key":"link","value":"<string>"},{"disabled":false,"description":{"content":"Specify what clicking on the left/right of a badge should do. Note that this only works when integrating your badge in an `<object>` HTML tag, but not an `<img>` tag or a markup language.","type":"text/plain"},"key":"link","value":"<string>"}],"variable":[{"disabled":false,"description":{"content":"(Required) ","type":"text/plain"},"type":"any","value":"<string>","key":"user"},{"disabled":false,"description":{"content":"(Required) ","type":"text/plain"},"type":"any","value":"<string>","key":"repo"},{"disabled":false,"description":{"content":"(Required) ","type":"text/plain"},"type":"any","value":"<string>","key":"kind"},{"disabled":false,"description":{"content":"(Required) This may be the name of an unscoped package like `package-name` or a [scoped package](https://docs.npmjs.com/about-scopes) like `@author/package-name`","type":"text/plain"},"type":"any","value":"<string>","key":"packageName"}]},"method":"GET"}},"source":"@site/categories/platform-support.yaml","sourceDirName":".","permalink":"/badges/git-hub-package-json-dev-peer-optional-dependency-version","previous":{"title":"GitHub go.mod Go version (branch)","permalink":"/badges/git-hub-go-mod-go-version-branch"},"next":{"title":"GitHub package.json dev/peer/optional dependency version (branch)","permalink":"/badges/git-hub-package-json-dev-peer-optional-dependency-version-branch"}}');var a=s(74848),t=s(28453);const l={},r="GitHub package.json dev/peer/optional dependency version",o=[];function d(e){const i={a:"a",code:"code",h1:"h1",header:"header",p:"p",strong:"strong",...(0,t.R)(),...e.components};return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(i.header,{children:(0,a.jsx)(i.h1,{id:"github-packagejson-devpeeroptional-dependency-version",children:"GitHub package.json dev/peer/optional dependency version"})}),"\n",(0,a.jsxs)(i.p,{children:["You can help increase Shields.io's rate limit by\n",(0,a.jsx)(i.a,{href:"https://img.shields.io/github-auth",children:"authorizing the Shields.io GitHub application"}),".\nRead more about ",(0,a.jsx)(i.a,{href:"/blog/token-pool",children:"how it works"}),"."]}),"\n",(0,a.jsxs)("table",{style:{display:"table",width:"100%"},children:[(0,a.jsx)("thead",{children:(0,a.jsx)("tr",{children:(0,a.jsx)("th",{style:{textAlign:"left"},children:"Path Parameters"})})}),(0,a.jsxs)("tbody",{children:[(0,a.jsx)("tr",{children:(0,a.jsxs)("td",{children:[(0,a.jsx)("code",{children:"user"}),(0,a.jsx)("span",{style:{opacity:"0.6"},children:" string"}),(0,a.jsx)("span",{style:{opacity:"0.6"},children:" \u2014 "}),(0,a.jsx)("strong",{style:{fontSize:"var(--ifm-code-font-size)",color:"var(--openapi-required)"},children:" REQUIRED"}),(0,a.jsx)("div",{style:{marginTop:"var(--ifm-table-cell-padding)"},children:(0,a.jsxs)(i.p,{children:["Example:\n",(0,a.jsx)("code",{children:"gatsbyjs"})]})})]})}),(0,a.jsx)("tr",{children:(0,a.jsxs)("td",{children:[(0,a.jsx)("code",{children:"repo"}),(0,a.jsx)("span",{style:{opacity:"0.6"},children:" string"}),(0,a.jsx)("span",{style:{opacity:"0.6"},children:" \u2014 "}),(0,a.jsx)("strong",{style:{fontSize:"var(--ifm-code-font-size)",color:"var(--openapi-required)"},children:" REQUIRED"}),(0,a.jsx)("div",{style:{marginTop:"var(--ifm-table-cell-padding)"},children:(0,a.jsxs)(i.p,{children:["Example:\n",(0,a.jsx)("code",{children:"gatsby"})]})})]})}),(0,a.jsx)("tr",{children:(0,a.jsxs)("td",{children:[(0,a.jsx)("code",{children:"kind"}),(0,a.jsx)("span",{style:{opacity:"0.6"},children:" string"}),(0,a.jsx)("span",{style:{opacity:"0.6"},children:" \u2014 "}),(0,a.jsx)("strong",{style:{fontSize:"var(--ifm-code-font-size)",color:"var(--openapi-required)"},children:" REQUIRED"}),(0,a.jsx)("div",{style:{marginTop:"var(--ifm-table-cell-padding)"},children:(0,a.jsxs)(i.p,{children:[(0,a.jsx)(i.strong,{children:"Possible values:"}
1)," [",(0,a.jsx)(i.code,{children:"dev"}),", ",(0,a.jsx)(i.code,{children:"peer"}),", ",(0,a.jsx)(i.code,{children:"optional"}),"]"]})}),(0,a.jsx)("div",{style:{marginTop:"var(--ifm-table-cell-padding)"},children:(0,a.jsxs)(i.p,{children:["Example:\n",(0,a.jsx)("code",{children:"dev"})]})})]})}),(0,a.jsx)("tr",{children:(0,a.jsxs)("td",{children:[(0,a.jsx)("code",{children:"packageName"}),(0,a.jsx)("span",{style:{opacity:"0.6"},children:" string"}),(0,a.jsx)("span",{style:{opacity:"0.6"},children:" \u2014 "}),(0,a.jsx)("strong",{style:{fontSize:"var(--ifm-code-font-size)",color:"var(--openapi-required)"},children:" REQUIRED"}),(0,a.jsx)("div",{style:{marginTop:"var(--ifm-table-cell-padding)"},children:(0,a.jsxs)(i.p,{children:["This may be the name of an unscoped package like ",(0,a.jsx)(i.code,{children:"package-name"})," or a ",(0,a.jsx)(i.a,{href:"https://docs.npmjs.com/about-scopes",children:"scoped package"})," like ",(0,a.jsx)(i.code,{children:"@author/package-name"})]})}),(0,a.jsx)("div",{style:{marginTop:"var(--ifm-table-cell-padding)"},children:(0,a.jsxs)(i.p,{children:["Example:\n",(0,a.jsx)("code",{children:"cross-env"})]})})]})})]})]}),"\n",(0,a.jsxs)("table",{style:{display:"table",width:"100%"},children:[(0,a.jsx)("thead",{children:(0,a.jsx)("tr",{children:(0,a.jsx)("th",{style:{textAlign:"left"},children:"Query Parameters"})})}),(0,a.jsxs)("tbody",{children:[(0,a.jsx)("tr",{children:(0,a.jsxs)("td",{children:[(0,a.jsx)("code",{children:"filename"}),(0,a.jsx)("span",{style:{opacity:"0.6"},children:" string"}),(0,a.jsx)("div",{style:{marginTop:"var(--ifm-table-cell-padding)"},children:(0,a.jsxs)(i.p,{children:["Example:\n",(0,a.jsx)("code",{children:"packages/gatsby-cli/package.json"})]})})]})}),(0,a.jsx)("tr",{children:(0,a.jsxs)("td",{children:[(0,a.jsx)("code",{children:"style"}),(0,a.jsx)("span",{style:{opacity:"0.6"},children:" string"}),(0,a.jsx)("div",{style:{marginTop:"var(--ifm-table-cell-padding)"},children:(0,a.jsxs)(i.p,{children:[(0,a.jsx)(i.strong,{children:"Possible values:"})," [",(0,a.jsx)(i.code,{children:"flat"}),", ",(0,a.jsx)(i.code,{children:"flat-square"}),", ",(0,a.jsx)(i.code,{children:"plastic"}),", ",(0,a.jsx)(i.code,{children:"for-the-badge"}),", ",(0,a.jsx)(i.code,{children:"social"}),"]"]})}),(0,a.jsx)("div",{style:{marginTop:"var(--ifm-table-cell-padding)"},children:(0,a.jsx)(i.p,{children:'If not specified, the default style for this badge is "flat".'})}),(0,a.jsx)("div",{style:{marginTop:"var(--ifm-table-cell-padding)"},children:(0,a.jsxs)(i.p,{children:["Example:\n",(0,a.jsx)("code",{children:"flat"})]})})]})}),(0,a.jsx)("tr",{children:(0,a.jsxs)("td",{children:[(0,a.jsx)("code",{children:"logo"}),(0,a.jsx)("span",{style:{opacity:"0.6"},children:" string"}),(0,a.jsx)("div",{style:{marginTop:"var(--ifm-table-cell-padding)"},children:(0,a.jsxs)(i.p,{children:["Icon slug from simple-icons. You can click the icon title on ",(0,a.jsx)("a",{href:"https://simpleicons.org/",rel:"noopener noreferrer",target:"_blank",children:"simple-icons"})," to copy the slug or they can be found in the ",(0,a.jsx)("a",{href:"https://github.com/simple-icons/simple-icons/blob/master/slugs.md",children:"slugs.md file"})," in the simple-icons repository. ",(0,a.jsx)("a",{href:"/docs/logos",children:"Further info"}),"."]})}),(0,a.jsx)("div",{style:{marginTop:"var(--ifm-table-cell-padding)"},children:(0,a.jsxs)(i.p,{children:["Example:\n",(0,a.jsx)("code",{children:"appveyor"})]})})]})}),(0,a.jsx)("tr",{children:(0,a.jsxs)("td",{children:[(0,a.jsx)("code",{children:"logoColor"}),(0,a.jsx)("span",{style:{opacity:"0.6"},children:" string"}),(0,a.jsx)("div",{style:{marginTop:"var(--ifm-table-cell-padding)"},children:(0,a.jsx)(i.p,{children:"The color of the logo (hex, rgb, rgba, hsl, hsla and css named colors supported). Supported for simple-icons logos but not for custom logos."})}),(0,a.jsx)("div",{style:{marginTop:"var(--ifm-table-cell-padding)"},children:(0,a.jsxs)(i.p,{children:["Example:\n",(0,a.jsx)("code",{children:"violet"})]})})]})}),(0,a.jsx)("tr",{children:(0,a.jsxs)("td",{children:[(0,a.jsx)("code",{children:"logoSize"}),(0,a.jsx)("span",{style:{opacity:"0.6"},children:" string"}),(0,a.jsx)("div",{style:{marginTop:"var(--ifm-table-cell-padding)"},children:(0,a.jsxs)(i.p,{children:["Make icons adaptively resize by setting ",(0,a.jsx)(i.co
1de,{children:"auto"}),". Useful for some wider logos like ",(0,a.jsx)(i.code,{children:"amd"})," and ",(0,a.jsx)(i.code,{children:"amg"}),". Supported for simple-icons logos but not for custom logos."]})}),(0,a.jsx)("div",{style:{marginTop:"var(--ifm-table-cell-padding)"},children:(0,a.jsxs)(i.p,{children:["Example:\n",(0,a.jsx)("code",{children:"auto"})]})})]})}),(0,a.jsx)("tr",{children:(0,a.jsxs)("td",{children:[(0,a.jsx)("code",{children:"label"}),(0,a.jsx)("span",{style:{opacity:"0.6"},children:" string"}),(0,a.jsx)("div",{style:{marginTop:"var(--ifm-table-cell-padding)"},children:(0,a.jsxs)(i.p,{children:["Override the default left-hand-side text (",(0,a.jsx)("a",{href:"https://developer.mozilla.org/en-US/docs/Glossary/percent-encoding",children:"URL-Encoding"})," needed for spaces or special characters!)"]})}),(0,a.jsx)("div",{style:{marginTop:"var(--ifm-table-cell-padding)"},children:(0,a.jsxs)(i.p,{children:["Example:\n",(0,a.jsx)("code",{children:"healthiness"})]})})]})}),(0,a.jsx)("tr",{children:(0,a.jsxs)("td",{children:[(0,a.jsx)("code",{children:"labelColor"}),(0,a.jsx)("span",{style:{opacity:"0.6"},children:" string"}),(0,a.jsx)("div",{style:{marginTop:"var(--ifm-table-cell-padding)"}
1,children:(0,a.jsx)(i.p,{children:"Background color of the left part (hex, rgb, rgba, hsl, hsla and css named colors supported)."})}),(0,a.jsx)("div",{style:{marginTop:"var(--ifm-table-cell-padding)"},children:(0,a.jsxs)(i.p,{children:["Example:\n",(0,a.jsx)("code",{children:"abcdef"})]})})]})}),(0,a.jsx)("tr",{children:(0,a.jsxs)("td",{children:[(0,a.jsx)("code",{children:"color"}),(0,a.jsx)("span",{style:{opacity:"0.6"},children:" string"}),(0,a.jsx)("div",{style:{marginTop:"var(--ifm-table-cell-padding)"},children:(0,a.jsx)(i.p,{children:"Background color of the right part (hex, rgb, rgba, hsl, hsla and css named colors supported)."})}),(0,a.jsx)("div",{style:{marginTop:"var(--ifm-table-cell-padding)"},children:(0,a.jsxs)(i.p,{children:["Example:\n",(0,a.jsx)("code",{children:"fedcba"})]})})]})}),(0,a.jsx)("tr",{children:(0,a.jsxs)("td",{children:[(0,a.jsx)("code",{children:"cacheSeconds"}),(0,a.jsx)("span",{style:{opacity:"0.6"},children:" string"}),(0,a.jsx)("div",{style:{marginTop:"var(--ifm-table-cell-padding)"},children:(0,a.jsx)(i.p,{children:"HTTP cache lifetime (rules are applied to infer a default value on a per-badge basis, any values specified below the default will be ignored)."})}),(0,a.jsx)("div",{style:{marginTop:"var(--ifm-table-cell-padding)"},children:(0,a.jsxs)(i.p,{children:["Example:\n",(0,a.jsx)("code",{children:"3600"})]})})]})}),(0,a.jsx)("tr",{children:(0,a.jsxs)("td",{children:[(0,a.jsx)("code",{children:"link"}),(0,a.jsx)("span",{style:{opacity:"0.6"},children:" string[]"}),(0,a.jsx)("div",{style:{marginTop:"var(--ifm-table-cell-padding)"},children:(0,a.jsxs)(i.p,{children:["Specify what clicking on the left/right of a badge should do. Note that this only works when integrating your badge in an ",(0,a.jsx)(i.code,{children:"<object>"})," HTML tag, but not an ",(0,a.jsx)(i.code,{children:"<img>"})," tag or a markup language."]})})]})})]})]})]})}function c(e={}){const{wrapper:i}={...(0,t.R)(),...e.components};return i?(0,a.jsx)(i,{...e,children:(0,a.jsx)(d,{...e})}):d(e)}},28453(e,i,s){s.d(i,{R:()=>l,x:()=>r});var n=s(96540);const a={},t=n.createContext(a);function l(e){const i=n.useContext(t);return n.useMemo(function(){return"function"==typeof e?e(i):{...i,...e}},[i,e])}function r(e){let i;return i=e.disableParentContext?"function"==typeof e.components?e.components(a):e.components||a:l(e.components),n.createElement(t.Provider,{value:i},e.children)}}}]);
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.