eslint-plugin-functype 2.202.0 → 2.202.1

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.
@@ -4,13 +4,13 @@ import e from"../index.js";import{validatePeerDependencies as t}from"../utils/de
4
4
  āœ… Available:`,`green`)),e.available.forEach(e=>{let t=e.required?`šŸ”§`:`šŸ”Œ`;console.log(` ${t} ${r(e.name,`green`)} - ${e.description}`)})),e.missing.length>0&&(console.log(r(`
5
5
  āŒ Missing:`,`red`)),e.missing.forEach(e=>{let t=e.required?`āš ļø `:`šŸ’”`,n=e.required?`red`:`yellow`;console.log(` ${t} ${r(e.name,n)} - ${e.description}`)}),e.installCommand&&(console.log(r(`
6
6
  šŸ“¦ Install missing dependencies:`,`bright`)),console.log(` ${r(e.installCommand,`cyan`)}`))),e.warnings.length>0&&(console.log(r(`
7
- āš ļø Warnings:`,`yellow`)),e.warnings.forEach(e=>console.log(` ${e}`)));let t=e.isValid?`āœ… Ready to use`:`āŒ Configuration will fail`,n=e.isValid?`green`:`red`;console.log(r(`\n${t}`,n))}async function a(){let n=process.argv.slice(2),a=n.includes(`--help`)||n.includes(`-h`),s=n.includes(`--usage`)||n.includes(`-u`),c=n.includes(`--check-deps`)||n.includes(`--check`);if(a){console.log(r(`šŸ“‹ ESLint Plugin Functype - Custom Rules`,`bright`)),console.log(`
7
+ āš ļø Warnings:`,`yellow`)),e.warnings.forEach(e=>console.log(` ${e}`)));let t=e.isValid?`āœ… Ready to use`:`āŒ Configuration will fail`,n=e.isValid?`green`:`red`;console.log(r(`\n${t}`,n))}async function a(){let n=process.argv.slice(2),a=n.includes(`--help`)||n.includes(`-h`),s=n.includes(`--usage`)||n.includes(`-u`),c=n.includes(`--check-deps`)||n.includes(`--check`);if(a){console.log(r(`šŸ“‹ eslint-plugin-functype: Custom Rules`,`bright`)),console.log(`
8
8
  Usage: pnpm run list-rules [options]`),console.log(`
9
9
  Options:`),console.log(` --verbose, -v Show rule descriptions and schemas`),console.log(` --usage, -u Show usage examples`),console.log(` --check-deps Check peer dependency status`),console.log(` --help, -h Show this help message`),console.log(`
10
- This command lists all custom rules provided by the functype plugin.`);return}if(c){console.log(r(`šŸ”§ ESLint Plugin Functype - Dependency Check`,`bright`));let e=t();i(e),e.isValid||process.exit(1);return}console.log(r(`šŸ”§ ESLint Plugin Functype - Custom Rules`,`bright`)),e.rules||(console.error(r(`āŒ No rules found in plugin.`,`red`)),process.exit(1)),console.log(r(`
10
+ This command lists all custom rules provided by the functype plugin.`);return}if(c){console.log(r(`šŸ”§ eslint-plugin-functype: Dependency Check`,`bright`));let e=t();i(e),e.isValid||process.exit(1);return}console.log(r(`šŸ”§ eslint-plugin-functype: Custom Rules`,`bright`)),e.rules||(console.error(r(`āŒ No rules found in plugin.`,`red`)),process.exit(1)),console.log(r(`
11
11
  šŸ“¦ Available Custom Rules:`,`bright`)),console.log(r(`=`.repeat(40),`blue`));let l=Object.keys(e.rules);l.forEach(t=>{let n=e.rules[t],i=`functype/${t}`;if(console.log(`\n${r(`ā—`,`green`)} ${r(i,`bright`)}`),n.meta?.docs?.description&&console.log(` ${r(`Description:`,`cyan`)} ${n.meta.docs.description}`),n.meta?.type){let e=n.meta.type===`problem`?`red`:n.meta.type===`suggestion`?`yellow`:`blue`;console.log(` ${r(`Type:`,`cyan`)} ${r(n.meta.type,e)}`)}n.meta?.fixable&&console.log(` ${r(`Fixable:`,`cyan`)} ${r(`Yes`,`green`)}`),s&&console.log(` ${r(`Usage:`,`cyan`)} "${i}": "error"`)}),console.log(r(`\nšŸ“Š Summary: ${l.length} custom rules available`,`bright`)),s&&o(),console.log(r(`
