This commit is contained in:
Christopher Chedeau committed 2017-02-05 18:28:20 -08:00
1 parent b42e865c61
commit 98d04d8c70
3 files changed
+33 -8

No files matched your search

+25
View File
@@ -1,3 +1,28 @@
# 0.16.0
[link](https://github.com/jlongster/prettier/compare/0.15.0...0.16.0)
* Revert "Print \x and \u escapes in strings and regexes lowercase (#522)
* Fix ternary indent bug (#577)
* jsx parentheses fix (#580)
* Run prettier on 0.15.0 (#558)
* Add parenthesis around single argument arrow if comments (#573)
* Use breakParent inside of last arrow expansion (#559)
* Support dangling comments in ClassBody (#570)
* Make all the member expressions but the last one part of the first group (#589)
* Break long imports (#590)
* Remove the concept of globalPrecedingNode (#561)
* Remove test.js and put it back in the gitignore
* Fix use strict as expression statement (#602)
* Use arrow function when inputted that way for flow objects (#608)
* Better support try/catch comments (#607)
* Print CallExpression comments inside of memberChain (#600)
* Do not attach comments to EmptyStatement (#599)
* Fix files with only comments on the flow parser (#598)
* Remove first line special case (#597)
* Fix single indented JSX comment (#596)
* Print dangling on ast on all the paths
# 0.15.0
[link](https://github.com/jlongster/prettier/compare/0.14.1...0.15.0)
+7 -7
View File
@@ -1,14 +1,14 @@
var prettier=function(){function Se($T,SA){return SA={exports:{}},$T(SA,SA.exports),SA.exports}function Te(){throw new Error("setTimeout has not been defined")}function Pe(){throw new Error("clearTimeout has not been defined")}function _e($T){if(Jc===setTimeout)return setTimeout($T,0);if((Jc===Te||!Jc)&&setTimeout)return Jc=setTimeout,setTimeout($T,0);try{return Jc($T,0)}catch(SA){try{return Jc.call(null,$T,0)}catch(TA){return Jc.call(this,$T,0)}}}function Ne($T){if(Zc===clearTimeout)return clearTimeout($T);if((Zc===Pe||!Zc)&&clearTimeout)return Zc=clearTimeout,clearTimeout($T);try{return Zc($T)}catch(SA){try{return Zc.call(null,$T)}catch(TA){return Zc.call(this,$T)}}}function Le(){Qc&&$c&&(Qc=!1,$c.length?Kc=$c.concat(Kc):Su=-1,Kc.length&&Re())}function Re(){if(!Qc){var $T=_e(Le);Qc=!0;for(var SA=Kc.length;SA;){for($c=Kc,Kc=[];++Su<SA;)$c&&$c[Su].run();Su=-1,SA=Kc.length}$c=null,Qc=!1,Ne($T)}}function Oe($T,SA){this.fun=$T,this.array=SA}function Ye(){}function Me($T){this.enabled=$T&&$T.enabled!==void 0?$T.enabled:Ku}function Ve($T){var SA=function(){return Ue.apply(SA,arguments)};return SA._styles=$T,SA.enabled=this.enabled,SA.__proto__=Tm,SA}function Ue(){var $T=arguments,SA=$T.length,TA=0!==SA&&arguments[0]+"";if(1<SA)for(var PA=1;PA<SA;PA++)TA+=" "+$T[PA];if(!this.enabled||!TA)return TA;var _A=this._styles,NA=_A.length,IA=Zu.dim.open;for($u&&(-1!==_A.indexOf("gray")||-1!==_A.indexOf("grey"))&&(Zu.dim.open="");NA--;){var LA=Zu[_A[NA]];TA=LA.open+TA.replace(LA.closeRe,LA.open)+LA.close}return Zu.dim.open=IA,TA}function Xe(){Om=!0;var $T="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";for(var SA=0,TA=$T.length;SA<TA;++SA)Nm[SA]=$T[SA],Lm[$T.charCodeAt(SA)]=SA;Lm["-".charCodeAt(0)]=62,Lm["_".charCodeAt(0)]=63}function We($T){Om||Xe();var LA=$T.length,SA,TA,PA,_A,NA,IA;if(0<LA%4)throw new Error("Invalid string. Length must be a multiple of 4");NA="="===$T[LA-2]?2:"="===$T[LA-1]?1:0,IA=new Rm(3*LA/4-NA),PA=0<NA?LA-4:LA;var RA=0;for(SA=0,TA=0;SA<PA;SA+=4,TA+=3)_A=Lm[$T.charCodeAt(SA)]<<18|Lm[$T.charCodeAt(SA+1)]<<12|Lm[$T.charCodeAt(SA+2)]<<6|Lm[$T.charCodeAt(SA+3)],IA[RA++]=255&_A>>16,IA[RA++]=255&_A>>8,IA[RA++]=255&_A;return 2===NA?(_A=Lm[$T.charCodeAt(SA)]<<2|Lm[$T.charCodeAt(SA+1)]>>4,IA[RA++]=255&_A):1==NA&&(_A=Lm[$T.charCodeAt(SA)]<<10|Lm[$T.charCodeAt(SA+1)]<<4|Lm[$T.charCodeAt(SA+2)]>>2,IA[RA++]=255&_A>>8,IA[RA++]=255&_A),IA}function Je($T){return Nm[63&$T>>18]+Nm[63&$T>>12]+Nm[63&$T>>6]+Nm[63&$T]}function Ze($T,SA,TA){var PA,_A=[];for(var NA=SA;NA<TA;NA+=3)PA=($T[NA]<<16)+($T[NA+1]<<8)+$T[NA+2],_A.push(Je(PA));return _A.join("")}function Ke($T){Om||Xe();var TA=$T.length,PA=TA%3,_A="",NA=[],IA=16383,SA;for(var LA=0,RA=TA-PA;LA<RA;LA+=IA)NA.push(Ze($T,LA,LA+IA>RA?RA:LA+IA));return 1==PA?(SA=$T[TA-1],_A+=Nm[SA>>2],_A+=Nm[63&SA<<4],_A+="=="):2==PA&&(SA=($T[TA-2]<<8)+$T[TA-1],_A+=Nm[SA>>10],_A+=Nm[63&SA>>4],_A+=Nm[63&SA<<2],_A+="="),NA.push(_A),NA.join("")}function Qe($T,SA,TA,PA,_A){var NA,IA,LA=8*_A-PA-1,RA=(1<<LA)-1,OA=RA>>1,YA=-7,MA=TA?_A-1:0,VA=TA?-1:1,UA=$T[SA+MA];for(MA+=VA,NA=UA&(1<<-YA)-1,UA>>=-YA,YA+=LA;0<YA;NA=256*NA+$T[SA+MA],MA+=VA,YA-=8);for(IA=NA&(1<<-YA)-1,NA>>=-YA,YA+=PA;0<YA;IA=256*IA+$T[SA+MA],MA+=VA,YA-=8);if(0===NA)NA=1-OA;else{if(NA===RA)return IA?NaN:(UA?-1:1)*Infinity;IA+=Math.pow(2,PA),NA-=OA}return(UA?-1:1)*IA*Math.pow(2,NA-PA)}function $e($T,SA,TA,PA,_A,NA){var IA,LA,RA,OA=8*NA-_A-1,YA=(1<<OA)-1,MA=YA>>1,VA=23===_A?Math.pow(2,-24)-Math.pow(2,-77):0,UA=PA?0:NA-1,XA=PA?1:-1,WA=0>SA||0===SA&&0>1/SA?1:0;for(SA=Math.abs(SA),isNaN(SA)||SA===Infinity?(LA=isNaN(SA)?1:0,IA=YA):(IA=Math.floor(Math.log(SA)/Math.LN2),1>SA*(RA=Math.pow(2,-IA))&&(IA--,RA*=2),SA+=1<=IA+MA?VA/RA:VA*Math.pow(2,1-MA),2<=SA*RA&&(IA++,RA/=2),IA+MA>=YA?(LA=0,IA=YA):1<=IA+MA?(LA=(SA*RA-1)*Math.pow(2,_A),IA+=MA):(LA=SA*Math.pow(2,MA-1)*Math.pow(2,_A),IA=0));8<=_A;$T[TA+UA]=255&LA,UA+=XA,LA/=256,_A-=8);for(IA=IA<<_A|LA,OA+=_A;0<OA;$T[TA+UA]=255&IA,UA+=XA,IA/=256,OA-=8);$T[TA+UA-XA]|=128*WA}function St(){return Pt.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function Tt($T,SA){if(St()<SA)throw new RangeError("Invalid typed array length");return Pt.TYPED_ARRAY_SUPPORT?($T=new Uint8Array(SA),$T.__proto__=Pt.prototype):(null===$T&&($T=new Pt(SA)),$T.length=SA),$T}function Pt($T,SA,TA){if(!Pt.TYPED_ARRAY_SUPPORT&&!(this instanceof Pt))return new Pt($T,SA,TA);if("number"==typeof $T){if("string"==typeof SA)throw new Error("If encoding is specified then the first argument must be a string");return Lt(this,$T)}return _t(this,$T,SA,TA)}function _t($T,SA,TA,PA){if("number"==typeof SA)throw new TypeError("\"value\" argument must not be a number");return"undefined"!=typeof ArrayBuffer&&SA instanceof ArrayBuffer?Yt($T,SA,TA,PA):"string"==typeof SA?Rt($T,SA,TA):Mt($T,SA)}function Nt($T){if("number"!=typeof $T)throw new TypeError("\"size\" argument must be a number");else if(0>$T)throw new RangeError("\"size\" argument must not be negative")}function It($T,SA,TA,PA){return Nt(SA),0>=SA?Tt($T,SA):void 0===TA?Tt($T,SA):Line truncated
${QS.bold.green(_E(TA))}
var prettier=function(){function Se(TA,PA){return PA={exports:{}},TA(PA,PA.exports),PA.exports}function Te(){throw new Error("setTimeout has not been defined")}function Pe(){throw new Error("clearTimeout has not been defined")}function _e(TA){if(Zc===setTimeout)return setTimeout(TA,0);if((Zc===Te||!Zc)&&setTimeout)return Zc=setTimeout,setTimeout(TA,0);try{return Zc(TA,0)}catch(PA){try{return Zc.call(null,TA,0)}catch(_A){return Zc.call(this,TA,0)}}}function Ne(TA){if(Kc===clearTimeout)return clearTimeout(TA);if((Kc===Pe||!Kc)&&clearTimeout)return Kc=clearTimeout,clearTimeout(TA);try{return Kc(TA)}catch(PA){try{return Kc.call(null,TA)}catch(_A){return Kc.call(this,TA)}}}function Le(){$c&&Su&&($c=!1,Su.length?Qc=Su.concat(Qc):Tu=-1,Qc.length&&Re())}function Re(){if(!$c){var TA=_e(Le);$c=!0;for(var PA=Qc.length;PA;){for(Su=Qc,Qc=[];++Tu<PA;)Su&&Su[Tu].run();Tu=-1,PA=Qc.length}Su=null,$c=!1,Ne(TA)}}function Oe(TA,PA){this.fun=TA,this.array=PA}function Ye(){}function Me(TA){this.enabled=TA&&TA.enabled!==void 0?TA.enabled:Qu}function Ve(TA){var PA=function(){return Ue.apply(PA,arguments)};return PA._styles=TA,PA.enabled=this.enabled,PA.__proto__=Pm,PA}function Ue(){var TA=arguments,PA=TA.length,_A=0!==PA&&arguments[0]+"";if(1<PA)for(var NA=1;NA<PA;NA++)_A+=" "+TA[NA];if(!this.enabled||!_A)return _A;var IA=this._styles,LA=IA.length,RA=Ku.dim.open;for(Sm&&(-1!==IA.indexOf("gray")||-1!==IA.indexOf("grey"))&&(Ku.dim.open="");LA--;){var OA=Ku[IA[LA]];_A=OA.open+_A.replace(OA.closeRe,OA.open)+OA.close}return Ku.dim.open=RA,_A}function Xe(){Ym=!0;var TA="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";for(var PA=0,_A=TA.length;PA<_A;++PA)Lm[PA]=TA[PA],Rm[TA.charCodeAt(PA)]=PA;Rm["-".charCodeAt(0)]=62,Rm["_".charCodeAt(0)]=63}function We(TA){Ym||Xe();var OA=TA.length,PA,_A,NA,IA,LA,RA;if(0<OA%4)throw new Error("Invalid string. Length must be a multiple of 4");LA="="===TA[OA-2]?2:"="===TA[OA-1]?1:0,RA=new Om(3*OA/4-LA),NA=0<LA?OA-4:OA;var YA=0;for(PA=0,_A=0;PA<NA;PA+=4,_A+=3)IA=Rm[TA.charCodeAt(PA)]<<18|Rm[TA.charCodeAt(PA+1)]<<12|Rm[TA.charCodeAt(PA+2)]<<6|Rm[TA.charCodeAt(PA+3)],RA[YA++]=255&IA>>16,RA[YA++]=255&IA>>8,RA[YA++]=255&IA;return 2===LA?(IA=Rm[TA.charCodeAt(PA)]<<2|Rm[TA.charCodeAt(PA+1)]>>4,RA[YA++]=255&IA):1==LA&&(IA=Rm[TA.charCodeAt(PA)]<<10|Rm[TA.charCodeAt(PA+1)]<<4|Rm[TA.charCodeAt(PA+2)]>>2,RA[YA++]=255&IA>>8,RA[YA++]=255&IA),RA}function Je(TA){return Lm[63&TA>>18]+Lm[63&TA>>12]+Lm[63&TA>>6]+Lm[63&TA]}function Ze(TA,PA,_A){var NA,IA=[];for(var LA=PA;LA<_A;LA+=3)NA=(TA[LA]<<16)+(TA[LA+1]<<8)+TA[LA+2],IA.push(Je(NA));return IA.join("")}function Ke(TA){Ym||Xe();var _A=TA.length,NA=_A%3,IA="",LA=[],RA=16383,PA;for(var OA=0,YA=_A-NA;OA<YA;OA+=RA)LA.push(Ze(TA,OA,OA+RA>YA?YA:OA+RA));return 1==NA?(PA=TA[_A-1],IA+=Lm[PA>>2],IA+=Lm[63&PA<<4],IA+="=="):2==NA&&(PA=(TA[_A-2]<<8)+TA[_A-1],IA+=Lm[PA>>10],IA+=Lm[63&PA>>4],IA+=Lm[63&PA<<2],IA+="="),LA.push(IA),LA.join("")}function Qe(TA,PA,_A,NA,IA){var LA,RA,OA=8*IA-NA-1,YA=(1<<OA)-1,MA=YA>>1,VA=-7,UA=_A?IA-1:0,XA=_A?-1:1,WA=TA[PA+UA];for(UA+=XA,LA=WA&(1<<-VA)-1,WA>>=-VA,VA+=OA;0<VA;LA=256*LA+TA[PA+UA],UA+=XA,VA-=8);for(RA=LA&(1<<-VA)-1,LA>>=-VA,VA+=NA;0<VA;RA=256*RA+TA[PA+UA],UA+=XA,VA-=8);if(0===LA)LA=1-MA;else{if(LA===YA)return RA?NaN:(WA?-1:1)*Infinity;RA+=Math.pow(2,NA),LA-=MA}return(WA?-1:1)*RA*Math.pow(2,LA-NA)}function $e(TA,PA,_A,NA,IA,LA){var RA,OA,YA,MA=8*LA-IA-1,VA=(1<<MA)-1,UA=VA>>1,XA=23===IA?Math.pow(2,-24)-Math.pow(2,-77):0,WA=NA?0:LA-1,JA=NA?1:-1,ZA=0>PA||0===PA&&0>1/PA?1:0;for(PA=Math.abs(PA),isNaN(PA)||PA===Infinity?(OA=isNaN(PA)?1:0,RA=VA):(RA=Math.floor(Math.log(PA)/Math.LN2),1>PA*(YA=Math.pow(2,-RA))&&(RA--,YA*=2),PA+=1<=RA+UA?XA/YA:XA*Math.pow(2,1-UA),2<=PA*YA&&(RA++,YA/=2),RA+UA>=VA?(OA=0,RA=VA):1<=RA+UA?(OA=(PA*YA-1)*Math.pow(2,IA),RA+=UA):(OA=PA*Math.pow(2,UA-1)*Math.pow(2,IA),RA=0));8<=IA;TA[_A+WA]=255&OA,WA+=JA,OA/=256,IA-=8);for(RA=RA<<IA|OA,MA+=IA;0<MA;TA[_A+WA]=255&RA,WA+=JA,RA/=256,MA-=8);TA[_A+WA-JA]|=128*ZA}function St(){return Pt.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function Tt(TA,PA){if(St()<PA)throw new RangeError("Invalid typed array length");return Pt.TYPED_ARRAY_SUPPORT?(TA=new Uint8Array(PA),TA.__proto__=Pt.prototype):(null===TA&&(TA=new Pt(PA)),TA.length=PA),TA}function Pt(TA,PA,_A){if(!Pt.TYPED_ARRAY_SUPPORT&&!(this instanceof Pt))return new Pt(TA,PA,_A);if("number"==typeof TA){if("string"==typeof PA)throw new Error("If encoding is specified then the first argument must be a string");return Lt(this,TA)}return _t(this,TA,PA,_A)}function _t(TA,PA,_A,NA){if("number"==typeof PA)throw new TypeError("\"value\" argument must not be a number");return"undefined"!=typeof ArrayBuffer&&PA instanceof ArrayBuffer?Yt(TA,PA,_A,NA):"string"==typeof PA?Rt(TA,PA,_A):Mt(TA,PA)}function Nt(TA){if("number"!=typeof TA)throw new TypeError("\"size\" argument must be a number");else if(0>TA)throw new RangeError("\"size\" argument must not be negative")}function It(TA,PA,_A,NA){return Nt(PA),0>=PA?Tt(TA,PA):void 0===_A?Tt(TA,PA):Line truncated
${SE.bold.green(IE(_A))}
but instead received:
${QS.bold.red(_E(SA))}
${SE.bold.red(IE(PA))}
Example:
{
${QS.bold(`"${$T}"`)}: ${QS.bold(SE(TA))}
}`,NA=PA.comment,IA=PA.title&&PA.title.error||PE;throw new TE(IA,_A,NA)}},IE=NS;const LE=IE.logValidationWarning,RE=IE.DEPRECATION,OE=($T,SA)=>{const TA=SA.comment,PA=SA.title&&SA.title.deprecation||RE;LE(PA,$T,TA)},YE=Pm;var ME=NS;const VE=ME.format,UE=ME.logValidationWarning,XE=ME.createDidYouMeanMessage,WE=ME.WARNING,JE=Object.prototype.toString,ZE={deprecationWarning:($T,SA,TA,PA)=>{SA in TA&&OE(TA[SA]($T),PA)}}.deprecationWarning,KE={unknownOptionWarning:($T,SA,TA,PA)=>{const _A=XE(TA,Object.keys(SA)),NA=` Unknown option ${YE.bold(`"${TA}"`)} with value ${YE.bold(VE($T[TA]))} was found.`+(_A&&` ${_A}`)+`\n This is probably a typing mistake. Fixing it will remove this message.`,IA=PA.comment,LA=PA.title&&PA.title.warning||WE;UE(LA,NA,IA)}}.unknownOptionWarning,QE=NE.errorMessage;var $E=NS;const ST=$E.ERROR,TT=$E.DEPRECATION,PT=$E.WARNING,_T={comment:"",condition:($T,SA)=>{return null===$T||$T===void 0||JE.call($T)===JE.call(SA)},deprecate:ZE,deprecatedConfig:{},error:QE,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:TT,error:ST,warning:PT},unknown:KE},NT=($T,SA)=>{for(const TA in $T)hasOwnProperty.call(SA.exampleConfig,TA)?"function"!=typeof SA.condition||"function"!=typeof SA.error||SA.condition($T[TA],SA.exampleConfig[TA])||SA.error(TA,$T[TA],SA.exampleConfig[TA],SA):SA.deprecatedConfig&&TA in SA.deprecatedConfig&&"function"==typeof SA.deprecate?SA.deprecate($T,TA,SA.deprecatedConfig,SA):SA.unknown&&SA.unknown($T,SA.exampleConfig,TA,SA)};var IT={ValidationError:NE.ValidationError,createDidYouMeanMessage:NS.createDidYouMeanMessage,logValidationWarning:NS.logValidationWarning,validate:($T,SA)=>{NT(SA,_T);const TA=Object.assign({},_T,SA,{title:Object.assign({},_T.title,SA.title)});return NT($T,TA),!0}},LT=IT.validate,RT={useFlowParser:$T=>` The ${"\"useFlowParser\""} option is deprecated. Use ${"\"parser\""} instead.
${SE.bold(`"${TA}"`)}: ${SE.bold(PE(_A))}
}`,LA=NA.comment,RA=NA.title&&NA.title.error||NE;throw new _E(RA,IA,LA)}},RE=LS;const OE=RE.logValidationWarning,YE=RE.DEPRECATION,ME=(TA,PA)=>{const _A=PA.comment,NA=PA.title&&PA.title.deprecation||YE;OE(NA,TA,_A)},VE=_m;var UE=LS;const XE=UE.format,WE=UE.logValidationWarning,JE=UE.createDidYouMeanMessage,ZE=UE.WARNING,KE=Object.prototype.toString,QE={deprecationWarning:(TA,PA,_A,NA)=>{PA in _A&&ME(_A[PA](TA),NA)}}.deprecationWarning,$E={unknownOptionWarning:(TA,PA,_A,NA)=>{const IA=JE(_A,Object.keys(PA)),LA=` Unknown option ${VE.bold(`"${_A}"`)} with value ${VE.bold(XE(TA[_A]))} was found.`+(IA&&` ${IA}`)+`\n This is probably a typing mistake. Fixing it will remove this message.`,RA=NA.comment,OA=NA.title&&NA.title.warning||ZE;WE(OA,LA,RA)}}.unknownOptionWarning,ST=LE.errorMessage;var TT=LS;const PT=TT.ERROR,_T=TT.DEPRECATION,NT=TT.WARNING,IT={comment:"",condition:(TA,PA)=>{return null===TA||TA===void 0||KE.call(TA)===KE.call(PA)},deprecate:QE,deprecatedConfig:{},error:ST,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:_T,error:PT,warning:NT},unknown:$E},LT=(TA,PA)=>{for(const _A in TA)hasOwnProperty.call(PA.exampleConfig,_A)?"function"!=typeof PA.condition||"function"!=typeof PA.error||PA.condition(TA[_A],PA.exampleConfig[_A])||PA.error(_A,TA[_A],PA.exampleConfig[_A],PA):PA.deprecatedConfig&&_A in PA.deprecatedConfig&&"function"==typeof PA.deprecate?PA.deprecate(TA,_A,PA.deprecatedConfig,PA):PA.unknown&&PA.unknown(TA,PA.exampleConfig,_A,PA)};var RT={ValidationError:LE.ValidationError,createDidYouMeanMessage:LS.createDidYouMeanMessage,logValidationWarning:LS.logValidationWarning,validate:(TA,PA)=>{LT(PA,IT);const _A=Object.assign({},IT,PA,{title:Object.assign({},IT.title,PA.title)});return LT(TA,_A),!0}},OT=RT.validate,YT={useFlowParser:TA=>` The ${"\"useFlowParser\""} option is deprecated. Use ${"\"parser\""} instead.
Prettier now treats your configuration as:
{
${"\"parser\""}: ${$T.useFlowParser?"\"flow\"":"\"babylon\""}
}`},OT={tabWidth:2,printWidth:80,singleQuote:!1,trailingComma:!1,bracketSpacing:!0,parser:"babylon"},YT=Object.assign({},OT,{filename:"testFilename",printWidth:80,originalText:"text"}),MT=Se(function($T,SA){(function(TA){"use strict";function PA(rwe,swe){throw[0,rwe,swe]}function _A(rwe,swe){if(typeof swe===NM)return rwe.fun=swe,0;if(swe.fun)return rwe.fun=swe.fun,0;for(var iwe=swe.length;iwe--;)rwe[iwe]=swe[iwe];return 0}function NA(rwe,swe,iwe){if("number"==typeof rwe)switch(rwe){case 0:swe.fun=iwe;break;case 1:default:_A(swe,iwe);}else switch(rwe[0]){case 0:for(var owe=1;owe<rwe[1].length;owe++)NA(rwe[1][owe],swe[owe],iwe[owe]);}return 0}function IA(rwe,swe){var iwe=rwe.length,owe=swe.length,lwe=iwe+owe-1,pwe=Array(lwe);pwe[0]=0;for(var dwe=1,cwe=1;dwe<iwe;dwe++)pwe[dwe]=rwe[dwe];for(;dwe<lwe;dwe++,cwe++)pwe[dwe]=swe[cwe];return pwe}function LA(rwe,swe,iwe,owe,lwe){if(owe<=swe)for(var pwe=1;pwe<=lwe;pwe++)iwe[owe+pwe]=rwe[swe+pwe];else for(var pwe=lwe;1<=pwe;pwe--)iwe[owe+pwe]=rwe[swe+pwe];return 0}function RA(rwe,swe,iwe){var owe=Array(iwe+1);owe[0]=0;for(var lwe=1,pwe=swe+1;lwe<=iwe;lwe++,pwe++)owe[lwe]=rwe[pwe];return owe}function OA(rwe,swe,iwe){var owe=Array(iwe);for(var lwe=0;lwe<iwe;lwe++)owe[lwe]=rwe[swe+lwe];return owe}function YA(rwe,swe,iwe){var owe=String.fromCharCode;if(0==swe&&4096>=iwe&&iwe==rwe.length)return owe.apply(null,rwe);for(var lwe=XW;0<iwe;swe+=ZX,iwe-=ZX)lwe+=owe.apply(null,OA(rwe,swe,Math.min(iwe,ZX)));return lwe}function MA(rwe){for(var swe=Array(rwe.l),iwe=rwe.c,owe=iwe.length,lwe=0;lwe<owe;lwe++)swe[lwe]=iwe.charCodeAt(lwe);for(owe=rwe.l;lwe<owe;lwe++)swe[lwe]=0;return rwe.c=swe,rwe.t=4,swe}function VA(rwe,swe,iwe,owe,lwe){if(0==lwe)return 0;if(0==owe&&(lwe>=iwe.l||2==iwe.t&&lwe>=iwe.c.length))iwe.c=4==rwe.t?YA(rwe.c,swe,lwe):0==swe&&rwe.c.length==lwe?rwe.c:rwe.c.substr(swe,lwe),iwe.t=iwe.c.length==iwe.l?0:2;else if(2==iwe.t&&owe==iwe.c.length)iwe.c+=4==rwe.t?YA(rwe.c,swe,lwe):0==swe&&rwe.c.length==lwe?rwe.c:rwe.c.substr(swe,lwe),iwe.t=iwe.c.length==iwe.l?0:2;else{4!=iwe.t&&MA(iwe);var pwe=rwe.c,dwe=iwe.c;if(4==rwe.t)for(var cwe=0;cwe<lwe;cwe++)dwe[owe+cwe]=pwe[swe+cwe];else{var uwe=Math.min(lwe,pwe.length-swe);for(var cwe=0;cwe<uwe;cwe++)dwe[owe+cwe]=pwe.charCodeAt(swe+cwe);for(;cwe<lwe;cwe++)dwe[owe+cwe]=0}}return 0}function UA(rwe,swe){for(var iwe=rwe.length,owe=Array(iwe+1),lwe=0;lwe<iwe;lwe++)owe[lwe]=rwe[lwe];return owe[lwe]=swe,owe}function XA(rwe,swe){if(rwe.fun)return XA(rwe.fun,swe);var iwe=rwe.length,owe=swe.length,lwe=iwe-owe;return 0==lwe?rwe.apply(null,swe):0>lwe?XA(rwe.apply(null,OA(swe,0,iwe)),OA(swe,iwe,owe-iwe)):function(pwe){return XA(rwe,UA(swe,pwe))}}function WA(rwe,swe){if(swe.repeat)return swe.repeat(rwe);var iwe=XW,owe=0;if(0==rwe)return iwe;for(;;){if(1&rwe&&(iwe+=swe),rwe>>=1,0==rwe)return iwe;swe+=swe,owe++,9==owe&&swe.slice(0,1)}}function JA(rwe){2==rwe.t?rwe.c+=WA(rwe.l-rwe.c.length,"\0"):rwe.c=YA(rwe.c,0,rwe.c.length),rwe.t=0}function ZA(rwe){if(24>rwe.length){for(var swe=0;swe<rwe.length;swe++)if(rwe.charCodeAt(swe)>IJ)return!1;return!0}return!/[^\x00-\x7f]/.test(rwe)}function KA(rwe){for(var swe=XW,iwe=XW,cwe=0,uwe=rwe.length,owe,lwe,pwe,dwe;cwe<uwe;cwe++){if(lwe=rwe.charCodeAt(cwe),lwe<IF){for(var mwe=cwe+1;mwe<uwe&&(lwe=rwe.charCodeAt(mwe))<IF;mwe++);if(mwe-cwe>UM?(iwe.substr(0,1),swe+=iwe,iwe=XW,swe+=rwe.slice(cwe,mwe)):iwe+=rwe.slice(cwe,mwe),mwe==uwe)break;cwe=mwe}dwe=1,++cwe<uwe&&(-64&(pwe=rwe.charCodeAt(cwe)))==IF&&(owe=pwe+(lwe<<6),lwe<IX?(dwe=owe-12416,dwe<IF&&(dwe=1)):(dwe=2,++cwe<uwe&&(-64&(pwe=rwe.charCodeAt(cwe)))==IF&&(owe=pwe+(owe<<6),lwe<RU?(dwe=owe-925824,(dwe<MU||55295<=dwe&&57344>dwe)&&(dwe=2)):(dwe=3,++cwe<uwe&&(-64&(pwe=rwe.charCodeAt(cwe)))==IF&&lwe<Rz&&(dwe=pwe-63447168+(owe<<6),(dwe<YX||dwe>VV)&&(dwe=3)))))),4>dwe?(cwe-=dwe,iwe+="\uFFFD"):dwe>Jq?iwe+=String.fromCharCode(55232+(dwe>>10),Lz+(dwe&KF)):iwe+=String.fromCharCode(dwe),iwe.length>ZX&&(iwe.substr(0,1),swe+=iwe,iwe=XW)}return swe+iwe}function QA(rwe){switch(rwe.t){case 9:return rwe.c;default:JA(rwe);case 0:if(ZA(rwe.c))return rwe.t=9,rwe.c;rwe.t=8;case 8:return KA(rwe.c);}}function $A(rwe,swe,iwe){this.t=rwe,this.c=swe,this.l=iwe}function SP(rwe){return new $A(0,rwe,rwe.length)}function TP(rwe,swe){PA(rwe,SP(swe))}function PP(rwe){TP(NH.Invalid_argument,rwe)}function _P(){PP($U)}function NP(rwe,swe){return swe>>>0>=rwe.length-1&&_P(),rwe}function IP(rwe){return isFinite(rwe)?2.2250738585072014e-308<=Math.abs(rwe)?0:0==rwe?2:1:isNaN(rwe)?4:3}function LP(rwe,swe){var iwe=rwe[3]<<16,owe=swe[3]<<16;return iwe>owe?1:iwe<owe?-1:rwe[2]>swe[2]?1:rwe[2]<swe[2]?-1:rwe[1]>swe[1]?1:rwe[1]<swe[1]?-1:0}function RP(rwe,swe){return rwe<swe?-1:rwe==swe?0:1}function OP(rwe,swe){return 6&rwe.t&&JA(rwe),6&swe.t&&JA(swe),rwe.c<swe.c?-1:rwe.c>swe.c?1:0}function YP(rwe,swe,iwe){for(var owe=[];;){if(!(iwe&&rwe===swe))if(rwe instanceof $A){if(!(swe instanceof $A))return 1;else if(rwe!==swe){var lwe=OP(rwe,swe);if(0!=lwe)return lwe}}else if(rwe instanceof Array&&rwe[0]===(0|rwe[0])){va Line truncated
${"\"parser\""}: ${TA.useFlowParser?"\"flow\"":"\"babylon\""}
}`},MT={tabWidth:2,printWidth:80,singleQuote:!1,trailingComma:!1,bracketSpacing:!0,parser:"babylon"},VT=Object.assign({},MT,{filename:"testFilename",printWidth:80,originalText:"text"}),UT=Se(function(TA,PA){(function(_A){"use strict";function NA(iwe,owe){throw[0,iwe,owe]}function IA(iwe,owe){if(typeof owe===LM)return iwe.fun=owe,0;if(owe.fun)return iwe.fun=owe.fun,0;for(var lwe=owe.length;lwe--;)iwe[lwe]=owe[lwe];return 0}function LA(iwe,owe,lwe){if("number"==typeof iwe)switch(iwe){case 0:owe.fun=lwe;break;case 1:default:IA(owe,lwe);}else switch(iwe[0]){case 0:for(var pwe=1;pwe<iwe[1].length;pwe++)LA(iwe[1][pwe],owe[pwe],lwe[pwe]);}return 0}function RA(iwe,owe){var lwe=iwe.length,pwe=owe.length,dwe=lwe+pwe-1,cwe=Array(dwe);cwe[0]=0;for(var uwe=1,mwe=1;uwe<lwe;uwe++)cwe[uwe]=iwe[uwe];for(;uwe<dwe;uwe++,mwe++)cwe[uwe]=owe[mwe];return cwe}function OA(iwe,owe,lwe,pwe,dwe){if(pwe<=owe)for(var cwe=1;cwe<=dwe;cwe++)lwe[pwe+cwe]=iwe[owe+cwe];else for(var cwe=dwe;1<=cwe;cwe--)lwe[pwe+cwe]=iwe[owe+cwe];return 0}function YA(iwe,owe,lwe){var pwe=Array(lwe+1);pwe[0]=0;for(var dwe=1,cwe=owe+1;dwe<=lwe;dwe++,cwe++)pwe[dwe]=iwe[cwe];return pwe}function MA(iwe,owe,lwe){var pwe=Array(lwe);for(var dwe=0;dwe<lwe;dwe++)pwe[dwe]=iwe[owe+dwe];return pwe}function VA(iwe,owe,lwe){var pwe=String.fromCharCode;if(0==owe&&4096>=lwe&&lwe==iwe.length)return pwe.apply(null,iwe);for(var dwe=JW;0<lwe;owe+=QX,lwe-=QX)dwe+=pwe.apply(null,MA(iwe,owe,Math.min(lwe,QX)));return dwe}function UA(iwe){for(var owe=Array(iwe.l),lwe=iwe.c,pwe=lwe.length,dwe=0;dwe<pwe;dwe++)owe[dwe]=lwe.charCodeAt(dwe);for(pwe=iwe.l;dwe<pwe;dwe++)owe[dwe]=0;return iwe.c=owe,iwe.t=4,owe}function XA(iwe,owe,lwe,pwe,dwe){if(0==dwe)return 0;if(0==pwe&&(dwe>=lwe.l||2==lwe.t&&dwe>=lwe.c.length))lwe.c=4==iwe.t?VA(iwe.c,owe,dwe):0==owe&&iwe.c.length==dwe?iwe.c:iwe.c.substr(owe,dwe),lwe.t=lwe.c.length==lwe.l?0:2;else if(2==lwe.t&&pwe==lwe.c.length)lwe.c+=4==iwe.t?VA(iwe.c,owe,dwe):0==owe&&iwe.c.length==dwe?iwe.c:iwe.c.substr(owe,dwe),lwe.t=lwe.c.length==lwe.l?0:2;else{4!=lwe.t&&UA(lwe);var cwe=iwe.c,uwe=lwe.c;if(4==iwe.t)for(var mwe=0;mwe<dwe;mwe++)uwe[pwe+mwe]=cwe[owe+mwe];else{var fwe=Math.min(dwe,cwe.length-owe);for(var mwe=0;mwe<fwe;mwe++)uwe[pwe+mwe]=cwe.charCodeAt(owe+mwe);for(;mwe<dwe;mwe++)uwe[pwe+mwe]=0}}return 0}function WA(iwe,owe){for(var lwe=iwe.length,pwe=Array(lwe+1),dwe=0;dwe<lwe;dwe++)pwe[dwe]=iwe[dwe];return pwe[dwe]=owe,pwe}function JA(iwe,owe){if(iwe.fun)return JA(iwe.fun,owe);var lwe=iwe.length,pwe=owe.length,dwe=lwe-pwe;return 0==dwe?iwe.apply(null,owe):0>dwe?JA(iwe.apply(null,MA(owe,0,lwe)),MA(owe,lwe,pwe-lwe)):function(cwe){return JA(iwe,WA(owe,cwe))}}function ZA(iwe,owe){if(owe.repeat)return owe.repeat(iwe);var lwe=JW,pwe=0;if(0==iwe)return lwe;for(;;){if(1&iwe&&(lwe+=owe),iwe>>=1,0==iwe)return lwe;owe+=owe,pwe++,9==pwe&&owe.slice(0,1)}}function KA(iwe){2==iwe.t?iwe.c+=ZA(iwe.l-iwe.c.length,"\0"):iwe.c=VA(iwe.c,0,iwe.c.length),iwe.t=0}function QA(iwe){if(24>iwe.length){for(var owe=0;owe<iwe.length;owe++)if(iwe.charCodeAt(owe)>RJ)return!1;return!0}return!/[^\x00-\x7f]/.test(iwe)}function $A(iwe){for(var owe=JW,lwe=JW,mwe=0,fwe=iwe.length,pwe,dwe,cwe,uwe;mwe<fwe;mwe++){if(dwe=iwe.charCodeAt(mwe),dwe<RF){for(var hwe=mwe+1;hwe<fwe&&(dwe=iwe.charCodeAt(hwe))<RF;hwe++);if(hwe-mwe>WM?(lwe.substr(0,1),owe+=lwe,lwe=JW,owe+=iwe.slice(mwe,hwe)):lwe+=iwe.slice(mwe,hwe),hwe==fwe)break;mwe=hwe}uwe=1,++mwe<fwe&&(-64&(cwe=iwe.charCodeAt(mwe)))==RF&&(pwe=cwe+(dwe<<6),dwe<RX?(uwe=pwe-12416,uwe<RF&&(uwe=1)):(uwe=2,++mwe<fwe&&(-64&(cwe=iwe.charCodeAt(mwe)))==RF&&(pwe=cwe+(pwe<<6),dwe<YU?(uwe=pwe-925824,(uwe<UU||55295<=uwe&&57344>uwe)&&(uwe=2)):(uwe=3,++mwe<fwe&&(-64&(cwe=iwe.charCodeAt(mwe)))==RF&&dwe<Yz&&(uwe=cwe-63447168+(pwe<<6),(uwe<VX||uwe>XV)&&(uwe=3)))))),4>uwe?(mwe-=uwe,lwe+="\uFFFD"):uwe>Kq?lwe+=String.fromCharCode(55232+(uwe>>10),Oz+(uwe&$F)):lwe+=String.fromCharCode(uwe),lwe.length>QX&&(lwe.substr(0,1),owe+=lwe,lwe=JW)}return owe+lwe}function SP(iwe){switch(iwe.t){case 9:return iwe.c;default:KA(iwe);case 0:if(QA(iwe.c))return iwe.t=9,iwe.c;iwe.t=8;case 8:return $A(iwe.c);}}function TP(iwe,owe,lwe){this.t=iwe,this.c=owe,this.l=lwe}function PP(iwe){return new TP(0,iwe,iwe.length)}function _P(iwe,owe){NA(iwe,PP(owe))}function NP(iwe){_P(LH.Invalid_argument,iwe)}function IP(){NP(TX)}function LP(iwe,owe){return owe>>>0>=iwe.length-1&&IP(),iwe}function RP(iwe){return isFinite(iwe)?2.2250738585072014e-308<=Math.abs(iwe)?0:0==iwe?2:1:isNaN(iwe)?4:3}function OP(iwe,owe){var lwe=iwe[3]<<16,pwe=owe[3]<<16;return lwe>pwe?1:lwe<pwe?-1:iwe[2]>owe[2]?1:iwe[2]<owe[2]?-1:iwe[1]>owe[1]?1:iwe[1]<owe[1]?-1:0}function YP(iwe,owe){return iwe<owe?-1:iwe==owe?0:1}function MP(iwe,owe){return 6&iwe.t&&KA(iwe),6&owe.t&&KA(owe),iwe.c<owe.c?-1:iwe.c>owe.c?1:0}function VP(iwe,owe,lwe){for(var pwe=[];;){if(!(lwe&&iwe===owe))if(iwe instanceof TP){if(!(owe instanceof TP))return 1;else if(iwe!==owe){var dwe=MP(iwe,owe);if(0!=dwe)return dwe}}else if(iwe instanceof Array&&iwe[0]===(0|iwe[0])){va Line truncated
+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "prettier",
"version": "0.15.0",
"version": "0.16.0",
"description": "Prettier is an opinionated JavaScript formatter",
"bin": {
"prettier": "./bin/prettier.js"