From 5bff3ec9b8cb452dfa63465db99906b8446c723b Mon Sep 17 00:00:00 2001 From: Daryl Ronningen Date: Fri, 18 Jun 2021 23:42:25 -0700 Subject: [PATCH] chore(yarn): update yarn --- .yarn/releases/yarn-sources.cjs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.yarn/releases/yarn-sources.cjs b/.yarn/releases/yarn-sources.cjs index e136406..61fe806 100755 --- a/.yarn/releases/yarn-sources.cjs +++ b/.yarn/releases/yarn-sources.cjs @@ -273,7 +273,7 @@ ${a}`:`${a}`}throw new Error(`Unsupported value type (${t})`)}function _s(t){try `,end:t=>`section_end:${Math.floor(Date.now()/1e3)}:${t.toLowerCase().replace(/\W+/g,"_")}\r`}:null,MW=new Date,OQe=["iTerm.app","Apple_Terminal"].includes(process.env.TERM_PROGRAM)||!!process.env.WT_SESSION,TQe=t=>t,VI=TQe({patrick:{date:[17,3],chars:["\u{1F340}","\u{1F331}"],size:40},simba:{date:[19,7],chars:["\u{1F981}","\u{1F334}"],size:40},jack:{date:[31,10],chars:["\u{1F383}","\u{1F987}"],size:40},hogsfather:{date:[31,12],chars:["\u{1F389}","\u{1F384}"],size:40},default:{chars:["=","-"],size:80}}),KQe=OQe&&Object.keys(VI).find(t=>{let e=VI[t];return!(e.date&&(e.date[0]!==MW.getDate()||e.date[1]!==MW.getMonth()+1))})||"default";function OW(t,{configuration:e,json:r}){if(!e.get("enableMessageNames"))return"";let n=xC(t===null?0:t);return!r&&t===null?je(e,n,"grey"):n}function DS(t,{configuration:e,json:r}){let i=OW(t,{configuration:e,json:r});if(!i||t===null||t===z.UNNAMED)return i;let n=z[t],s=`https://yarnpkg.com/advanced/error-codes#${i}---${n}`.toLowerCase();return oc(e,i,s)}var Se=class extends ai{constructor({configuration:e,stdout:r,json:i=!1,includeFooter:n=!0,includeLogs:s=!i,includeInfos:o=s,includeWarnings:a=s,forgettableBufferSize:l=MQe,forgettableNames:c=new Set}){super();this.uncommitted=new Set;this.cacheHitCount=0;this.cacheMissCount=0;this.lastCacheMiss=null;this.warningCount=0;this.errorCount=0;this.startTime=Date.now();this.indent=0;this.progress=new Map;this.progressTime=0;this.progressFrame=0;this.progressTimeout=null;this.forgettableLines=[];Eh(this,{configuration:e}),this.configuration=e,this.forgettableBufferSize=l,this.forgettableNames=new Set([...c,...NQe]),this.includeFooter=n,this.includeInfos=o,this.includeWarnings=a,this.json=i,this.stdout=r;let u=this.configuration.get("progressBarStyle")||KQe;if(!Object.prototype.hasOwnProperty.call(VI,u))throw new Error("Assertion failed: Invalid progress bar style");this.progressStyle=VI[u];let g="\u27A4 YN0000: \u250C ".length,h=Math.max(0,Math.min(process.stdout.columns-g,80));this.progressMaxScaledSize=Math.floor(this.progressStyle.size*h/80)}static async start(e,r){let i=new this(e),n=process.emitWarning;process.emitWarning=(s,o)=>{if(typeof s!="string"){let l=s;s=l.message,o=o!=null?o:l.name}let a=typeof o!="undefined"?`${o}: ${s}`:s;i.reportWarning(z.UNNAMED,a)};try{await r(i)}catch(s){i.reportExceptionOnce(s)}finally{await i.finalize(),process.emitWarning=n}return i}hasErrors(){return this.errorCount>0}exitCode(){return this.hasErrors()?1:0}reportCacheHit(e){this.cacheHitCount+=1}reportCacheMiss(e,r){this.lastCacheMiss=e,this.cacheMissCount+=1,typeof r!="undefined"&&!this.configuration.get("preferAggregateCacheInfo")&&this.reportInfo(z.FETCH_NOT_CACHED,r)}startTimerSync(e,r,i){let n=typeof r=="function"?{}:r,s=typeof r=="function"?r:i,o={committed:!1,action:()=>{this.reportInfo(null,`\u250C ${e}`),this.indent+=1,sa!==null&&!this.json&&this.stdout.write(sa.start(e))}};n.skipIfEmpty?this.uncommitted.add(o):(o.action(),o.committed=!0);let a=Date.now();try{return s()}catch(l){throw this.reportExceptionOnce(l),l}finally{let l=Date.now();this.uncommitted.delete(o),o.committed&&(this.indent-=1,sa!==null&&!this.json&&this.stdout.write(sa.end(e)),this.configuration.get("enableTimers")&&l-a>200?this.reportInfo(null,`\u2514 Completed in ${je(this.configuration,l-a,ke.DURATION)}`):this.reportInfo(null,"\u2514 Completed"))}}async startTimerPromise(e,r,i){let n=typeof r=="function"?{}:r,s=typeof r=="function"?r:i,o={committed:!1,action:()=>{this.reportInfo(null,`\u250C ${e}`),this.indent+=1,sa!==null&&!this.json&&this.stdout.write(sa.start(e))}};n.skipIfEmpty?this.uncommitted.add(o):(o.action(),o.committed=!0);let a=Date.now();try{return await s()}catch(l){throw this.reportExceptionOnce(l),l}finally{let l=Date.now();this.uncommitted.delete(o),o.committed&&(this.indent-=1,sa!==null&&!this.json&&this.stdout.write(sa.end(e)),this.configuration.get("enableTimers")&&l-a>200?this.reportInfo(null,`\u2514 Completed in ${je(this.configuration,l-a,ke.DURATION)}`):this.reportInfo(null,"\u2514 Completed"))}}async startCacheReport(e){let r=this.configuration.get("preferAggregateCacheInfo")?{cacheHitCount:this.cacheHitCount,cacheMissCount:this.cacheMissCount}:null;try{return await e()}catch(i){throw this.reportExceptionOnce(i),i}finally{r!==null&&this.reportCacheChanges(r)}}reportSeparator(){this.indent===0?this.writeLineWithForgettableReset(""):this.reportInfo(null,"")}reportInfo(e,r){if(!this.includeInfos)return;this.commit();let i=this.formatNameWithHyperlink(e),n=i?`${i}: `:"",s=`${je(this.configuration,"\u27A4","blueBright")} ${n}${this.formatIndent()}${r}`;if(this.json)this.reportJson({type:"info",name:e,displayName:this.formatName(e),indent:this.formatIndent(),data:r});else if(this.forgettableNames.has(e))if(this.forgettableLines.push(s),this.forgettableLines.length>this.forgettableBufferSize){for(;this.forgettableLines.length>this.forgettableBufferSize;)this.forgettableLines.shift();this.writeLines(this.forgettableLines,{truncate:!0})}else this.writeLine(s,{truncate:!0});else this.writeLineWithForgettableReset(s)}reportWarning(e,r){if(this.warningCount+=1,!this.includeWarnings)return;this.commit();let i=this.formatNameWithHyperlink(e),n=i?`${i}: `:"";this.json?this.reportJson({type:"warning",name:e,displayName:this.formatName(e),indent:this.formatIndent(),data:r}):this.writeLineWithForgettableReset(`${je(this.configuration,"\u27A4","yellowBright")} ${n}${this.formatIndent()}${r}`)}reportError(e,r){this.errorCount+=1,this.commit();let i=this.formatNameWithHyperlink(e),n=i?`${i}: `:"";this.json?this.reportJson({type:"error",name:e,displayName:this.formatName(e),indent:this.formatIndent(),data:r}):this.writeLineWithForgettableReset(`${je(this.configuration,"\u27A4","redBright")} ${n}${this.formatIndent()}${r}`,{truncate:!1})}reportProgress(e){let r=!1,i=Promise.resolve().then(async()=>{let s={progress:0,title:void 0};this.progress.set(e,{definition:s,lastScaledSize:-1}),this.refreshProgress(-1);for await(let{progress:o,title:a}of e)r||s.progress===o&&s.title===a||(s.progress=o,s.title=a,this.refreshProgress());n()}),n=()=>{r||(r=!0,this.progress.delete(e),this.refreshProgress(1))};return V(P({},i),{stop:n})}reportJson(e){this.json&&this.writeLineWithForgettableReset(`${JSON.stringify(e)}`)}async finalize(){if(!this.includeFooter)return;let e="";this.errorCount>0?e="Failed with errors":this.warningCount>0?e="Done with warnings":e="Done";let r=je(this.configuration,Date.now()-this.startTime,ke.DURATION),i=this.configuration.get("enableTimers")?`${e} in ${r}`:e;this.errorCount>0?this.reportError(z.UNNAMED,i):this.warningCount>0?this.reportWarning(z.UNNAMED,i):this.reportInfo(z.UNNAMED,i)}writeLine(e,{truncate:r}={}){this.clearProgress({clear:!0}),this.stdout.write(`${this.truncate(e,{truncate:r})} `),this.writeProgress()}writeLineWithForgettableReset(e,{truncate:r}={}){this.forgettableLines=[],this.writeLine(e,{truncate:r})}writeLines(e,{truncate:r}={}){this.clearProgress({delta:e.length});for(let i of e)this.stdout.write(`${this.truncate(i,{truncate:r})} `);this.writeProgress()}reportCacheChanges({cacheHitCount:e,cacheMissCount:r}){let i=this.cacheHitCount-e,n=this.cacheMissCount-r;if(i===0&&n===0)return;let s="";this.cacheHitCount>1?s+=`${this.cacheHitCount} packages were already cached`:this.cacheHitCount===1?s+=" - one package was already cached":s+="No packages were cached",this.cacheHitCount>0?this.cacheMissCount>1?s+=`, ${this.cacheMissCount} had to be fetched`:this.cacheMissCount===1&&(s+=`, one had to be fetched (${it(this.configuration,this.lastCacheMiss)})`):this.cacheMissCount>1?s+=` - ${this.cacheMissCount} packages had to be fetched`:this.cacheMissCount===1&&(s+=` - one package had to be fetched (${it(this.configuration,this.lastCacheMiss)})`),this.reportInfo(z.FETCH_NOT_CACHED,s)}commit(){let e=this.uncommitted;this.uncommitted=new Set;for(let r of e)r.committed=!0,r.action()}clearProgress({delta:e=0,clear:r=!1}){!this.configuration.get("enableProgressBars")||this.json||this.progress.size+e>0&&(this.stdout.write(`[${this.progress.size+e}A`),(e>0||r)&&this.stdout.write(""))}writeProgress(){if(!this.configuration.get("enableProgressBars")||this.json||(this.progressTimeout!==null&&clearTimeout(this.progressTimeout),this.progressTimeout=null,this.progress.size===0))return;let e=Date.now();e-this.progressTime>NW&&(this.progressFrame=(this.progressFrame+1)%LW.length,this.progressTime=e);let r=LW[this.progressFrame];for(let i of this.progress.values()){let n=this.progressStyle.chars[0].repeat(i.lastScaledSize),s=this.progressStyle.chars[1].repeat(this.progressMaxScaledSize-i.lastScaledSize),o=this.formatName(null),a=o?`${o}: `:"";this.stdout.write(`${je(this.configuration,"\u27A4","blueBright")} ${a}${r} ${n}${s} -`)}this.progressTimeout=setTimeout(()=>{this.refreshProgress()},NW)}refreshProgress(e=0){let r=!1;if(this.progress.size===0)r=!0;else for(let i of this.progress.values()){let n=Math.trunc(this.progressMaxScaledSize*i.definition.progress),s=i.lastScaledSize;if(i.lastScaledSize=n,n!==s){r=!0;break}}r&&(this.clearProgress({delta:e}),this.writeProgress())}truncate(e,{truncate:r}={}){return this.configuration.get("enableProgressBars")||(r=!1),typeof r=="undefined"&&(r=this.configuration.get("preferTruncatedLines")),r&&(e=(0,RW.default)(e,0,process.stdout.columns-1)),e}formatName(e){return OW(e,{configuration:this.configuration,json:this.json})}formatNameWithHyperlink(e){return DS(e,{configuration:this.configuration,json:this.json})}formatIndent(){return"\u2502 ".repeat(this.indent)}};var Yi="3.0.0-rc.5.git.20210615.hash-7fa0938e";var ls;(function(n){n.Yarn1="Yarn Classic",n.Yarn2="Yarn",n.Npm="npm",n.Pnpm="pnpm"})(ls||(ls={}));async function $s(t,e,r,i=[]){if(process.platform==="win32"){let n=`@goto #_undefined_# 2>NUL || @title %COMSPEC% & @setlocal & @"${r}" ${i.map(s=>`"${s.replace('"','""')}"`).join(" ")} %*`;await M.writeFilePromise(B.format({dir:t,name:e,ext:".cmd"}),n)}await M.writeFilePromise(B.join(t,e),`#!/bin/sh +`)}this.progressTimeout=setTimeout(()=>{this.refreshProgress()},NW)}refreshProgress(e=0){let r=!1;if(this.progress.size===0)r=!0;else for(let i of this.progress.values()){let n=Math.trunc(this.progressMaxScaledSize*i.definition.progress),s=i.lastScaledSize;if(i.lastScaledSize=n,n!==s){r=!0;break}}r&&(this.clearProgress({delta:e}),this.writeProgress())}truncate(e,{truncate:r}={}){return this.configuration.get("enableProgressBars")||(r=!1),typeof r=="undefined"&&(r=this.configuration.get("preferTruncatedLines")),r&&(e=(0,RW.default)(e,0,process.stdout.columns-1)),e}formatName(e){return OW(e,{configuration:this.configuration,json:this.json})}formatNameWithHyperlink(e){return DS(e,{configuration:this.configuration,json:this.json})}formatIndent(){return"\u2502 ".repeat(this.indent)}};var Yi="3.0.0-rc.5.git.20210618.hash-73c76f0e";var ls;(function(n){n.Yarn1="Yarn Classic",n.Yarn2="Yarn",n.Npm="npm",n.Pnpm="pnpm"})(ls||(ls={}));async function $s(t,e,r,i=[]){if(process.platform==="win32"){let n=`@goto #_undefined_# 2>NUL || @title %COMSPEC% & @setlocal & @"${r}" ${i.map(s=>`"${s.replace('"','""')}"`).join(" ")} %*`;await M.writeFilePromise(B.format({dir:t,name:e,ext:".cmd"}),n)}await M.writeFilePromise(B.join(t,e),`#!/bin/sh exec "${r}" ${i.map(n=>`'${n.replace(/'/g,`'"'"'`)}'`).join(" ")} "$@" `),await M.chmodPromise(B.join(t,e),493)}async function UQe(t){let e=null;try{e=await M.readFilePromise(B.join(t,mt.lockfile),"utf8")}catch{}return e!==null?e.match(/^__metadata:$/m)?{packageManager:ls.Yarn2,reason:'"__metadata" key found in yarn.lock'}:{packageManager:ls.Yarn1,reason:'"__metadata" key not found in yarn.lock, must be a Yarn classic lockfile'}:M.existsSync(B.join(t,"package-lock.json"))?{packageManager:ls.Npm,reason:`found npm's "package-lock.json" lockfile`}:M.existsSync(B.join(t,"pnpm-lock.yaml"))?{packageManager:ls.Pnpm,reason:`found pnpm's "pnpm-lock.yaml" lockfile`}:null}async function Zh({project:t,locator:e,binFolder:r,lifecycleScript:i}){var a,l;let n={};for(let[c,u]of Object.entries(process.env))typeof u!="undefined"&&(n[c.toLowerCase()!=="path"?c:"PATH"]=u);let s=L.fromPortablePath(r);if(n.BERRY_BIN_FOLDER=L.fromPortablePath(s),await Promise.all([$s(r,"node",process.execPath),...Yi!==null?[$s(r,"run",process.execPath,[process.argv[1],"run"]),$s(r,"yarn",process.execPath,[process.argv[1]]),$s(r,"yarnpkg",process.execPath,[process.argv[1]]),$s(r,"node-gyp",process.execPath,[process.argv[1],"run","--top-level","node-gyp"])]:[]]),t&&(n.INIT_CWD=L.fromPortablePath(t.configuration.startingCwd),n.PROJECT_CWD=L.fromPortablePath(t.cwd)),n.PATH=n.PATH?`${s}${L.delimiter}${n.PATH}`:`${s}`,n.npm_execpath=`${s}${L.sep}yarn`,n.npm_node_execpath=`${s}${L.sep}node`,e){if(!t)throw new Error("Assertion failed: Missing project");let c=t.tryWorkspaceByLocator(e),u=c?(a=c.manifest.version)!=null?a:"":(l=t.storedPackages.get(e.locatorHash).version)!=null?l:"";n.npm_package_name=dt(e),n.npm_package_version=u}let o=Yi!==null?`yarn/${Yi}`:`yarn/${vn("@yarnpkg/core").version}-core`;return n.npm_config_user_agent=`${o} npm/? node/${process.versions.node} ${process.platform} ${process.arch}`,i&&(n.npm_lifecycle_event=i),t&&await t.configuration.triggerHook(c=>c.setupScriptEnvironment,t,n,async(c,u,g)=>await $s(r,jt(c),u,g)),n}var HQe=2,YQe=(0,KW.default)(HQe);async function qQe(t,e,{configuration:r,report:i,workspace:n=null,locator:s=null}){await YQe(async()=>{await M.mktempPromise(async o=>{let a=B.join(o,"pack.log"),l=null,{stdout:c,stderr:u}=r.getSubprocessStreams(a,{prefix:L.fromPortablePath(t),report:i}),g=s&&ns(s)?fh(s):s,h=g?ln(g):"an external project";c.write(`Packing ${h} from sources `);let f=await UQe(t),p;f!==null?(c.write(`Using ${f.packageManager} for bootstrap. Reason: ${f.reason}