Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .yarn/releases/yarn-3.2.3.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -487,7 +487,7 @@ ${e}`)});let n=(g=r.projectCwd)!=null?g:r.startingCwd,s=x.resolve(n,".yarn/relea
`;await U.changeFilePromise(p,m,{automaticNewlines:!0})}}function xoe(r){return X[yI(r)]}var OWe=/## (?<code>YN[0-9]{4}) - `(?<name>[A-Z_]+)`\n\n(?<details>(?:.(?!##))+)/gs;async function MWe(r){let t=`https://repo.yarnpkg.com/${Se.isTaggedYarnVersion(Kr)?Kr:await lm(r,"canary")}/packages/gatsby/content/advanced/error-codes.md`,i=await ir.get(t,{configuration:r});return new Map(Array.from(i.toString().matchAll(OWe),({groups:n})=>{if(!n)throw new Error("Assertion failed: Expected the match to have been successful");let s=xoe(n.code);if(n.name!==s)throw new Error(`Assertion failed: Invalid error code data: Expected "${n.name}" to be named "${s}"`);return[n.code,n.details]}))}var cm=class extends Le{constructor(){super(...arguments);this.code=J.String({required:!1,validator:hp(fp(),[pp(/^YN[0-9]{4}$/)])});this.json=J.Boolean("--json",!1,{description:"Format the output as an NDJSON stream"})}async execute(){let e=await ye.find(this.context.cwd,this.context.plugins);if(typeof this.code!="undefined"){let t=xoe(this.code),i=ae.pretty(e,t,ae.Type.CODE),n=this.cli.format().header(`${this.code} - ${i}`),o=(await MWe(e)).get(this.code),a=typeof o!="undefined"?ae.jsonOrPretty(this.json,e,ae.tuple(ae.Type.MARKDOWN,{text:o,format:this.cli.format(),paragraphs:!0})):`This error code does not have a description.

You can help us by editing this page on GitHub \u{1F642}:
${ae.jsonOrPretty(this.json,e,ae.tuple(ae.Type.URL,"https://github.com/yarnpkg/berry/blob/master/packages/gatsby/content/advanced/error-codes.md"))}
${ae.jsonOrPretty(this.json,e,ae.tuple(ae.Type.URL,"https://github.com/yarnpkg/berry/blob/master/packages/docusaurus/docs/advanced/01-general-reference/error-codes.mdx"))}
`;this.json?this.context.stdout.write(`${JSON.stringify({code:this.code,name:t,details:a})}
`):this.context.stdout.write(`${n}

Expand Down