diff --git a/package.json b/package.json index cf3624a..0222488 100644 --- a/package.json +++ b/package.json @@ -66,7 +66,7 @@ "url": "https://github.com/webdeveric/utils/issues" }, "homepage": "https://github.com/webdeveric/utils/#readme", - "packageManager": "pnpm@10.17.1+sha512.17c560fca4867ae9473a3899ad84a88334914f379be46d455cbf92e5cf4b39d34985d452d2583baf19967fa76cb5c17bc9e245529d0b98745721aa7200ecaf7a", + "packageManager": "pnpm@10.18.0+sha512.e804f889f1cecc40d572db084eec3e4881739f8dec69c0ff10d2d1beff9a4e309383ba27b5b750059d7f4c149535b6cd0d2cb1ed3aeb739239a4284a68f40cfa", "scripts": { "clean": "rimraf ./dist/", "prebuild": "pnpm clean", @@ -87,11 +87,11 @@ "devDependencies": { "@commitlint/config-conventional": "^20.0.0", "@commitlint/types": "^20.0.0", - "@types/node": "^22.18.6", + "@types/node": "^22.18.7", "@vitest/coverage-v8": "^3.2.4", "@webdeveric/eslint-config-ts": "^0.11.0", "@webdeveric/prettier-config": "^0.3.0", - "commitlint": "^20.0.0", + "commitlint": "^20.1.0", "commitlint-plugin-cspell": "^0.3.0", "conventional-changelog-conventionalcommits": "^9.1.0", "cspell": "^9.2.1", @@ -101,12 +101,12 @@ "eslint-plugin-import": "^2.32.0", "husky": "^9.1.7", "jsdom": "^27.0.0", - "lint-staged": "^16.2.1", + "lint-staged": "^16.2.3", "prettier": "^3.6.2", "rimraf": "^6.0.1", "semantic-release": "^24.2.9", "typescript": "^5.9.2", - "validate-package-exports": "^0.13.0", + "validate-package-exports": "^0.14.0", "vitest": "^3.2.4" }, "pnpm": { diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 7e16ac7..402e123 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -15,11 +15,11 @@ importers: specifier: ^20.0.0 version: 20.0.0 '@types/node': - specifier: ^22.18.6 - version: 22.18.6 + specifier: ^22.18.7 + version: 22.18.7 '@vitest/coverage-v8': specifier: ^3.2.4 - version: 3.2.4(vitest@3.2.4(@types/node@22.18.6)(jiti@2.6.0)(jsdom@27.0.0(postcss@8.5.6))(yaml@2.8.1)) + version: 3.2.4(vitest@3.2.4(@types/node@22.18.7)(jiti@2.6.0)(jsdom@27.0.0(postcss@8.5.6))(yaml@2.8.1)) '@webdeveric/eslint-config-ts': specifier: ^0.11.0 version: 0.11.0(eslint@8.57.1)(typescript@5.9.2) @@ -27,8 +27,8 @@ importers: specifier: ^0.3.0 version: 0.3.0(prettier@3.6.2) commitlint: - specifier: ^20.0.0 - version: 20.0.0(@types/node@22.18.6)(typescript@5.9.2) + specifier: ^20.1.0 + version: 20.1.0(@types/node@22.18.7)(typescript@5.9.2) commitlint-plugin-cspell: specifier: ^0.3.0 version: 0.3.0(@commitlint/lint@20.0.0) @@ -57,8 +57,8 @@ importers: specifier: ^27.0.0 version: 27.0.0(postcss@8.5.6) lint-staged: - specifier: ^16.2.1 - version: 16.2.1 + specifier: ^16.2.3 + version: 16.2.3 prettier: specifier: ^3.6.2 version: 3.6.2 @@ -72,11 +72,11 @@ importers: specifier: ^5.9.2 version: 5.9.2 validate-package-exports: - specifier: ^0.13.0 - version: 0.13.0 + specifier: ^0.14.0 + version: 0.14.0 vitest: specifier: ^3.2.4 - version: 3.2.4(@types/node@22.18.6)(jiti@2.6.0)(jsdom@27.0.0(postcss@8.5.6))(yaml@2.8.1) + version: 3.2.4(@types/node@22.18.7)(jiti@2.6.0)(jsdom@27.0.0(postcss@8.5.6))(yaml@2.8.1) packages: @@ -122,8 +122,8 @@ packages: resolution: {integrity: sha512-ooWCrlZP11i8GImSjTHYHLkvFDP48nS4+204nGb1RiX/WXYHmJA2III9/e2DWVabCESdW7hBAEzHRqUn9OUVvQ==} engines: {node: '>=0.1.90'} - '@commitlint/cli@20.0.0': - resolution: {integrity: sha512-I3D7Yldq8ZhOB3qEaTvXWIgib6tSZhbCpRObfFQ/aYI0J9AH8NMwT07Ak+bpE3n6Yn7EtbqEhQUkJZ/jZ5kCeQ==} + '@commitlint/cli@20.1.0': + resolution: {integrity: sha512-pW5ujjrOovhq5RcYv5xCpb4GkZxkO2+GtOdBW2/qrr0Ll9tl3PX0aBBobGQl3mdZUbOBgwAexEQLeH6uxL0VYg==} engines: {node: '>=v18'} hasBin: true @@ -155,8 +155,8 @@ packages: resolution: {integrity: sha512-kWrX8SfWk4+4nCexfLaQT3f3EcNjJwJBsSZ5rMBw6JCd6OzXufFHgel2Curos4LKIxwec9WSvs2YUD87rXlxNQ==} engines: {node: '>=v18'} - '@commitlint/load@20.0.0': - resolution: {integrity: sha512-WiNKO9fDPlLY90Rruw2HqHKcghrmj5+kMDJ4GcTlX1weL8K07Q6b27C179DxnsrjGCRAKVwFKyzxV4x+xDY28Q==} + '@commitlint/load@20.1.0': + resolution: {integrity: sha512-qo9ER0XiAimATQR5QhvvzePfeDfApi/AFlC1G+YN+ZAY8/Ua6IRrDrxRvQAr+YXUKAxUsTDSp9KXeXLBPsNRWg==} engines: {node: '>=v18'} '@commitlint/message@20.0.0': @@ -171,8 +171,8 @@ packages: resolution: {integrity: sha512-Ti7Y7aEgxsM1nkwA4ZIJczkTFRX/+USMjNrL9NXwWQHqNqrBX2iMi+zfuzZXqfZ327WXBjdkRaytJ+z5vNqTOA==} engines: {node: '>=v18'} - '@commitlint/resolve-extends@20.0.0': - resolution: {integrity: sha512-BA4vva1hY8y0/Hl80YDhe9TJZpRFMsUYzVxvwTLPTEBotbGx/gS49JlVvtF1tOCKODQp7pS7CbxCpiceBgp3Dg==} + '@commitlint/resolve-extends@20.1.0': + resolution: {integrity: sha512-cxKXQrqHjZT3o+XPdqDCwOWVFQiae++uwd9dUBC7f2MdV58ons3uUvASdW7m55eat5sRiQ6xUHyMWMRm6atZWw==} engines: {node: '>=v18'} '@commitlint/rules@20.0.0': @@ -761,53 +761,47 @@ packages: resolution: {integrity: sha512-P4YJBPdPSpWTQ1NU4XYdvHvXJJDxM6YwpS0FZHRgP7YFkdVxsWcpWGy/NVqlAA7PcPCnMacXlRm1y2PFZRWL/w==} engines: {node: '>= 20'} - '@octokit/core@7.0.4': - resolution: {integrity: sha512-jOT8V1Ba5BdC79sKrRWDdMT5l1R+XNHTPR6CPWzUP2EcfAcvIHZWF0eAbmRcpOOP5gVIwnqNg0C4nvh6Abc3OA==} + '@octokit/core@7.0.5': + resolution: {integrity: sha512-t54CUOsFMappY1Jbzb7fetWeO0n6K0k/4+/ZpkS+3Joz8I4VcvY9OiEBFRYISqaI2fq5sCiPtAjRDOzVYG8m+Q==} engines: {node: '>= 20'} - '@octokit/endpoint@11.0.0': - resolution: {integrity: sha512-hoYicJZaqISMAI3JfaDr1qMNi48OctWuOih1m80bkYow/ayPw6Jj52tqWJ6GEoFTk1gBqfanSoI1iY99Z5+ekQ==} + '@octokit/endpoint@11.0.1': + resolution: {integrity: sha512-7P1dRAZxuWAOPI7kXfio88trNi/MegQ0IJD3vfgC3b+LZo1Qe6gRJc2v0mz2USWWJOKrB2h5spXCzGbw+fAdqA==} engines: {node: '>= 20'} - '@octokit/graphql@9.0.1': - resolution: {integrity: sha512-j1nQNU1ZxNFx2ZtKmL4sMrs4egy5h65OMDmSbVyuCzjOcwsHq6EaYjOTGXPQxgfiN8dJ4CriYHk6zF050WEULg==} + '@octokit/graphql@9.0.2': + resolution: {integrity: sha512-iz6KzZ7u95Fzy9Nt2L8cG88lGRMr/qy1Q36ih/XVzMIlPDMYwaNLE/ENhqmIzgPrlNWiYJkwmveEetvxAgFBJw==} engines: {node: '>= 20'} - '@octokit/openapi-types@25.1.0': - resolution: {integrity: sha512-idsIggNXUKkk0+BExUn1dQ92sfysJrje03Q0bv0e+KPLrvyqZF8MnBpFz8UNfYDwB3Ie7Z0TByjWfzxt7vseaA==} - '@octokit/openapi-types@26.0.0': resolution: {integrity: sha512-7AtcfKtpo77j7Ts73b4OWhOZHTKo/gGY8bB3bNBQz4H+GRSWqx2yvj8TXRsbdTE0eRmYmXOEY66jM7mJ7LzfsA==} - '@octokit/plugin-paginate-rest@13.1.1': - resolution: {integrity: sha512-q9iQGlZlxAVNRN2jDNskJW/Cafy7/XE52wjZ5TTvyhyOD904Cvx//DNyoO3J/MXJ0ve3rPoNWKEg5iZrisQSuw==} + '@octokit/plugin-paginate-rest@13.2.0': + resolution: {integrity: sha512-YuAlyjR8o5QoRSOvMHxSJzPtogkNMgeMv2mpccrvdUGeC3MKyfi/hS+KiFwyH/iRKIKyx+eIMsDjbt3p9r2GYA==} engines: {node: '>= 20'} peerDependencies: '@octokit/core': '>=6' - '@octokit/plugin-retry@8.0.1': - resolution: {integrity: sha512-KUoYR77BjF5O3zcwDQHRRZsUvJwepobeqiSSdCJ8lWt27FZExzb0GgVxrhhfuyF6z2B2zpO0hN5pteni1sqWiw==} + '@octokit/plugin-retry@8.0.2': + resolution: {integrity: sha512-mVPCe77iaD8g1lIX46n9bHPUirFLzc3BfIzsZOpB7bcQh1ecS63YsAgcsyMGqvGa2ARQWKEFTrhMJX2MLJVHVw==} engines: {node: '>= 20'} peerDependencies: '@octokit/core': '>=7' - '@octokit/plugin-throttling@11.0.1': - resolution: {integrity: sha512-S+EVhy52D/272L7up58dr3FNSMXWuNZolkL4zMJBNIfIxyZuUcczsQAU4b5w6dewJXnKYVgSHSV5wxitMSW1kw==} + '@octokit/plugin-throttling@11.0.2': + resolution: {integrity: sha512-ntNIig4zZhQVOZF4fG9Wt8QCoz9ehb+xnlUwp74Ic2ANChCk8oKmRwV9zDDCtrvU1aERIOvtng8wsalEX7Jk5Q==} engines: {node: '>= 20'} peerDependencies: '@octokit/core': ^7.0.0 - '@octokit/request-error@7.0.0': - resolution: {integrity: sha512-KRA7VTGdVyJlh0cP5Tf94hTiYVVqmt2f3I6mnimmaVz4UG3gQV/k4mDJlJv3X67iX6rmN7gSHCF8ssqeMnmhZg==} + '@octokit/request-error@7.0.1': + resolution: {integrity: sha512-CZpFwV4+1uBrxu7Cw8E5NCXDWFNf18MSY23TdxCBgjw1tXXHvTrZVsXlW8hgFTOLw8RQR1BBrMvYRtuyaijHMA==} engines: {node: '>= 20'} - '@octokit/request@10.0.3': - resolution: {integrity: sha512-V6jhKokg35vk098iBqp2FBKunk3kMTXlmq+PtbV9Gl3TfskWlebSofU9uunVKhUN7xl+0+i5vt0TGTG8/p/7HA==} + '@octokit/request@10.0.5': + resolution: {integrity: sha512-TXnouHIYLtgDhKo+N6mXATnDBkV05VwbR0TtMWpgTHIoQdRQfCSzmy/LGqR1AbRMbijq/EckC/E3/ZNcU92NaQ==} engines: {node: '>= 20'} - '@octokit/types@14.1.0': - resolution: {integrity: sha512-1y6DgTy8Jomcpu33N+p5w58l6xyt55Ar2I91RPiIA0xCJBXyUAhXCcmZaDWSANiha7R9a6qJJ2CRomGPZ6f46g==} - '@octokit/types@15.0.0': resolution: {integrity: sha512-8o6yDfmoGJUIeR9OfYU0/TUJTnMPG2r68+1yEdUeG2Fdqpj8Qetg0ziKIgcBm0RW/j29H41WP37CYCEhp6GoHQ==} @@ -1040,8 +1034,8 @@ packages: '@types/json5@0.0.29': resolution: {integrity: sha512-dRLjCWHYg4oaA77cxO64oO+7JwCwnIzkZPdrrC71jQmQtlhM556pwKo5bUzqvZndkVbeFLIIi+9TC40JNF5hNQ==} - '@types/node@22.18.6': - resolution: {integrity: sha512-r8uszLPpeIWbNKtvWRt/DbVi5zbqZyj1PTmhRMqBMvDnaz1QpmSKujUtJLrqGZeoM8v72MfYggDceY4K1itzWQ==} + '@types/node@22.18.7': + resolution: {integrity: sha512-3E97nlWEVp2V6J7aMkR8eOnw/w0pArPwf/5/W0865f+xzBoGL/ZuHkTAKAGN7cOWNwd+sG+hZOqj+fjzeHS75g==} '@types/normalize-package-data@2.4.4': resolution: {integrity: sha512-37i+OaWTh9qeK4LSHPsyRC7NahnGotNuZvjLSgcPzblpHB3rrCJxAOgI5gCdKm7coonsaX1Of0ILiTcnZjbfxA==} @@ -1264,8 +1258,8 @@ packages: peerDependencies: prettier: '>=2.4.0' - '@webdeveric/utils@0.69.0': - resolution: {integrity: sha512-WLf+fViXfrRmz6+zswUast0jqwF+2x1ffpbURhEHuBvklWsx8k7DzgEItwGZ1wPJ7AkA3X/Mdl5qoykIQxzJFw==} + '@webdeveric/utils@0.72.0': + resolution: {integrity: sha512-CJHJteyzH8ZH3A5MEI2jlCRk7unUw6+D9NSZ2RaDydT9lGwXHbJbmDD7Xv3/7LZY9VzLkE5Dw3Yyc7ECCCm6nw==} engines: {node: '>=18.0.0'} JSONStream@1.3.5: @@ -1524,8 +1518,8 @@ packages: resolution: {integrity: sha512-2JkV3gUZUVrbNA+1sjBOYLsMZ5cEEl8GTFP2a4AVz5hvasAMCQ1D2l2le/cX+pV4N6ZU17zjUahLpIXRrnWL8A==} engines: {node: '>=20'} - comment-json@4.2.5: - resolution: {integrity: sha512-bKw/r35jR3HGt5PEPm1ljsQQGyCrR8sFGNiN5L+ykDHdpO8Smxkrkla9Yi6NkQyUrb8V54PGhfMs6NrIwtxtdw==} + comment-json@4.3.0: + resolution: {integrity: sha512-DczdmbvWLd09KATFWY0xcihOO45b32+5V34vZg1oelxqgjtGJotaLrrdFpJRLOdG6Wb031qcg4zOKgnQoBWbEw==} engines: {node: '>= 6'} commitlint-plugin-cspell@0.3.0: @@ -1533,8 +1527,8 @@ packages: peerDependencies: '@commitlint/lint': '>=7.6.0' - commitlint@20.0.0: - resolution: {integrity: sha512-BZlx+WZzmt9aX15d9WwRbhr+RZ7rmuu3MCSerqyZ3ierfPuwWqKqERsIMeDxSfZe/WSpxVb25QdtHYV4kT+DEQ==} + commitlint@20.1.0: + resolution: {integrity: sha512-3W3CTUpZl6R98UquFiZA/C9yGdzGJU2rmVIXlx6tvKNX8hzLuiPsoZINFfzKnfCnaSP07Xys5aXP+FE7vXZmEg==} engines: {node: '>=v18'} hasBin: true @@ -2088,6 +2082,10 @@ packages: functions-have-names@1.2.3: resolution: {integrity: sha512-xckBUXyTIqT97tq2x2AMb+g163b5JFysYk0x4qxNFwbfQkmNZoiRHb6sPzI9/QV33WeuvVYBUIiD4NzNIyqaRQ==} + generator-function@2.0.0: + resolution: {integrity: sha512-xPypGGincdfyl/AiSGa7GjXLkvld9V7GjZlowup9SHIJnQnHLFiLODCd/DqKOp0PBagbHJ68r1KJI9Mut7m4sA==} + engines: {node: '>= 0.4'} + gensequence@7.0.0: resolution: {integrity: sha512-47Frx13aZh01afHJTB3zTtKIlFI6vWY+MYCN9Qpew6i52rfKjnhCF/l1YlC8UmEMvvntZZ6z4PiCcmyuedR2aQ==} engines: {node: '>=18'} @@ -2206,10 +2204,6 @@ packages: resolution: {integrity: sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==} engines: {node: '>=8'} - has-own-prop@2.0.0: - resolution: {integrity: sha512-Pq0h+hvsVm6dDEa8x82GnLSYHOzNDt7f0ddFa3FqcQlgzEiptPqL+XrOJNavjOzSYiYWIrgeVYYgGlLmnxwilQ==} - engines: {node: '>=8'} - has-property-descriptors@1.0.2: resolution: {integrity: sha512-55JNKuIW+vq4Ke1BjOTjM2YctQIvCT7GFzHwmfZPGo5wnrgkid0YQtnAleFSqumZm4az3n2BS+erby5ipJdgrg==} @@ -2398,8 +2392,8 @@ packages: resolution: {integrity: sha512-5XHYaSyiqADb4RnZ1Bdad6cPp8Toise4TzEjcOYDHZkTCbKgiUl7WTUCpNWHuxmDt91wnsZBc9xinNzopv3JMQ==} engines: {node: '>=18'} - is-generator-function@1.1.0: - resolution: {integrity: sha512-nPUB5km40q9e8UfN/Zc24eLlzdSf9OfKByBw9CIdw4H1giPMeA0OIJvbchsCu4npfI2QcMVBsGEBHKZ7wLTWmQ==} + is-generator-function@1.1.1: + resolution: {integrity: sha512-Gn8BWUdrTzf9XUJAvqIYP7QnSC3mKs8QjQdGdJ7HmBemzZo14wj/OVmmAwgxDX/7WhFEjboybL4VhXGIQYPlOA==} engines: {node: '>= 0.4'} is-glob@4.0.3: @@ -2608,8 +2602,8 @@ packages: lines-and-columns@1.2.4: resolution: {integrity: sha512-7ylylesZQ/PV29jhEDl3Ufjo6ZX7gCqJr5F7PKrqc93v7fzSymt1BpwEU8nAUXs8qzzvqhbjhK5QZg6Mt/HkBg==} - lint-staged@16.2.1: - resolution: {integrity: sha512-KMeYmH9wKvHsXdUp+z6w7HN3fHKHXwT1pSTQTYxB9kI6ekK1rlL3kLZEoXZCppRPXFK9PFW/wfQctV7XUqMrPQ==} + lint-staged@16.2.3: + resolution: {integrity: sha512-1OnJEESB9zZqsp61XHH2fvpS1es3hRCxMplF/AJUDa8Ho8VrscYDIuxGrj3m8KPXbcWZ8fT9XTMUhEQmOVKpKw==} engines: {node: '>=20.17'} hasBin: true @@ -3268,10 +3262,6 @@ packages: resolution: {integrity: sha512-GdekYuwLXLxMuFTwAPg5UKGLW/UXzQrZvH/Zj791BQif5T05T0RsaLfHc9q3ZOKi7n+BoprPD9mJ0O0k4xzUlw==} engines: {node: '>=14'} - repeat-string@1.6.1: - resolution: {integrity: sha512-PV0dzCYDNfRi1jCDbJzpW7jNNDRuCOG/jI5ctQcGKt/clZD+YcPS3yIlWuTJMmESC8aevCFmWJy5wjAFgNqN6w==} - engines: {node: '>=0.10'} - require-directory@2.1.1: resolution: {integrity: sha512-fGxEI7+wsG9xrvdjsrlmL22OMTTiHRwAMroiEeMgq8gzoLC/PQr7RsRDSTLUg/bZAZtF+TVIkHc6/4RIKrui+Q==} engines: {node: '>=0.10.0'} @@ -3570,8 +3560,8 @@ packages: resolution: {integrity: sha512-6fPc+R4ihwqP6N/aIv2f1gMH8lOVtWQHoqC4yK6oSDVVocumAsfCqjkXnqiYMhmMwS/mEHLp7Vehlt3ql6lEig==} engines: {node: '>=8'} - strip-literal@3.0.0: - resolution: {integrity: sha512-TcccoMhJOM3OebGhSBEmp3UZ2SfDMZUEBdRA/9ynfLi8yYajyWX3JiXArcJt4Umh4vISpspkQIY8ZZoCqjbviA==} + strip-literal@3.1.0: + resolution: {integrity: sha512-8r3mkIM/2+PpjHoOtiAW8Rg3jJLHaV7xPwG+YRGrv6FP0wwk/toTpATxWYOW0BKdWwl82VT2tFYi5DlROa0Mxg==} super-regex@1.0.0: resolution: {integrity: sha512-CY8u7DtbvucKuquCmOFEKhr9Besln7n9uN8eFbwcoGYWXOMW07u2o8njWaiXt11ylS3qoGF55pILjRmPlbodyg==} @@ -3808,8 +3798,8 @@ packages: resolution: {integrity: sha512-IUoow1YUtvoBBC06dXs8bR8B9vuA3aJfmQNKMoaPG/OFsPmoQvw8xh+6Ye25Gx9DQhoEom3Pcu9MKHerm/NpUQ==} engines: {node: ^18.17.0 || >=20.5.0} - validate-package-exports@0.13.0: - resolution: {integrity: sha512-weoY5KcYDEhHq3NMCFRAHQK7ZWdH/bV60UujYp4X2y0+B2ukDv8gT70J4vHFLe5CqslJmuunX+LwLnW8pwOczw==} + validate-package-exports@0.14.0: + resolution: {integrity: sha512-QWcHBMI30gqIUcIbNIGmomy4JNUxB/Iigos+tMVkz7hhU/G3WCSrjFPPz7vz4D3g/TBjTFkcG2tYHQrjflw09A==} engines: {node: '>=20.17.0'} hasBin: true @@ -4093,11 +4083,11 @@ snapshots: '@colors/colors@1.5.0': optional: true - '@commitlint/cli@20.0.0(@types/node@22.18.6)(typescript@5.9.2)': + '@commitlint/cli@20.1.0(@types/node@22.18.7)(typescript@5.9.2)': dependencies: '@commitlint/format': 20.0.0 '@commitlint/lint': 20.0.0 - '@commitlint/load': 20.0.0(@types/node@22.18.6)(typescript@5.9.2) + '@commitlint/load': 20.1.0(@types/node@22.18.7)(typescript@5.9.2) '@commitlint/read': 20.0.0 '@commitlint/types': 20.0.0 tinyexec: 1.0.1 @@ -4144,15 +4134,15 @@ snapshots: '@commitlint/rules': 20.0.0 '@commitlint/types': 20.0.0 - '@commitlint/load@20.0.0(@types/node@22.18.6)(typescript@5.9.2)': + '@commitlint/load@20.1.0(@types/node@22.18.7)(typescript@5.9.2)': dependencies: '@commitlint/config-validator': 20.0.0 '@commitlint/execute-rule': 20.0.0 - '@commitlint/resolve-extends': 20.0.0 + '@commitlint/resolve-extends': 20.1.0 '@commitlint/types': 20.0.0 chalk: 5.6.2 cosmiconfig: 9.0.0(typescript@5.9.2) - cosmiconfig-typescript-loader: 6.1.0(@types/node@22.18.6)(cosmiconfig@9.0.0(typescript@5.9.2))(typescript@5.9.2) + cosmiconfig-typescript-loader: 6.1.0(@types/node@22.18.7)(cosmiconfig@9.0.0(typescript@5.9.2))(typescript@5.9.2) lodash.isplainobject: 4.0.6 lodash.merge: 4.6.2 lodash.uniq: 4.5.0 @@ -4176,7 +4166,7 @@ snapshots: minimist: 1.2.8 tinyexec: 1.0.1 - '@commitlint/resolve-extends@20.0.0': + '@commitlint/resolve-extends@20.1.0': dependencies: '@commitlint/config-validator': 20.0.0 '@commitlint/types': 20.0.0 @@ -4760,65 +4750,59 @@ snapshots: '@octokit/auth-token@6.0.0': {} - '@octokit/core@7.0.4': + '@octokit/core@7.0.5': dependencies: '@octokit/auth-token': 6.0.0 - '@octokit/graphql': 9.0.1 - '@octokit/request': 10.0.3 - '@octokit/request-error': 7.0.0 + '@octokit/graphql': 9.0.2 + '@octokit/request': 10.0.5 + '@octokit/request-error': 7.0.1 '@octokit/types': 15.0.0 before-after-hook: 4.0.0 universal-user-agent: 7.0.3 - '@octokit/endpoint@11.0.0': + '@octokit/endpoint@11.0.1': dependencies: - '@octokit/types': 14.1.0 + '@octokit/types': 15.0.0 universal-user-agent: 7.0.3 - '@octokit/graphql@9.0.1': + '@octokit/graphql@9.0.2': dependencies: - '@octokit/request': 10.0.3 - '@octokit/types': 14.1.0 + '@octokit/request': 10.0.5 + '@octokit/types': 15.0.0 universal-user-agent: 7.0.3 - '@octokit/openapi-types@25.1.0': {} - '@octokit/openapi-types@26.0.0': {} - '@octokit/plugin-paginate-rest@13.1.1(@octokit/core@7.0.4)': + '@octokit/plugin-paginate-rest@13.2.0(@octokit/core@7.0.5)': dependencies: - '@octokit/core': 7.0.4 - '@octokit/types': 14.1.0 + '@octokit/core': 7.0.5 + '@octokit/types': 15.0.0 - '@octokit/plugin-retry@8.0.1(@octokit/core@7.0.4)': + '@octokit/plugin-retry@8.0.2(@octokit/core@7.0.5)': dependencies: - '@octokit/core': 7.0.4 - '@octokit/request-error': 7.0.0 - '@octokit/types': 14.1.0 + '@octokit/core': 7.0.5 + '@octokit/request-error': 7.0.1 + '@octokit/types': 15.0.0 bottleneck: 2.19.5 - '@octokit/plugin-throttling@11.0.1(@octokit/core@7.0.4)': + '@octokit/plugin-throttling@11.0.2(@octokit/core@7.0.5)': dependencies: - '@octokit/core': 7.0.4 - '@octokit/types': 14.1.0 + '@octokit/core': 7.0.5 + '@octokit/types': 15.0.0 bottleneck: 2.19.5 - '@octokit/request-error@7.0.0': + '@octokit/request-error@7.0.1': dependencies: - '@octokit/types': 14.1.0 + '@octokit/types': 15.0.0 - '@octokit/request@10.0.3': + '@octokit/request@10.0.5': dependencies: - '@octokit/endpoint': 11.0.0 - '@octokit/request-error': 7.0.0 - '@octokit/types': 14.1.0 + '@octokit/endpoint': 11.0.1 + '@octokit/request-error': 7.0.1 + '@octokit/types': 15.0.0 fast-content-type-parse: 3.0.0 universal-user-agent: 7.0.3 - '@octokit/types@14.1.0': - dependencies: - '@octokit/openapi-types': 25.1.0 - '@octokit/types@15.0.0': dependencies: '@octokit/openapi-types': 26.0.0 @@ -4926,10 +4910,10 @@ snapshots: '@semantic-release/github@11.0.6(semantic-release@24.2.9(typescript@5.9.2))': dependencies: - '@octokit/core': 7.0.4 - '@octokit/plugin-paginate-rest': 13.1.1(@octokit/core@7.0.4) - '@octokit/plugin-retry': 8.0.1(@octokit/core@7.0.4) - '@octokit/plugin-throttling': 11.0.1(@octokit/core@7.0.4) + '@octokit/core': 7.0.5 + '@octokit/plugin-paginate-rest': 13.2.0(@octokit/core@7.0.5) + '@octokit/plugin-retry': 8.0.2(@octokit/core@7.0.5) + '@octokit/plugin-throttling': 11.0.2(@octokit/core@7.0.5) '@semantic-release/error': 4.0.0 aggregate-error: 5.0.0 debug: 4.4.3 @@ -5033,7 +5017,7 @@ snapshots: '@types/conventional-commits-parser@5.0.1': dependencies: - '@types/node': 22.18.6 + '@types/node': 22.18.7 '@types/deep-eql@4.0.2': {} @@ -5041,7 +5025,7 @@ snapshots: '@types/json5@0.0.29': {} - '@types/node@22.18.6': + '@types/node@22.18.7': dependencies: undici-types: 6.21.0 @@ -5189,7 +5173,7 @@ snapshots: '@unrs/resolver-binding-win32-x64-msvc@1.11.1': optional: true - '@vitest/coverage-v8@3.2.4(vitest@3.2.4(@types/node@22.18.6)(jiti@2.6.0)(jsdom@27.0.0(postcss@8.5.6))(yaml@2.8.1))': + '@vitest/coverage-v8@3.2.4(vitest@3.2.4(@types/node@22.18.7)(jiti@2.6.0)(jsdom@27.0.0(postcss@8.5.6))(yaml@2.8.1))': dependencies: '@ampproject/remapping': 2.3.0 '@bcoe/v8-coverage': 1.0.2 @@ -5204,7 +5188,7 @@ snapshots: std-env: 3.9.0 test-exclude: 7.0.1 tinyrainbow: 2.0.0 - vitest: 3.2.4(@types/node@22.18.6)(jiti@2.6.0)(jsdom@27.0.0(postcss@8.5.6))(yaml@2.8.1) + vitest: 3.2.4(@types/node@22.18.7)(jiti@2.6.0)(jsdom@27.0.0(postcss@8.5.6))(yaml@2.8.1) transitivePeerDependencies: - supports-color @@ -5216,13 +5200,13 @@ snapshots: chai: 5.3.3 tinyrainbow: 2.0.0 - '@vitest/mocker@3.2.4(vite@7.1.7(@types/node@22.18.6)(jiti@2.6.0)(yaml@2.8.1))': + '@vitest/mocker@3.2.4(vite@7.1.7(@types/node@22.18.7)(jiti@2.6.0)(yaml@2.8.1))': dependencies: '@vitest/spy': 3.2.4 estree-walker: 3.0.3 magic-string: 0.30.19 optionalDependencies: - vite: 7.1.7(@types/node@22.18.6)(jiti@2.6.0)(yaml@2.8.1) + vite: 7.1.7(@types/node@22.18.7)(jiti@2.6.0)(yaml@2.8.1) '@vitest/pretty-format@3.2.4': dependencies: @@ -5232,7 +5216,7 @@ snapshots: dependencies: '@vitest/utils': 3.2.4 pathe: 2.0.3 - strip-literal: 3.0.0 + strip-literal: 3.1.0 '@vitest/snapshot@3.2.4': dependencies: @@ -5268,7 +5252,7 @@ snapshots: dependencies: prettier: 3.6.2 - '@webdeveric/utils@0.69.0': {} + '@webdeveric/utils@0.72.0': {} JSONStream@1.3.5: dependencies: @@ -5573,13 +5557,11 @@ snapshots: commander@14.0.1: {} - comment-json@4.2.5: + comment-json@4.3.0: dependencies: array-timsort: 1.0.3 core-util-is: 1.0.3 esprima: 4.0.1 - has-own-prop: 2.0.0 - repeat-string: 1.6.1 commitlint-plugin-cspell@0.3.0(@commitlint/lint@20.0.0): dependencies: @@ -5587,9 +5569,9 @@ snapshots: '@commitlint/types': 19.8.1 cspell-lib: 9.2.1 - commitlint@20.0.0(@types/node@22.18.6)(typescript@5.9.2): + commitlint@20.1.0(@types/node@22.18.7)(typescript@5.9.2): dependencies: - '@commitlint/cli': 20.0.0(@types/node@22.18.6)(typescript@5.9.2) + '@commitlint/cli': 20.1.0(@types/node@22.18.7)(typescript@5.9.2) '@commitlint/types': 20.0.0 transitivePeerDependencies: - '@types/node' @@ -5649,9 +5631,9 @@ snapshots: core-util-is@1.0.3: {} - cosmiconfig-typescript-loader@6.1.0(@types/node@22.18.6)(cosmiconfig@9.0.0(typescript@5.9.2))(typescript@5.9.2): + cosmiconfig-typescript-loader@6.1.0(@types/node@22.18.7)(cosmiconfig@9.0.0(typescript@5.9.2))(typescript@5.9.2): dependencies: - '@types/node': 22.18.6 + '@types/node': 22.18.7 cosmiconfig: 9.0.0(typescript@5.9.2) jiti: 2.6.0 typescript: 5.9.2 @@ -5678,7 +5660,7 @@ snapshots: cspell-config-lib@9.2.1: dependencies: '@cspell/cspell-types': 9.2.1 - comment-json: 4.2.5 + comment-json: 4.3.0 smol-toml: 1.4.2 yaml: 2.8.1 @@ -5721,7 +5703,7 @@ snapshots: '@cspell/strong-weak-map': 9.2.1 '@cspell/url': 9.2.1 clear-module: 4.1.2 - comment-json: 4.2.5 + comment-json: 4.3.0 cspell-config-lib: 9.2.1 cspell-dictionary: 9.2.1 cspell-glob: 9.2.1 @@ -6312,6 +6294,8 @@ snapshots: functions-have-names@1.2.3: {} + generator-function@2.0.0: {} + gensequence@7.0.0: {} get-caller-file@2.0.5: {} @@ -6452,8 +6436,6 @@ snapshots: has-flag@4.0.0: {} - has-own-prop@2.0.0: {} - has-property-descriptors@1.0.2: dependencies: es-define-property: 1.0.1 @@ -6630,9 +6612,10 @@ snapshots: dependencies: get-east-asian-width: 1.4.0 - is-generator-function@1.1.0: + is-generator-function@1.1.1: dependencies: call-bound: 1.0.4 + generator-function: 2.0.0 get-proto: 1.0.1 has-tostringtag: 1.0.2 safe-regex-test: 1.1.0 @@ -6839,7 +6822,7 @@ snapshots: lines-and-columns@1.2.4: {} - lint-staged@16.2.1: + lint-staged@16.2.3: dependencies: commander: 14.0.1 listr2: 9.0.4 @@ -7473,8 +7456,6 @@ snapshots: dependencies: '@pnpm/npm-conf': 2.3.1 - repeat-string@1.6.1: {} - require-directory@2.1.1: {} require-from-string@2.0.2: {} @@ -7838,7 +7819,7 @@ snapshots: strip-json-comments@3.1.1: {} - strip-literal@3.0.0: + strip-literal@3.1.0: dependencies: js-tokens: 9.0.1 @@ -8091,21 +8072,21 @@ snapshots: validate-npm-package-name@6.0.2: {} - validate-package-exports@0.13.0: + validate-package-exports@0.14.0: dependencies: '@npmcli/arborist': 9.1.5 - '@webdeveric/utils': 0.69.0 + '@webdeveric/utils': 0.72.0 npm-packlist: 10.0.2 transitivePeerDependencies: - supports-color - vite-node@3.2.4(@types/node@22.18.6)(jiti@2.6.0)(yaml@2.8.1): + vite-node@3.2.4(@types/node@22.18.7)(jiti@2.6.0)(yaml@2.8.1): dependencies: cac: 6.7.14 debug: 4.4.3 es-module-lexer: 1.7.0 pathe: 2.0.3 - vite: 7.1.7(@types/node@22.18.6)(jiti@2.6.0)(yaml@2.8.1) + vite: 7.1.7(@types/node@22.18.7)(jiti@2.6.0)(yaml@2.8.1) transitivePeerDependencies: - '@types/node' - jiti @@ -8120,7 +8101,7 @@ snapshots: - tsx - yaml - vite@7.1.7(@types/node@22.18.6)(jiti@2.6.0)(yaml@2.8.1): + vite@7.1.7(@types/node@22.18.7)(jiti@2.6.0)(yaml@2.8.1): dependencies: esbuild: 0.25.10 fdir: 6.5.0(picomatch@4.0.3) @@ -8129,16 +8110,16 @@ snapshots: rollup: 4.52.3 tinyglobby: 0.2.15 optionalDependencies: - '@types/node': 22.18.6 + '@types/node': 22.18.7 fsevents: 2.3.3 jiti: 2.6.0 yaml: 2.8.1 - vitest@3.2.4(@types/node@22.18.6)(jiti@2.6.0)(jsdom@27.0.0(postcss@8.5.6))(yaml@2.8.1): + vitest@3.2.4(@types/node@22.18.7)(jiti@2.6.0)(jsdom@27.0.0(postcss@8.5.6))(yaml@2.8.1): dependencies: '@types/chai': 5.2.2 '@vitest/expect': 3.2.4 - '@vitest/mocker': 3.2.4(vite@7.1.7(@types/node@22.18.6)(jiti@2.6.0)(yaml@2.8.1)) + '@vitest/mocker': 3.2.4(vite@7.1.7(@types/node@22.18.7)(jiti@2.6.0)(yaml@2.8.1)) '@vitest/pretty-format': 3.2.4 '@vitest/runner': 3.2.4 '@vitest/snapshot': 3.2.4 @@ -8156,11 +8137,11 @@ snapshots: tinyglobby: 0.2.15 tinypool: 1.1.1 tinyrainbow: 2.0.0 - vite: 7.1.7(@types/node@22.18.6)(jiti@2.6.0)(yaml@2.8.1) - vite-node: 3.2.4(@types/node@22.18.6)(jiti@2.6.0)(yaml@2.8.1) + vite: 7.1.7(@types/node@22.18.7)(jiti@2.6.0)(yaml@2.8.1) + vite-node: 3.2.4(@types/node@22.18.7)(jiti@2.6.0)(yaml@2.8.1) why-is-node-running: 2.3.0 optionalDependencies: - '@types/node': 22.18.6 + '@types/node': 22.18.7 jsdom: 27.0.0(postcss@8.5.6) transitivePeerDependencies: - jiti @@ -8215,7 +8196,7 @@ snapshots: is-async-function: 2.1.1 is-date-object: 1.1.0 is-finalizationregistry: 1.1.1 - is-generator-function: 1.1.0 + is-generator-function: 1.1.1 is-regex: 1.2.1 is-weakref: 1.1.1 isarray: 2.0.5 diff --git a/src/predicate/isTimeoutError.ts b/src/predicate/isTimeoutError.ts new file mode 100644 index 0000000..78fe533 --- /dev/null +++ b/src/predicate/isTimeoutError.ts @@ -0,0 +1,4 @@ +import type { TimeoutError } from '../types/errors.js'; + +export const isTimeoutError = (error: unknown): error is TimeoutError => + error instanceof DOMException && error.name === 'TimeoutError'; diff --git a/src/types/errors.ts b/src/types/errors.ts new file mode 100644 index 0000000..a6aeb94 --- /dev/null +++ b/src/types/errors.ts @@ -0,0 +1,3 @@ +export type TimeoutError = DOMException & { + name: 'TimeoutError'; +}; diff --git a/test/predicate/isTimeoutError.test.ts b/test/predicate/isTimeoutError.test.ts new file mode 100644 index 0000000..53f340b --- /dev/null +++ b/test/predicate/isTimeoutError.test.ts @@ -0,0 +1,25 @@ +import { setTimeout } from 'timers/promises'; + +import { describe, it, expect } from 'vitest'; + +import { isTimeoutError } from '../../src/predicate/isTimeoutError.js'; + +describe('isTimeoutError()', () => { + it('should return true for TimeoutError', () => { + const error = new DOMException('The operation timed out.', 'TimeoutError'); + + expect(isTimeoutError(error)).toBe(true); + }); + + it('recognizes timeouts from AbortSignal', async () => { + const signal = AbortSignal.timeout(0); + + await setTimeout(1); + + try { + signal.throwIfAborted(); + } catch (error) { + expect(isTimeoutError(error)).toBe(true); + } + }); +});