12
12
  šŸ’” Tips:`,`bright`)),console.log(`• Use --verbose to see detailed rule information`),console.log(`• Use --usage to see configuration examples`),console.log(`• All rules are prefixed with "functype/"`),console.log(`• Consider using eslint-config-functype for pre-configured setup`),console.log(r(`
13
- šŸ”— Links:`,`bright`)),console.log(`• Documentation: https://github.com/jordanburke/eslint-plugin-functype`),console.log(`• Configuration Bundle: https://github.com/jordanburke/eslint-config-functype`),console.log(`• Functype Library: https://github.com/jordanburke/functype`)}function o(){console.log(r(`
13
+ šŸ”— Links:`,`bright`)),console.log(`• Documentation: https://github.com/jordanburke/eslint-plugin-functype`),console.log(`• Configuration Bundle: https://github.com/jordanburke/eslint-config-functype`),console.log(`• functype library: https://github.com/jordanburke/functype`)}function o(){console.log(r(`
14
14
  šŸ’” Usage Examples:`,`bright`)),console.log(r(`=`.repeat(30),`blue`)),console.log(`
15
15
  `+r(`ESLint 9+ (flat config):`,`green`)),console.log(` import functypePlugin from "eslint-plugin-functype"`),console.log(` export default [`),console.log(` {`),console.log(` plugins: { functype: functypePlugin },`),console.log(` rules: {`),console.log(` "functype/prefer-option": "error",`),console.log(` "functype/prefer-either": "error",`),console.log(` "functype/no-get-unsafe": "error",`),console.log(` }`),console.log(` }`),console.log(` ]`),console.log(`
