0.13.0
This commit is contained in:
1 parent
32059f6914
commit
94b137ac47
3 files changed
+18
-8
No files matched your search
@@ -1,3 +1,13 @@
|
||||
# 0.13.0
|
||||
|
||||
[link](https://github.com/jlongster/prettier/compare/0.12.0...0.13.0)
|
||||
|
||||
* Simplify arrow functions that use blocks (#496)
|
||||
* Properly print comments for BinaryExpression (#494)
|
||||
* Preserve empty line after comment (#493)
|
||||
* [JSX] Handle each line of text separately (#455)
|
||||
* Proper support for dangling comments (#492)
|
||||
|
||||
# 0.12.0
|
||||
|
||||
[link](https://github.com/jlongster/prettier/compare/0.11.0...0.12.0)
|
||||
|
||||
Vendored
+7
-7
@@ -1,14 +1,14 @@
|
||||
var prettier=function(){function Se(YT,MT){return MT={exports:{}},YT(MT,MT.exports),MT.exports}function Te(){throw new Error("setTimeout has not been defined")}function Pe(){throw new Error("clearTimeout has not been defined")}function _e(YT){if(Rc===setTimeout)return setTimeout(YT,0);if((Rc===Te||!Rc)&&setTimeout)return Rc=setTimeout,setTimeout(YT,0);try{return Rc(YT,0)}catch(MT){try{return Rc.call(null,YT,0)}catch(VT){return Rc.call(this,YT,0)}}}function Ne(YT){if(Oc===clearTimeout)return clearTimeout(YT);if((Oc===Pe||!Oc)&&clearTimeout)return Oc=clearTimeout,clearTimeout(YT);try{return Oc(YT)}catch(MT){try{return Oc.call(null,YT)}catch(VT){return Oc.call(this,YT)}}}function Le(){Mc&&Vc&&(Mc=!1,Vc.length?Yc=Vc.concat(Yc):Uc=-1,Yc.length&&Re())}function Re(){if(!Mc){var YT=_e(Le);Mc=!0;for(var MT=Yc.length;MT;){for(Vc=Yc,Yc=[];++Uc<MT;)Vc&&Vc[Uc].run();Uc=-1,MT=Yc.length}Vc=null,Mc=!1,Ne(YT)}}function Oe(YT,MT){this.fun=YT,this.array=MT}function Ye(){}function Me(YT){this.enabled=YT&&YT.enabled!==void 0?YT.enabled:Yu}function Ve(YT){var MT=function(){return Ue.apply(MT,arguments)};return MT._styles=YT,MT.enabled=this.enabled,MT.__proto__=Xu,MT}function Ue(){var YT=arguments,MT=YT.length,VT=0!==MT&&arguments[0]+"";if(1<MT)for(var UT=1;UT<MT;UT++)VT+=" "+YT[UT];if(!this.enabled||!VT)return VT;var XT=this._styles,WT=XT.length,JT=Ou.dim.open;for(Vu&&(-1!==XT.indexOf("gray")||-1!==XT.indexOf("grey"))&&(Ou.dim.open="");WT--;){var ZT=Ou[XT[WT]];VT=ZT.open+VT.replace(ZT.closeRe,ZT.open)+ZT.close}return Ou.dim.open=JT,VT}function Xe(){$u=!0;var YT="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";for(var MT=0,VT=YT.length;MT<VT;++MT)Zu[MT]=YT[MT],Ku[YT.charCodeAt(MT)]=MT;Ku["-".charCodeAt(0)]=62,Ku["_".charCodeAt(0)]=63}function We(YT){$u||Xe();var ZT=YT.length,MT,VT,UT,XT,WT,JT;if(0<ZT%4)throw new Error("Invalid string. Length must be a multiple of 4");WT="="===YT[ZT-2]?2:"="===YT[ZT-1]?1:0,JT=new Qu(3*ZT/4-WT),UT=0<WT?ZT-4:ZT;var KT=0;for(MT=0,VT=0;MT<UT;MT+=4,VT+=3)XT=Ku[YT.charCodeAt(MT)]<<18|Ku[YT.charCodeAt(MT+1)]<<12|Ku[YT.charCodeAt(MT+2)]<<6|Ku[YT.charCodeAt(MT+3)],JT[KT++]=255&XT>>16,JT[KT++]=255&XT>>8,JT[KT++]=255&XT;return 2===WT?(XT=Ku[YT.charCodeAt(MT)]<<2|Ku[YT.charCodeAt(MT+1)]>>4,JT[KT++]=255&XT):1==WT&&(XT=Ku[YT.charCodeAt(MT)]<<10|Ku[YT.charCodeAt(MT+1)]<<4|Ku[YT.charCodeAt(MT+2)]>>2,JT[KT++]=255&XT>>8,JT[KT++]=255&XT),JT}function Je(YT){return Zu[63&YT>>18]+Zu[63&YT>>12]+Zu[63&YT>>6]+Zu[63&YT]}function Ze(YT,MT,VT){var UT,XT=[];for(var WT=MT;WT<VT;WT+=3)UT=(YT[WT]<<16)+(YT[WT+1]<<8)+YT[WT+2],XT.push(Je(UT));return XT.join("")}function Ke(YT){$u||Xe();var VT=YT.length,UT=VT%3,XT="",WT=[],JT=16383,MT;for(var ZT=0,KT=VT-UT;ZT<KT;ZT+=JT)WT.push(Ze(YT,ZT,ZT+JT>KT?KT:ZT+JT));return 1==UT?(MT=YT[VT-1],XT+=Zu[MT>>2],XT+=Zu[63&MT<<4],XT+="=="):2==UT&&(MT=(YT[VT-2]<<8)+YT[VT-1],XT+=Zu[MT>>10],XT+=Zu[63&MT>>4],XT+=Zu[63&MT<<2],XT+="="),WT.push(XT),WT.join("")}function Qe(YT,MT,VT,UT,XT){var WT,JT,ZT=8*XT-UT-1,KT=(1<<ZT)-1,QT=KT>>1,$T=-7,SA=VT?XT-1:0,TA=VT?-1:1,PA=YT[MT+SA];for(SA+=TA,WT=PA&(1<<-$T)-1,PA>>=-$T,$T+=ZT;0<$T;WT=256*WT+YT[MT+SA],SA+=TA,$T-=8);for(JT=WT&(1<<-$T)-1,WT>>=-$T,$T+=UT;0<$T;JT=256*JT+YT[MT+SA],SA+=TA,$T-=8);if(0===WT)WT=1-QT;else{if(WT===KT)return JT?NaN:(PA?-1:1)*Infinity;JT+=Math.pow(2,UT),WT-=QT}return(PA?-1:1)*JT*Math.pow(2,WT-UT)}function $e(YT,MT,VT,UT,XT,WT){var JT,ZT,KT,QT=8*WT-XT-1,$T=(1<<QT)-1,SA=$T>>1,TA=23===XT?Math.pow(2,-24)-Math.pow(2,-77):0,PA=UT?0:WT-1,_A=UT?1:-1,NA=0>MT||0===MT&&0>1/MT?1:0;for(MT=Math.abs(MT),isNaN(MT)||MT===Infinity?(ZT=isNaN(MT)?1:0,JT=$T):(JT=Math.floor(Math.log(MT)/Math.LN2),1>MT*(KT=Math.pow(2,-JT))&&(JT--,KT*=2),MT+=1<=JT+SA?TA/KT:TA*Math.pow(2,1-SA),2<=MT*KT&&(JT++,KT/=2),JT+SA>=$T?(ZT=0,JT=$T):1<=JT+SA?(ZT=(MT*KT-1)*Math.pow(2,XT),JT+=SA):(ZT=MT*Math.pow(2,SA-1)*Math.pow(2,XT),JT=0));8<=XT;YT[VT+PA]=255&ZT,PA+=_A,ZT/=256,XT-=8);for(JT=JT<<XT|ZT,QT+=XT;0<QT;YT[VT+PA]=255&JT,PA+=_A,JT/=256,QT-=8);YT[VT+PA-_A]|=128*NA}function St(){return Pt.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function Tt(YT,MT){if(St()<MT)throw new RangeError("Invalid typed array length");return Pt.TYPED_ARRAY_SUPPORT?(YT=new Uint8Array(MT),YT.__proto__=Pt.prototype):(null===YT&&(YT=new Pt(MT)),YT.length=MT),YT}function Pt(YT,MT,VT){if(!Pt.TYPED_ARRAY_SUPPORT&&!(this instanceof Pt))return new Pt(YT,MT,VT);if("number"==typeof YT){if("string"==typeof MT)throw new Error("If encoding is specified then the first argument must be a string");return Lt(this,YT)}return _t(this,YT,MT,VT)}function _t(YT,MT,VT,UT){if("number"==typeof MT)throw new TypeError("\"value\" argument must not be a number");return"undefined"!=typeof ArrayBuffer&&MT instanceof ArrayBuffer?Yt(YT,MT,VT,UT):"string"==typeof MT?Rt(YT,MT,VT):Mt(YT,MT)}function Nt(YT){if("number"!=typeof YT)throw new TypeError("\"size\" argument must be a number");else if(0>YT)throw new RangeError("\"size\" argument must not be negative")}function It(YT,MT,VT,UT){return Nt(MT),0>=MT?Tt(YT,MT):void 0===VT?Tt(YT,MT):Line truncated
|
||||
${OS.bold.green(XS(VT))}
|
||||
var prettier=function(){function Se(MT,VT){return VT={exports:{}},MT(VT,VT.exports),VT.exports}function Te(){throw new Error("setTimeout has not been defined")}function Pe(){throw new Error("clearTimeout has not been defined")}function _e(MT){if(Rc===setTimeout)return setTimeout(MT,0);if((Rc===Te||!Rc)&&setTimeout)return Rc=setTimeout,setTimeout(MT,0);try{return Rc(MT,0)}catch(VT){try{return Rc.call(null,MT,0)}catch(UT){return Rc.call(this,MT,0)}}}function Ne(MT){if(Oc===clearTimeout)return clearTimeout(MT);if((Oc===Pe||!Oc)&&clearTimeout)return Oc=clearTimeout,clearTimeout(MT);try{return Oc(MT)}catch(VT){try{return Oc.call(null,MT)}catch(UT){return Oc.call(this,MT)}}}function Le(){Mc&&Vc&&(Mc=!1,Vc.length?Yc=Vc.concat(Yc):Uc=-1,Yc.length&&Re())}function Re(){if(!Mc){var MT=_e(Le);Mc=!0;for(var VT=Yc.length;VT;){for(Vc=Yc,Yc=[];++Uc<VT;)Vc&&Vc[Uc].run();Uc=-1,VT=Yc.length}Vc=null,Mc=!1,Ne(MT)}}function Oe(MT,VT){this.fun=MT,this.array=VT}function Ye(){}function Me(MT){this.enabled=MT&&MT.enabled!==void 0?MT.enabled:Yu}function Ve(MT){var VT=function(){return Ue.apply(VT,arguments)};return VT._styles=MT,VT.enabled=this.enabled,VT.__proto__=Xu,VT}function Ue(){var MT=arguments,VT=MT.length,UT=0!==VT&&arguments[0]+"";if(1<VT)for(var XT=1;XT<VT;XT++)UT+=" "+MT[XT];if(!this.enabled||!UT)return UT;var WT=this._styles,JT=WT.length,ZT=Ou.dim.open;for(Vu&&(-1!==WT.indexOf("gray")||-1!==WT.indexOf("grey"))&&(Ou.dim.open="");JT--;){var KT=Ou[WT[JT]];UT=KT.open+UT.replace(KT.closeRe,KT.open)+KT.close}return Ou.dim.open=ZT,UT}function Xe(){$u=!0;var MT="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";for(var VT=0,UT=MT.length;VT<UT;++VT)Zu[VT]=MT[VT],Ku[MT.charCodeAt(VT)]=VT;Ku["-".charCodeAt(0)]=62,Ku["_".charCodeAt(0)]=63}function We(MT){$u||Xe();var KT=MT.length,VT,UT,XT,WT,JT,ZT;if(0<KT%4)throw new Error("Invalid string. Length must be a multiple of 4");JT="="===MT[KT-2]?2:"="===MT[KT-1]?1:0,ZT=new Qu(3*KT/4-JT),XT=0<JT?KT-4:KT;var QT=0;for(VT=0,UT=0;VT<XT;VT+=4,UT+=3)WT=Ku[MT.charCodeAt(VT)]<<18|Ku[MT.charCodeAt(VT+1)]<<12|Ku[MT.charCodeAt(VT+2)]<<6|Ku[MT.charCodeAt(VT+3)],ZT[QT++]=255&WT>>16,ZT[QT++]=255&WT>>8,ZT[QT++]=255&WT;return 2===JT?(WT=Ku[MT.charCodeAt(VT)]<<2|Ku[MT.charCodeAt(VT+1)]>>4,ZT[QT++]=255&WT):1==JT&&(WT=Ku[MT.charCodeAt(VT)]<<10|Ku[MT.charCodeAt(VT+1)]<<4|Ku[MT.charCodeAt(VT+2)]>>2,ZT[QT++]=255&WT>>8,ZT[QT++]=255&WT),ZT}function Je(MT){return Zu[63&MT>>18]+Zu[63&MT>>12]+Zu[63&MT>>6]+Zu[63&MT]}function Ze(MT,VT,UT){var XT,WT=[];for(var JT=VT;JT<UT;JT+=3)XT=(MT[JT]<<16)+(MT[JT+1]<<8)+MT[JT+2],WT.push(Je(XT));return WT.join("")}function Ke(MT){$u||Xe();var UT=MT.length,XT=UT%3,WT="",JT=[],ZT=16383,VT;for(var KT=0,QT=UT-XT;KT<QT;KT+=ZT)JT.push(Ze(MT,KT,KT+ZT>QT?QT:KT+ZT));return 1==XT?(VT=MT[UT-1],WT+=Zu[VT>>2],WT+=Zu[63&VT<<4],WT+="=="):2==XT&&(VT=(MT[UT-2]<<8)+MT[UT-1],WT+=Zu[VT>>10],WT+=Zu[63&VT>>4],WT+=Zu[63&VT<<2],WT+="="),JT.push(WT),JT.join("")}function Qe(MT,VT,UT,XT,WT){var JT,ZT,KT=8*WT-XT-1,QT=(1<<KT)-1,$T=QT>>1,SA=-7,TA=UT?WT-1:0,PA=UT?-1:1,_A=MT[VT+TA];for(TA+=PA,JT=_A&(1<<-SA)-1,_A>>=-SA,SA+=KT;0<SA;JT=256*JT+MT[VT+TA],TA+=PA,SA-=8);for(ZT=JT&(1<<-SA)-1,JT>>=-SA,SA+=XT;0<SA;ZT=256*ZT+MT[VT+TA],TA+=PA,SA-=8);if(0===JT)JT=1-$T;else{if(JT===QT)return ZT?NaN:(_A?-1:1)*Infinity;ZT+=Math.pow(2,XT),JT-=$T}return(_A?-1:1)*ZT*Math.pow(2,JT-XT)}function $e(MT,VT,UT,XT,WT,JT){var ZT,KT,QT,$T=8*JT-WT-1,SA=(1<<$T)-1,TA=SA>>1,PA=23===WT?Math.pow(2,-24)-Math.pow(2,-77):0,_A=XT?0:JT-1,NA=XT?1:-1,IA=0>VT||0===VT&&0>1/VT?1:0;for(VT=Math.abs(VT),isNaN(VT)||VT===Infinity?(KT=isNaN(VT)?1:0,ZT=SA):(ZT=Math.floor(Math.log(VT)/Math.LN2),1>VT*(QT=Math.pow(2,-ZT))&&(ZT--,QT*=2),VT+=1<=ZT+TA?PA/QT:PA*Math.pow(2,1-TA),2<=VT*QT&&(ZT++,QT/=2),ZT+TA>=SA?(KT=0,ZT=SA):1<=ZT+TA?(KT=(VT*QT-1)*Math.pow(2,WT),ZT+=TA):(KT=VT*Math.pow(2,TA-1)*Math.pow(2,WT),ZT=0));8<=WT;MT[UT+_A]=255&KT,_A+=NA,KT/=256,WT-=8);for(ZT=ZT<<WT|KT,$T+=WT;0<$T;MT[UT+_A]=255&ZT,_A+=NA,ZT/=256,$T-=8);MT[UT+_A-NA]|=128*IA}function St(){return Pt.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function Tt(MT,VT){if(St()<VT)throw new RangeError("Invalid typed array length");return Pt.TYPED_ARRAY_SUPPORT?(MT=new Uint8Array(VT),MT.__proto__=Pt.prototype):(null===MT&&(MT=new Pt(VT)),MT.length=VT),MT}function Pt(MT,VT,UT){if(!Pt.TYPED_ARRAY_SUPPORT&&!(this instanceof Pt))return new Pt(MT,VT,UT);if("number"==typeof MT){if("string"==typeof VT)throw new Error("If encoding is specified then the first argument must be a string");return Lt(this,MT)}return _t(this,MT,VT,UT)}function _t(MT,VT,UT,XT){if("number"==typeof VT)throw new TypeError("\"value\" argument must not be a number");return"undefined"!=typeof ArrayBuffer&&VT instanceof ArrayBuffer?Yt(MT,VT,UT,XT):"string"==typeof VT?Rt(MT,VT,UT):Mt(MT,VT)}function Nt(MT){if("number"!=typeof MT)throw new TypeError("\"size\" argument must be a number");else if(0>MT)throw new RangeError("\"size\" argument must not be negative")}function It(MT,VT,UT,XT){return Nt(VT),0>=VT?Tt(MT,VT):void 0===UT?Tt(MT,VT):Line truncated
|
||||
${YS.bold.green(WS(UT))}
|
||||
but instead received:
|
||||
${OS.bold.red(XS(MT))}
|
||||
${YS.bold.red(WS(VT))}
|
||||
|
||||
Example:
|
||||
{
|
||||
${OS.bold(`"${YT}"`)}: ${OS.bold(MS(VT))}
|
||||
}`,WT=UT.comment,JT=UT.title&&UT.title.error||US;throw new VS(JT,XT,WT)}},JS=Wx;const ZS=JS.logValidationWarning,KS=JS.DEPRECATION,QS=(YT,MT)=>{const VT=MT.comment,UT=MT.title&&MT.title.deprecation||KS;ZS(UT,YT,VT)},$S=Wu;var SE=Wx;const TE=SE.format,PE=SE.logValidationWarning,_E=SE.createDidYouMeanMessage,NE=SE.WARNING,IE=Object.prototype.toString,LE={deprecationWarning:(YT,MT,VT,UT)=>{MT in VT&&QS(VT[MT](YT),UT)}}.deprecationWarning,RE={unknownOptionWarning:(YT,MT,VT,UT)=>{const XT=_E(VT,Object.keys(MT)),WT=` Unknown option ${$S.bold(`"${VT}"`)} with value ${$S.bold(TE(YT[VT]))} was found.`+(XT&&` ${XT}`)+`\n This is probably a typing mistake. Fixing it will remove this message.`,JT=UT.comment,ZT=UT.title&&UT.title.warning||NE;PE(ZT,WT,JT)}}.unknownOptionWarning,OE=WS.errorMessage;var YE=Wx;const ME=YE.ERROR,VE=YE.DEPRECATION,UE=YE.WARNING,XE={comment:"",condition:(YT,MT)=>{return null===YT||YT===void 0||IE.call(YT)===IE.call(MT)},deprecate:LE,deprecatedConfig:{},error:OE,exampleConfig:{comment:" A comment",condition:()=>!0,deprecate:()=>{},deprecatedConfig:{key:()=>{}},error:()=>{},exampleConfig:{key:"value",test:"case"},title:{deprecation:"Deprecation Warning",error:"Validation Error",warning:"Validation Warning"},unknown:()=>{}},title:{deprecation:VE,error:ME,warning:UE},unknown:RE},WE=(YT,MT)=>{for(const VT in YT)hasOwnProperty.call(MT.exampleConfig,VT)?"function"!=typeof MT.condition||"function"!=typeof MT.error||MT.condition(YT[VT],MT.exampleConfig[VT])||MT.error(VT,YT[VT],MT.exampleConfig[VT],MT):MT.deprecatedConfig&&VT in MT.deprecatedConfig&&"function"==typeof MT.deprecate?MT.deprecate(YT,VT,MT.deprecatedConfig,MT):MT.unknown&&MT.unknown(YT,MT.exampleConfig,VT,MT)};var JE={ValidationError:WS.ValidationError,createDidYouMeanMessage:Wx.createDidYouMeanMessage,logValidationWarning:Wx.logValidationWarning,validate:(YT,MT)=>{WE(MT,XE);const VT=Object.assign({},XE,MT,{title:Object.assign({},XE.title,MT.title)});return WE(YT,VT),!0}},ZE=JE.validate,KE={useFlowParser:YT=>` The ${"\"useFlowParser\""} option is deprecated. Use ${"\"parser\""} instead.
|
||||
${YS.bold(`"${MT}"`)}: ${YS.bold(VS(UT))}
|
||||
}`,JT=XT.comment,ZT=XT.title&&XT.title.error||XS;throw new US(ZT,WT,JT)}},ZS=Jx;const KS=ZS.logValidationWarning,QS=ZS.DEPRECATION,$S=(MT,VT)=>{const UT=VT.comment,XT=VT.title&&VT.title.deprecation||QS;KS(XT,MT,UT)},SE=Wu;var TE=Jx;const PE=TE.format,_E=TE.logValidationWarning,NE=TE.createDidYouMeanMessage,IE=TE.WARNING,LE=Object.prototype.toString,RE={deprecationWarning:(MT,VT,UT,XT)=>{VT in UT&&$S(UT[VT](MT),XT)}}.deprecationWarning,OE={unknownOptionWarning:(MT,VT,UT,XT)=>{const WT=NE(UT,Object.keys(VT)),JT=` Unknown option ${SE.bold(`"${UT}"`)} with value ${SE.bold(PE(MT[UT]))} was found.`+(WT&&` ${WT}`)+`\n This is probably a typing mistake. Fixing it will remove this message.`,ZT=XT.comment,KT=XT.title&&XT.title.warning||IE;_E(KT,JT,ZT)}}.unknownOptionWarning,YE=JS.errorMessage;var ME=Jx;const VE=ME.ERROR,UE=ME.DEPRECATION,XE=ME.WARNING,WE={comment:"",condition:(MT,VT)=>{return null===MT||MT===void 0||LE.call(MT)===LE.call(VT)},deprecate:RE,deprecatedConfig:{},error:YE,exampleConfig:{comment:" A comment",condition:()=>!0,deprecate:()=>{},deprecatedConfig:{key:()=>{}},error:()=>{},exampleConfig:{key:"value",test:"case"},title:{deprecation:"Deprecation Warning",error:"Validation Error",warning:"Validation Warning"},unknown:()=>{}},title:{deprecation:UE,error:VE,warning:XE},unknown:OE},JE=(MT,VT)=>{for(const UT in MT)hasOwnProperty.call(VT.exampleConfig,UT)?"function"!=typeof VT.condition||"function"!=typeof VT.error||VT.condition(MT[UT],VT.exampleConfig[UT])||VT.error(UT,MT[UT],VT.exampleConfig[UT],VT):VT.deprecatedConfig&&UT in VT.deprecatedConfig&&"function"==typeof VT.deprecate?VT.deprecate(MT,UT,VT.deprecatedConfig,VT):VT.unknown&&VT.unknown(MT,VT.exampleConfig,UT,VT)};var ZE={ValidationError:JS.ValidationError,createDidYouMeanMessage:Jx.createDidYouMeanMessage,logValidationWarning:Jx.logValidationWarning,validate:(MT,VT)=>{JE(VT,WE);const UT=Object.assign({},WE,VT,{title:Object.assign({},WE.title,VT.title)});return JE(MT,UT),!0}},KE=ZE.validate,QE={useFlowParser:MT=>` The ${"\"useFlowParser\""} option is deprecated. Use ${"\"parser\""} instead.
|
||||
|
||||
Prettier now treats your configuration as:
|
||||
{
|
||||
${"\"parser\""}: ${YT.useFlowParser?"\"flow\"":"\"babylon\""}
|
||||
}`},QE={tabWidth:2,printWidth:80,singleQuote:!1,trailingComma:!1,bracketSpacing:!0,parser:"babylon"},$E=Object.assign({},QE,{filename:"testFilename",printWidth:80,originalText:"text"}),ST=Se(function(YT,MT){(function(VT){"use strict";function UT(HCe,GCe){throw[0,HCe,GCe]}function XT(HCe,GCe){if(typeof GCe===WY)return HCe.fun=GCe,0;if(GCe.fun)return HCe.fun=GCe.fun,0;for(var ZCe=GCe.length;ZCe--;)HCe[ZCe]=GCe[ZCe];return 0}function WT(HCe,GCe,ZCe){if("number"==typeof HCe)switch(HCe){case 0:GCe.fun=ZCe;break;case 1:default:XT(GCe,ZCe);}else switch(HCe[0]){case 0:for(var KCe=1;KCe<HCe[1].length;KCe++)WT(HCe[1][KCe],GCe[KCe],ZCe[KCe]);}return 0}function JT(HCe,GCe){var ZCe=HCe.length,KCe=GCe.length,QCe=ZCe+KCe-1,$Ce=Array(QCe);$Ce[0]=0;for(var ewe=1,twe=1;ewe<ZCe;ewe++)$Ce[ewe]=HCe[ewe];for(;ewe<QCe;ewe++,twe++)$Ce[ewe]=GCe[twe];return $Ce}function ZT(HCe,GCe,ZCe,KCe,QCe){if(KCe<=GCe)for(var $Ce=1;$Ce<=QCe;$Ce++)ZCe[KCe+$Ce]=HCe[GCe+$Ce];else for(var $Ce=QCe;1<=$Ce;$Ce--)ZCe[KCe+$Ce]=HCe[GCe+$Ce];return 0}function KT(HCe,GCe,ZCe){var KCe=Array(ZCe+1);KCe[0]=0;for(var QCe=1,$Ce=GCe+1;QCe<=ZCe;QCe++,$Ce++)KCe[QCe]=HCe[$Ce];return KCe}function QT(HCe,GCe,ZCe){var KCe=Array(ZCe);for(var QCe=0;QCe<ZCe;QCe++)KCe[QCe]=HCe[GCe+QCe];return KCe}function $T(HCe,GCe,ZCe){var KCe=String.fromCharCode;if(0==GCe&&4096>=ZCe&&ZCe==HCe.length)return KCe.apply(null,HCe);for(var QCe=_W;0<ZCe;GCe+=LX,ZCe-=LX)QCe+=KCe.apply(null,QT(HCe,GCe,Math.min(ZCe,LX)));return QCe}function SA(HCe){for(var GCe=Array(HCe.l),ZCe=HCe.c,KCe=ZCe.length,QCe=0;QCe<KCe;QCe++)GCe[QCe]=ZCe.charCodeAt(QCe);for(KCe=HCe.l;QCe<KCe;QCe++)GCe[QCe]=0;return HCe.c=GCe,HCe.t=4,GCe}function TA(HCe,GCe,ZCe,KCe,QCe){if(0==QCe)return 0;if(0==KCe&&(QCe>=ZCe.l||2==ZCe.t&&QCe>=ZCe.c.length))ZCe.c=4==HCe.t?$T(HCe.c,GCe,QCe):0==GCe&&HCe.c.length==QCe?HCe.c:HCe.c.substr(GCe,QCe),ZCe.t=ZCe.c.length==ZCe.l?0:2;else if(2==ZCe.t&&KCe==ZCe.c.length)ZCe.c+=4==HCe.t?$T(HCe.c,GCe,QCe):0==GCe&&HCe.c.length==QCe?HCe.c:HCe.c.substr(GCe,QCe),ZCe.t=ZCe.c.length==ZCe.l?0:2;else{4!=ZCe.t&&SA(ZCe);var $Ce=HCe.c,ewe=ZCe.c;if(4==HCe.t)for(var twe=0;twe<QCe;twe++)ewe[KCe+twe]=$Ce[GCe+twe];else{var awe=Math.min(QCe,$Ce.length-GCe);for(var twe=0;twe<awe;twe++)ewe[KCe+twe]=$Ce.charCodeAt(GCe+twe);for(;twe<QCe;twe++)ewe[KCe+twe]=0}}return 0}function PA(HCe,GCe){for(var ZCe=HCe.length,KCe=Array(ZCe+1),QCe=0;QCe<ZCe;QCe++)KCe[QCe]=HCe[QCe];return KCe[QCe]=GCe,KCe}function _A(HCe,GCe){if(HCe.fun)return _A(HCe.fun,GCe);var ZCe=HCe.length,KCe=GCe.length,QCe=ZCe-KCe;return 0==QCe?HCe.apply(null,GCe):0>QCe?_A(HCe.apply(null,QT(GCe,0,ZCe)),QT(GCe,ZCe,KCe-ZCe)):function($Ce){return _A(HCe,PA(GCe,$Ce))}}function NA(HCe,GCe){if(GCe.repeat)return GCe.repeat(HCe);var ZCe=_W,KCe=0;if(0==HCe)return ZCe;for(;;){if(1&HCe&&(ZCe+=GCe),HCe>>=1,0==HCe)return ZCe;GCe+=GCe,KCe++,9==KCe&&GCe.slice(0,1)}}function IA(HCe){2==HCe.t?HCe.c+=NA(HCe.l-HCe.c.length,"\0"):HCe.c=$T(HCe.c,0,HCe.c.length),HCe.t=0}function LA(HCe){if(24>HCe.length){for(var GCe=0;GCe<HCe.length;GCe++)if(HCe.charCodeAt(GCe)>Jq)return!1;return!0}return!/[^\x00-\x7f]/.test(HCe)}function RA(HCe){for(var GCe=_W,ZCe=_W,twe=0,awe=HCe.length,KCe,QCe,$Ce,ewe;twe<awe;twe++){if(QCe=HCe.charCodeAt(twe),QCe<JF){for(var nwe=twe+1;nwe<awe&&(QCe=HCe.charCodeAt(nwe))<JF;nwe++);if(nwe-twe>PF?(ZCe.substr(0,1),GCe+=ZCe,ZCe=_W,GCe+=HCe.slice(twe,nwe)):ZCe+=HCe.slice(twe,nwe),nwe==awe)break;twe=nwe}ewe=1,++twe<awe&&(-64&($Ce=HCe.charCodeAt(twe)))==JF&&(KCe=$Ce+(QCe<<6),QCe<JU?(ewe=KCe-12416,ewe<JF&&(ewe=1)):(ewe=2,++twe<awe&&(-64&($Ce=HCe.charCodeAt(twe)))==JF&&(KCe=$Ce+(KCe<<6),QCe<KB?(ewe=KCe-925824,(ewe<SU||55295<=ewe&&57344>ewe)&&(ewe=2)):(ewe=3,++twe<awe&&(-64&($Ce=HCe.charCodeAt(twe)))==JF&&QCe<KJ&&(ewe=$Ce-63447168+(KCe<<6),(ewe<$U||ewe>TV)&&(ewe=3)))))),4>ewe?(twe-=ewe,ZCe+="\uFFFD"):ewe>Nq?ZCe+=String.fromCharCode(55232+(ewe>>10),ZJ+(ewe&RM)):ZCe+=String.fromCharCode(ewe),ZCe.length>LX&&(ZCe.substr(0,1),GCe+=ZCe,ZCe=_W)}return GCe+ZCe}function OA(HCe){switch(HCe.t){case 9:return HCe.c;default:IA(HCe);case 0:if(LA(HCe.c))return HCe.t=9,HCe.c;HCe.t=8;case 8:return RA(HCe.c);}}function YA(HCe,GCe,ZCe){this.t=HCe,this.c=GCe,this.l=ZCe}function MA(HCe){return new YA(0,HCe,HCe.length)}function VA(HCe,GCe){UT(HCe,MA(GCe))}function UA(HCe){VA(Wz.Invalid_argument,HCe)}function XA(){UA(YU)}function WA(HCe,GCe){return GCe>>>0>=HCe.length-1&&XA(),HCe}function JA(HCe){return isFinite(HCe)?2.2250738585072014e-308<=Math.abs(HCe)?0:0==HCe?2:1:isNaN(HCe)?4:3}function ZA(HCe,GCe){var ZCe=HCe[3]<<16,KCe=GCe[3]<<16;return ZCe>KCe?1:ZCe<KCe?-1:HCe[2]>GCe[2]?1:HCe[2]<GCe[2]?-1:HCe[1]>GCe[1]?1:HCe[1]<GCe[1]?-1:0}function KA(HCe,GCe){return HCe<GCe?-1:HCe==GCe?0:1}function QA(HCe,GCe){return 6&HCe.t&&IA(HCe),6&GCe.t&&IA(GCe),HCe.c<GCe.c?-1:HCe.c>GCe.c?1:0}function $A(HCe,GCe,ZCe){for(var KCe=[];;){if(!(ZCe&&HCe===GCe))if(HCe instanceof YA){if(!(GCe instanceof YA))return 1;else if(HCe!==GCe){var QCe=QA(HCe,GCe);if(0!=QCe)return QCe}}else if(HCe instanceof Array&&HCe[0]===(0|HCe[0])){va
Line truncated
|
||||
${"\"parser\""}: ${MT.useFlowParser?"\"flow\"":"\"babylon\""}
|
||||
}`},$E={tabWidth:2,printWidth:80,singleQuote:!1,trailingComma:!1,bracketSpacing:!0,parser:"babylon"},ST=Object.assign({},$E,{filename:"testFilename",printWidth:80,originalText:"text"}),TT=Se(function(MT,VT){(function(UT){"use strict";function XT(GCe,ZCe){throw[0,GCe,ZCe]}function WT(GCe,ZCe){if(typeof ZCe===JY)return GCe.fun=ZCe,0;if(ZCe.fun)return GCe.fun=ZCe.fun,0;for(var KCe=ZCe.length;KCe--;)GCe[KCe]=ZCe[KCe];return 0}function JT(GCe,ZCe,KCe){if("number"==typeof GCe)switch(GCe){case 0:ZCe.fun=KCe;break;case 1:default:WT(ZCe,KCe);}else switch(GCe[0]){case 0:for(var QCe=1;QCe<GCe[1].length;QCe++)JT(GCe[1][QCe],ZCe[QCe],KCe[QCe]);}return 0}function ZT(GCe,ZCe){var KCe=GCe.length,QCe=ZCe.length,$Ce=KCe+QCe-1,ewe=Array($Ce);ewe[0]=0;for(var twe=1,awe=1;twe<KCe;twe++)ewe[twe]=GCe[twe];for(;twe<$Ce;twe++,awe++)ewe[twe]=ZCe[awe];return ewe}function KT(GCe,ZCe,KCe,QCe,$Ce){if(QCe<=ZCe)for(var ewe=1;ewe<=$Ce;ewe++)KCe[QCe+ewe]=GCe[ZCe+ewe];else for(var ewe=$Ce;1<=ewe;ewe--)KCe[QCe+ewe]=GCe[ZCe+ewe];return 0}function QT(GCe,ZCe,KCe){var QCe=Array(KCe+1);QCe[0]=0;for(var $Ce=1,ewe=ZCe+1;$Ce<=KCe;$Ce++,ewe++)QCe[$Ce]=GCe[ewe];return QCe}function $T(GCe,ZCe,KCe){var QCe=Array(KCe);for(var $Ce=0;$Ce<KCe;$Ce++)QCe[$Ce]=GCe[ZCe+$Ce];return QCe}function SA(GCe,ZCe,KCe){var QCe=String.fromCharCode;if(0==ZCe&&4096>=KCe&&KCe==GCe.length)return QCe.apply(null,GCe);for(var $Ce=NW;0<KCe;ZCe+=RX,KCe-=RX)$Ce+=QCe.apply(null,$T(GCe,ZCe,Math.min(KCe,RX)));return $Ce}function TA(GCe){for(var ZCe=Array(GCe.l),KCe=GCe.c,QCe=KCe.length,$Ce=0;$Ce<QCe;$Ce++)ZCe[$Ce]=KCe.charCodeAt($Ce);for(QCe=GCe.l;$Ce<QCe;$Ce++)ZCe[$Ce]=0;return GCe.c=ZCe,GCe.t=4,ZCe}function PA(GCe,ZCe,KCe,QCe,$Ce){if(0==$Ce)return 0;if(0==QCe&&($Ce>=KCe.l||2==KCe.t&&$Ce>=KCe.c.length))KCe.c=4==GCe.t?SA(GCe.c,ZCe,$Ce):0==ZCe&&GCe.c.length==$Ce?GCe.c:GCe.c.substr(ZCe,$Ce),KCe.t=KCe.c.length==KCe.l?0:2;else if(2==KCe.t&&QCe==KCe.c.length)KCe.c+=4==GCe.t?SA(GCe.c,ZCe,$Ce):0==ZCe&&GCe.c.length==$Ce?GCe.c:GCe.c.substr(ZCe,$Ce),KCe.t=KCe.c.length==KCe.l?0:2;else{4!=KCe.t&&TA(KCe);var ewe=GCe.c,twe=KCe.c;if(4==GCe.t)for(var awe=0;awe<$Ce;awe++)twe[QCe+awe]=ewe[ZCe+awe];else{var nwe=Math.min($Ce,ewe.length-ZCe);for(var awe=0;awe<nwe;awe++)twe[QCe+awe]=ewe.charCodeAt(ZCe+awe);for(;awe<$Ce;awe++)twe[QCe+awe]=0}}return 0}function _A(GCe,ZCe){for(var KCe=GCe.length,QCe=Array(KCe+1),$Ce=0;$Ce<KCe;$Ce++)QCe[$Ce]=GCe[$Ce];return QCe[$Ce]=ZCe,QCe}function NA(GCe,ZCe){if(GCe.fun)return NA(GCe.fun,ZCe);var KCe=GCe.length,QCe=ZCe.length,$Ce=KCe-QCe;return 0==$Ce?GCe.apply(null,ZCe):0>$Ce?NA(GCe.apply(null,$T(ZCe,0,KCe)),$T(ZCe,KCe,QCe-KCe)):function(ewe){return NA(GCe,_A(ZCe,ewe))}}function IA(GCe,ZCe){if(ZCe.repeat)return ZCe.repeat(GCe);var KCe=NW,QCe=0;if(0==GCe)return KCe;for(;;){if(1&GCe&&(KCe+=ZCe),GCe>>=1,0==GCe)return KCe;ZCe+=ZCe,QCe++,9==QCe&&ZCe.slice(0,1)}}function LA(GCe){2==GCe.t?GCe.c+=IA(GCe.l-GCe.c.length,"\0"):GCe.c=SA(GCe.c,0,GCe.c.length),GCe.t=0}function RA(GCe){if(24>GCe.length){for(var ZCe=0;ZCe<GCe.length;ZCe++)if(GCe.charCodeAt(ZCe)>Zq)return!1;return!0}return!/[^\x00-\x7f]/.test(GCe)}function OA(GCe){for(var ZCe=NW,KCe=NW,awe=0,nwe=GCe.length,QCe,$Ce,ewe,twe;awe<nwe;awe++){if($Ce=GCe.charCodeAt(awe),$Ce<ZF){for(var rwe=awe+1;rwe<nwe&&($Ce=GCe.charCodeAt(rwe))<ZF;rwe++);if(rwe-awe>_F?(KCe.substr(0,1),ZCe+=KCe,KCe=NW,ZCe+=GCe.slice(awe,rwe)):KCe+=GCe.slice(awe,rwe),rwe==nwe)break;awe=rwe}twe=1,++awe<nwe&&(-64&(ewe=GCe.charCodeAt(awe)))==ZF&&(QCe=ewe+($Ce<<6),$Ce<ZU?(twe=QCe-12416,twe<ZF&&(twe=1)):(twe=2,++awe<nwe&&(-64&(ewe=GCe.charCodeAt(awe)))==ZF&&(QCe=ewe+(QCe<<6),$Ce<QB?(twe=QCe-925824,(twe<TU||55295<=twe&&57344>twe)&&(twe=2)):(twe=3,++awe<nwe&&(-64&(ewe=GCe.charCodeAt(awe)))==ZF&&$Ce<QJ&&(twe=ewe-63447168+(QCe<<6),(twe<SX||twe>PV)&&(twe=3)))))),4>twe?(awe-=twe,KCe+="\uFFFD"):twe>Lq?KCe+=String.fromCharCode(55232+(twe>>10),KJ+(twe&OM)):KCe+=String.fromCharCode(twe),KCe.length>RX&&(KCe.substr(0,1),ZCe+=KCe,KCe=NW)}return ZCe+KCe}function YA(GCe){switch(GCe.t){case 9:return GCe.c;default:LA(GCe);case 0:if(RA(GCe.c))return GCe.t=9,GCe.c;GCe.t=8;case 8:return OA(GCe.c);}}function MA(GCe,ZCe,KCe){this.t=GCe,this.c=ZCe,this.l=KCe}function VA(GCe){return new MA(0,GCe,GCe.length)}function UA(GCe,ZCe){XT(GCe,VA(ZCe))}function XA(GCe){UA(Jz.Invalid_argument,GCe)}function WA(){XA(MU)}function JA(GCe,ZCe){return ZCe>>>0>=GCe.length-1&&WA(),GCe}function ZA(GCe){return isFinite(GCe)?2.2250738585072014e-308<=Math.abs(GCe)?0:0==GCe?2:1:isNaN(GCe)?4:3}function KA(GCe,ZCe){var KCe=GCe[3]<<16,QCe=ZCe[3]<<16;return KCe>QCe?1:KCe<QCe?-1:GCe[2]>ZCe[2]?1:GCe[2]<ZCe[2]?-1:GCe[1]>ZCe[1]?1:GCe[1]<ZCe[1]?-1:0}function QA(GCe,ZCe){return GCe<ZCe?-1:GCe==ZCe?0:1}function $A(GCe,ZCe){return 6&GCe.t&&LA(GCe),6&ZCe.t&&LA(ZCe),GCe.c<ZCe.c?-1:GCe.c>ZCe.c?1:0}function SP(GCe,ZCe,KCe){for(var QCe=[];;){if(!(KCe&&GCe===ZCe))if(GCe instanceof MA){if(!(ZCe instanceof MA))return 1;else if(GCe!==ZCe){var $Ce=$A(GCe,ZCe);if(0!=$Ce)return $Ce}}else if(GCe instanceof Array&&GCe[0]===(0|GCe[0])){va
Line truncated
|
||||
+1
-1
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "prettier",
|
||||
"version": "0.12.0",
|
||||
"version": "0.13.0",
|
||||
"description": "Prettier is an opinionated JavaScript formatter",
|
||||
"bin": {
|
||||
"prettier": "./bin/prettier.js"
|
||||
|
||||
Reference in new issue
Block a user