Skip to content

Commit

Permalink
chore: willboosterify this repo
Browse files Browse the repository at this point in the history
  • Loading branch information
WillBooster-bot committed Jan 10, 2024
1 parent d00c665 commit da44738
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 4 deletions.
4 changes: 2 additions & 2 deletions .yarn/plugins/plugin-auto-install.cjs
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
"use strict";var n={name:"plugin-auto-install",factory:n=>{const t=n("child_process"),e=n("crypto"),r=n("fs"),c=n("path"),s="plugin-auto-install v1.9.2";let i=!1,o="";function a(n){try{const t=e.createHash("sha256"),s=c.join(n.cwd,"yarn.lock");r.statSync(s,{throwIfNoEntry:!1})&&t.update(r.readFileSync(s,"utf8"));for(const e of n.workspaces.map((n=>n.cwd)).sort()){const n=c.join(e,"package.json"),s=JSON.parse(r.readFileSync(n,"utf8")),i=Object.keys(s).filter((n=>n.endsWith("ependencies"))),o=[];for(const n of i)o.push(...Object.entries(s[n]).map((([n,t])=>`${n}: ${t}`)));t.update(o.sort().join(","))}return t.digest("hex")}catch{}}function u(n){try{const t=d(n);return r.readFileSync(c.join(t,"hash"),"utf8")}catch{}}function l(n,t){if(!n||n===o)return!1;try{const e=d(t);r.mkdirSync(e,{recursive:!0}),r.writeFileSync(c.join(e,"hash"),n),r.writeFileSync(c.join(e,".gitignore"),".gitignore\nhash"),console.info(`${s} updated dependency hash: ${n}`),o=n}catch{}return!0}function d(n){return c.join(n.cwd,".yarn","plugins","plugin-auto-install")}return{hooks:{validateProject(n){i=!0;const t=a(n);t&&t===u(n)||l(t,n)},afterAllInstalled(n){i=!1;const t=a(n);t&&t===u(n)||l(t,n)},async wrapScriptExecution(n,e,r,c,o){if(i)return n;try{const r=a(e);if(r&&r===u(e))return n;if(!l(r,e))return n;console.info(`${s} is running 'yarn install' due to dependency changes.`),t.spawnSync("yarn",["install"],{cwd:o.cwd,env:o.env}),console.info(`${s} finished 'yarn install'.`);const i=t.spawnSync("yarn",["run",c,...o.args],{cwd:o.cwd,env:o.env,stdio:"inherit",shell:!0});return async()=>i.status||0}catch{}return n}}}}};module.exports=n;
//# sourceMappingURL=index.cjs.map
"use strict";var n={name:"plugin-auto-install",factory:n=>{const t=n("child_process"),e=n("crypto"),c=n("fs"),r=n("path"),o="plugin-auto-install v2.0.1";let i=!1,s="";function a(n){try{const t=e.createHash("sha256"),o=r.join(n.cwd,"yarn.lock");c.statSync(o,{throwIfNoEntry:!1})&&t.update(c.readFileSync(o,"utf8"));for(const e of n.workspaces.map((n=>n.cwd)).sort()){const n=r.join(e,"package.json"),o=JSON.parse(c.readFileSync(n,"utf8")),i=Object.keys(o).filter((n=>n.endsWith("ependencies"))),s=[];for(const n of i)s.push(...Object.entries(o[n]).map((([n,t])=>`${n}: ${t}`)));t.update(s.sort().join(","))}return t.digest("hex")}catch{}}function l(n){try{const t=d(n);return c.readFileSync(r.join(t,"hash"),"utf8")}catch{}}function u(n,t){if(!n||n===s)return!1;try{const e=d(t);c.mkdirSync(e,{recursive:!0}),c.writeFileSync(r.join(e,"hash"),n),c.writeFileSync(r.join(e,".gitignore"),".gitignore\nhash"),console.info(`${o} updated dependency hash: ${n}`),s=n}catch{}return!0}function d(n){return r.join(n.cwd,".yarn","plugins","plugin-auto-install")}return{hooks:{validateProject(n){i=!0;const t=a(n);t&&t===l(n)||u(t,n)},afterAllInstalled(n){i=!1;const t=a(n);t&&t===l(n)||u(t,n)},async setupScriptEnvironment(n,e){if(!i)try{const c=a(n);if(c&&c===l(n))return;if(!u(c,n))return;console.info(`${o} is running 'yarn install' due to dependency changes.`),t.spawnSync("yarn",["install"],{cwd:n.cwd,env:e}),console.info(`${o} finished 'yarn install'.`)}catch{}}}}}};module.exports=n;
//# sourceMappingURL=index.js.map
9 changes: 7 additions & 2 deletions .yarnrc.yml
Original file line number Diff line number Diff line change
@@ -1,9 +1,14 @@
defaultSemverRangePrefix: ''

enableGlobalCache: true

nmMode: hardlinks-global

nodeLinker: node-modules

plugins:
- checksum: ce19b56f51c3b3ec807f36dfef041828dbd2ea66757299b28b0e33dc3346a830b230bc81d60c04892a2655f46ebb1a5475c0f47f3ea0df555d8c6ebac87d2ca5
- checksum: 8b171ee8559cde7c8696b5459b49e19cb8ec2cdf942a6a64107706c803f5f1b9b96ae7378a32240ce5119807ac7cf12cd8dd32313188d2f72a3452d28e9c3e44
path: .yarn/plugins/plugin-auto-install.cjs
spec: https://github.com/WillBooster/yarn-plugin-auto-install/releases/download/v1.9.2/index.cjs
spec: 'https://github.com/WillBooster/yarn-plugin-auto-install/releases/download/v2.0.1/index.cjs'

yarnPath: .yarn/releases/yarn-4.0.2.cjs

0 comments on commit da44738

Please sign in to comment.