@bfra.me/prettier-config 0.7.4 → 0.9.0

Sign up to get free protection for your applications and to get access to all the features.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bfra.me/prettier-config",
3
- "version": "0.7.4",
3
+ "version": "0.9.0",
4
4
  "description": "Shared Prettier configuration for bfra.me",
5
5
  "keywords": [
6
6
  "bfra.me",
@@ -14,7 +14,7 @@
14
14
  "bugs": "https://github.com/bfra-me/works/issues",
15
15
  "repository": {
16
16
  "type": "git",
17
- "url": "https://github.com/bfra-me/works.git",
17
+ "url": "git+https://github.com/bfra-me/works.git",
18
18
  "directory": "packages/prettier-config"
19
19
  },
20
20
  "license": "MIT",
@@ -23,7 +23,13 @@
23
23
  "exports": {
24
24
  ".": {
25
25
  "types": "./lib/prettier.config.d.ts",
26
- "import": "./lib/prettier.config.js"
26
+ "source": "./src/prettier.config.ts",
27
+ "import": "./prettier.config.js"
28
+ },
29
+ "./*": {
30
+ "types": "./lib/*.d.ts",
31
+ "source": "./src/*.ts",
32
+ "import": "./lib/*.js"
27
33
  },
28
34
  "./100-proof": "./lib/prettier.config.js",
29
35
  "./120-proof": "./lib/120-proof.js",
@@ -32,27 +38,27 @@
32
38
  "./*/semi": "./lib/*.js?semi=true",
33
39
  "./package.json": "./package.json"
34
40
  },
35
- "main": "./lib/prettier.config.js",
41
+ "main": "./prettier.config.js",
36
42
  "types": "./lib/prettier.config.d.ts",
37
43
  "files": [
38
44
  "lib",
39
45
  "src",
40
- "!**/*.map",
41
- "!tsup.config.ts"
46
+ "prettier.config.js",
47
+ "!**/*.map"
42
48
  ],
43
49
  "dependencies": {
44
- "@bfra.me/prettier-plugins": "0.4.0"
50
+ "@bfra.me/prettier-plugins": "0.5.0"
45
51
  },
46
52
  "devDependencies": {
47
53
  "@types/fs-extra": "11.0.4",
48
- "execa": "9.4.0",
54
+ "execa": "9.5.1",
49
55
  "fast-glob": "3.3.2",
50
56
  "fs-extra": "11.2.0",
51
57
  "prettier": "3.3.3",
52
- "tsup": "8.3.0",
53
- "vitest": "2.1.0",
54
- "@bfra.me/tsconfig": "0.8.1",
55
- "@bfra.me/prettier-config": "0.7.4"
58
+ "tsup": "8.3.5",
59
+ "vitest": "2.1.4",
60
+ "@bfra.me/prettier-config": "0.9.0",
61
+ "@bfra.me/tsconfig": "0.9.0"
56
62
  },
57
63
  "peerDependencies": {
58
64
  "prettier": "^3.0.0"
@@ -63,6 +69,7 @@
63
69
  },
64
70
  "scripts": {
65
71
  "build": "tsup",
66
- "test": "vitest"
72
+ "postbuild": "prettier --config ./prettier.config.js --ignore-path .prettierignore --log-level warn --write .",
73
+ "test": "pnpm --filter-prod=\"{.}...\" --loglevel error run build && vitest"
67
74
  }
68
75
  }
