pickier 0.1.73 → 0.1.74

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.
@@ -1,3 +1,3 @@
1
1
  // @bun
2
- var oe="pickier",ae="module",F="0.1.73",le="Format, lint and more in a fraction of seconds.",ce="Chris Breuer <chris@stacksjs.org>",ue="MIT",fe="https://github.com/pickier/pickier#readme",me={type:"git",url:"git+https://github.com/pickier/pickier.git"},he={url:"https://github.com/pickier/pickier/issues"},de=["pickier","linter","formatter","bun","fast"],pe={".":{types:"./dist/src/index.d.ts",import:"./dist/src/index.js"},"./*":{import:"./dist/*"}},ge="./dist/src/index.js",ye="./dist/src/index.d.ts",be={pickier:"./dist/bin/cli.js"},we=["README.md","dist"],xe={build:"bun --bun build.ts","build:bin":"bun --bun build.ts && bun run compile","build:native":"bun scripts/build-native.ts",compile:"bun build ./bin/cli.ts --compile --minify --outfile bin/pickier","compile:all":"bun run compile:linux-x64 && bun run compile:linux-arm64 && bun run compile:linux-x64-musl && bun run compile:linux-arm64-musl && bun run compile:windows-x64 && bun run compile:windows-arm64 && bun run compile:darwin-x64 && bun run compile:darwin-arm64","compile:linux-x64":"bun build ./bin/cli.ts --compile --minify --target=bun-linux-x64 --outfile bin/pickier-linux-x64","compile:linux-arm64":"bun build ./bin/cli.ts --compile --minify --target=bun-linux-arm64 --outfile bin/pickier-linux-arm64","compile:linux-x64-musl":"bun build ./bin/cli.ts --compile --minify --target=bun-linux-x64-musl --outfile bin/pickier-linux-x64-musl","compile:linux-arm64-musl":"bun build ./bin/cli.ts --compile --minify --target=bun-linux-arm64-musl --outfile bin/pickier-linux-arm64-musl","compile:windows-x64":"bun build ./bin/cli.ts --compile --minify --target=bun-windows-x64 --outfile bin/pickier-windows-x64.exe","compile:windows-arm64":"bun build ./bin/cli.ts --compile --minify --target=bun-windows-arm64 --outfile bin/pickier-windows-arm64.exe","compile:darwin-x64":"bun build ./bin/cli.ts --compile --minify --target=bun-darwin-x64 --outfile bin/pickier-darwin-x64","compile:darwin-arm64":"bun build ./bin/cli.ts --compile --minify --target=bun-darwin-arm64 --outfile bin/pickier-darwin-arm64",zip:"bun run zip:all","zip:all":"bun run zip:linux-x64 && bun run zip:linux-arm64 && bun run zip:linux-x64-musl && bun run zip:linux-arm64-musl && bun run zip:windows-x64 && bun run zip:windows-arm64 && bun run zip:darwin-x64 && bun run zip:darwin-arm64","zip:linux-x64":"zip -j bin/pickier-linux-x64.zip bin/pickier-linux-x64","zip:linux-arm64":"zip -j bin/pickier-linux-arm64.zip bin/pickier-linux-arm64","zip:linux-x64-musl":"zip -j bin/pickier-linux-x64-musl.zip bin/pickier-linux-x64-musl","zip:linux-arm64-musl":"zip -j bin/pickier-linux-arm64-musl.zip bin/pickier-linux-arm64-musl","zip:windows-x64":"zip -j bin/pickier-windows-x64.zip bin/pickier-windows-x64.exe","zip:windows-arm64":"zip -j bin/pickier-windows-arm64.zip bin/pickier-windows-arm64.exe","zip:darwin-x64":"zip -j bin/pickier-darwin-x64.zip bin/pickier-darwin-x64","zip:darwin-arm64":"zip -j bin/pickier-darwin-arm64.zip bin/pickier-darwin-arm64",prepublishOnly:"bun --bun run build && bun scripts/build-native.ts --required && bun run compile:all && bun run zip",test:"PICKIER_NO_AUTO_CONFIG=1 bun test --coverage","test:core":"PICKIER_NO_AUTO_CONFIG=1 bun test test/core","test:format":"PICKIER_NO_AUTO_CONFIG=1 bun test test/format","test:lint":"PICKIER_NO_AUTO_CONFIG=1 bun test test/lint","test:rules":"PICKIER_NO_AUTO_CONFIG=1 bun test test/rules","test:rules:sort":"PICKIER_NO_AUTO_CONFIG=1 bun test test/rules/sort","test:rules:style":"PICKIER_NO_AUTO_CONFIG=1 bun test test/rules/style","test:rules:quality":"PICKIER_NO_AUTO_CONFIG=1 bun test test/rules/quality","test:rules:imports":"PICKIER_NO_AUTO_CONFIG=1 bun test test/rules/imports","test:rules:typescript":"PICKIER_NO_AUTO_CONFIG=1 bun test test/rules/typescript","test:rules:regexp":"PICKIER_NO_AUTO_CONFIG=1 bun test test/rules/regexp","test:plugin":"PICKIER_NO_AUTO_CONFIG=1 bun test test/plugin","test:watch":"PICKIER_NO_AUTO_CONFIG=1 bun test --watch"},ke={"@stacksjs/clarity":"^0.3.24","@stacksjs/clapp":"^0.2.3"},Re={"@stacksjs/ts-spell-check":"^0.1.0"},$e={bunfig:"^0.15.13"},ve={name:oe,type:ae,version:F,description:le,author:ce,license:ue,homepage:fe,repository:me,bugs:he,keywords:de,exports:pe,module:ge,types:ye,bin:be,files:we,scripts:xe,dependencies:ke,optionalDependencies:Re,devDependencies:$e};
2
+ var oe="pickier",ae="module",F="0.1.74",le="Format, lint and more in a fraction of seconds.",ce="Chris Breuer <chris@stacksjs.org>",ue="MIT",fe="https://github.com/pickier/pickier#readme",me={type:"git",url:"git+https://github.com/pickier/pickier.git"},he={url:"https://github.com/pickier/pickier/issues"},de=["pickier","linter","formatter","bun","fast"],pe={".":{types:"./dist/src/index.d.ts",import:"./dist/src/index.js"},"./*":{import:"./dist/*"}},ge="./dist/src/index.js",ye="./dist/src/index.d.ts",be={pickier:"./dist/bin/cli.js"},we=["README.md","dist"],xe={build:"bun --bun build.ts","build:bin":"bun --bun build.ts && bun run compile","build:native":"bun scripts/build-native.ts",compile:"bun build ./bin/cli.ts --compile --minify --outfile bin/pickier","compile:all":"bun run compile:linux-x64 && bun run compile:linux-arm64 && bun run compile:linux-x64-musl && bun run compile:linux-arm64-musl && bun run compile:windows-x64 && bun run compile:windows-arm64 && bun run compile:darwin-x64 && bun run compile:darwin-arm64","compile:linux-x64":"bun build ./bin/cli.ts --compile --minify --target=bun-linux-x64 --outfile bin/pickier-linux-x64","compile:linux-arm64":"bun build ./bin/cli.ts --compile --minify --target=bun-linux-arm64 --outfile bin/pickier-linux-arm64","compile:linux-x64-musl":"bun build ./bin/cli.ts --compile --minify --target=bun-linux-x64-musl --outfile bin/pickier-linux-x64-musl","compile:linux-arm64-musl":"bun build ./bin/cli.ts --compile --minify --target=bun-linux-arm64-musl --outfile bin/pickier-linux-arm64-musl","compile:windows-x64":"bun build ./bin/cli.ts --compile --minify --target=bun-windows-x64 --outfile bin/pickier-windows-x64.exe","compile:windows-arm64":"bun build ./bin/cli.ts --compile --minify --target=bun-windows-arm64 --outfile bin/pickier-windows-arm64.exe","compile:darwin-x64":"bun build ./bin/cli.ts --compile --minify --target=bun-darwin-x64 --outfile bin/pickier-darwin-x64","compile:darwin-arm64":"bun build ./bin/cli.ts --compile --minify --target=bun-darwin-arm64 --outfile bin/pickier-darwin-arm64",zip:"bun run zip:all","zip:all":"bun run zip:linux-x64 && bun run zip:linux-arm64 && bun run zip:linux-x64-musl && bun run zip:linux-arm64-musl && bun run zip:windows-x64 && bun run zip:windows-arm64 && bun run zip:darwin-x64 && bun run zip:darwin-arm64","zip:linux-x64":"zip -j bin/pickier-linux-x64.zip bin/pickier-linux-x64","zip:linux-arm64":"zip -j bin/pickier-linux-arm64.zip bin/pickier-linux-arm64","zip:linux-x64-musl":"zip -j bin/pickier-linux-x64-musl.zip bin/pickier-linux-x64-musl","zip:linux-arm64-musl":"zip -j bin/pickier-linux-arm64-musl.zip bin/pickier-linux-arm64-musl","zip:windows-x64":"zip -j bin/pickier-windows-x64.zip bin/pickier-windows-x64.exe","zip:windows-arm64":"zip -j bin/pickier-windows-arm64.zip bin/pickier-windows-arm64.exe","zip:darwin-x64":"zip -j bin/pickier-darwin-x64.zip bin/pickier-darwin-x64","zip:darwin-arm64":"zip -j bin/pickier-darwin-arm64.zip bin/pickier-darwin-arm64",prepublishOnly:"bun --bun run build && bun scripts/build-native.ts --required && bun run compile:all && bun run zip",test:"PICKIER_NO_AUTO_CONFIG=1 bun test --coverage","test:core":"PICKIER_NO_AUTO_CONFIG=1 bun test test/core","test:format":"PICKIER_NO_AUTO_CONFIG=1 bun test test/format","test:lint":"PICKIER_NO_AUTO_CONFIG=1 bun test test/lint","test:rules":"PICKIER_NO_AUTO_CONFIG=1 bun test test/rules","test:rules:sort":"PICKIER_NO_AUTO_CONFIG=1 bun test test/rules/sort","test:rules:style":"PICKIER_NO_AUTO_CONFIG=1 bun test test/rules/style","test:rules:quality":"PICKIER_NO_AUTO_CONFIG=1 bun test test/rules/quality","test:rules:imports":"PICKIER_NO_AUTO_CONFIG=1 bun test test/rules/imports","test:rules:typescript":"PICKIER_NO_AUTO_CONFIG=1 bun test test/rules/typescript","test:rules:regexp":"PICKIER_NO_AUTO_CONFIG=1 bun test test/rules/regexp","test:plugin":"PICKIER_NO_AUTO_CONFIG=1 bun test test/plugin","test:watch":"PICKIER_NO_AUTO_CONFIG=1 bun test --watch"},ke={"@stacksjs/clarity":"^0.3.24","@stacksjs/clapp":"^0.2.3"},Re={"@stacksjs/ts-spell-check":"^0.1.0"},$e={bunfig:"^0.15.13"},ve={name:oe,type:ae,version:F,description:le,author:ce,license:ue,homepage:fe,repository:me,bugs:he,keywords:de,exports:pe,module:ge,types:ye,bin:be,files:we,scripts:xe,dependencies:ke,optionalDependencies:Re,devDependencies:$e};
3
3
  export{oe,ae,F,le,ce,ue,fe,me,he,de,pe,ge,ye,be,we,xe,ke,Re,$e,ve};