16
16
  `+r(`With eslint-config-functype (recommended):`,`green`)),console.log(` import functypeConfig from "eslint-config-functype"`),console.log(` export default [functypeConfig.recommended]`)}a().catch(e=>{console.error(r(`āŒ Unexpected error:`,`red`),e),process.exit(1)});export{};
@@ -1 +1 @@
1
- {"version":3,"file":"list-rules.js","names":["plugin","validatePeerDependencies","colors","colorize","text","color","printDependencyStatus","result","dep","icon","warning","status","statusColor","main","args","showHelp","showUsage","checkDeps","rules","ruleName","rule","fullName","typeColor","printCustomUsageInfo","error"],"sources":["../../src/cli/list-rules.ts"],"sourcesContent":["#!/usr/bin/env node\n\nimport plugin from \"../index.js\"\nimport { validatePeerDependencies, type ValidationResult } from \"../utils/dependency-validator.js\"\n\n// Colors for console output\nconst colors = {\n reset: \"\\x1b[0m\",\n bright: \"\\x1b[1m\",\n red: \"\\x1b[31m\",\n green: \"\\x1b[32m\",\n yellow: \"\\x1b[33m\",\n blue: \"\\x1b[34m\",\n magenta: \"\\x1b[35m\",\n cyan: \"\\x1b[36m\",\n} as const\n\nfunction colorize(text: string, color: keyof typeof colors): string {\n return colors[color] + text + colors.reset\n}\n\n// Removed unused utility functions - they were for the old config-based approach\n\nfunction printDependencyStatus(result: ValidationResult): void {\n console.log(colorize(\"\\nšŸ” Dependency Status Check:\", \"bright\"))\n console.log(colorize(\"=\".repeat(40), \"blue\"))\n\n // Show available dependencies\n if (result.available.length > 0) {\n console.log(colorize(\"\\nāœ… Available:\", \"green\"))\n result.available.forEach((dep) => {\n const icon = dep.required ? \"šŸ”§\" : \"šŸ”Œ\"\n console.log(` ${icon} ${colorize(dep.name, \"green\")} - ${dep.description}`)\n })\n }\n\n // Show missing dependencies\n if (result.missing.length > 0) {\n console.log(colorize(\"\\nāŒ Missing:\", \"red\"))\n result.missing.forEach((dep) => {\n const icon = dep.required ? \"āš ļø \" : \"šŸ’”\"\n const color = dep.required ? \"red\" : \"yellow\"\n console.log(` ${icon} ${colorize(dep.name, color)} - ${dep.description}`)\n })\n\n if (result.installCommand) {\n console.log(colorize(\"\\nšŸ“¦ Install missing dependencies:\", \"bright\"))\n console.log(` ${colorize(result.installCommand, \"cyan\")}`)\n }\n }\n\n // Show warnings\n if (result.warnings.length > 0) {\n console.log(colorize(\"\\nāš ļø Warnings:\", \"yellow\"))\n result.warnings.forEach((warning) => console.log(` ${warning}`))\n }\n\n // Overall status\n const status = result.isValid ? \"āœ… Ready to use\" : \"āŒ Configuration will fail\"\n const statusColor = result.isValid ? \"green\" : \"red\"\n console.log(colorize(`\\n${status}`, statusColor))\n}\n\nasync function main(): Promise<void> {\n const args = process.argv.slice(2)\n const showHelp = args.includes(\"--help\") || args.includes(\"-h\")\n const showUsage = args.includes(\"--usage\") || args.includes(\"-u\")\n const checkDeps = args.includes(\"--check-deps\") || args.includes(\"--check\")\n\n if (showHelp) {\n console.log(colorize(\"šŸ“‹ ESLint Plugin Functype - Custom Rules\", \"bright\"))\n console.log(\"\\nUsage: pnpm run list-rules [options]\")\n console.log(\"\\nOptions:\")\n console.log(\" --verbose, -v Show rule descriptions and schemas\")\n console.log(\" --usage, -u Show usage examples\")\n console.log(\" --check-deps Check peer dependency status\")\n console.log(\" --help, -h Show this help message\")\n console.log(\"\\nThis command lists all custom rules provided by the functype plugin.\")\n return\n }\n\n // Handle dependency check\n if (checkDeps) {\n console.log(colorize(\"šŸ”§ ESLint Plugin Functype - Dependency Check\", \"bright\"))\n const result = validatePeerDependencies()\n printDependencyStatus(result)\n\n if (!result.isValid) {\n process.exit(1)\n }\n return\n }\n\n console.log(colorize(\"šŸ”§ ESLint Plugin Functype - Custom Rules\", \"bright\"))\n\n if (!plugin.rules) {\n console.error(colorize(\"āŒ No rules found in plugin.\", \"red\"))\n process.exit(1)\n }\n\n console.log(colorize(\"\\nšŸ“¦ Available Custom Rules:\", \"bright\"))\n console.log(colorize(\"=\".repeat(40), \"blue\"))\n\n const rules = Object.keys(plugin.rules)\n\n rules.forEach((ruleName) => {\n const rule = plugin.rules[ruleName]\n const fullName = `functype/${ruleName}`\n\n console.log(`\\n${colorize(\"ā—\", \"green\")} ${colorize(fullName, \"bright\")}`)\n\n if (rule.meta?.docs?.description) {\n console.log(` ${colorize(\"Description:\", \"cyan\")} ${rule.meta.docs.description}`)\n }\n\n if (rule.meta?.type) {\n const typeColor = rule.meta.type === \"problem\" ? \"red\" : rule.meta.type === \"suggestion\" ? \"yellow\" : \"blue\"\n console.log(` ${colorize(\"Type:\", \"cyan\")} ${colorize(rule.meta.type, typeColor)}`)\n }\n\n if (rule.meta?.fixable) {\n console.log(` ${colorize(\"Fixable:\", \"cyan\")} ${colorize(\"Yes\", \"green\")}`)\n }\n\n if (showUsage) {\n console.log(` ${colorize(\"Usage:\", \"cyan\")} \"${fullName}\": \"error\"`)\n }\n })\n\n console.log(colorize(`\\nšŸ“Š Summary: ${rules.length} custom rules available`, \"bright\"))\n\n if (showUsage) {\n printCustomUsageInfo()\n }\n\n console.log(colorize(\"\\nšŸ’” Tips:\", \"bright\"))\n console.log(\"• Use --verbose to see detailed rule information\")\n console.log(\"• Use --usage to see configuration examples\")\n console.log('• All rules are prefixed with \"functype/\"')\n console.log(\"• Consider using eslint-config-functype for pre-configured setup\")\n\n console.log(colorize(\"\\nšŸ”— Links:\", \"bright\"))\n console.log(\"• Documentation: https://github.com/jordanburke/eslint-plugin-functype\")\n console.log(\"• Configuration Bundle: https://github.com/jordanburke/eslint-config-functype\")\n console.log(\"• Functype Library: https://github.com/jordanburke/functype\")\n}\n\nfunction printCustomUsageInfo(): void {\n console.log(colorize(\"\\nšŸ’” Usage Examples:\", \"bright\"))\n console.log(colorize(\"=\".repeat(30), \"blue\"))\n console.log(\"\\n\" + colorize(\"ESLint 9+ (flat config):\", \"green\"))\n console.log(' import functypePlugin from \"eslint-plugin-functype\"')\n console.log(\" export default [\")\n console.log(\" {\")\n console.log(\" plugins: { functype: functypePlugin },\")\n console.log(\" rules: {\")\n console.log(' \"functype/prefer-option\": \"error\",')\n console.log(' \"functype/prefer-either\": \"error\",')\n console.log(' \"functype/no-get-unsafe\": \"error\",')\n console.log(\" }\")\n console.log(\" }\")\n console.log(\" ]\")\n console.log(\"\\n\" + colorize(\"With eslint-config-functype (recommended):\", \"green\"))\n console.log(' import functypeConfig from \"eslint-config-functype\"')\n console.log(\" export default [functypeConfig.recommended]\")\n}\n\n// Run the CLI\nmain().catch((error) => {\n console.error(colorize(\"āŒ Unexpected error:\", \"red\"), error)\n process.exit(1)\n})\n"],"mappings":";A,uGAMA,MAAME,EAAS,CACb,MAAO,UACP,OAAQ,UACR,IAAK,WACL,MAAO,WACP,OAAQ,WACR,KAAM,WACN,QAAS,WACT,KAAM,UACR,EAEA,SAASC,EAASC,EAAcC,EAAoC,CAClE,OAAOH,EAAOG,GAASD,EAAOF,EAAO,KACvC,CAIA,SAASI,EAAsBC,EAAgC,CAC7D,QAAQ,IAAIJ,EAAS;6BAAiC,QAAQ,CAAC,EAC/D,QAAQ,IAAIA,EAAS,IAAI,OAAO,EAAE,EAAG,MAAM,CAAC,EAGxCI,EAAO,UAAU,OAAS,IAC5B,QAAQ,IAAIJ,EAAS;cAAkB,OA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","validatePeerDependencies","colors","colorize","text","color","printDependencyStatus","result","dep","icon","warning","status","statusColor","main","args","showHelp","showUsage","checkDeps","rules","ruleName","rule","fullName","typeColor","printCustomUsageInfo","error"],"sources":["../../src/cli/list-rules.ts"],"sourcesContent":["#!/usr/bin/env node\n\nimport plugin from \"../index.js\"\nimport { validatePeerDependencies, type ValidationResult } from \"../utils/dependency-validator.js\"\n\n// Colors for console output\nconst colors = {\n reset: \"\\x1b[0m\",\n bright: \"\\x1b[1m\",\n red: \"\\x1b[31m\",\n green: \"\\x1b[32m\",\n yellow: \"\\x1b[33m\",\n blue: \"\\x1b[34m\",\n magenta: \"\\x1b[35m\",\n cyan: \"\\x1b[36m\",\n} as const\n\nfunction colorize(text: string, color: keyof typeof colors): string {\n return colors[color] + text + colors.reset\n}\n\n// Removed unused utility functions - they were for the old config-based approach\n\nfunction printDependencyStatus(result: ValidationResult): void {\n console.log(colorize(\"\\nšŸ” Dependency Status Check:\", \"bright\"))\n console.log(colorize(\"=\".repeat(40), \"blue\"))\n\n // Show available dependencies\n if (result.available.length > 0) {\n console.log(colorize(\"\\nāœ… Available:\", \"green\"))\n result.available.forEach((dep) => {\n const icon = dep.required ? \"šŸ”§\" : \"šŸ”Œ\"\n console.log(` ${icon} ${colorize(dep.name, \"green\")} - ${dep.description}`)\n })\n }\n\n // Show missing dependencies\n if (result.missing.length > 0) {\n console.log(colorize(\"\\nāŒ Missing:\", \"red\"))\n result.missing.forEach((dep) => {\n const icon = dep.required ? \"āš ļø \" : \"šŸ’”\"\n const color = dep.required ? \"red\" : \"yellow\"\n console.log(` ${icon} ${colorize(dep.name, color)} - ${dep.description}`)\n })\n\n if (result.installCommand) {\n console.log(colorize(\"\\nšŸ“¦ Install missing dependencies:\", \"bright\"))\n console.log(` ${colorize(result.installCommand, \"cyan\")}`)\n }\n }\n\n // Show warnings\n if (result.warnings.length > 0) {\n console.log(colorize(\"\\nāš ļø Warnings:\", \"yellow\"))\n result.warnings.forEach((warning) => console.log(` ${warning}`))\n }\n\n // Overall status\n const status = result.isValid ? \"āœ… Ready to use\" : \"āŒ Configuration will fail\"\n const statusColor = result.isValid ? \"green\" : \"red\"\n console.log(colorize(`\\n${status}`, statusColor))\n}\n\nasync function main(): Promise<void> {\n const args = process.argv.slice(2)\n const showHelp = args.includes(\"--help\") || args.includes(\"-h\")\n const showUsage = args.includes(\"--usage\") || args.includes(\"-u\")\n const checkDeps = args.includes(\"--check-deps\") || args.includes(\"--check\")\n\n if (showHelp) {\n console.log(colorize(\"šŸ“‹ eslint-plugin-functype: Custom Rules\", \"bright\"))\n console.log(\"\\nUsage: pnpm run list-rules [options]\")\n console.log(\"\\nOptions:\")\n console.log(\" --verbose, -v Show rule descriptions and schemas\")\n console.log(\" --usage, -u Show usage examples\")\n console.log(\" --check-deps Check peer dependency status\")\n console.log(\" --help, -h Show this help message\")\n console.log(\"\\nThis command lists all custom rules provided by the functype plugin.\")\n return\n }\n\n // Handle dependency check\n if (checkDeps) {\n console.log(colorize(\"šŸ”§ eslint-plugin-functype: Dependency Check\", \"bright\"))\n const result = validatePeerDependencies()\n printDependencyStatus(result)\n\n if (!result.isValid) {\n process.exit(1)\n }\n return\n }\n\n console.log(colorize(\"šŸ”§ eslint-plugin-functype: Custom Rules\", \"bright\"))\n\n if (!plugin.rules) {\n console.error(colorize(\"āŒ No rules found in plugin.\", \"red\"))\n process.exit(1)\n }\n\n console.log(colorize(\"\\nšŸ“¦ Available Custom Rules:\", \"bright\"))\n console.log(colorize(\"=\".repeat(40), \"blue\"))\n\n const rules = Object.keys(plugin.rules)\n\n rules.forEach((ruleName) => {\n const rule = plugin.rules[ruleName]\n const fullName = `functype/${ruleName}`\n\n console.log(`\\n${colorize(\"ā—\", \"green\")} ${colorize(fullName, \"bright\")}`)\n\n if (rule.meta?.docs?.description) {\n console.log(` ${colorize(\"Description:\", \"cyan\")} ${rule.meta.docs.description}`)\n }\n\n if (rule.meta?.type) {\n const typeColor = rule.meta.type === \"problem\" ? \"red\" : rule.meta.type === \"suggestion\" ? \"yellow\" : \"blue\"\n console.log(` ${colorize(\"Type:\", \"cyan\")} ${colorize(rule.meta.type, typeColor)}`)\n }\n\n if (rule.meta?.fixable) {\n console.log(` ${colorize(\"Fixable:\", \"cyan\")} ${colorize(\"Yes\", \"green\")}`)\n }\n\n if (showUsage) {\n console.log(` ${colorize(\"Usage:\", \"cyan\")} \"${fullName}\": \"error\"`)\n }\n })\n\n console.log(colorize(`\\nšŸ“Š Summary: ${rules.length} custom rules available`, \"bright\"))\n\n if (showUsage) {\n printCustomUsageInfo()\n }\n\n console.log(colorize(\"\\nšŸ’” Tips:\", \"bright\"))\n console.log(\"• Use --verbose to see detailed rule information\")\n console.log(\"• Use --usage to see configuration examples\")\n console.log('• All rules are prefixed with \"functype/\"')\n console.log(\"• Consider using eslint-config-functype for pre-configured setup\")\n\n console.log(colorize(\"\\nšŸ”— Links:\", \"bright\"))\n console.log(\"• Documentation: https://github.com/jordanburke/eslint-plugin-functype\")\n console.log(\"• Configuration Bundle: https://github.com/jordanburke/eslint-config-functype\")\n console.log(\"• functype library: https://github.com/jordanburke/functype\")\n}\n\nfunction printCustomUsageInfo(): void {\n console.log(colorize(\"\\nšŸ’” Usage Examples:\", \"bright\"))\n console.log(colorize(\"=\".repeat(30), \"blue\"))\n console.log(\"\\n\" + colorize(\"ESLint 9+ (flat config):\", \"green\"))\n console.log(' import functypePlugin from \"eslint-plugin-functype\"')\n console.log(\" export default [\")\n console.log(\" {\")\n console.log(\" plugins: { functype: functypePlugin },\")\n console.log(\" rules: {\")\n console.log(' \"functype/prefer-option\": \"error\",')\n console.log(' \"functype/prefer-either\": \"error\",')\n console.log(' \"functype/no-get-unsafe\": \"error\",')\n console.log(\" }\")\n console.log(\" }\")\n console.log(\" ]\")\n console.log(\"\\n\" + colorize(\"With eslint-config-functype (recommended):\", \"green\"))\n console.log(' import functypeConfig from \"eslint-config-functype\"')\n console.log(\" export default [functypeConfig.recommended]\")\n}\n\n// Run the CLI\nmain().catch((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1D,QAAQ,IAAI,gBAAgB,EAC5B,QAAQ,IAAI,4CAA4C,EACxD,QAAQ,IAAI,4CAA4C,EACxD,QAAQ,IAAI,4CAA4C,EACxD,QAAQ,IAAI,SAAS,EACrB,QAAQ,IAAI,OAAO,EACnB,QAAQ,IAAI,KAAK,EACjB,QAAQ,IAAI;EAAOA,EAAS,6CAA8C,OAAO,CAAC,EAClF,QAAQ,IAAI,uDAAuD,EACnE,QAAQ,IAAI,+CAA+C,CAC7D,CAGAU,EAAK,CAAC,CAAC,MAAOW,GAAU,CACtB,QAAQ,MAAMrB,EAAS,sBAAuB,KAAK,EAAGqB,CAAK,EAC3D,QAAQ,KAAK,CAAC,CAChB,CAAC,E"}
package/dist/index.js CHANGED
@@ -1,2 +1,2 @@
1
- import e from"./configs/recommended.js";import t,{testFiles as n}from"./configs/tests.js";import r from"./rules/index.js";const i={rules:r,meta:{name:`eslint-plugin-functype`,version:`2.202.0`},configs:{}};i.configs={recommended:{name:`functype-plugin/recommended`,plugins:{functype:i},rules:e},tests:{name:`functype-plugin/tests`,plugins:{functype:i},files:n,rules:t}};export{i as default};
1
+ import e from"./configs/recommended.js";import t,{testFiles as n}from"./configs/tests.js";import r from"./rules/index.js";const i={rules:r,meta:{name:`eslint-plugin-functype`,version:`2.202.1`},configs:{}};i.configs={recommended:{name:`functype-plugin/recommended`,plugins:{functype:i},rules:e},tests:{name:`functype-plugin/tests`,plugins:{functype:i},files:n,rules:t}};export{i as default};
2
2
  //# sourceMappingURL=index.js.map
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "eslint-plugin-functype",
3
- "version": "2.202.0",
3
+ "version": "2.202.1",
4
4
  "description": "Custom ESLint rules for functional TypeScript programming with functype library patterns including Do notation (ESLint 10+)",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",
@@ -42,7 +42,7 @@
42
42
  "@types/node": "^24.19.2",
43
43
  "@typescript-eslint/rule-tester": "^8.72.2",
44
44
  "eslint-config-prettier": "^10.1.8",
45
- "functype": "^2.2.0",
45
+ "functype": "^2.2.1",
46
46
  "ts-builds": "^5.0.0",
47
47
  "tsdown": "^0.23.7"
48
48
  },