prettier 2.8.1 → 2.8.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +73 -18
- package/README.md +3 -3
- package/bin-prettier.js +3 -1
- package/cli.js +413 -185
- package/esm/parser-angular.mjs +1 -1
- package/esm/parser-babel.mjs +20 -20
- package/esm/parser-espree.mjs +18 -18
- package/esm/parser-flow.mjs +26 -26
- package/esm/parser-glimmer.mjs +4 -4
- package/esm/parser-graphql.mjs +1 -1
- package/esm/parser-html.mjs +16 -16
- package/esm/parser-markdown.mjs +48 -48
- package/esm/parser-meriyah.mjs +13 -13
- package/esm/parser-postcss.mjs +57 -57
- package/esm/parser-typescript.mjs +36 -36
- package/esm/parser-yaml.mjs +13 -13
- package/esm/standalone.mjs +77 -77
- package/index.js +636 -304
- package/package.json +1 -1
- package/parser-babel.js +16 -16
- package/parser-espree.js +17 -17
- package/parser-flow.js +26 -26
- package/parser-glimmer.js +3 -3
- package/parser-html.js +20 -20
- package/parser-markdown.js +47 -47
- package/parser-meriyah.js +13 -13
- package/parser-postcss.js +56 -56
- package/parser-typescript.js +36 -36
- package/parser-yaml.js +13 -13
- package/standalone.js +73 -73
- package/third-party.js +5 -5
package/esm/parser-graphql.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
var X=Object.getOwnPropertyNames,re=(l,T)=>function(){return l&&(T=(0,l[X(l)[0]])(l=0)),T},K=(l,T)=>function(){return T||(0,l[X(l)[0]])((T={exports:{}}).exports,T),T.exports},L=re({"<define:process>"(){}}),ie=K({"src/common/parser-create-error.js"(l,T){"use strict";L();function a(p,r){let _=new SyntaxError(p+" ("+r.start.line+":"+r.start.column+")");return _.loc=r,_}T.exports=a}}),ae=K({"src/utils/try-combinations.js"(l,T){"use strict";L();function a(){let p;for(var r=arguments.length,_=new Array(r),E=0;E<r;E++)_[E]=arguments[E];for(let[k,g]of _.entries())try{return{result:g()}}catch(D){k===0&&(p=D)}return{error:p}}T.exports=a}}),oe=K({"src/language-graphql/pragma.js"(l,T){"use strict";L();function a(r){return/^\s*#[^\S\n]*@(?:format|prettier)\s*(?:\n|$)/.test(r)}function p(r){return`# @format
|
|
2
2
|
|
|
3
3
|
`+r}T.exports={hasPragma:a,insertPragma:p}}}),se=K({"src/language-graphql/loc.js"(l,T){"use strict";L();function a(r){return typeof r.start=="number"?r.start:r.loc&&r.loc.start}function p(r){return typeof r.end=="number"?r.end:r.loc&&r.loc.end}T.exports={locStart:a,locEnd:p}}}),ce=K({"node_modules/graphql/jsutils/isObjectLike.js"(l){"use strict";L(),Object.defineProperty(l,"__esModule",{value:!0}),l.default=a;function T(p){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?T=function(_){return typeof _}:T=function(_){return _&&typeof Symbol=="function"&&_.constructor===Symbol&&_!==Symbol.prototype?"symbol":typeof _},T(p)}function a(p){return T(p)=="object"&&p!==null}}}),H=K({"node_modules/graphql/polyfills/symbols.js"(l){"use strict";L(),Object.defineProperty(l,"__esModule",{value:!0}),l.SYMBOL_TO_STRING_TAG=l.SYMBOL_ASYNC_ITERATOR=l.SYMBOL_ITERATOR=void 0;var T=typeof Symbol=="function"&&Symbol.iterator!=null?Symbol.iterator:"@@iterator";l.SYMBOL_ITERATOR=T;var a=typeof Symbol=="function"&&Symbol.asyncIterator!=null?Symbol.asyncIterator:"@@asyncIterator";l.SYMBOL_ASYNC_ITERATOR=a;var p=typeof Symbol=="function"&&Symbol.toStringTag!=null?Symbol.toStringTag:"@@toStringTag";l.SYMBOL_TO_STRING_TAG=p}}),z=K({"node_modules/graphql/language/location.js"(l){"use strict";L(),Object.defineProperty(l,"__esModule",{value:!0}),l.getLocation=T;function T(a,p){for(var r=/\r\n|[\n\r]/g,_=1,E=p+1,k;(k=r.exec(a.body))&&k.index<p;)_+=1,E=p+1-(k.index+k[0].length);return{line:_,column:E}}}}),ue=K({"node_modules/graphql/language/printLocation.js"(l){"use strict";L(),Object.defineProperty(l,"__esModule",{value:!0}),l.printLocation=a,l.printSourceLocation=p;var T=z();function a(k){return p(k.source,(0,T.getLocation)(k.source,k.start))}function p(k,g){var D=k.locationOffset.column-1,O=_(D)+k.body,S=g.line-1,I=k.locationOffset.line-1,h=g.line+I,N=g.line===1?D:0,i=g.column+N,u="".concat(k.name,":").concat(h,":").concat(i,`
|
|
4
4
|
`),e=O.split(/\r\n|[\n\r]/g),n=e[S];if(n.length>120){for(var t=Math.floor(i/80),s=i%80,y=[],f=0;f<n.length;f+=80)y.push(n.slice(f,f+80));return u+r([["".concat(h),y[0]]].concat(y.slice(1,t+1).map(function(m){return["",m]}),[[" ",_(s-1)+"^"],["",y[t+1]]]))}return u+r([["".concat(h-1),e[S-1]],["".concat(h),n],["",_(i-1)+"^"],["".concat(h+1),e[S+1]]])}function r(k){var g=k.filter(function(O){var S=O[0],I=O[1];return I!==void 0}),D=Math.max.apply(Math,g.map(function(O){var S=O[0];return S.length}));return g.map(function(O){var S=O[0],I=O[1];return E(D,S)+(I?" | "+I:" |")}).join(`
|