@@ -0,0 +1,2 @@
1
+ // @bun
2
+ import{B}from"./chunk-nhan327m.js";import"./chunk-rx0b7k57.js";export{B as runUnified};
@@ -1,3 +1,3 @@
1
1
  // @bun
2
- import{p,u}from"./chunk-rx0b7k57.js";import{readFileSync as O,statSync as y,writeFileSync as x}from"fs";import{isAbsolute as d,resolve as l}from"path";function o(r){return r.write===!0||r.fix===!0}async function B(r,t){let a=t.mode||"auto";if(a==="format"&&r.length===1&&!/[*?[\]{}()!]/.test(r[0]))try{let n=r[0],i=d(n)?n:l(process.cwd(),n);if(y(i).isFile()){let m=await u(t.config),f=O(i,"utf8"),c=p(f,m,i);if(c===f)return 0;if(o(t))return x(i,c,"utf8"),0}}catch{}let{runLint:e}=await import("./chunk-2ja6xfzf.js");if(a==="lint")return e(r,t);if(a==="format"){let n={...t,fix:!0,dryRun:!o(t),ext:t.ext,_formatOnly:!0};return e(r,n)}if(!(t.fix===!0||t.write===!0||t.check===!0))return e(r,t);let s={...t,fix:!0,dryRun:!!t.check,ext:t.ext};return e(r,s)}
2
+ import{p,u}from"./chunk-rx0b7k57.js";import{readFileSync as O,statSync as y,writeFileSync as x}from"fs";import{isAbsolute as d,resolve as l}from"path";function o(r){return r.write===!0||r.fix===!0}async function B(r,t){let a=t.mode||"auto";if(a==="format"&&r.length===1&&!/[*?[\]{}()!]/.test(r[0]))try{let n=r[0],i=d(n)?n:l(process.cwd(),n);if(y(i).isFile()){let m=await u(t.config),f=O(i,"utf8"),c=p(f,m,i);if(c===f)return 0;if(o(t))return x(i,c,"utf8"),0}}catch{}let{runLint:e}=await import("./chunk-zdbvg427.js");if(a==="lint")return e(r,t);if(a==="format"){let n={...t,fix:!0,dryRun:!o(t),ext:t.ext,_formatOnly:!0};return e(r,n)}if(!(t.fix===!0||t.write===!0||t.check===!0))return e(r,t);let s={...t,fix:!0,dryRun:!!t.check,ext:t.ext};return e(r,s)}
3
3
  export{B};
