diff --git a/.yarn/plugins/@yarnpkg/plugin-postinstall.cjs b/.yarn/plugins/@yarnpkg/plugin-postinstall.cjs index 6e9a305e5b..ef6887be43 100644 --- a/.yarn/plugins/@yarnpkg/plugin-postinstall.cjs +++ b/.yarn/plugins/@yarnpkg/plugin-postinstall.cjs @@ -1,8 +1,9 @@ /* eslint-disable */ +//prettier-ignore module.exports = { name: "@yarnpkg/plugin-postinstall", factory: function (require) { -var plugin;(()=>{"use strict";var e={d:(t,n)=>{for(var o in n)e.o(n,o)&&!e.o(t,o)&&Object.defineProperty(t,o,{enumerable:!0,get:n[o]})},o:(e,t)=>Object.prototype.hasOwnProperty.call(e,t),r:e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})}},t={};e.r(t),e.d(t,{default:()=>c});const n=require("@yarnpkg/core"),o=require("@yarnpkg/shell"),r=require("clipanion"),l={postinstall:{description:"Postinstall hook that will always run in Yarn v2",type:n.SettingsType.STRING,default:""}};var i=function(e,t,n,o){var r,l=arguments.length,i=l<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,n):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)i=Reflect.decorate(e,t,n,o);else for(var a=e.length-1;a>=0;a--)(r=e[a])&&(i=(l<3?r(i):l>3?r(t,n,i):r(t,n))||i);return l>3&&i&&Object.defineProperty(t,n,i),i};class a extends r.Command{async execute(){const e=(await n.Configuration.find(this.context.cwd,this.context.plugins)).get("postinstall");e&&o.execute(e)}}i([r.Command.Path("postinstall")],a.prototype,"execute",null);const c={configuration:l,commands:[a],hooks:{afterAllInstalled:e=>{const t=e.configuration.get("postinstall");t&&(console.log("Running postinstall script..."),o.execute(t))}}};plugin=t})(); +var plugin=(()=>{var w=Object.create,c=Object.defineProperty;var x=Object.getOwnPropertyDescriptor;var C=Object.getOwnPropertyNames;var P=Object.getPrototypeOf,N=Object.prototype.hasOwnProperty;var S=t=>c(t,"__esModule",{value:!0});var n=t=>{if(typeof require!="undefined")return require(t);throw new Error('Dynamic require of "'+t+'" is not supported')};var E=(t,e)=>{for(var o in e)c(t,o,{get:e[o],enumerable:!0})},T=(t,e,o)=>{if(e&&typeof e=="object"||typeof e=="function")for(let a of C(e))!N.call(t,a)&&a!=="default"&&c(t,a,{get:()=>e[a],enumerable:!(o=x(e,a))||o.enumerable});return t},i=t=>T(S(c(t!=null?w(P(t)):{},"default",t&&t.__esModule&&"default"in t?{get:()=>t.default,enumerable:!0}:{value:t,enumerable:!0})),t);var R={};E(R,{default:()=>A});var s=i(n("@yarnpkg/core")),k=i(n("@yarnpkg/cli")),h=i(n("clipanion"));var u=i(n("@yarnpkg/core")),d={postinstall:{description:"Postinstall hook that will always run in Yarn v2+",type:u.SettingsType.STRING,default:""}};var y=i(n("@yarnpkg/shell")),r=i(n("@yarnpkg/core")),f=async(t,e)=>{await e.report.startTimerPromise("Postinstall step",async()=>{if(process.env.YARN_ENABLE_SCRIPTS==="0"){let m=r.formatUtils.pretty(t.configuration,"YARN_ENABLE_SCRIPTS=0",r.formatUtils.Type.CODE);e.report.reportWarning(r.MessageName.UNNAMED,`Skipping postinstall because of ${m}`);return}switch(e.mode){case r.InstallMode.SkipBuild:case r.InstallMode.UpdateLockfile:{let m=r.formatUtils.pretty(t.configuration,`--mode=${e==null?void 0:e.mode}`,r.formatUtils.Type.CODE);e.report.reportWarning(r.MessageName.UNNAMED,`Skipping postinstall because of ${m}`);return}default:break}let o=t.configuration.get("postinstall"),a=r.formatUtils.pretty(t.configuration,o,r.formatUtils.Type.CODE),l=r.formatUtils.pretty(t.configuration,"workspace root",r.formatUtils.Type.PATH);e.report.reportInfo(r.MessageName.UNNAMED,`Running command ${a} from the ${l}...`),e.report.reportSeparator();let g=await(0,y.execute)(o,[],{cwd:t.cwd,stdout:e.report.createStreamReporter()});if(e.report.reportSeparator(),g!==0)throw new Error(`The postinstall command failed with exit code ${g}`)})};var p=class extends k.BaseCommand{async execute(){let e=await s.Configuration.find(this.context.cwd,this.context.plugins),{project:o}=await s.Project.find(e,this.context.cwd);return(await s.StreamReport.start({configuration:e,stdout:this.context.stdout},async l=>{await f(o,{cache:null,report:l})})).exitCode()}};p.paths=[["postinstall"]],p.usage=h.Command.Usage({description:'Manually trigger the "postinstall" command'});var M={configuration:d,commands:[p],hooks:{afterAllInstalled:f}},A=M;return R;})(); return plugin; } -}; \ No newline at end of file +}; diff --git a/.yarnrc.yml b/.yarnrc.yml index ef4c757021..6f4664b47d 100644 --- a/.yarnrc.yml +++ b/.yarnrc.yml @@ -4,7 +4,7 @@ plugins: - path: .yarn/plugins/@yarnpkg/plugin-constraints.cjs spec: '@yarnpkg/plugin-constraints' - path: .yarn/plugins/@yarnpkg/plugin-postinstall.cjs - spec: 'https://raw.githubusercontent.com/gravitywelluk/yarn-plugin-postinstall/master/bundles/%40yarnpkg/plugin-postinstall.js' + spec: 'https://raw.githubusercontent.com/emmenko/yarn-plugin-postinstall/nm-fix-no-postinstall/bundles/%40yarnpkg/plugin-postinstall.js' - path: .yarn/plugins/@yarnpkg/plugin-workspace-tools.cjs spec: '@yarnpkg/plugin-workspace-tools'