@kitschpatrol/repo-config 6.0.3 → 6.2.0

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/bin/cli.js CHANGED
@@ -1,5 +1,5 @@
1
1
  #!/usr/bin/env node
2
- import"cosmiconfig";import"cosmiconfig-typescript-loader";import{execa as e}from"execa";import t from"fs-extra";import n from"node:fs";import r from"node:path";import{PassThrough as i,Transform as a}from"node:stream";import{fileURLToPath as o}from"node:url";import{packageUp as s,packageUpSync as c}from"package-up";import l from"picocolors";import u from"yargs";import{hideBin as d}from"yargs/helpers";import f from"@pinojs/json-colorizer";import p from"decircular";import m from"deepmerge";import h from"json-stringify-pretty-compact";import{findWorkspaces as g,findWorkspacesRoot as _}from"find-workspaces";import v from"node:fs/promises";import{globby as y}from"globby";import b,{gt as x,minVersion as S}from"semver";import{readWantedLockfile as C}from"@pnpm/lockfile.fs";var w=`6.0.3`;function ee(e){return e instanceof Error&&`exitCode`in e&&typeof e.exitCode==`number`}function T(e){return f(h(p(e),{indent:2,replacer(e,t){return typeof t==`function`?t.name:t}}),{colors:{BRACKET:`gray`}})}const E=(e,t,n)=>{let r=[...e];for(let[i,a]of t.entries())r[i]===void 0?r[i]=n.cloneUnlessOtherwiseSpecified(a,n):n.isMergeableObject(a)?r[i]=D(e[i],a,n):e.includes(a)||r.push(a);return r};function D(e,t,n={arrayMerge:E}){return m(e,t,n)}function te(e,t){return e.startsWith(t+r.sep)}function ne(){let e=O(),t=new Set([e]),n=g();if(n!==null)for(let r of n)te(r.location,e)&&t.add(r.location);return[...t]}function O(){let e=c();if(e===void 0)throw Error(`No package.json found.`);return r.dirname(e)}function k(){let e=_();return e===null?O():e.location}function A(e){if(e===`workspace-root`)return k();if(e===`package-dir`)return O();if(typeof e==`string`){if(!t.pathExistsSync(e))throw Error(`Custom cwd directory does not exist: ${e}`);return e}return process.cwd()}async function j(e,t){try{let{default:n}=await import(`prettier`),r=await n.resolveConfig(e),i=await n.format(t,{filepath:e,...r});await v.writeFile(e,i,`utf8`)}catch{console.warn(`Skipped formatting ${e} since Prettier is not installed.`)}}async function M(e){try{await j(e,await v.readFile(e,`utf8`))}catch{}}function N(e,t){return new a({transform(n,r,i){let a=n.toString().split(/\r?\n/).filter(e=>e.trim().length>0).map(n=>`${e?t===void 0?e:l[t](e):``} ${n}\n`).join(``);this.push(a),i()}})}async function re(e){let t=[];return new Promise((n,r)=>{e.on(`data`,e=>t.push(e)),e.on(`error`,e=>{r(e)}),e.on(`end`,()=>{n(Buffer.concat(t).toString(`utf8`))})})}function P(e,t){return t===1?e:e+`s`}async function ie(e,t,n,r,i){let a=1,o;if(r.logPrefix===void 0)o=e;else{let t=N(r.logPrefix,r.logColor);t.pipe(e),o=t}i&&o.write(l.bold(`Running: "${r.name}() with Positional arguments: ${String(t)} and Option flags: ${String(n)}"`));try{a=await r.execute(o,t,n)}catch(e){console.error(String(e)),a=1}return a}async function ae(t,n,r,a,o){let s=1,c;if(a.logPrefix===void 0)c=t;else{let e=N(a.logPrefix,a.logColor);e.pipe(t),c=e}let l=a.subcommands??[],u=[...a.receivePositionalArguments?n:[],...a.positionalArguments??[]],d=[...a.receiveOptionFlags?r:[],...a.optionFlags??[]],f=[...l,...d,...u],p=A(a.cwdOverride);o&&c.write(`Running: "${a.name} ${f.join(` `)}"`);let m=a.prettyJsonOutput?new i:c;try{let t=e(a.name,f,{cwd:p,env:{...process.env.NO_COLOR===void 0?{FORCE_COLOR:`true`}:{}},preferLocal:!0,reject:!1,stdin:`inherit`});if(t.stdout.pipe(m,{end:!1}),t.stderr.pipe(m,{end:!1}),await t,a.prettyJsonOutput){m.end();let e=await re(m),t=T(JSON.parse(e)).split(`
2
+ import"cosmiconfig";import"cosmiconfig-typescript-loader";import{execa as e}from"execa";import t from"fs-extra";import n from"node:fs";import r from"node:path";import{PassThrough as i,Transform as a}from"node:stream";import{fileURLToPath as o}from"node:url";import{packageUp as s,packageUpSync as c}from"package-up";import l from"picocolors";import u from"yargs";import{hideBin as d}from"yargs/helpers";import f from"@pinojs/json-colorizer";import p from"decircular";import m from"deepmerge";import h from"json-stringify-pretty-compact";import{findWorkspaces as g,findWorkspacesRoot as _}from"find-workspaces";import v from"node:fs/promises";import{globby as y}from"globby";import b,{gt as x,minVersion as S}from"semver";import{readWantedLockfile as C}from"@pnpm/lockfile.fs";var w=`6.2.0`;function ee(e){return e instanceof Error&&`exitCode`in e&&typeof e.exitCode==`number`}function T(e){return f(h(p(e),{indent:2,replacer(e,t){return typeof t==`function`?t.name:t}}),{colors:{BRACKET:`gray`}})}const E=(e,t,n)=>{let r=[...e];for(let[i,a]of t.entries())r[i]===void 0?r[i]=n.cloneUnlessOtherwiseSpecified(a,n):n.isMergeableObject(a)?r[i]=D(e[i],a,n):e.includes(a)||r.push(a);return r};function D(e,t,n={arrayMerge:E}){return m(e,t,n)}function te(e,t){return e.startsWith(t+r.sep)}function ne(){let e=O(),t=new Set([e]),n=g();if(n!==null)for(let i of n){let n=r.resolve(i.location);te(n,e)&&t.add(n)}return[...t]}function O(){let e=c();if(e===void 0)throw Error(`No package.json found.`);return r.dirname(e)}function k(){let e=_();return e===null?O():r.resolve(e.location)}function A(e){if(e===`workspace-root`)return k();if(e===`package-dir`)return O();if(typeof e==`string`){if(!t.pathExistsSync(e))throw Error(`Custom cwd directory does not exist: ${e}`);return e}return process.cwd()}async function j(e,t){try{let{default:n}=await import(`prettier`),r=await n.resolveConfig(e),i=await n.format(t,{filepath:e,...r});await v.writeFile(e,i,`utf8`)}catch{console.warn(`Skipped formatting ${e} since Prettier is not installed.`)}}async function M(e){try{await j(e,await v.readFile(e,`utf8`))}catch{}}function N(e,t){return new a({transform(n,r,i){let a=n.toString().split(/\r?\n/).filter(e=>e.trim().length>0).map(n=>`${e?t===void 0?e:l[t](e):``} ${n}\n`).join(``);this.push(a),i()}})}async function re(e){let t=[];return new Promise((n,r)=>{e.on(`data`,e=>t.push(e)),e.on(`error`,e=>{r(e)}),e.on(`end`,()=>{n(Buffer.concat(t).toString(`utf8`))})})}function P(e,t){return t===1?e:e+`s`}async function ie(e,t,n,r,i){let a=1,o;if(r.logPrefix===void 0)o=e;else{let t=N(r.logPrefix,r.logColor);t.pipe(e),o=t}i&&o.write(l.bold(`Running: "${r.name}() with Positional arguments: ${String(t)} and Option flags: ${String(n)}"`));try{a=await r.execute(o,t,n)}catch(e){console.error(String(e)),a=1}return a}async function ae(t,n,r,a,o){let s=1,c;if(a.logPrefix===void 0)c=t;else{let e=N(a.logPrefix,a.logColor);e.pipe(t),c=e}let l=a.subcommands??[],u=[...a.receivePositionalArguments?n:[],...a.positionalArguments??[]],d=[...a.receiveOptionFlags?r:[],...a.optionFlags??[]],f=[...l,...d,...u],p=A(a.cwdOverride);o&&c.write(`Running: "${a.name} ${f.join(` `)}"`);let m=a.prettyJsonOutput?new i:c;try{let t=e(a.name,f,{cwd:p,env:{...process.env.NO_COLOR===void 0?{FORCE_COLOR:`true`}:{}},preferLocal:!0,reject:!1,stdin:`inherit`});if(t.stdout.pipe(m,{end:!1}),t.stderr.pipe(m,{end:!1}),await t,a.prettyJsonOutput){m.end();let e=await re(m),t=T(JSON.parse(e)).split(`
3
3
  `);for(let e of t)c.write(`${e}\n`)}s=t.exitCode??1}catch(e){console.error(`${a.name} failed with error:`),console.error(e),ee(e)&&(s=typeof e.exitCode==`number`?e.exitCode:1)}return s}function oe(e){return`execute`in e}async function F(e,t,n,r,i,a){let o=[];for(let a of r){let r=await(oe(a)?ie(e,t,n,a,i):ae(e,t,n,a,i));o.push({exitCode:r,name:a.name})}if(a){let t=o.filter(({exitCode:e})=>e===0).map(({name:e})=>e),n=o.filter(({exitCode:e})=>e!==0).map(({name:e})=>e),r=o.length;t.length>0&&e.write(`✅ ${l.green(l.bold(`${t.length} / ${r} ${P(`Command`,t.length)} Succeeded:`))} ${l.green(t.join(`, `))}\n`),n.length>0&&e.write(`❌ ${l.red(l.bold(`${n.length} / ${r} ${P(`Command`,n.length)} Failed:`))} ${l.red(n.join(`, `))}\n`)}return o.every(({exitCode:e})=>e===0)?0:1}async function I(e,i,a,c){let l=await s();if(l===void 0)throw Error("The `init` command must be used in a directory with a package.json file");let u=await s({cwd:o(import.meta.url)});if(u===void 0)return e.write(`Error: The script being called was not in a package, weird.
4
- `),1;let d=r.join(r.dirname(u),`init`),f=r.dirname(l),p=(i===`file`||i===`package`)&&a!==void 0&&c!==void 0;try{if(p){let n=Object.keys(c)[0];if(i===`package`){let r=t.readJsonSync(l);e.write(`Merging: \nPackage config key "${n}" → "${f}" (Because --location is set to "package")\n`);let i=D(r,c);t.writeJSONSync(l,i,{spaces:` `}),await M(l)}else{let r=t.readJsonSync(l);Object.keys(r).includes(n)&&(e.write(`Deleting: \nPackage config key "${n}" in "${f}" (Because --location is set to "file")\n`),delete r[n],t.writeJSONSync(l,r,{spaces:` `}),await M(l))}}if(!await t.pathExists(d))return 0;if((await t.readdir(d)).length===0)return e.write(`Source directory "${d}" is empty.\n`),0;e.write(`Adding initial configuration files from:\n"${d}" → "${f}"\n`),await t.copy(d,f,{async filter(o,s){let c=n.statSync(o).isFile(),l=n.existsSync(s);if(c){if(p&&i===`package`&&o.includes(a))return l?(e.write(`Deleting: \n"${o}" → "${s}" (Because --location is set to "package")\n`),t.removeSync(s)):e.write(`Skipping: \n"${o}" → "${s}" (Because --location is set to "package")\n`),!1;if(l&&(s.includes(`.vscode/`)||s.includes(`package.json`))&&r.extname(s)===`.json`){e.write(`Merging: \n"${o}" → "${s}"\n`);let n=t.readJSONSync(o),r=D(t.readJSONSync(s),n);return t.writeJSONSync(s,r,{spaces:` `}),await M(s),!1}return l?(e.write(`Overwriting: \n"${o}" → "${s}"\n`),await M(s),!0):(e.write(`Copying: \n"${o}" → "${s}"\n`),await M(s),!0)}return!0},overwrite:!0})}catch(e){return console.error(String(e)),1}return 0}async function L(e){let{commands:{fix:t,init:n,lint:r,printConfig:i},description:a,logColor:o,logPrefix:s,name:c,showSummary:l,verbose:f}=e,p=N(s,o);p.pipe(process.stdout);let m=u(d(process.argv)).scriptName(c).usage(`$0 <command>`,a);n!==void 0&&m.command({builder(e){return n.locationOptionFlag?e.option(`location`,{choices:[`file`,`package`],default:`file`,describe:`TK`,type:`string`}):e},command:`init`,describe:n.description??`Initialize by copying starter config files to your project root${n.locationOptionFlag?` or to your package.json file.`:`.`}`,async handler(e){let t=n.locationOptionFlag?e.location:void 0,r=await F(p,[],t===void 0?[]:[`--location`,t],[{async execute(e,t,r){return I(e,r.at(1),n.configFile,n.configPackageJson)},name:`copyAndMergeInitFiles`},...n.commands??[]]);process.exit(r)}}),r!==void 0&&m.command({builder(e){return r.positionalArgumentMode===`none`?e:e.positional(`files`,{array:!0,...r.positionalArgumentDefault===void 0?{}:{default:r.positionalArgumentDefault},describe:`Files or glob pattern to lint.`,type:`string`})},command:r.positionalArgumentMode===`none`?`lint`:r.positionalArgumentMode===`optional`?`lint [files..]`:`lint <files..>`,describe:r.description,async handler(e){let t=await F(p,e.files??[],[],r.commands,f,l);process.exit(t)}}),t!==void 0&&m.command({builder(e){return t.positionalArgumentMode===`none`?e:e.positional(`files`,{array:!0,...t.positionalArgumentDefault===void 0?{}:{default:t.positionalArgumentDefault},describe:`Files or glob pattern to fix.`,type:`string`})},command:t.positionalArgumentMode===`none`?`fix`:t.positionalArgumentMode===`optional`?`fix [files..]`:`fix <files..>`,describe:t.description,async handler(e){let n=await F(p,e.files??[],[],t.commands);process.exit(n)}}),i!==void 0&&m.command({builder(e){return i.positionalArgumentMode===`none`?e:e.positional(`file`,{...i.positionalArgumentDefault===void 0?{}:{default:i.positionalArgumentDefault},describe:`File or glob pattern to TK.`,type:`string`})},command:i.positionalArgumentMode===`none`?`print-config`:i.positionalArgumentMode===`optional`?`print-config [file]`:`print-config <file>`,describe:i.description,async handler(e){let t=e.file??void 0,n=await F(p,t===void 0?[]:[t],[],i.commands,f,l);process.exit(n)}}),m.alias(`h`,`help`),m.version(w),m.alias(`v`,`version`),m.help(),m.wrap(process.stdout.isTTY?Math.min(120,m.terminalWidth()):0),await m.parseAsync()}const R={fileRun:`Matches files below the current working directory by default.`,monorepoRun:`In a monorepo, it will also run in all packages below the current working directory.`,monorepoSearch:`Searches up to the root of a monorepo if necessary.`,multiArgumentCaveat:`Will use file arguments / globs where possible if provided, but some of the invoked tools only operate at the package-scope.`,multiOptionCaveat:`Will use option flags where possible if provided, but some of the invoked tools will ignore them.`,optionalFileRun:`Package-scoped by default, file-scoped if a file argument is provided.`,packageRun:`Package-scoped.`,packageSearch:`Package-scoped.`},z=[/Version 2\.0,?\s*January 2004/g,/Version 1,?\s*February 1989/g,/Version 2,?\s*June 1991/g,/Version 3,?\s*29 June 2007/g,/Version 2\.1,?\s*February 1999/g,/Version 3,?\s*19 November 2007/g,/Version 1\.0\s*-\s*August 17th,?\s*2003/g,/Version 1\.1,?\s*March 2000/g,/Version 1\.2,?\s*November 2002/g,/Version 1\.3,?\s*3 November 2008/g,/Version 1\.0\s*-\s*22 November 2005/g,/Version 1\.1\s*-\s*26 February 2007/g,/Version 2,?\s*December 2004/g,/20 December 1996/g,/December 20,?\s*1996/g,/11 March 1996/g,/28 March 2007/g,/November 1,?\s*2008/g,/August 1,?\s*2009/g,/1 April 19\d{2}/g,/Copyright \(c\) 2000-2006,?\s*The Perl Foundation/gi,/Copyright \(C\) (?:\d{4},?\s*)+Free Software Foundation/g],B=[`node_modules/**`,`test/**`];function V(e){let t=e;for(let e of z)e.lastIndex=0,t=t.replace(e,e=>e.replaceAll(/\d/g,`X`));return t}function H(e,t){let n=V(e),r=/(\d{4})\s*-\s*(\d{4})/,i=r.exec(n);if(i){let[,n,a]=i;if(Number.parseInt(a,10)!==t){let a=`${n}-${t}`;return e.slice(0,i.index)+e.slice(i.index).replace(r,a)}return e}let a=/(\d{4})/,o=a.exec(n);if(o){let[,n]=o;if(Number.parseInt(n,10)!==t){let r=`${n}-${t}`;return e.slice(0,o.index)+e.slice(o.index).replace(a,r)}return e}return e}async function U(e,t=!1){let n=new Date().getFullYear(),r=[],i=await y([`**/license.txt`,`**/license`,...B.map(e=>`!${e}`)],{caseSensitiveMatch:!1,cwd:O(),followSymbolicLinks:!1,gitignore:!0});for(let e of i)r.push(e);let a=[];for(let e of r)try{let r=await v.readFile(e,`utf8`),i=H(r,n);i!==r&&(a.push(e),t&&await v.writeFile(e,i,`utf8`))}catch(t){console.error(`Failed to process ${e}:`,t)}if(a.length>0){e.write(`${t?`Fixed`:`Found`} ${a.length} license ${P(`file`,a.length)} with outdated copyright year:\n`);for(let t of a)e.write(` - ${t}\n`);return t?0:1}return 0}async function W(e){return U(e,!1)}async function G(e){return U(e,!0)}const K=`pnpm-lock.yaml`;function se(e){let n=k(),i=r.resolve(e);for(;;){if(t.existsSync(r.join(i,K)))return i;if(i===n)break;let e=r.dirname(i);if(e===i)break;i=e}}function ce(e,t,n){let r=`${e}@${t}`;if(r in n)return r;if(t in n)return t}async function q(e){let t=se(e);if(!t)throw Error(`${K} not found at or above "${e}".`);let n=r.join(t,K),i=await C(t,{ignoreIncompatible:!1});if(!i?.importers)throw Error(`Lockfile at "${n}" is unreadable or missing importers.`);let a=i.packages??{},o,s,c={},l={};function u(e,t){let n,r=new Set;function i(e,t){if(t.startsWith(`link:`))return;let o=ce(e,t,a);if(!o||r.has(o))return;r.add(o);let s=a[o],c=s?.engines?.node;if(c){let e=S(c)?.version;e&&(!n||x(e,n))&&(n=e)}if(s?.dependencies)for(let[e,t]of Object.entries(s.dependencies))typeof t==`string`&&i(e,t)}return i(e,t),n}function d(e,t){for(let[n,r]of Object.entries(e)){let e=u(n,typeof r==`string`?r:r.version);if(e){let r=t?l:c;r[e]??=new Set,r[e].add(n);let i=t?s:o;(!i||x(e,i))&&(t?s=e:o=e)}}}let f=r.relative(t,e)||`.`,p=i.importers[f];p&&(p.dependencies&&d(p.dependencies,!1),p.devDependencies&&d(p.devDependencies,!0));let m=o&&s?x(o,s)?`>=${o}`:`>=${s}`:o?`>=${o}`:s?`>=${s}`:void 0;return{dependencies:o?{topLevelCauses:[...c[o]],version:`>=${o}`}:void 0,devDependencies:s?{topLevelCauses:[...l[s]],version:`>=${s}`}:void 0,lockfile:n,version:m}}function le(e){let t=e.devEngines;if(t?.runtime)return(Array.isArray(t.runtime)?t.runtime:[t.runtime]).find(e=>e.name===`node`)?.version}function J(e,t){let n=e.devEngines??{};if(n.runtime)if(Array.isArray(n.runtime)){let e=n.runtime.findIndex(e=>e.name===`node`);e===-1?n.runtime.push({name:`node`,version:t}):n.runtime[e].version=t}else n.runtime.name===`node`?n.runtime.version=t:n.runtime=[n.runtime,{name:`node`,version:t}];else n.runtime={name:`node`,version:t};e.devEngines=n}function ue(e){let t=e.devEngines;t?.runtime&&(Array.isArray(t.runtime)?(t.runtime=t.runtime.filter(e=>e.name!==`node`),t.runtime.length===0?delete t.runtime:t.runtime.length===1&&(t.runtime=t.runtime[0])):t.runtime.name===`node`&&delete t.runtime,Object.keys(t).length===0&&delete e.devEngines)}function Y(e){return e.length===0?``:` (from ${e.join(`, `)})`}async function de(e,n,i){let a=r.join(i,`package.json`);if(!t.existsSync(a))return 0;let o=t.readJsonSync(a),s=o.engines?.node,c=le(o),l=await q(i),u=l.dependencies?.version,d=l.dependencies?.topLevelCauses??[],f=l.version,p=l.devDependencies?.topLevelCauses??[],m=[];if(u!==void 0)if(s===void 0){if(m.push(`Missing engines.node — suggest setting to "${u}"${Y(d)}`),n){let e=o.engines??{};e.node=u,o.engines=e}}else{let e=b.minVersion(s),t=b.minVersion(u);e&&t&&b.lt(e,t)&&(m.push(`engines.node is "${s}" but production dependencies require at least "${u}"${Y(d)}`),n&&(o.engines.node=u))}let h=u??s,g=h?b.minVersion(h):void 0,_=f?b.minVersion(f):void 0,v=_&&(!g||b.gt(_,g));if(f!==void 0&&v)if(c===void 0)m.push(`devDependencies require a higher Node.js minimum (${f}) than engines.node (${h??`none`}) — suggest adding devEngines.runtime for node with version "${f}"${Y(p)}`),n&&J(o,f);else{let e=b.minVersion(c);e&&b.lt(e,_)&&(m.push(`devEngines.runtime.version for node is "${c}" but all dependencies require at least "${f}"${Y(p)}`),n&&J(o,f))}else if(c!==void 0){let e=b.minVersion(c);e&&g&&b.lte(e,g)&&(m.push(`devEngines.runtime.version for node is redundant (engines.node already covers the requirement) — suggest removing`),n&&ue(o))}if(m.length>0){e.write(`${n?`Fixed`:`Found`} ${m.length} Node.js version ${P(`issue`,m.length)} in ${a}:\n`);for(let t of m)e.write(` - ${t}\n`);return n?(t.writeJsonSync(a,o,{spaces:` `}),await M(a),0):1}return 0}async function X(e,t){let n=ne(),r=0;for(let i of n)await de(e,t,i)!==0&&(r=1);return r}async function Z(e){let t=T(await q(O())).split(`
4
+ `),1;let d=r.join(r.dirname(u),`init`),f=r.dirname(l),p=(i===`file`||i===`package`)&&a!==void 0&&c!==void 0;try{if(p){let n=Object.keys(c)[0];if(i===`package`){let r=t.readJsonSync(l);e.write(`Merging: \nPackage config key "${n}" → "${f}" (Because --location is set to "package")\n`);let i=D(r,c);t.writeJSONSync(l,i,{spaces:` `}),await M(l)}else{let r=t.readJsonSync(l);Object.keys(r).includes(n)&&(e.write(`Deleting: \nPackage config key "${n}" in "${f}" (Because --location is set to "file")\n`),delete r[n],t.writeJSONSync(l,r,{spaces:` `}),await M(l))}}if(!await t.pathExists(d))return 0;if((await t.readdir(d)).length===0)return e.write(`Source directory "${d}" is empty.\n`),0;e.write(`Adding initial configuration files from:\n"${d}" → "${f}"\n`),await t.copy(d,f,{async filter(o,s){let c=n.statSync(o).isFile(),l=n.existsSync(s);if(c){if(p&&i===`package`&&o.includes(a))return l?(e.write(`Deleting: \n"${o}" → "${s}" (Because --location is set to "package")\n`),t.removeSync(s)):e.write(`Skipping: \n"${o}" → "${s}" (Because --location is set to "package")\n`),!1;if(l&&(s.includes(`.vscode/`)||s.includes(`package.json`))&&r.extname(s)===`.json`){e.write(`Merging: \n"${o}" → "${s}"\n`);let n=t.readJSONSync(o),r=D(t.readJSONSync(s),n);return t.writeJSONSync(s,r,{spaces:` `}),await M(s),!1}return l?(e.write(`Overwriting: \n"${o}" → "${s}"\n`),await M(s),!0):(e.write(`Copying: \n"${o}" → "${s}"\n`),await M(s),!0)}return!0},overwrite:!0})}catch(e){return console.error(String(e)),1}return 0}async function L(e){let{commands:{fix:t,init:n,lint:r,printConfig:i},description:a,logColor:o,logPrefix:s,name:c,showSummary:l,verbose:f}=e,p=N(s,o);p.pipe(process.stdout);let m=u(d(process.argv)).scriptName(c).usage(`$0 <command>`,a);n!==void 0&&m.command({builder(e){return n.locationOptionFlag?e.option(`location`,{choices:[`file`,`package`],default:`file`,describe:`TK`,type:`string`}):e},command:`init`,describe:n.description??`Initialize by copying starter config files to your project root${n.locationOptionFlag?` or to your package.json file.`:`.`}`,async handler(e){let t=n.locationOptionFlag?e.location:void 0,r=await F(p,[],t===void 0?[]:[`--location`,t],[{async execute(e,t,r){return I(e,r.at(1),n.configFile,n.configPackageJson)},name:`copyAndMergeInitFiles`},...n.commands??[]]);process.exit(r)}}),r!==void 0&&m.command({builder(e){return r.positionalArgumentMode===`none`?e:e.positional(`files`,{array:!0,...r.positionalArgumentDefault===void 0?{}:{default:r.positionalArgumentDefault},describe:`Files or glob pattern to lint.`,type:`string`})},command:r.positionalArgumentMode===`none`?`lint`:r.positionalArgumentMode===`optional`?`lint [files..]`:`lint <files..>`,describe:r.description,async handler(e){let t=await F(p,e.files??[],[],r.commands,f,l);process.exit(t)}}),t!==void 0&&m.command({builder(e){return t.positionalArgumentMode===`none`?e:e.positional(`files`,{array:!0,...t.positionalArgumentDefault===void 0?{}:{default:t.positionalArgumentDefault},describe:`Files or glob pattern to fix.`,type:`string`})},command:t.positionalArgumentMode===`none`?`fix`:t.positionalArgumentMode===`optional`?`fix [files..]`:`fix <files..>`,describe:t.description,async handler(e){let n=await F(p,e.files??[],[],t.commands);process.exit(n)}}),i!==void 0&&m.command({builder(e){return i.positionalArgumentMode===`none`?e:e.positional(`file`,{...i.positionalArgumentDefault===void 0?{}:{default:i.positionalArgumentDefault},describe:`File or glob pattern to TK.`,type:`string`})},command:i.positionalArgumentMode===`none`?`print-config`:i.positionalArgumentMode===`optional`?`print-config [file]`:`print-config <file>`,describe:i.description,async handler(e){let t=e.file??void 0,n=await F(p,t===void 0?[]:[t],[],i.commands,f,l);process.exit(n)}}),m.alias(`h`,`help`),m.version(w),m.alias(`v`,`version`),m.help(),m.wrap(process.stdout.isTTY?Math.min(120,m.terminalWidth()):0),await m.parseAsync()}const R={fileRun:`Matches files below the current working directory by default.`,monorepoRun:`In a monorepo, it will also run in all packages below the current working directory.`,monorepoSearch:`Searches up to the root of a monorepo if necessary.`,multiArgumentCaveat:`Will use file arguments / globs where possible if provided, but some of the invoked tools only operate at the package-scope.`,multiOptionCaveat:`Will use option flags where possible if provided, but some of the invoked tools will ignore them.`,optionalFileRun:`Package-scoped by default, file-scoped if a file argument is provided.`,packageRun:`Package-scoped.`,packageSearch:`Package-scoped.`},z=[/Version 2\.0,?\s*January 2004/g,/Version 1,?\s*February 1989/g,/Version 2,?\s*June 1991/g,/Version 3,?\s*29 June 2007/g,/Version 2\.1,?\s*February 1999/g,/Version 3,?\s*19 November 2007/g,/Version 1\.0\s*-\s*August 17th,?\s*2003/g,/Version 1\.1,?\s*March 2000/g,/Version 1\.2,?\s*November 2002/g,/Version 1\.3,?\s*3 November 2008/g,/Version 1\.0\s*-\s*22 November 2005/g,/Version 1\.1\s*-\s*26 February 2007/g,/Version 2,?\s*December 2004/g,/20 December 1996/g,/December 20,?\s*1996/g,/11 March 1996/g,/28 March 2007/g,/November 1,?\s*2008/g,/August 1,?\s*2009/g,/1 April 19\d{2}/g,/Copyright \(c\) 2000-2006,?\s*The Perl Foundation/gi,/Copyright \(C\) (?:\d{4},?\s*)+Free Software Foundation/g],B=[`node_modules/**`,`test/**`];function V(e){let t=e;for(let e of z)e.lastIndex=0,t=t.replace(e,e=>e.replaceAll(/\d/g,`X`));return t}function H(e,t){let n=V(e),r=/(\d{4})\s*-\s*(\d{4})/,i=r.exec(n);if(i){let[,n,a]=i;if(Number.parseInt(a,10)!==t){let a=`${n}-${t}`;return e.slice(0,i.index)+e.slice(i.index).replace(r,a)}return e}let a=/(\d{4})/,o=a.exec(n);if(o){let[,n]=o;if(Number.parseInt(n,10)!==t){let r=`${n}-${t}`;return e.slice(0,o.index)+e.slice(o.index).replace(a,r)}return e}return e}async function U(e,t=!1){let n=new Date().getFullYear(),r=[],i=await y([`**/license.txt`,`**/license`,...B.map(e=>`!${e}`)],{caseSensitiveMatch:!1,cwd:O(),followSymbolicLinks:!1,gitignore:!0});for(let e of i)r.push(e);let a=[];for(let e of r)try{let r=await v.readFile(e,`utf8`),i=H(r,n);i!==r&&(a.push(e),t&&await v.writeFile(e,i,`utf8`))}catch(t){console.error(`Failed to process ${e}:`,t)}if(a.length>0){e.write(`${t?`Fixed`:`Found`} ${a.length} license ${P(`file`,a.length)} with outdated copyright year:\n`);for(let t of a)e.write(` - ${t}\n`);return t?0:1}return 0}async function W(e){return U(e,!1)}async function G(e){return U(e,!0)}const K=`pnpm-lock.yaml`;function se(e){let n=k(),i=r.resolve(e);for(;;){if(t.existsSync(r.join(i,K)))return i;if(i===n)break;let e=r.dirname(i);if(e===i)break;i=e}}function ce(e,t,n){let r=`${e}@${t}`;if(r in n)return r;if(t in n)return t}async function q(e){let t=se(e);if(!t)throw Error(`${K} not found at or above "${e}".`);let n=r.join(t,K),i=await C(t,{ignoreIncompatible:!1});if(!i?.importers)throw Error(`Lockfile at "${n}" is unreadable or missing importers.`);let a=i.packages??{},o,s,c={},l={};function u(e,t){let n,r=new Set;function i(e,t){if(t.startsWith(`link:`))return;let o=ce(e,t,a);if(!o||r.has(o))return;r.add(o);let s=a[o],c=s?.engines?.node;if(c){let e=S(c)?.version;e&&(!n||x(e,n))&&(n=e)}if(s?.dependencies)for(let[e,t]of Object.entries(s.dependencies))typeof t==`string`&&i(e,t)}return i(e,t),n}function d(e,t){for(let[n,r]of Object.entries(e)){let e=u(n,typeof r==`string`?r:r.version);if(e){let r=t?l:c;r[e]??=new Set,r[e].add(n);let i=t?s:o;(!i||x(e,i))&&(t?s=e:o=e)}}}let f=r.relative(t,e)||`.`,p=i.importers[f];p&&(p.dependencies&&d(p.dependencies,!1),p.devDependencies&&d(p.devDependencies,!0));let m=o&&s?x(o,s)?`>=${o}`:`>=${s}`:o?`>=${o}`:s?`>=${s}`:void 0;return{dependencies:o?{topLevelCauses:[...c[o]],version:`>=${o}`}:void 0,devDependencies:s?{topLevelCauses:[...l[s]],version:`>=${s}`}:void 0,lockfile:n,version:m}}function le(e){let t=e.devEngines;if(t?.runtime)return(Array.isArray(t.runtime)?t.runtime:[t.runtime]).find(e=>e.name===`node`)?.version}function J(e,t){let n=e.devEngines??{};if(n.runtime)if(Array.isArray(n.runtime)){let e=n.runtime.findIndex(e=>e.name===`node`);e===-1?n.runtime.push({name:`node`,version:t}):n.runtime[e].version=t}else n.runtime.name===`node`?n.runtime.version=t:n.runtime=[n.runtime,{name:`node`,version:t}];else n.runtime={name:`node`,version:t};e.devEngines=n}function ue(e){let t=e.devEngines;t?.runtime&&(Array.isArray(t.runtime)?(t.runtime=t.runtime.filter(e=>e.name!==`node`),t.runtime.length===0?delete t.runtime:t.runtime.length===1&&(t.runtime=t.runtime[0])):t.runtime.name===`node`&&delete t.runtime,Object.keys(t).length===0&&delete e.devEngines)}function Y(e){return e.length===0?``:` (from ${e.join(`, `)})`}async function de(e,n,i){let a=r.join(i,`package.json`);if(!t.existsSync(a))return 0;let o=t.readJsonSync(a),s=o.engines?.node,c=le(o),l=await q(i),u=l.dependencies?.version,d=l.dependencies?.topLevelCauses??[],f=l.version,p=l.devDependencies?.topLevelCauses??[],m=[];if(u!==void 0)if(s===void 0){if(m.push(`Missing engines.node — suggest setting to "${u}"${Y(d)}`),n){let e=o.engines??{};e.node=u,o.engines=e}}else{let e=b.minVersion(s),t=b.minVersion(u);e&&t&&b.lt(e,t)&&(m.push(`engines.node is "${s}" but production dependencies require at least "${u}"${Y(d)}`),n&&(o.engines.node=u))}let h=(()=>{if(u&&s){let e=b.minVersion(u),t=b.minVersion(s);if(e&&t)return b.gt(e,t)?u:s}return u??s})(),g=h?b.minVersion(h):void 0,_=f?b.minVersion(f):void 0,v=_&&g&&b.gt(_,g);if(f!==void 0&&v)if(c===void 0)m.push(`devDependencies require a higher Node.js minimum (${f}) than engines.node (${h??`none`}) — suggest adding devEngines.runtime for node with version "${f}"${Y(p)}`),n&&J(o,f);else{let e=b.minVersion(c);e&&b.lt(e,_)&&(m.push(`devEngines.runtime.version for node is "${c}" but all dependencies require at least "${f}"${Y(p)}`),n&&J(o,f))}else if(c!==void 0){let e=b.minVersion(c);e&&g&&b.lte(e,g)&&(m.push(`devEngines.runtime.version for node is redundant (engines.node already covers the requirement) — suggest removing`),n&&ue(o))}if(m.length>0){e.write(`${n?`Fixed`:`Found`} ${m.length} Node.js version ${P(`issue`,m.length)} in ${a}:\n`);for(let t of m)e.write(` - ${t}\n`);return n?(t.writeJsonSync(a,o,{spaces:` `}),await M(a),0):1}return 0}async function X(e,t){let n=ne(),r=0;for(let i of n)await de(e,t,i)!==0&&(r=1);return r}async function Z(e){let t=T(await q(O())).split(`
5
5
  `);for(let n of t)e.write(`${n}\n`);return 0}async function Q(e){return X(e,!1)}async function $(e){return X(e,!0)}await L({commands:{fix:{commands:[{execute:G,name:W.name},{execute:$,name:$.name}],description:`Fix common issues like outdated copyright years in license files. ${R.packageRun} ${R.monorepoRun}`,positionalArgumentMode:`none`},init:{locationOptionFlag:!1},lint:{commands:[{execute:W,name:G.name},{execute:Q,name:Q.name}],description:`Check the repo for common issues. ${R.packageRun} ${R.monorepoRun}`,positionalArgumentMode:`none`},printConfig:{commands:[{execute:Z,name:Z.name}],description:`Print minimum Node.js version constraints from the pnpm lockfile.`,positionalArgumentMode:`none`}},description:`Kitschpatrol's repository-related shared configuration tools.`,logColor:`gray`,logPrefix:`[Repo Config]`,name:`ksc-repo`,order:1});export{};
@@ -0,0 +1,137 @@
1
+ ---
2
+ name: ksc
3
+ description: >-
4
+ Rules and conventions for projects using @kitschpatrol/shared-config. Covers
5
+ ESLint, Prettier, TypeScript, CSpell, Knip, Stylelint, and Perfectionist configuration to avoid
6
+ lint failures. Relevant when writing or modifying TypeScript, JavaScript, CSS,
7
+ Markdown, JSON, YAML, or configuration files.
8
+ user-invocable: true
9
+ ---
10
+
11
+ # @kitschpatrol/shared-config Rules
12
+
13
+ This project uses `@kitschpatrol/shared-config` for linting, formatting, and type checking. All tools are orchestrated via the `ksc` CLI. Always use **pnpm** — never npm, npx, or yarn. After writing code, run `pnpm ksc fix` to auto-fix formatting, sorting, and other fixable issues.
14
+
15
+ ## Critical Type Rules
16
+
17
+ These cause the most lint failures. Follow them strictly:
18
+
19
+ - **No `null`** — Use `undefined` instead. Both the value `null` and the type `null` are banned (`unicorn/no-null`, `ts/no-restricted-types`). When interfacing with APIs that return `null`, convert immediately: `apiResult() ?? undefined`
20
+ - **No `any`** — Use `unknown` instead (`ts/no-explicit-any`). Also enforced: `ts/no-unsafe-assignment`, `ts/no-unsafe-call`, `ts/no-unsafe-member-access`, `ts/no-unsafe-return`, `ts/no-unsafe-type-assertion`
21
+ - **No `Buffer`** — Use `Uint8Array` instead
22
+ - **No `object` type** — Use `Record<string, unknown>` instead
23
+ - **Handle all promises** — `ts/no-floating-promises` is an error. Async functions returning promises must use `await`. Use `void someAsyncFunction()` for intentionally fire-and-forget calls. Functions that return a promise must be declared `async` (`ts/promise-function-async`)
24
+ - **Strict template expressions** — Only strings and numbers are allowed in template literals (`ts/restrict-template-expressions` with `allowNumber: true`). Booleans, objects, nullish values must be converted explicitly: `` `flag: ${String(isReady)}` ``
25
+ - **Strict plus operands** — Cannot implicitly add string + number (`ts/restrict-plus-operands`)
26
+ - **Prefer nullish coalescing** — Use `??` not `||` for nullish checks (`ts/prefer-nullish-coalescing`). Use `?.` optional chains (`ts/prefer-optional-chain`)
27
+
28
+ ## Naming Conventions
29
+
30
+ - **Default**: `camelCase` for variables, functions, parameters
31
+ - **Types**: `StrictPascalCase` for types, interfaces, enums, classes, type parameters
32
+ - **Constants**: `const` variables may be `UPPER_CASE` or `camelCase`
33
+ - **Booleans**: Variables typed as `boolean` MUST be prefixed with `is`, `has`, `can`, `should`, `will`, or `did` (e.g., `isReady`, `hasPermission`)
34
+ - **Unused variables/parameters**: MUST have a leading underscore prefix (`_unused`, `_error`)
35
+ - **Imports**: `camelCase` or `StrictPascalCase` (for component imports)
36
+ - **Destructured variables**: `camelCase` or `StrictPascalCase` allowed
37
+ - **File names**: `kebab-case` enforced by `unicorn/filename-case`
38
+ - **Prefer `type` over `interface`**: `ts/consistent-type-definitions` enforces `type Foo = { ... }` not `interface Foo { ... }`
39
+ - **Type imports**: Use inline style: `import { type Foo } from './bar'`
40
+ - **Array types**: Simple types use `string[]`, complex types use `Array<string | number>` (`ts/array-type` with `array-simple`)
41
+
42
+ ## Sorting — Do Not Manually Sort
43
+
44
+ The **Perfectionist** plugin auto-sorts imports, object keys, type members, union/intersection types, and interfaces. All these rules have auto-fix. **Do not waste time manually sorting** — write code in any logical order, then run `pnpm ksc-eslint fix` or `pnpm ksc fix`.
45
+
46
+ Perfectionist sorts alphabetically (natural, ascending) with domain-specific exceptions that preserve semantic grouping:
47
+
48
+ - Coordinates: `x, y, z, w` and `x1, y1, x2, y2`
49
+ - Dimensions: `width, height`
50
+ - Colors: `r, g, b, a` / `red, green, blue, alpha` / `h, s, l, a`
51
+ - Ranges: `min, max` / `start, end` / `open, close` / `pre, post`
52
+
53
+ These patterns are matched by exact name, prefix, and suffix. If an object's keys all match one of these patterns, the domain order takes precedence over alphabetical.
54
+
55
+ Import sorting: alphabetical with no newlines between groups. Internal modules (`~/`, `@/`, `$`) are grouped together.
56
+
57
+ ## Code Style
58
+
59
+ Formatting is handled by Prettier — do not fight it:
60
+
61
+ - No semicolons
62
+ - Single quotes
63
+ - Tabs for indentation (except `.md`, `.mdx`, `.yml` which use spaces)
64
+ - Trailing commas always
65
+ - Print width: 100 characters
66
+ - LF line endings
67
+
68
+ Additional ESLint style rules:
69
+
70
+ - **Comments must be capitalized** (`capitalized-comments`) — exception for commented-out code patterns like `if`, `else`, `const`, `import`, etc.
71
+ - **No `Array.reduce()`** — Use `for...of` loops instead (`unicorn/no-array-reduce`)
72
+ - **No `Array.forEach()`** — Use `for...of` loops instead (`unicorn/no-array-for-each`)
73
+ - **Use `node:` protocol** for Node.js built-in imports: `import fs from 'node:fs'` (`unicorn/prefer-node-protocol`)
74
+ - **No abbreviations** (`unicorn/prevent-abbreviations`) except these allowed ones: `i`, `j`, `acc`, `arg`, `args`, `db`, `dev`, `doc`, `docs`, `env`, `fn`, `lib`, `param`, `params`, `pkg`, `prop`, `props`, `ref`, `refs`, `sep`, `src`, `temp`, `util`, `utils`
75
+ - **Explicit length checks** — Write `array.length > 0` not `array.length` (`unicorn/explicit-length-check`)
76
+ - **Catch variable naming** — Use `error` not `err` or `e` (`unicorn/catch-error-name`)
77
+
78
+ ## JSDoc
79
+
80
+ - **Public exports require JSDoc** with a body description (`jsdoc/require-jsdoc` with `publicOnly: true`, `jsdoc/require-description`)
81
+ - **No types in JSDoc** — TypeScript provides the types. Do not write `@param {string} name`, just `@param name` (`jsdoc/no-types`)
82
+ - In `.ts` files, `@param` and `@returns` tags are not required — the TypeScript signature is sufficient
83
+
84
+ ## ESLint Plugin Name Mappings
85
+
86
+ ESLint plugins are renamed in this config. Use these short names in `eslint-disable` comments:
87
+
88
+ - `@typescript-eslint` -> `ts` (e.g., `// eslint-disable-next-line ts/no-explicit-any`)
89
+ - `import-x` -> `import`
90
+ - `n` -> `node`
91
+ - `vitest` -> `test`
92
+ - `@eslint-community/eslint-comments` -> `eslint-comments`
93
+ - `jsonc` -> `json`
94
+ - `yml` -> `yaml`
95
+ - `@html-eslint` -> `html`
96
+ - `package-json` -> `json-package`
97
+
98
+ ## Project Patterns and Tooling
99
+
100
+ **Package manager**: Always use `pnpm`. Never use `npm`, `npx`, or `yarn`. Dependencies are already available locally — use `pnpm exec` to run binaries, `pnpm add` to install packages, `pnpm dlx` instead of `npx`.
101
+
102
+ **Configuration files**: Each tool uses a typed factory function for configuration:
103
+
104
+ - `eslint.config.ts` — `eslintConfig({ type: 'lib' })` or `eslintConfig({ type: 'app' })`
105
+ - Library projects use `type: 'lib'`, application projects use `type: 'app'`
106
+ - Framework support via flags: `eslintConfig({ astro: true })`, `eslintConfig({ svelte: true })`, `eslintConfig({ react: true })`
107
+ - Frameworks are auto-detected from installed packages, but can be explicitly enabled
108
+ - `prettier.config.ts` — `prettierConfig()` with optional overrides
109
+ - `cspell.config.ts` — `cspellConfig()` with optional custom words
110
+ - `knip.config.ts` — `knipConfig()` with optional ignore patterns
111
+ - `stylelint.config.js` — `stylelintConfig()`
112
+ - `.remarkrc.js` — `remarkConfig()`
113
+ - `tsconfig.json` — extends `@kitschpatrol/typescript-config`
114
+
115
+ **Linting commands**:
116
+
117
+ - `pnpm ksc lint` / `pnpm ksc fix` — Run ALL tools at once, usually mapped to the package.json "lint" and "fix" scripts.
118
+ - `pnpm ksc-eslint lint` / `pnpm ksc-eslint fix` — ESLint only
119
+ - `pnpm ksc-prettier lint` / `pnpm ksc-prettier fix` — Prettier only
120
+ - `pnpm ksc-typescript lint` — TypeScript type checking only
121
+ - `pnpm ksc-cspell lint` — Spell checking only
122
+ - `pnpm ksc-stylelint lint` / `pnpm ksc-stylelint fix` — CSS/style linting only
123
+ - `pnpm ksc-remark lint` / `pnpm ksc-remark fix` — Markdown linting only
124
+ - `pnpm ksc-knip lint` — Unused code/export detection
125
+
126
+ Use individual commands to focus on specific linter errors instead of running the full suite.
127
+
128
+ ## TypeScript Configuration
129
+
130
+ - Target: `ES2023` with `DOM` and `DOM.Iterable` libs
131
+ - Module: `ESNext` with `bundler` module resolution
132
+ - `strict: true` — all strict checks enabled (strictNullChecks, strictFunctionTypes, etc.)
133
+ - `erasableSyntaxOnly: true` — no `const enum`, no runtime `namespace` blocks, no `enum` with computed values. Only type-level syntax that can be erased is allowed.
134
+ - `noUnusedLocals: true`, `noUnusedParameters: true`
135
+ - `isolatedModules: true`
136
+ - JSON imports enabled (`resolveJsonModule: true`)
137
+ - `.ts` extensions allowed in imports (`allowImportingTsExtensions: true`)
@@ -5,6 +5,9 @@ on:
5
5
  tags:
6
6
  - 'v[0-9]*'
7
7
 
8
+ permissions:
9
+ contents: write
10
+
8
11
  jobs:
9
12
  build:
10
13
  name: Create Release
@@ -16,13 +19,17 @@ jobs:
16
19
 
17
20
  steps:
18
21
  - name: Checkout
19
- uses: actions/checkout@v6
22
+ uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6
20
23
  with:
21
24
  fetch-depth: 0
25
+ persist-credentials: false
22
26
 
23
27
  - name: Log Token Type
28
+ env:
29
+ TOKEN: ${{ env.ACCESS_TOKEN }}
30
+ GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
24
31
  run: |
25
- if [ ${{ env.ACCESS_TOKEN }} == ${{ secrets.GITHUB_TOKEN }} ]; then
32
+ if [ "$TOKEN" = "$GH_TOKEN" ]; then
26
33
  echo "🗝️ Authenticated with GitHub Token"
27
34
  else
28
35
  echo "🔑 Authenticated with Personal Access token"
@@ -75,7 +82,11 @@ jobs:
75
82
 
76
83
  - name: Log Release Details
77
84
  if: env.IS_VALID_COMMIT == 'true'
85
+ env:
86
+ TAG: ${{ env.TAG_NAME }}
87
+ RELEASE_URL: ${{ steps.release.outputs.url }}
88
+ RELEASE_ID: ${{ steps.release.outputs.id }}
78
89
  run: |
79
- echo "📦 Successfully released: ${{ env.TAG_NAME }}"
80
- echo "🔗 Release URL: ${{ steps.release.outputs.url }}"
81
- echo "🪪 Release ID: ${{ steps.release.outputs.id }}"
90
+ echo "📦 Successfully released: $TAG"
91
+ echo "🔗 Release URL: $RELEASE_URL"
92
+ echo "🪪 Release ID: $RELEASE_ID"
@@ -4,6 +4,9 @@ on:
4
4
  branches: [main]
5
5
  workflow_dispatch: {}
6
6
 
7
+ permissions:
8
+ contents: read
9
+
7
10
  jobs:
8
11
  build:
9
12
  name: Set GitHub Metadata
@@ -11,11 +14,12 @@ jobs:
11
14
 
12
15
  steps:
13
16
  - name: Checkout
14
- uses: actions/checkout@v6
17
+ uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6
15
18
  with:
16
19
  fetch-depth: 0
20
+ persist-credentials: false
17
21
 
18
22
  - name: Sync Package info to GitHub
19
- uses: kitschpatrol/github-action-repo-sync@v4
23
+ uses: kitschpatrol/github-action-repo-sync@v5
20
24
  with:
21
25
  TOKEN: ${{ secrets.PERSONAL_ACCESS_TOKEN }}
@@ -5,7 +5,7 @@
5
5
  ".env": ".env.*, .template.env",
6
6
  "*.js": "${basename}.ts.map, ${basename}.js.map, ${basename}.d.ts, ${basename}.d.ts.map, ${basename}.d.js.map",
7
7
  "*.ts": "${basename}.ts.map, ${basename}.d.ts, ${basename}.d.ts.map",
8
- "package.json": ".*.cjs, .*.cts, .*.js, .*.json, .*.json5, .*.jsonc, .*.mjs, .*.mts, .*.toml, .*.ts, .*.yaml, .*.yml, .*ignore, .*rc, .node-version, *config.cjs, *config.cts, *config.js, *config.json, *config.json5, *config.jsonc, *config.mjs, *config.mts, *config.toml, *config.ts, *config.yaml, *config.yml, tsconfig.*.json, lerna.json, netlify.toml, .node-version, package-lock.json, pnpm*, turbo.json, vercel.json, workspace*, wrangler.toml, wrangler.json, wrangler.jsonc, yarn.lock, yarn*",
8
+ "package.json": ".*.cjs, .*.cts, .*.js, .*.json, .*.json5, .*.jsonc, .*.mjs, .*.mts, .*.toml, .*.ts, .*.yaml, .*.yml, .*attributes, .*ignore, .*rc, .node-version, *config.cjs, *config.cts, *config.js, *config.json, *config.json5, *config.jsonc, *config.mjs, *config.mts, *config.toml, *config.ts, *config.yaml, *config.yml, tsconfig.*.json, lerna.json, netlify.toml, .node-version, package-lock.json, pnpm*, skills-lock.json, turbo.json, vercel.json, workspace*, wrangler.toml, wrangler.json, wrangler.jsonc, yarn.lock, yarn*",
9
9
  "readme.md": "authors*, backers*, changelog*, citation*, code_of_conduct*, contributing*, contributors*, copying*, credits*, governance*, history*, license*, maintainers*, release_notes*, security*, sponsors*"
10
10
  }
11
11
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kitschpatrol/repo-config",
3
- "version": "6.0.3",
3
+ "version": "6.2.0",
4
4
  "description": "Repository configuration and GitHub workflows for @kitschpatrol/shared-config.",
5
5
  "keywords": [
6
6
  "shared-config",
@@ -33,7 +33,7 @@
33
33
  ],
34
34
  "dependencies": {
35
35
  "@pinojs/json-colorizer": "^4.0.0",
36
- "@pnpm/lockfile.fs": "^1001.1.31",
36
+ "@pnpm/lockfile.fs": "^1001.1.32",
37
37
  "cosmiconfig": "^9.0.1",
38
38
  "cosmiconfig-typescript-loader": "^6.2.0",
39
39
  "decircular": "^1.0.0",
@@ -41,7 +41,7 @@
41
41
  "execa": "^9.6.1",
42
42
  "find-workspaces": "^0.3.1",
43
43
  "fs-extra": "^11.3.4",
44
- "globby": "^16.1.1",
44
+ "globby": "^16.2.0",
45
45
  "json-stringify-pretty-compact": "^4.0.0",
46
46
  "package-up": "^5.0.0",
47
47
  "picocolors": "^1.1.1",