@@ -1,2 +1,2 @@
1
1
  // @bun
2
- import{oe,ae,F,le,ce,ue,fe,me,he,de,pe,ge,ye,be,we,xe,ke,Re,$e,ve}from"./chunk-ra9jn7j5.js";export{ce as author,be as bin,he as bugs,ve as default,ke as dependencies,le as description,$e as devDependencies,pe as exports,we as files,fe as homepage,de as keywords,ue as license,ge as module,oe as name,Re as optionalDependencies,me as repository,xe as scripts,ae as type,ye as types,F as version};
2
+ import{oe,ae,F,le,ce,ue,fe,me,he,de,pe,ge,ye,be,we,xe,ke,Re,$e,ve}from"./chunk-gm98vb80.js";export{ce as author,be as bin,he as bugs,ve as default,ke as dependencies,le as description,$e as devDependencies,pe as exports,we as files,fe as homepage,de as keywords,ue as license,ge as module,oe as name,Re as optionalDependencies,me as repository,xe as scripts,ae as type,ye as types,F as version};
@@ -0,0 +1,2 @@
1
+ // @bun
2
+ import{W,A,U,V,v,K}from"./chunk-2n2819ks.js";import"./chunk-rx0b7k57.js";import"./chunk-gm98vb80.js";export{A as fixText,v as lintFileForRun,W as lintText,V as plannedCheckRules,K as runLint,U as runLintProgrammatic};
@@ -12,6 +12,11 @@ export declare function openLintCache(cfg: PickierConfig, options: LintOptions,
12
12
  * config - rule functions included, so a changed plugin invalidates it - and
13
13
  * the same run options; anything else starts from empty. Runs that write
14
14
  * files (`--fix`, `--write`) neither read nor write it.
15
+ *
16
+ * Entries are keyed by the path relative to the working directory, and an
17
+ * issue's own path is stored as a reference to its file, so the same project
18
+ * checked out somewhere else - every CI job gets a fresh directory - reuses the
19
+ * cache when it is kept outside the checkout (`--cache-location`).
15
20
  */
16
21
  export declare const DEFAULT_CACHE_LOCATION: '.pickiercache';
17
22
  export declare interface LintCache {
package/dist/src/index.js CHANGED
@@ -1,2 +1,2 @@
1
1
  // @bun
2
- import{l,z,p,O,M,C,L,f,se,r,_,m,N,E,o,re,w,J,Y,Z,X,Q,ee,t,y,u,x,T,h,d,ie}from"../chunk-rx0b7k57.js";import{H,W,A,U,K}from"../chunk-dnn0da5m.js";import"../chunk-ra9jn7j5.js";import{B}from"../chunk-d1qeak2x.js";export{_ as ALWAYS_IGNORES,r as ENV,L as MAX_FIXER_PASSES,m as UNIVERSAL_IGNORES,X as blue,ee as bold,w as colorize,t as colors,z as config,d as createIgnoreMatcher,se as createLimiter,l as defaultConfig,O as detectQuoteIssues,x as expandPatterns,A as fixText,p as formatCode,C as formatImports,N as getRuleSetting,f as glob,Q as gray,J as green,M as hasIndentIssue,T as isCodeFile,re as isRuleOff,W as lintText,u as loadConfigFromPath,y as mergeConfig,E as normalizeRuleSeverity,Y as red,o as resolveRuleSeverity,B as run,H as runFormat,K as runLint,U as runLintProgrammatic,ie as shouldIgnorePath,h as withAlwaysIgnores,Z as yellow};
2
+ import{l,z,p,O,M,C,L,f,se,r,_,m,N,E,o,re,w,J,Y,Z,X,Q,ee,t,y,u,x,T,h,d,ie}from"../chunk-rx0b7k57.js";import{H,W,A,U,K}from"../chunk-2n2819ks.js";import"../chunk-gm98vb80.js";import{B}from"../chunk-nhan327m.js";export{_ as ALWAYS_IGNORES,r as ENV,L as MAX_FIXER_PASSES,m as UNIVERSAL_IGNORES,X as blue,ee as bold,w as colorize,t as colors,z as config,d as createIgnoreMatcher,se as createLimiter,l as defaultConfig,O as detectQuoteIssues,x as expandPatterns,A as fixText,p as formatCode,C as formatImports,N as getRuleSetting,f as glob,Q as gray,J as green,M as hasIndentIssue,T as isCodeFile,re as isRuleOff,W as lintText,u as loadConfigFromPath,y as mergeConfig,E as normalizeRuleSeverity,Y as red,o as resolveRuleSeverity,B as run,H as runFormat,K as runLint,U as runLintProgrammatic,ie as shouldIgnorePath,h as withAlwaysIgnores,Z as yellow};
@@ -1,2 +1,2 @@
1
1
  // @bun
2
- import{u}from"../chunk-rx0b7k57.js";import{R,v}from"../chunk-dnn0da5m.js";import"../chunk-ra9jn7j5.js";var s,i=null;self.onmessage=async(n)=>{let t=n.data;if(t.type==="init"){s=t.options,i=u(s.config);return}try{let e=await i,o=[];for(let[r,a]of t.batch)o.push([r,await v(a,e,s)]);await R(),postMessage({type:"done",results:o})}catch(e){await R(),postMessage({type:"error",message:e?.message||String(e)})}};
2
+ import{u}from"../chunk-rx0b7k57.js";import{R,v}from"../chunk-2n2819ks.js";import"../chunk-gm98vb80.js";var s,i=null;self.onmessage=async(n)=>{let t=n.data;if(t.type==="init"){s=t.options,i=u(s.config);return}try{let e=await i,o=[];for(let[r,a]of t.batch)o.push([r,await v(a,e,s)]);await R(),postMessage({type:"done",results:o})}catch(e){await R(),postMessage({type:"error",message:e?.message||String(e)})}};
@@ -19,6 +19,7 @@ export declare interface PickierLintConfig {
19
19
  extensions: Extension[]
20
20
  reporter: 'stylish' | 'json' | 'compact'
21
21
  cache: boolean
22
+ cacheLocation?: string
22
23
  maxWarnings: number
23
24
  }
24
25
  export declare interface PickierFormatConfig {
@@ -78,6 +79,7 @@ export declare interface LintOptions {
78
79
  ignorePath?: string
79
80
  ext?: string
80
81
  cache?: boolean
82
+ cacheLocation?: string
81
83
  verbose?: boolean
82
84
  _formatOnly?: boolean
83
85
  _nativeRules?: string[]
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "pickier",
3
3
  "type": "module",
4
- "version": "0.1.73",
4
+ "version": "0.1.74",
5
5
  "description": "Format, lint and more in a fraction of seconds.",
6
6
  "author": "Chris Breuer <chris@stacksjs.org>",
7
7
  "license": "MIT",
@@ -1,2 +0,0 @@
1
- // @bun
2
- import{W,A,U,V,v,K}from"./chunk-dnn0da5m.js";import"./chunk-rx0b7k57.js";import"./chunk-ra9jn7j5.js";export{A as fixText,v as lintFileForRun,W as lintText,V as plannedCheckRules,K as runLint,U as runLintProgrammatic};
@@ -1,2 +0,0 @@
1
- // @bun
2
- import{B}from"./chunk-d1qeak2x.js";import"./chunk-rx0b7k57.js";export{B as runUnified};