@@ -0,0 +1,9 @@
1
+ import {createRequire}from'node:module';import Io from'prettier';import {parsers}from'prettier/plugins/babel';import*as Oo from'prettier/plugins/estree';import ss from'node:fs';var Ht=Object.create;var Y=Object.defineProperty;var Bt=Object.getOwnPropertyDescriptor;var Mt=Object.getOwnPropertyNames;var Yt=Object.getPrototypeOf,Wt=Object.prototype.hasOwnProperty;var o=(r,e)=>Y(r,"name",{value:e,configurable:!0});var m=(r,e)=>()=>(e||r((e={exports:{}}).exports,e),e.exports),zt=(r,e)=>{for(var t in e)Y(r,t,{get:e[t],enumerable:!0});},Jt=(r,e,t,s)=>{if(e&&typeof e=="object"||typeof e=="function")for(let n of Mt(e))!Wt.call(r,n)&&n!==t&&Y(r,n,{get:()=>e[n],enumerable:!(s=Bt(e,n))||s.enumerable});return r};var qe=(r,e,t)=>(t=r!=null?Ht(Yt(r)):{},Jt(Y(t,"default",{value:r,enumerable:!0}),r));var Ce=m((Co,Pe)=>{Pe.exports=o(function(e,t){var s,n;typeof t=="function"?n=t:s=t;var i=Object.keys(e);return (s||[]).concat(i.sort(n)).reduce(function(a,c){return i.indexOf(c)!==-1&&(a[c]=e[c]),a},Object.create(null))},"sortObjectByKeyNameList");});var j=m((_o,Ge)=>{var os="2.0.0",as=Number.MAX_SAFE_INTEGER||9007199254740991,cs=16,ls=250,us=["major","premajor","minor","preminor","patch","prepatch","prerelease"];Ge.exports={MAX_LENGTH:256,MAX_SAFE_COMPONENT_LENGTH:cs,MAX_SAFE_BUILD_LENGTH:ls,MAX_SAFE_INTEGER:as,RELEASE_TYPES:us,SEMVER_SPEC_VERSION:os,FLAG_INCLUDE_PRERELEASE:1,FLAG_LOOSE:2};});var G=m((Ho,Fe)=>{var ps=typeof process=="object"&&process.env&&process.env.NODE_DEBUG&&/\bsemver\b/i.test(process.env.NODE_DEBUG)?(...r)=>console.error("SEMVER",...r):()=>{};Fe.exports=ps;});var P=m((w,Ue)=>{var{MAX_SAFE_COMPONENT_LENGTH:pe,MAX_SAFE_BUILD_LENGTH:fs,MAX_LENGTH:hs}=j(),Es=G();w=Ue.exports={};var ms=w.re=[],ds=w.safeRe=[],l=w.src=[],u=w.t={},ys=0,fe="[a-zA-Z0-9-]",Rs=[["\\s",1],["\\d",hs],[fe,fs]],gs=o(r=>{for(let[e,t]of Rs)r=r.split(`${e}*`).join(`${e}{0,${t}}`).split(`${e}+`).join(`${e}{1,${t}}`);return r},"makeSafeRegex"),d=o((r,e,t)=>{let s=gs(e),n=ys++;Es(r,n,e),u[r]=n,l[n]=e,ms[n]=new RegExp(e,t?"g":void 0),ds[n]=new RegExp(s,t?"g":void 0);},"createToken");d("NUMERICIDENTIFIER","0|[1-9]\\d*");d("NUMERICIDENTIFIERLOOSE","\\d+");d("NONNUMERICIDENTIFIER",`\\d*[a-zA-Z-]${fe}*`);d("MAINVERSION",`(${l[u.NUMERICIDENTIFIER]})\\.(${l[u.NUMERICIDENTIFIER]})\\.(${l[u.NUMERICIDENTIFIER]})`);d("MAINVERSIONLOOSE",`(${l[u.NUMERICIDENTIFIERLOOSE]})\\.(${l[u.NUMERICIDENTIFIERLOOSE]})\\.(${l[u.NUMERICIDENTIFIERLOOSE]})`);d("PRERELEASEIDENTIFIER",`(?:${l[u.NUMERICIDENTIFIER]}|${l[u.NONNUMERICIDENTIFIER]})`);d("PRERELEASEIDENTIFIERLOOSE",`(?:${l[u.NUMERICIDENTIFIERLOOSE]}|${l[u.NONNUMERICIDENTIFIER]})`);d("PRERELEASE",`(?:-(${l[u.PRERELEASEIDENTIFIER]}(?:\\.${l[u.PRERELEASEIDENTIFIER]})*))`);d("PRERELEASELOOSE",`(?:-?(${l[u.PRERELEASEIDENTIFIERLOOSE]}(?:\\.${l[u.PRERELEASEIDENTIFIERLOOSE]})*))`);d("BUILDIDENTIFIER",`${fe}+`);d("BUILD",`(?:\\+(${l[u.BUILDIDENTIFIER]}(?:\\.${l[u.BUILDIDENTIFIER]})*))`);d("FULLPLAIN",`v?${l[u.MAINVERSION]}${l[u.PRERELEASE]}?${l[u.BUILD]}?`);d("FULL",`^${l[u.FULLPLAIN]}$`);d("LOOSEPLAIN",`[v=\\s]*${l[u.MAINVERSIONLOOSE]}${l[u.PRERELEASELOOSE]}?${l[u.BUILD]}?`);d("LOOSE",`^${l[u.LOOSEPLAIN]}$`);d("GTLT","((?:<|>)?=?)");d("XRANGEIDENTIFIERLOOSE",`${l[u.NUMERICIDENTIFIERLOOSE]}|x|X|\\*`);d("XRANGEIDENTIFIER",`${l[u.NUMERICIDENTIFIER]}|x|X|\\*`);d("XRANGEPLAIN",`[v=\\s]*(${l[u.XRANGEIDENTIFIER]})(?:\\.(${l[u.XRANGEIDENTIFIER]})(?:\\.(${l[u.XRANGEIDENTIFIER]})(?:${l[u.PRERELEASE]})?${l[u.BUILD]}?)?)?`);d("XRANGEPLAINLOOSE",`[v=\\s]*(${l[u.XRANGEIDENTIFIERLOOSE]})(?:\\.(${l[u.XRANGEIDENTIFIERLOOSE]})(?:\\.(${l[u.XRANGEIDENTIFIERLOOSE]})(?:${l[u.PRERELEASELOOSE]})?${l[u.BUILD]}?)?)?`);d("XRANGE",`^${l[u.GTLT]}\\s*${l[u.XRANGEPLAIN]}$`);d("XRANGELOOSE",`^${l[u.GTLT]}\\s*${l[u.XRANGEPLAINLOOSE]}$`);d("COERCEPLAIN",`(^|[^\\d])(\\d{1,${pe}})(?:\\.(\\d{1,${pe}}))?(?:\\.(\\d{1,${pe}}))?`);d("COERCE",`${l[u.COERCEPLAIN]}(?:$|[^\\d])`);d("COERCEFULL",l[u.COERCEPLAIN]+`(?:${l[u.PRERELEASE]})?(?:${l[u.BUILD]})?(?:$|[^\\d])`);d("COERCERTL",l[u.COERCE],!0);d("COERCERTLFULL",l[u.COERCEFULL],!0);d("LONETILDE","(?:~>?)");d("TILDETRIM",`(\\s*)${l[u.LONETILDE]}\\s+`,!0);w.tildeTrimReplace="$1~";d("TILDE",`^${l[u.LONETILDE]}${l[u.XRANGEPLAIN]}$`);d("TILDELOOSE",`^${l[u.LONETILDE]}${l[u.XRANGEPLAINLOOSE]}$`);d("LONECARET","(?:\\^)");d("CARETTRIM",`(\\s*)${l[u.LONECARET]}\\s+`,!0);w.caretTrimReplace="$1^";d("CARET",`^${l[u.LONECARET]}${l[u.XRANGEPLAIN]}$`);d("CARETLOOSE",`^${l[u.LONECARET]}${l[u.XRANGEPLAINLOOSE]}$`);d("COMPARATORLOOSE",`^${l[u.GTLT]}\\s*(${l[u.LOOSEPLAIN]})$|^$`);d("COMPARATOR",`^${l[u.GTLT]}\\s*(${l[u.FULLPLAIN]})$|^$`);d("COMPARATORTRIM",`(\\s*)${l[u.GTLT]}\\s*(${l[u.LOOSEPLAIN]}|${l[u.XRANGEPLAIN]})`,!0);w.comparatorTrimReplace="$1$2$3";d("HYPHENRANGE",`^\\s*(${l[u.XRANGEPLAIN]})\\s+-\\s+(${l[u.XRANGEPLAIN]})\\s*$`);d("HYPHENRANGELOOSE",`^\\s*(${l[u.XRANGEPLAINLOOSE]})\\s+-\\s+(${l[u.XRANGEPLAINLOOSE]})\\s*$`);d("STAR","(<|>)?=?\\s*\\*");d("GTE0","^\\s*>=\\s*0\\.0\\.0\\s*$");d("GTE0PRE","^\\s*>=\\s*0\\.0\\.0-0\\s*$");});var W=m((Mo,Ve)=>{var $s=Object.freeze({loose:!0}),Is=Object.freeze({}),vs=o(r=>r?typeof r!="object"?$s:r:Is,"parseOptions");Ve.exports=vs;});var he=m((Wo,He)=>{var Xe=/^[0-9]+$/,_e=o((r,e)=>{let t=Xe.test(r),s=Xe.test(e);return t&&s&&(r=+r,e=+e),r===e?0:t&&!s?-1:s&&!t?1:r<e?-1:1},"compareIdentifiers"),Os=o((r,e)=>_e(e,r),"rcompareIdentifiers");He.exports={compareIdentifiers:_e,rcompareIdentifiers:Os};});var I=m((Jo,We)=>{var z=G(),{MAX_LENGTH:Be,MAX_SAFE_INTEGER:J}=j(),{safeRe:Me,t:Ye}=P(),Ns=W(),{compareIdentifiers:C}=he(),Ls=class T{static{o(this,"SemVer");}constructor(e,t){if(t=Ns(t),e instanceof T){if(e.loose===!!t.loose&&e.includePrerelease===!!t.includePrerelease)return e;e=e.version;}else if(typeof e!="string")throw new TypeError(`Invalid version. Must be a string. Got type "${typeof e}".`);if(e.length>Be)throw new TypeError(`version is longer than ${Be} characters`);z("SemVer",e,t),this.options=t,this.loose=!!t.loose,this.includePrerelease=!!t.includePrerelease;let s=e.trim().match(t.loose?Me[Ye.LOOSE]:Me[Ye.FULL]);if(!s)throw new TypeError(`Invalid Version: ${e}`);if(this.raw=e,this.major=+s[1],this.minor=+s[2],this.patch=+s[3],this.major>J||this.major<0)throw new TypeError("Invalid major version");if(this.minor>J||this.minor<0)throw new TypeError("Invalid minor version");if(this.patch>J||this.patch<0)throw new TypeError("Invalid patch version");s[4]?this.prerelease=s[4].split(".").map(n=>{if(/^[0-9]+$/.test(n)){let i=+n;if(i>=0&&i<J)return i}return n}):this.prerelease=[],this.build=s[5]?s[5].split("."):[],this.format();}format(){return this.version=`${this.major}.${this.minor}.${this.patch}`,this.prerelease.length&&(this.version+=`-${this.prerelease.join(".")}`),this.version}toString(){return this.version}compare(e){if(z("SemVer.compare",this.version,this.options,e),!(e instanceof T)){if(typeof e=="string"&&e===this.version)return 0;e=new T(e,this.options);}return e.version===this.version?0:this.compareMain(e)||this.comparePre(e)}compareMain(e){return e instanceof T||(e=new T(e,this.options)),C(this.major,e.major)||C(this.minor,e.minor)||C(this.patch,e.patch)}comparePre(e){if(e instanceof T||(e=new T(e,this.options)),this.prerelease.length&&!e.prerelease.length)return -1;if(!this.prerelease.length&&e.prerelease.length)return 1;if(!this.prerelease.length&&!e.prerelease.length)return 0;let t=0;do{let s=this.prerelease[t],n=e.prerelease[t];if(z("prerelease compare",t,s,n),s===void 0&&n===void 0)return 0;if(n===void 0)return 1;if(s===void 0)return -1;if(s===n)continue;return C(s,n)}while(++t)}compareBuild(e){e instanceof T||(e=new T(e,this.options));let t=0;do{let s=this.build[t],n=e.build[t];if(z("build compare",t,s,n),s===void 0&&n===void 0)return 0;if(n===void 0)return 1;if(s===void 0)return -1;if(s===n)continue;return C(s,n)}while(++t)}inc(e,t,s){switch(e){case"premajor":this.prerelease.length=0,this.patch=0,this.minor=0,this.major++,this.inc("pre",t,s);break;case"preminor":this.prerelease.length=0,this.patch=0,this.minor++,this.inc("pre",t,s);break;case"prepatch":this.prerelease.length=0,this.inc("patch",t,s),this.inc("pre",t,s);break;case"prerelease":this.prerelease.length===0&&this.inc("patch",t,s),this.inc("pre",t,s);break;case"major":(this.minor!==0||this.patch!==0||this.prerelease.length===0)&&this.major++,this.minor=0,this.patch=0,this.prerelease=[];break;case"minor":(this.patch!==0||this.prerelease.length===0)&&this.minor++,this.patch=0,this.prerelease=[];break;case"patch":this.prerelease.length===0&&this.patch++,this.prerelease=[];break;case"pre":{let n=Number(s)?1:0;if(!t&&s===!1)throw new Error("invalid increment argument: identifier is empty");if(this.prerelease.length===0)this.prerelease=[n];else {let i=this.prerelease.length;for(;--i>=0;)typeof this.prerelease[i]=="number"&&(this.prerelease[i]++,i=-2);if(i===-1){if(t===this.prerelease.join(".")&&s===!1)throw new Error("invalid increment argument: identifier already exists");this.prerelease.push(n);}}if(t){let i=[t,n];s===!1&&(i=[t]),C(this.prerelease[0],t)===0?isNaN(this.prerelease[1])&&(this.prerelease=i):this.prerelease=i;}break}default:throw new Error(`invalid increment argument: ${e}`)}return this.raw=this.format(),this.build.length&&(this.raw+=`+${this.build.join(".")}`),this}};We.exports=Ls;});var q=m((Qo,Je)=>{var ze=I(),Ss=o((r,e,t=!1)=>{if(r instanceof ze)return r;try{return new ze(r,e)}catch(s){if(!t)return null;throw s}},"parse");Je.exports=Ss;});var Qe=m((ea,Ke)=>{var ks=q(),As=o((r,e)=>{let t=ks(r,e);return t?t.version:null},"valid");Ke.exports=As;});var er=m((ta,Ze)=>{var Ts=q(),ws=o((r,e)=>{let t=Ts(r.trim().replace(/^[=v]+/,""),e);return t?t.version:null},"clean");Ze.exports=ws;});var sr=m((na,tr)=>{var rr=I(),qs=o((r,e,t,s,n)=>{typeof t=="string"&&(n=s,s=t,t=void 0);try{return new rr(r instanceof rr?r.version:r,t).inc(e,s,n).version}catch{return null}},"inc");tr.exports=qs;});var or=m((oa,ir)=>{var nr=q(),Ps=o((r,e)=>{let t=nr(r,null,!0),s=nr(e,null,!0),n=t.compare(s);if(n===0)return null;let i=n>0,a=i?t:s,c=i?s:t,p=!!a.prerelease.length;if(!!c.prerelease.length&&!p)return !c.patch&&!c.minor?"major":a.patch?"patch":a.minor?"minor":"major";let y=p?"pre":"";return t.major!==s.major?y+"major":t.minor!==s.minor?y+"minor":t.patch!==s.patch?y+"patch":"prerelease"},"diff");ir.exports=Ps;});var cr=m((ca,ar)=>{var Cs=I(),xs=o((r,e)=>new Cs(r,e).major,"major");ar.exports=xs;});var ur=m((ua,lr)=>{var Ds=I(),bs=o((r,e)=>new Ds(r,e).minor,"minor");lr.exports=bs;});var fr=m((fa,pr)=>{var js=I(),Gs=o((r,e)=>new js(r,e).patch,"patch");pr.exports=Gs;});var Er=m((Ea,hr)=>{var Fs=q(),Us=o((r,e)=>{let t=Fs(r,e);return t&&t.prerelease.length?t.prerelease:null},"prerelease");hr.exports=Us;});var S=m((da,dr)=>{var mr=I(),Vs=o((r,e,t)=>new mr(r,t).compare(new mr(e,t)),"compare");dr.exports=Vs;});var Rr=m((Ra,yr)=>{var Xs=S(),_s=o((r,e,t)=>Xs(e,r,t),"rcompare");yr.exports=_s;});var $r=m(($a,gr)=>{var Hs=S(),Bs=o((r,e)=>Hs(r,e,!0),"compareLoose");gr.exports=Bs;});var K=m((va,vr)=>{var Ir=I(),Ms=o((r,e,t)=>{let s=new Ir(r,t),n=new Ir(e,t);return s.compare(n)||s.compareBuild(n)},"compareBuild");vr.exports=Ms;});var Nr=m((Na,Or)=>{var Ys=K(),Ws=o((r,e)=>r.sort((t,s)=>Ys(t,s,e)),"sort");Or.exports=Ws;});var Sr=m((Sa,Lr)=>{var zs=K(),Js=o((r,e)=>r.sort((t,s)=>zs(s,t,e)),"rsort");Lr.exports=Js;});var F=m((Aa,kr)=>{var Ks=S(),Qs=o((r,e,t)=>Ks(r,e,t)>0,"gt");kr.exports=Qs;});var Q=m((wa,Ar)=>{var Zs=S(),en=o((r,e,t)=>Zs(r,e,t)<0,"lt");Ar.exports=en;});var Ee=m((Pa,Tr)=>{var rn=S(),tn=o((r,e,t)=>rn(r,e,t)===0,"eq");Tr.exports=tn;});var me=m((xa,wr)=>{var sn=S(),nn=o((r,e,t)=>sn(r,e,t)!==0,"neq");wr.exports=nn;});var Z=m((ba,qr)=>{var on=S(),an=o((r,e,t)=>on(r,e,t)>=0,"gte");qr.exports=an;});var ee=m((Ga,Pr)=>{var cn=S(),ln=o((r,e,t)=>cn(r,e,t)<=0,"lte");Pr.exports=ln;});var de=m((Ua,Cr)=>{var un=Ee(),pn=me(),fn=F(),hn=Z(),En=Q(),mn=ee(),dn=o((r,e,t,s)=>{switch(e){case"===":return typeof r=="object"&&(r=r.version),typeof t=="object"&&(t=t.version),r===t;case"!==":return typeof r=="object"&&(r=r.version),typeof t=="object"&&(t=t.version),r!==t;case"":case"=":case"==":return un(r,t,s);case"!=":return pn(r,t,s);case">":return fn(r,t,s);case">=":return hn(r,t,s);case"<":return En(r,t,s);case"<=":return mn(r,t,s);default:throw new TypeError(`Invalid operator: ${e}`)}},"cmp");Cr.exports=dn;});var Dr=m((Xa,xr)=>{var yn=I(),Rn=q(),{safeRe:re,t:te}=P(),gn=o((r,e)=>{if(r instanceof yn)return r;if(typeof r=="number"&&(r=String(r)),typeof r!="string")return null;e=e||{};let t=null;if(!e.rtl)t=r.match(e.includePrerelease?re[te.COERCEFULL]:re[te.COERCE]);else {let p=e.includePrerelease?re[te.COERCERTLFULL]:re[te.COERCERTL],E;for(;(E=p.exec(r))&&(!t||t.index+t[0].length!==r.length);)(!t||E.index+E[0].length!==t.index+t[0].length)&&(t=E),p.lastIndex=E.index+E[1].length+E[2].length;p.lastIndex=-1;}if(t===null)return null;let s=t[2],n=t[3]||"0",i=t[4]||"0",a=e.includePrerelease&&t[5]?`-${t[5]}`:"",c=e.includePrerelease&&t[6]?`+${t[6]}`:"";return Rn(`${s}.${n}.${i}${a}${c}`,e)},"coerce");xr.exports=gn;});var jr=m((Ba,br)=>{var $n=class{static{o(this,"LRUCache");}constructor(){this.max=1e3,this.map=new Map;}get(e){let t=this.map.get(e);if(t!==void 0)return this.map.delete(e),this.map.set(e,t),t}delete(e){return this.map.delete(e)}set(e,t){if(!this.delete(e)&&t!==void 0){if(this.map.size>=this.max){let n=this.map.keys().next().value;this.delete(n);}this.map.set(e,t);}return this}};br.exports=$n;});var k=m((Ya,Vr)=>{var In=/\s+/g,vn=class se{static{o(this,"Range");}constructor(e,t){if(t=Nn(t),e instanceof se)return e.loose===!!t.loose&&e.includePrerelease===!!t.includePrerelease?e:new se(e.raw,t);if(e instanceof ye)return this.raw=e.value,this.set=[[e]],this.formatted=void 0,this;if(this.options=t,this.loose=!!t.loose,this.includePrerelease=!!t.includePrerelease,this.raw=e.trim().replace(In," "),this.set=this.raw.split("||").map(s=>this.parseRange(s.trim())).filter(s=>s.length),!this.set.length)throw new TypeError(`Invalid SemVer Range: ${this.raw}`);if(this.set.length>1){let s=this.set[0];if(this.set=this.set.filter(n=>!Fr(n[0])),this.set.length===0)this.set=[s];else if(this.set.length>1){for(let n of this.set)if(n.length===1&&qn(n[0])){this.set=[n];break}}}this.formatted=void 0;}get range(){if(this.formatted===void 0){this.formatted="";for(let e=0;e<this.set.length;e++){e>0&&(this.formatted+="||");let t=this.set[e];for(let s=0;s<t.length;s++)s>0&&(this.formatted+=" "),this.formatted+=t[s].toString().trim();}}return this.formatted}format(){return this.range}toString(){return this.range}parseRange(e){let s=((this.options.includePrerelease&&Tn)|(this.options.loose&&wn))+":"+e,n=Gr.get(s);if(n)return n;let i=this.options.loose,a=i?L[O.HYPHENRANGELOOSE]:L[O.HYPHENRANGE];e=e.replace(a,Vn(this.options.includePrerelease)),$("hyphen replace",e),e=e.replace(L[O.COMPARATORTRIM],Sn),$("comparator trim",e),e=e.replace(L[O.TILDETRIM],kn),$("tilde trim",e),e=e.replace(L[O.CARETTRIM],An),$("caret trim",e);let c=e.split(" ").map(f=>Pn(f,this.options)).join(" ").split(/\s+/).map(f=>Un(f,this.options));i&&(c=c.filter(f=>($("loose invalid filter",f,this.options),!!f.match(L[O.COMPARATORLOOSE])))),$("range list",c);let p=new Map,E=c.map(f=>new ye(f,this.options));for(let f of E){if(Fr(f))return [f];p.set(f.value,f);}p.size>1&&p.has("")&&p.delete("");let y=[...p.values()];return Gr.set(s,y),y}intersects(e,t){if(!(e instanceof se))throw new TypeError("a Range is required");return this.set.some(s=>Ur(s,t)&&e.set.some(n=>Ur(n,t)&&s.every(i=>n.every(a=>i.intersects(a,t)))))}test(e){if(!e)return !1;if(typeof e=="string")try{e=new Ln(e,this.options);}catch{return !1}for(let t=0;t<this.set.length;t++)if(Xn(this.set[t],e,this.options))return !0;return !1}};Vr.exports=vn;var On=jr(),Gr=new On,Nn=W(),ye=U(),$=G(),Ln=I(),{safeRe:L,t:O,comparatorTrimReplace:Sn,tildeTrimReplace:kn,caretTrimReplace:An}=P(),{FLAG_INCLUDE_PRERELEASE:Tn,FLAG_LOOSE:wn}=j(),Fr=o(r=>r.value==="<0.0.0-0","isNullSet"),qn=o(r=>r.value==="","isAny"),Ur=o((r,e)=>{let t=!0,s=r.slice(),n=s.pop();for(;t&&s.length;)t=s.every(i=>n.intersects(i,e)),n=s.pop();return t},"isSatisfiable"),Pn=o((r,e)=>($("comp",r,e),r=Dn(r,e),$("caret",r),r=Cn(r,e),$("tildes",r),r=jn(r,e),$("xrange",r),r=Fn(r,e),$("stars",r),r),"parseComparator"),N=o(r=>!r||r.toLowerCase()==="x"||r==="*","isX"),Cn=o((r,e)=>r.trim().split(/\s+/).map(t=>xn(t,e)).join(" "),"replaceTildes"),xn=o((r,e)=>{let t=e.loose?L[O.TILDELOOSE]:L[O.TILDE];return r.replace(t,(s,n,i,a,c)=>{$("tilde",r,s,n,i,a,c);let p;return N(n)?p="":N(i)?p=`>=${n}.0.0 <${+n+1}.0.0-0`:N(a)?p=`>=${n}.${i}.0 <${n}.${+i+1}.0-0`:c?($("replaceTilde pr",c),p=`>=${n}.${i}.${a}-${c} <${n}.${+i+1}.0-0`):p=`>=${n}.${i}.${a} <${n}.${+i+1}.0-0`,$("tilde return",p),p})},"replaceTilde"),Dn=o((r,e)=>r.trim().split(/\s+/).map(t=>bn(t,e)).join(" "),"replaceCarets"),bn=o((r,e)=>{$("caret",r,e);let t=e.loose?L[O.CARETLOOSE]:L[O.CARET],s=e.includePrerelease?"-0":"";return r.replace(t,(n,i,a,c,p)=>{$("caret",r,n,i,a,c,p);let E;return N(i)?E="":N(a)?E=`>=${i}.0.0${s} <${+i+1}.0.0-0`:N(c)?i==="0"?E=`>=${i}.${a}.0${s} <${i}.${+a+1}.0-0`:E=`>=${i}.${a}.0${s} <${+i+1}.0.0-0`:p?($("replaceCaret pr",p),i==="0"?a==="0"?E=`>=${i}.${a}.${c}-${p} <${i}.${a}.${+c+1}-0`:E=`>=${i}.${a}.${c}-${p} <${i}.${+a+1}.0-0`:E=`>=${i}.${a}.${c}-${p} <${+i+1}.0.0-0`):($("no pr"),i==="0"?a==="0"?E=`>=${i}.${a}.${c}${s} <${i}.${a}.${+c+1}-0`:E=`>=${i}.${a}.${c}${s} <${i}.${+a+1}.0-0`:E=`>=${i}.${a}.${c} <${+i+1}.0.0-0`),$("caret return",E),E})},"replaceCaret"),jn=o((r,e)=>($("replaceXRanges",r,e),r.split(/\s+/).map(t=>Gn(t,e)).join(" ")),"replaceXRanges"),Gn=o((r,e)=>{r=r.trim();let t=e.loose?L[O.XRANGELOOSE]:L[O.XRANGE];return r.replace(t,(s,n,i,a,c,p)=>{$("xRange",r,s,n,i,a,c,p);let E=N(i),y=E||N(a),f=y||N(c),g=f;return n==="="&&g&&(n=""),p=e.includePrerelease?"-0":"",E?n===">"||n==="<"?s="<0.0.0-0":s="*":n&&g?(y&&(a=0),c=0,n===">"?(n=">=",y?(i=+i+1,a=0,c=0):(a=+a+1,c=0)):n==="<="&&(n="<",y?i=+i+1:a=+a+1),n==="<"&&(p="-0"),s=`${n+i}.${a}.${c}${p}`):y?s=`>=${i}.0.0${p} <${+i+1}.0.0-0`:f&&(s=`>=${i}.${a}.0${p} <${i}.${+a+1}.0-0`),$("xRange return",s),s})},"replaceXRange"),Fn=o((r,e)=>($("replaceStars",r,e),r.trim().replace(L[O.STAR],"")),"replaceStars"),Un=o((r,e)=>($("replaceGTE0",r,e),r.trim().replace(L[e.includePrerelease?O.GTE0PRE:O.GTE0],"")),"replaceGTE0"),Vn=o(r=>(e,t,s,n,i,a,c,p,E,y,f,g)=>(N(s)?t="":N(n)?t=`>=${s}.0.0${r?"-0":""}`:N(i)?t=`>=${s}.${n}.0${r?"-0":""}`:a?t=`>=${t}`:t=`>=${t}${r?"-0":""}`,N(E)?p="":N(y)?p=`<${+E+1}.0.0-0`:N(f)?p=`<${E}.${+y+1}.0-0`:g?p=`<=${E}.${y}.${f}-${g}`:r?p=`<${E}.${y}.${+f+1}-0`:p=`<=${p}`,`${t} ${p}`.trim()),"hyphenReplace"),Xn=o((r,e,t)=>{for(let s=0;s<r.length;s++)if(!r[s].test(e))return !1;if(e.prerelease.length&&!t.includePrerelease){for(let s=0;s<r.length;s++)if($(r[s].semver),r[s].semver!==ye.ANY&&r[s].semver.prerelease.length>0){let n=r[s].semver;if(n.major===e.major&&n.minor===e.minor&&n.patch===e.patch)return !0}return !1}return !0},"testSet");});var U=m((za,Yr)=>{var V=Symbol("SemVer ANY"),_n=class $e{static{o(this,"Comparator");}static get ANY(){return V}constructor(e,t){if(t=Xr(t),e instanceof $e){if(e.loose===!!t.loose)return e;e=e.value;}e=e.trim().split(/\s+/).join(" "),ge("comparator",e,t),this.options=t,this.loose=!!t.loose,this.parse(e),this.semver===V?this.value="":this.value=this.operator+this.semver.version,ge("comp",this);}parse(e){let t=this.options.loose?_r[Hr.COMPARATORLOOSE]:_r[Hr.COMPARATOR],s=e.match(t);if(!s)throw new TypeError(`Invalid comparator: ${e}`);this.operator=s[1]!==void 0?s[1]:"",this.operator==="="&&(this.operator=""),s[2]?this.semver=new Br(s[2],this.options.loose):this.semver=V;}toString(){return this.value}test(e){if(ge("Comparator.test",e,this.options.loose),this.semver===V||e===V)return !0;if(typeof e=="string")try{e=new Br(e,this.options);}catch{return !1}return Re(e,this.operator,this.semver,this.options)}intersects(e,t){if(!(e instanceof $e))throw new TypeError("a Comparator is required");return this.operator===""?this.value===""?!0:new Mr(e.value,t).test(this.value):e.operator===""?e.value===""?!0:new Mr(this.value,t).test(e.semver):(t=Xr(t),t.includePrerelease&&(this.value==="<0.0.0-0"||e.value==="<0.0.0-0")||!t.includePrerelease&&(this.value.startsWith("<0.0.0")||e.value.startsWith("<0.0.0"))?!1:!!(this.operator.startsWith(">")&&e.operator.startsWith(">")||this.operator.startsWith("<")&&e.operator.startsWith("<")||this.semver.version===e.semver.version&&this.operator.includes("=")&&e.operator.includes("=")||Re(this.semver,"<",e.semver,t)&&this.operator.startsWith(">")&&e.operator.startsWith("<")||Re(this.semver,">",e.semver,t)&&this.operator.startsWith("<")&&e.operator.startsWith(">")))}};Yr.exports=_n;var Xr=W(),{safeRe:_r,t:Hr}=P(),Re=de(),ge=G(),Br=I(),Mr=k();});var X=m((Ka,Wr)=>{var Hn=k(),Bn=o((r,e,t)=>{try{e=new Hn(e,t);}catch{return !1}return e.test(r)},"satisfies");Wr.exports=Bn;});var Jr=m((Za,zr)=>{var Mn=k(),Yn=o((r,e)=>new Mn(r,e).set.map(t=>t.map(s=>s.value).join(" ").trim().split(" ")),"toComparators");zr.exports=Yn;});var Qr=m((rc,Kr)=>{var Wn=I(),zn=k(),Jn=o((r,e,t)=>{let s=null,n=null,i=null;try{i=new zn(e,t);}catch{return null}return r.forEach(a=>{i.test(a)&&(!s||n.compare(a)===-1)&&(s=a,n=new Wn(s,t));}),s},"maxSatisfying");Kr.exports=Jn;});var et=m((sc,Zr)=>{var Kn=I(),Qn=k(),Zn=o((r,e,t)=>{let s=null,n=null,i=null;try{i=new Qn(e,t);}catch{return null}return r.forEach(a=>{i.test(a)&&(!s||n.compare(a)===1)&&(s=a,n=new Kn(s,t));}),s},"minSatisfying");Zr.exports=Zn;});var st=m((ic,tt)=>{var Ie=I(),ei=k(),rt=F(),ri=o((r,e)=>{r=new ei(r,e);let t=new Ie("0.0.0");if(r.test(t)||(t=new Ie("0.0.0-0"),r.test(t)))return t;t=null;for(let s=0;s<r.set.length;++s){let n=r.set[s],i=null;n.forEach(a=>{let c=new Ie(a.semver.version);switch(a.operator){case">":c.prerelease.length===0?c.patch++:c.prerelease.push(0),c.raw=c.format();case"":case">=":(!i||rt(c,i))&&(i=c);break;case"<":case"<=":break;default:throw new Error(`Unexpected operation: ${a.operator}`)}}),i&&(!t||rt(t,i))&&(t=i);}return t&&r.test(t)?t:null},"minVersion");tt.exports=ri;});var it=m((ac,nt)=>{var ti=k(),si=o((r,e)=>{try{return new ti(r,e).range||"*"}catch{return null}},"validRange");nt.exports=si;});var ne=m((lc,lt)=>{var ni=I(),ct=U(),{ANY:ii}=ct,oi=k(),ai=X(),ot=F(),at=Q(),ci=ee(),li=Z(),ui=o((r,e,t,s)=>{r=new ni(r,s),e=new oi(e,s);let n,i,a,c,p;switch(t){case">":n=ot,i=ci,a=at,c=">",p=">=";break;case"<":n=at,i=li,a=ot,c="<",p="<=";break;default:throw new TypeError('Must provide a hilo val of "<" or ">"')}if(ai(r,e,s))return !1;for(let E=0;E<e.set.length;++E){let y=e.set[E],f=null,g=null;if(y.forEach(h=>{h.semver===ii&&(h=new ct(">=0.0.0")),f=f||h,g=g||h,n(h.semver,f.semver,s)?f=h:a(h.semver,g.semver,s)&&(g=h);}),f.operator===c||f.operator===p||(!g.operator||g.operator===c)&&i(r,g.semver))return !1;if(g.operator===p&&a(r,g.semver))return !1}return !0},"outside");lt.exports=ui;});var pt=m((pc,ut)=>{var pi=ne(),fi=o((r,e,t)=>pi(r,e,">",t),"gtr");ut.exports=fi;});var ht=m((hc,ft)=>{var hi=ne(),Ei=o((r,e,t)=>hi(r,e,"<",t),"ltr");ft.exports=Ei;});var dt=m((mc,mt)=>{var Et=k(),mi=o((r,e,t)=>(r=new Et(r,t),e=new Et(e,t),r.intersects(e,t)),"intersects");mt.exports=mi;});var Rt=m((yc,yt)=>{var di=X(),yi=S();yt.exports=(r,e,t)=>{let s=[],n=null,i=null,a=r.sort((y,f)=>yi(y,f,t));for(let y of a)di(y,e,t)?(i=y,n||(n=y)):(i&&s.push([n,i]),i=null,n=null);n&&s.push([n,null]);let c=[];for(let[y,f]of s)y===f?c.push(y):!f&&y===a[0]?c.push("*"):f?y===a[0]?c.push(`<=${f}`):c.push(`${y} - ${f}`):c.push(`>=${y}`);let p=c.join(" || "),E=typeof e.raw=="string"?e.raw:String(e);return p.length<E.length?p:e};});var Nt=m((Rc,Ot)=>{var gt=k(),Oe=U(),{ANY:ve}=Oe,_=X(),Ne=S(),Ri=o((r,e,t={})=>{if(r===e)return !0;r=new gt(r,t),e=new gt(e,t);let s=!1;e:for(let n of r.set){for(let i of e.set){let a=$i(n,i,t);if(s=s||a!==null,a)continue e}if(s)return !1}return !0},"subset"),gi=[new Oe(">=0.0.0-0")],$t=[new Oe(">=0.0.0")],$i=o((r,e,t)=>{if(r===e)return !0;if(r.length===1&&r[0].semver===ve){if(e.length===1&&e[0].semver===ve)return !0;t.includePrerelease?r=gi:r=$t;}if(e.length===1&&e[0].semver===ve){if(t.includePrerelease)return !0;e=$t;}let s=new Set,n,i;for(let h of r)h.operator===">"||h.operator===">="?n=It(n,h,t):h.operator==="<"||h.operator==="<="?i=vt(i,h,t):s.add(h.semver);if(s.size>1)return null;let a;if(n&&i){if(a=Ne(n.semver,i.semver,t),a>0)return null;if(a===0&&(n.operator!==">="||i.operator!=="<="))return null}for(let h of s){if(n&&!_(h,String(n),t)||i&&!_(h,String(i),t))return null;for(let ce of e)if(!_(h,String(ce),t))return !1;return !0}let c,p,E,y,f=i&&!t.includePrerelease&&i.semver.prerelease.length?i.semver:!1,g=n&&!t.includePrerelease&&n.semver.prerelease.length?n.semver:!1;f&&f.prerelease.length===1&&i.operator==="<"&&f.prerelease[0]===0&&(f=!1);for(let h of e){if(y=y||h.operator===">"||h.operator===">=",E=E||h.operator==="<"||h.operator==="<=",n){if(g&&h.semver.prerelease&&h.semver.prerelease.length&&h.semver.major===g.major&&h.semver.minor===g.minor&&h.semver.patch===g.patch&&(g=!1),h.operator===">"||h.operator===">="){if(c=It(n,h,t),c===h&&c!==n)return !1}else if(n.operator===">="&&!_(n.semver,String(h),t))return !1}if(i){if(f&&h.semver.prerelease&&h.semver.prerelease.length&&h.semver.major===f.major&&h.semver.minor===f.minor&&h.semver.patch===f.patch&&(f=!1),h.operator==="<"||h.operator==="<="){if(p=vt(i,h,t),p===h&&p!==i)return !1}else if(i.operator==="<="&&!_(i.semver,String(h),t))return !1}if(!h.operator&&(i||n)&&a!==0)return !1}return !(n&&E&&!i&&a!==0||i&&y&&!n&&a!==0||g||f)},"simpleSubset"),It=o((r,e,t)=>{if(!r)return e;let s=Ne(r.semver,e.semver,t);return s>0?r:s<0||e.operator===">"&&r.operator===">="?e:r},"higherGT"),vt=o((r,e,t)=>{if(!r)return e;let s=Ne(r.semver,e.semver,t);return s<0?r:s>0||e.operator==="<"&&r.operator==="<="?e:r},"lowerLT");Ot.exports=Ri;});var At=m(($c,kt)=>{var Le=P(),Lt=j(),Ii=I(),St=he(),vi=q(),Oi=Qe(),Ni=er(),Li=sr(),Si=or(),ki=cr(),Ai=ur(),Ti=fr(),wi=Er(),qi=S(),Pi=Rr(),Ci=$r(),xi=K(),Di=Nr(),bi=Sr(),ji=F(),Gi=Q(),Fi=Ee(),Ui=me(),Vi=Z(),Xi=ee(),_i=de(),Hi=Dr(),Bi=U(),Mi=k(),Yi=X(),Wi=Jr(),zi=Qr(),Ji=et(),Ki=st(),Qi=it(),Zi=ne(),eo=pt(),ro=ht(),to=dt(),so=Rt(),no=Nt();kt.exports={parse:vi,valid:Oi,clean:Ni,inc:Li,diff:Si,major:ki,minor:Ai,patch:Ti,prerelease:wi,compare:qi,rcompare:Pi,compareLoose:Ci,compareBuild:xi,sort:Di,rsort:bi,gt:ji,lt:Gi,eq:Fi,neq:Ui,gte:Vi,lte:Xi,cmp:_i,coerce:Hi,Comparator:Bi,Range:Mi,satisfies:Yi,toComparators:Wi,maxSatisfying:zi,minSatisfying:Ji,minVersion:Ki,validRange:Qi,outside:Zi,gtr:eo,ltr:ro,intersects:to,simplifyRange:so,subset:no,SemVer:Ii,re:Le.re,src:Le.src,tokens:Le.t,SEMVER_SPEC_VERSION:Lt.SEMVER_SPEC_VERSION,RELEASE_TYPES:Lt.RELEASE_TYPES,compareIdentifiers:St.compareIdentifiers,rcompareIdentifiers:St.rcompareIdentifiers};});var Te={};zt(Te,{default:()=>Lo,languages:()=>Ut,options:()=>Ft,parsers:()=>Vt,pluginPackageJson:()=>Xt});var M=qe(Ce());var Kt=/^(?:( )+|\t+)/,b="space",De="tab";function xe(r,e){let t=new Map,s=0,n,i;for(let a of r.split(/\n/g)){if(!a)continue;let c,p,E,y,f,g=a.match(Kt);if(g===null)s=0,n="";else {if(c=g[0].length,p=g[1]?b:De,e&&p===b&&c===1)continue;p!==n&&(s=0),n=p,E=1,y=0;let h=c-s;if(s=c,h===0)E=0,y=1;else {let ce=h>0?h:-h;i=Qt(p,ce);}f=t.get(i),f=f===void 0?[1,0]:[f[0]+E,f[1]+y],t.set(i,f);}}return t}o(xe,"makeIndentsMap");function Qt(r,e){return (r===b?"s":"t")+String(e)}o(Qt,"encodeIndentsKey");function Zt(r){let t=r[0]==="s"?b:De,s=Number(r.slice(1));return {type:t,amount:s}}o(Zt,"decodeIndentsKey");function es(r){let e,t=0,s=0;for(let[n,[i,a]]of r)(i>t||i===t&&a>s)&&(t=i,s=a,e=n);return e}o(es,"getMostUsedKey");function rs(r,e){return (r===b?" ":" ").repeat(e)}o(rs,"makeIndentString");function le(r){if(typeof r!="string")throw new TypeError("Expected a string");let e=xe(r,!0);e.size===0&&(e=xe(r,!1));let t=es(e),s,n=0,i="";return t!==void 0&&({type:s,amount:n}=Zt(t),i=rs(s,n)),{amount:n,type:s,indent:i}}o(le,"detectIndent");function ts(r){if(typeof r!="string")throw new TypeError("Expected a string");let e=r.match(/(?:\r?\n)/g)||[];if(e.length===0)return;let t=e.filter(n=>n===`\r
2
+ `).length,s=e.length-t;return t>s?`\r
3
+ `:`
4
+ `}o(ts,"detectNewline");function be(r){return typeof r=="string"&&ts(r)||`
5
+ `}o(be,"detectNewlineGraceful");var ns=new URL("./index.json",import.meta.url),is=JSON.parse(ss.readFileSync(ns)),je=is;function ue(r){if(typeof r!="object"||r===null)return !1;let e=Object.getPrototypeOf(r);return (e===null||e===Object.prototype||Object.getPrototypeOf(e)===null)&&!(Symbol.toStringTag in r)&&!(Symbol.iterator in r)}o(ue,"isPlainObject");var oe=qe(At());var Ae=Object.hasOwn||((r,e)=>Object.prototype.hasOwnProperty.call(r,e)),x=o(r=>(e,...t)=>r.reduce((s,n)=>n(s,...t),e),"pipe"),B=o(r=>e=>Array.isArray(e)?r(e):e,"onArray"),Dt=o(r=>e=>Array.isArray(e)&&e.every(t=>typeof t=="string")?r(e):e,"onStringArray"),H=Dt(r=>[...new Set(r)]),io=Dt(r=>[...r].sort()),ie=x([H,io]),D=o(r=>(e,...t)=>ue(e)?r(e,...t):e,"onObject"),v=o((r,e)=>{let t=D(s=>(e&&(s=Object.fromEntries(Object.entries(s).map(([n,i])=>[n,t(i)]))),(0, M.default)(s,r)));return t},"sortObjectBy"),R=v(),Se=v(["type","url"]),ke=v(["name","email","url"]),oo=v(["lib","bin","man","doc","example","test"]),A=o((r,e)=>(t,...s)=>Ae(t,r)?{...t,[r]:e(t[r],...s)}:t,"overProperty"),Tt=v(je),wt=o(r=>{let[e]=r.split(">"),t=[...e.matchAll("@")];if(!t.length||t.length===1&&t[0].index===0)return {name:r};let s=t.pop().index;return {name:e.substring(0,s),range:e.substring(s+1)}},"parseNameAndVersionRange"),ao=v((r,e)=>{let{name:t,range:s}=wt(r),{name:n,range:i}=wt(e);return t!==n?t.localeCompare(n):s?i?oe.default.compare(oe.default.minVersion(s),oe.default.minVersion(i)):1:-1}),qt=o(r=>{let e=r.split("@");return r.startsWith("@")?e.length>2?e.slice(0,-1).join("@"):r:e.length>1?e.slice(0,-1).join("@"):r},"getPackageName"),co=o((r,e)=>{let t=qt(r),s=qt(e);return t<s?-1:t>s?1:0},"sortObjectByIdent"),lo=["files","excludedFiles","env","parser","parserOptions","settings","plugins","extends","rules","overrides","globals","processor","noInlineConfig","reportUnusedDisableDirectives"],bt=D(x([v(lo),A("env",R),A("globals",R),A("overrides",B(r=>r.map(bt))),A("parserOptions",R),A("rules",v((r,e)=>r.split("/").length-e.split("/").length||r.localeCompare(e))),A("settings",R)])),uo=v(["description","url","href"]),po=D(x([r=>(0, M.default)(r,[...Object.keys(r).filter(e=>e!=="overrides").sort(),"overrides"]),A("overrides",B(r=>r.map(x([R,A("options",R)]))))])),fo=v(["node","npm","yarn"]),ho=["peerDependencyRules","neverBuiltDependencies","onlyBuiltDependencies","onlyBuiltDependenciesFile","allowedDeprecatedVersions","allowNonAppliedPatches","updateConfig","auditConfig","requiredScripts","supportedArchitectures","overrides","patchedDependencies","packageExtensions"],Eo=D(x([v(ho,!0),A("overrides",ao)])),mo=new Set(["install","pack","prepare","publish","restart","shrinkwrap","start","stop","test","uninstall","version"]),Pt=o((r,e)=>Ae(e,"devDependencies")&&Ae(e.devDependencies,r),"hasDevDependency"),Ct=D((r,e)=>{let t=Object.keys(r),s=new Set,n=t.map(a=>{let c=a.replace(/^(?:pre|post)/,"");return mo.has(c)||t.includes(c)?(s.add(c),c):a});!Pt("npm-run-all",e)&&!Pt("npm-run-all2",e)&&n.sort();let i=n.flatMap(a=>s.has(a)?[`pre${a}`,a,`post${a}`]:[a]);return (0, M.default)(r,i)}),jt=[{key:"$schema"},{key:"name"},{key:"displayName"},{key:"version"},{key:"private"},{key:"description"},{key:"categories",over:H},{key:"keywords",over:H},{key:"homepage"},{key:"bugs",over:v(["url","email"])},{key:"repository",over:Se},{key:"funding",over:Se},{key:"license",over:Se},{key:"qna"},{key:"author",over:ke},{key:"maintainers",over:B(r=>r.map(ke))},{key:"contributors",over:B(r=>r.map(ke))},{key:"publisher"},{key:"sideEffects"},{key:"type"},{key:"imports"},{key:"exports"},{key:"main"},{key:"svelte"},{key:"umd:main"},{key:"jsdelivr"},{key:"unpkg"},{key:"module"},{key:"source"},{key:"jsnext:main"},{key:"browser"},{key:"react-native"},{key:"types"},{key:"typesVersions"},{key:"typings"},{key:"style"},{key:"example"},{key:"examplestyle"},{key:"assets"},{key:"bin",over:R},{key:"man"},{key:"directories",over:oo},{key:"files",over:H},{key:"workspaces"},{key:"binary",over:v(["module_name","module_path","remote_path","package_name","host"])},{key:"scripts",over:Ct},{key:"betterScripts",over:Ct},{key:"contributes",over:R},{key:"activationEvents",over:H},{key:"husky",over:A("hooks",Tt)},{key:"simple-git-hooks",over:Tt},{key:"pre-commit"},{key:"commitlint",over:R},{key:"lint-staged"},{key:"nano-staged"},{key:"config",over:R},{key:"nodemonConfig",over:R},{key:"browserify",over:R},{key:"babel",over:R},{key:"browserslist"},{key:"xo",over:R},{key:"prettier",over:po},{key:"eslintConfig",over:bt},{key:"eslintIgnore"},{key:"npmpkgjsonlint",over:R},{key:"npmPackageJsonLintConfig",over:R},{key:"npmpackagejsonlint",over:R},{key:"release",over:R},{key:"remarkConfig",over:R},{key:"stylelint"},{key:"ava",over:R},{key:"jest",over:R},{key:"jest-junit",over:R},{key:"jest-stare",over:R},{key:"mocha",over:R},{key:"nyc",over:R},{key:"c8",over:R},{key:"tap",over:R},{key:"oclif",over:v(void 0,!0)},{key:"resolutions",over:R},{key:"dependencies",over:R},{key:"devDependencies",over:R},{key:"dependenciesMeta",over:v(co,!0)},{key:"peerDependencies",over:R},{key:"peerDependenciesMeta",over:v(void 0,!0)},{key:"optionalDependencies",over:R},{key:"bundledDependencies",over:ie},{key:"bundleDependencies",over:ie},{key:"extensionPack",over:ie},{key:"extensionDependencies",over:ie},{key:"flat"},{key:"packageManager"},{key:"engines",over:R},{key:"engineStrict",over:R},{key:"volta",over:fo},{key:"languageName"},{key:"os"},{key:"cpu"},{key:"preferGlobal",over:R},{key:"publishConfig",over:R},{key:"icon"},{key:"badges",over:B(r=>r.map(uo))},{key:"galleryBanner",over:R},{key:"preview"},{key:"markdown"},{key:"pnpm",over:Eo}],xt=jt.map(({key:r})=>r),yo=x(jt.map(({key:r,over:e})=>e?A(r,e):void 0).filter(Boolean));function Ro(r,e){if(typeof r=="string"){let{indent:t,type:s}=le(r),n=r.slice(-1)===`
6
+ `?`
7
+ `:"",i=be(r);r=JSON.parse(r);let a=JSON.stringify(e(r),null,s==="tab"?" ":t)+n;return i===`\r
8
+ `&&(a=a.replace(/\n/g,i)),a}return e(r)}o(Ro,"editStringJSON");var go=o(r=>r[0]==="_","isPrivateKey"),$o=o((r,e)=>r.reduce((t,s)=>(t[e(s)?0:1].push(s),t),[[],[]]),"partition");function Gt(r,e={}){return Ro(r,D(t=>{let s=e.sortOrder||xt;if(Array.isArray(s)){let n=Object.keys(t),[i,a]=$o(n,go);s=[...s,...xt,...a.sort(),...i.sort()];}return yo((0, M.default)(t,s),t)}))}o(Gt,"sortPackageJson");var Ft={sortPackageJsonSortOrder:{category:"Format",type:"string",description:"Custom ordering array.",default:[{value:[]}],array:!0}},{languages:No}=Oo,Ut=No.filter(({name:r})=>r==="JSON.stringify"),ae=parsers["json-stringify"],Vt={"json-stringify":{...ae,async parse(r,e){let{filepath:t}=e;if(/package.*json$/u.test(t)){r=await Io.format(r,{filepath:t}),ae.preprocess&&(r=ae.preprocess(r,e));let s=e?.sortPackageJsonSortOrder;r=Gt(r,s&&s.length>0?{sortOrder:s}:{});}return ae.parse(r,e)}}},Xt={languages:Ut,options:Ft,parsers:Vt},Lo=Xt;var we={"@bfra.me/prettier-plugins/package-json":Te};async function _t(r,e){try{if(!we[e]){let t=r(e),s=await So(import(t));we[e]=s;}return we[e]??e}catch{return e}}o(_t,"resolve");async function So(r){return (await r).default||await r}o(So,"interopDefault");var Ao=createRequire(import.meta.url),To=_t.bind(null,Ao.resolve),{searchParams:wo}=new URL(import.meta.url),qo={arrowParens:"avoid",bracketSpacing:!1,endOfLine:"auto",printWidth:100,semi:wo.has("semi","true"),singleQuote:!0,overrides:[{files:["**/node_modules/**","**/dist/**","**/coverage/**","**/out/**","**/temp/**","**/.idea/**","**/.next/**","**/.nuxt/**","**/.output/**","**/.tsup/**","**/.vercel/**","**/.vitepress/cache/**","**/.vite-inspect/**","**/__snapshots__/**","**/test/fixtures/**","**/auto-import?(s).d.ts","**/.changeset/*.md","**/CHANGELOG*.md","**/changelog*.md","**/components.d.ts","**/devcontainer-lock.json","**/LICENSE*","**/license*","**/*.min.*","**/package-lock.json","**/pnpm-lock.yaml","**/typed-router.d.ts","**/yarn.lock"],options:{requirePragma:!0}},{files:[".vscode/*.json",".devcontainer/**/devcontainer*.json"],options:{tabWidth:4}},{files:["*.md"],options:{proseWrap:"never",singleQuote:!1}}],plugins:await Promise.all(["@bfra.me/prettier-plugins/package-json"].map(To))},xc=qo;export{xc as default};//# sourceMappingURL=prettier.config.js.map
9
+ //# sourceMappingURL=prettier.config.js.map
package/src/120-proof.ts CHANGED
@@ -1,18 +1,14 @@
1
- import prettierConfig from './prettier.config.js'
2
- import type {Config} from 'prettier'
1
+ import defaultConfig, {type Writable} from './prettier.config.js'
3
2
 
4
- const {searchParams: params} = new URL(import.meta.url)
5
- const preset = {
6
- semi: params.has('semi') || prettierConfig.semi || false,
3
+ const $120ProofConfig = {
4
+ ...defaultConfig,
7
5
  printWidth: 120,
8
- } as const satisfies Pick<Config, 'printWidth' | 'semi'>
6
+ semi: new URL(import.meta.url).searchParams.has('semi', 'true') || defaultConfig.semi,
7
+ } as const
9
8
 
10
9
  /**
11
10
  * Shared Prettier configuration for bfra.me projects with `printWidth` set to 120 characters.
12
11
  */
13
- const config: Config & typeof preset = {
14
- ...prettierConfig,
15
- ...preset,
16
- }
12
+ type $120ProofConfig = Writable<typeof $120ProofConfig>
17
13
 
18
- export default config
14
+ export default $120ProofConfig as $120ProofConfig
package/src/plugins.ts CHANGED
@@ -5,13 +5,24 @@ const resolvedPlugins: Record<string, Plugin> = {
5
5
  '@bfra.me/prettier-plugins/package-json': PluginPackageJson,
6
6
  }
7
7
 
8
- export const resolve = (resolver: (id: string) => string, plugin: string): string | Plugin => {
8
+ export async function resolve(
9
+ resolver: (id: string) => string,
10
+ plugin: string,
11
+ ): Promise<string | Plugin<any>> {
9
12
  try {
10
- if (resolvedPlugins[plugin]) {
11
- return resolvedPlugins[plugin]
13
+ if (!resolvedPlugins[plugin]) {
14
+ const resolved = resolver(plugin)
15
+ const resolvedPlugin = await interopDefault(import(resolved))
16
+ resolvedPlugins[plugin] = resolvedPlugin
12
17
  }
13
- return resolver(plugin)
14
- } finally {
18
+ return resolvedPlugins[plugin] ?? plugin
19
+ } catch {
15
20
  return plugin
16
21
  }
17
22
  }
23
+
24
+ async function interopDefault<T>(
25
+ m: T | PromiseLike<T>,
26
+ ): Promise<T extends {default: infer U} ? U : T> {
27
+ return ((await m) as any).default || (await m)
28
+ }
@@ -1,22 +1,21 @@
1
+ import {createRequire} from 'node:module'
2
+ import type * as prettier from 'prettier'
1
3
  import {resolve} from './plugins.js'
2
- import type {Config} from 'prettier'
3
4
 
4
- import {createRequire} from 'module'
5
+ export type Writable<T> = {
6
+ -readonly [K in keyof T]: T[K] extends object ? {[J in keyof T[K]]: Writable<T[K][J]>} : T[K]
7
+ } & {}
5
8
 
6
9
  const require = createRequire(import.meta.url)
7
10
  const resolvePlugin = resolve.bind(null, require.resolve)
11
+ const {searchParams} = new URL(import.meta.url)
8
12
 
9
- const {searchParams: params} = new URL(import.meta.url)
10
-
11
- /**
12
- * Shared Prettier configuration for bfra.me projects.
13
- */
14
- const config: Config = {
13
+ const config = {
15
14
  arrowParens: 'avoid',
16
15
  bracketSpacing: false,
17
16
  endOfLine: 'auto',
18
17
  printWidth: 100,
19
- semi: params.has('semi', 'true'),
18
+ semi: searchParams.has('semi', 'true'),
20
19
  singleQuote: true,
21
20
 
22
21
  overrides: [
@@ -78,9 +77,16 @@ const config: Config = {
78
77
  singleQuote: false,
79
78
  },
80
79
  },
81
- ],
80
+ ] as prettier.Config['overrides'],
82
81
 
83
- plugins: ['@bfra.me/prettier-plugins/package-json'].map(resolvePlugin),
84
- }
82
+ plugins: (await Promise.all(
83
+ ['@bfra.me/prettier-plugins/package-json'].map(resolvePlugin),
84
+ )) as prettier.Config['plugins'],
85
+ } as const
86
+
87
+ /**
88
+ * Shared Prettier configuration for bfra.me projects.
89
+ */
90
+ export type Config = Writable<typeof config>
85
91
 
86
- export default config
92
+ export default config as Config
@@ -1,12 +0,0 @@
1
- import { Config } from 'prettier';
2
-
3
- declare const preset: {
4
- readonly semi: boolean;
5
- readonly printWidth: 120;
6
- };
7
- /**
8
- * Shared Prettier configuration for bfra.me projects with `printWidth` set to 120 characters.
9
- */
10
- declare const config: Config & typeof preset;
11
-
12
- export { config as default };
package/lib/120-proof.js DELETED
@@ -1,15 +0,0 @@
1
- import prettierConfig from "./prettier.config.js";
2
- const { searchParams: params } = new URL(import.meta.url);
3
- const preset = {
4
- semi: params.has("semi") || prettierConfig.semi || false,
5
- printWidth: 120
6
- };
7
- const config = {
8
- ...prettierConfig,
9
- ...preset
10
- };
11
- var proof_default = config;
12
- export {
13
- proof_default as default
14
- };
15
- //# sourceMappingURL=120-proof.js.map
package/lib/plugins.d.ts DELETED
@@ -1,5 +0,0 @@
1
- import { Plugin } from 'prettier';
2
-
3
- declare const resolve: (resolver: (id: string) => string, plugin: string) => string | Plugin;
4
-
5
- export { resolve };
package/lib/plugins.js DELETED
@@ -1,20 +0,0 @@
1
- var __defProp = Object.defineProperty;
2
- var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
3
- import * as PluginPackageJson from "@bfra.me/prettier-plugins/package-json";
4
- const resolvedPlugins = {
5
- "@bfra.me/prettier-plugins/package-json": PluginPackageJson
6
- };
7
- const resolve = /* @__PURE__ */ __name((resolver, plugin) => {
8
- try {
9
- if (resolvedPlugins[plugin]) {
10
- return resolvedPlugins[plugin];
11
- }
12
- return resolver(plugin);
13
- } finally {
14
- return plugin;
15
- }
16
- }, "resolve");
17
- export {
18
- resolve
19
- };
20
- //# sourceMappingURL=plugins.js.map
@@ -1,8 +0,0 @@
1
- import { Config } from 'prettier';
2
-
3
- /**
4
- * Shared Prettier configuration for bfra.me projects.
5
- */
6
- declare const config: Config;
7
-
8
- export { config as default };
@@ -1,83 +0,0 @@
1
- import { resolve } from "./plugins.js";
2
- import { createRequire } from "module";
3
- const require2 = createRequire(import.meta.url);
4
- const resolvePlugin = resolve.bind(null, require2.resolve);
5
- const { searchParams: params } = new URL(import.meta.url);
6
- const config = {
7
- arrowParens: "avoid",
8
- bracketSpacing: false,
9
- endOfLine: "auto",
10
- printWidth: 100,
11
- semi: params.has("semi", "true"),
12
- singleQuote: true,
13
- overrides: [
14
- // Adapted from https://github.com/sxzz/prettier-config/blob/1e5cc3021e5816aceebe0b90af1d530239442ecf/index.js.
15
- // Require a pragma for paths typically not under version control or written by build tools.
16
- {
17
- files: [
18
- "**/node_modules/**",
19
- "**/dist/**",
20
- "**/coverage/**",
21
- "**/out/**",
22
- "**/temp/**",
23
- "**/.idea/**",
24
- "**/.next/**",
25
- "**/.nuxt/**",
26
- "**/.output/**",
27
- "**/.tsup/**",
28
- "**/.vercel/**",
29
- "**/.vitepress/cache/**",
30
- "**/.vite-inspect/**",
31
- "**/__snapshots__/**",
32
- "**/test/fixtures/**",
33
- "**/auto-import?(s).d.ts",
34
- "**/.changeset/*.md",
35
- "**/CHANGELOG*.md",
36
- "**/changelog*.md",
37
- "**/components.d.ts",
38
- "**/devcontainer-lock.json",
39
- "**/LICENSE*",
40
- "**/license*",
41
- "**/*.min.*",
42
- "**/package-lock.json",
43
- "**/pnpm-lock.yaml",
44
- "**/typed-router.d.ts",
45
- "**/yarn.lock"
46
- ],
47
- options: {
48
- requirePragma: true
49
- }
50
- },
51
- // VS Code configuration files:
52
- // Use 4 spaces for indentation to match the default VS Code settings.
53
- {
54
- files: [
55
- ".vscode/*.json",
56
- ".devcontainer/**/devcontainer*.json"
57
- ],
58
- options: {
59
- tabWidth: 4
60
- }
61
- },
62
- // Markdown:
63
- // - Disable single quotes for Markdown files.
64
- // - Disable `proseWrap` to avoid wrapping prose.
65
- {
66
- files: [
67
- "*.md"
68
- ],
69
- options: {
70
- proseWrap: "never",
71
- singleQuote: false
72
- }
73
- }
74
- ],
75
- plugins: [
76
- "@bfra.me/prettier-plugins/package-json"
77
- ].map(resolvePlugin)
78
- };
79
- var prettier_config_default = config;
80
- export {
81
- prettier_config_default as default
82
- };
83
- //# sourceMappingURL=prettier.config.js.map