diff --git a/bench/isPrimitive.bench.ts b/bench/isPrimitive.bench.ts new file mode 100644 index 0000000..cfa84f4 --- /dev/null +++ b/bench/isPrimitive.bench.ts @@ -0,0 +1,11 @@ +import { bench } from 'vitest'; + +import { isPrimitive } from '../src/predicate/isPrimitive.js'; + +import type { Primitive } from '../src/index.js'; + +const data: Primitive[] = ['string', 1, 1n, true, undefined, Symbol('test'), null]; + +bench('isPrimitive()', () => { + data.forEach(isPrimitive); +}); diff --git a/bench/isPromiseLike.bench.ts b/bench/isPromiseLike.bench.ts index 6714fc1..780075c 100644 --- a/bench/isPromiseLike.bench.ts +++ b/bench/isPromiseLike.bench.ts @@ -5,7 +5,7 @@ import { isObjectWith } from '../src/predicate/isObjectWith.js'; import { isPromiseLike } from '../src/predicate/isPromiseLike.js'; function isPromiseLike2(input: unknown): input is PromiseLike { - return isObjectWith(input, 'then') && isFunction(input.then) && input.then.length === 2; + return isObjectWith(input, ['then']) && isFunction(input.then) && input.then.length === 2; } const resolvedPromise = Promise.resolve(); diff --git a/package.json b/package.json index 53fabdf..5b64ad5 100644 --- a/package.json +++ b/package.json @@ -87,7 +87,7 @@ "devDependencies": { "@commitlint/config-conventional": "^19.8.0", "@commitlint/types": "^19.8.0", - "@types/node": "^22.13.11", + "@types/node": "^22.13.13", "@vitest/coverage-v8": "^3.0.9", "@webdeveric/eslint-config-ts": "^0.11.0", "@webdeveric/prettier-config": "^0.3.0", @@ -106,7 +106,7 @@ "rimraf": "^6.0.1", "semantic-release": "^24.2.3", "typescript": "^5.8.2", - "validate-package-exports": "^0.8.0", + "validate-package-exports": "^0.9.0", "vitest": "^3.0.9" }, "pnpm": { diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index d346a6f..1e8e13f 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -15,11 +15,11 @@ importers: specifier: ^19.8.0 version: 19.8.0 '@types/node': - specifier: ^22.13.11 - version: 22.13.11 + specifier: ^22.13.13 + version: 22.13.13 '@vitest/coverage-v8': specifier: ^3.0.9 - version: 3.0.9(vitest@3.0.9(@types/node@22.13.11)(jiti@2.4.2)(jsdom@26.0.0)(yaml@2.7.0)) + version: 3.0.9(vitest@3.0.9(@types/node@22.13.13)(jiti@2.4.2)(jsdom@26.0.0)(yaml@2.7.0)) '@webdeveric/eslint-config-ts': specifier: ^0.11.0 version: 0.11.0(eslint@8.57.1)(typescript@5.8.2) @@ -28,7 +28,7 @@ importers: version: 0.3.0(prettier@3.5.3) commitlint: specifier: ^19.8.0 - version: 19.8.0(@types/node@22.13.11)(typescript@5.8.2) + version: 19.8.0(@types/node@22.13.13)(typescript@5.8.2) commitlint-plugin-cspell: specifier: ^0.1.1 version: 0.1.1(@commitlint/lint@19.8.0) @@ -72,11 +72,11 @@ importers: specifier: ^5.8.2 version: 5.8.2 validate-package-exports: - specifier: ^0.8.0 - version: 0.8.0 + specifier: ^0.9.0 + version: 0.9.0 vitest: specifier: ^3.0.9 - version: 3.0.9(@types/node@22.13.11)(jiti@2.4.2)(jsdom@26.0.0)(yaml@2.7.0) + version: 3.0.9(@types/node@22.13.13)(jiti@2.4.2)(jsdom@26.0.0)(yaml@2.7.0) packages: @@ -99,13 +99,13 @@ packages: resolution: {integrity: sha512-Ed61U6XJc3CVRfkERJWDz4dJwKe7iLmmJsbOGu9wSloNSFttHV0I8g6UAgb7qnK5ly5bGLPd4oXZlxCdANBOWQ==} engines: {node: '>=6.9.0'} - '@babel/parser@7.26.10': - resolution: {integrity: sha512-6aQR2zGE/QFi8JpDLjUZEPYOs7+mhKXm86VaKFiLP35JQwQb6bwUE+XbvkH0EptsYhbNBSUGaUBLKqxH1xSgsA==} + '@babel/parser@7.27.0': + resolution: {integrity: sha512-iaepho73/2Pz7w2eMS0Q5f83+0RKI7i4xmiYeBmDzfRVbQtTOG7Ts0S4HzJVsTMGI9keU8rNfuZr8DKfSt7Yyg==} engines: {node: '>=6.0.0'} hasBin: true - '@babel/types@7.26.10': - resolution: {integrity: sha512-emqcG3vHrpxUKTrxcblR36dcrcoRDvKmnL/dCL6ZsHaShW80qxCAcNhzQZrpeM765VzEos+xOi4s+r4IXzTwdQ==} + '@babel/types@7.27.0': + resolution: {integrity: sha512-H45s8fVLYjbhFH62dIJ3WtmJ6RSPt/3DRO0ZcT2SUiYiQyz3BLVb9ADEnLl91m74aQPS3AzzeajZHYOalWe3bg==} engines: {node: '>=6.9.0'} '@bcoe/v8-coverage@1.0.2': @@ -678,9 +678,9 @@ packages: resolution: {integrity: sha512-S79NdEgDQd/NGCay6TCoVzXSj74skRZIKJcpJjC5lOq34SZzyI6MqtiiWoiVWoVrTcGjNeC4ipbh1VIHlpfF5Q==} engines: {node: ^18.17.0 || >=20.5.0} - '@npmcli/arborist@8.0.0': - resolution: {integrity: sha512-APDXxtXGSftyXibl0dZ3CuZYmmVnkiN3+gkqwXshY4GKC2rof2+Lg0sGuj6H1p2YfBAKd7PRwuMVhu6Pf/nQ/A==} - engines: {node: ^18.17.0 || >=20.5.0} + '@npmcli/arborist@9.0.1': + resolution: {integrity: sha512-m00iV8hgbmli0IMf4Os+UmEq5JRTgqOHR+x5h07O7mO/60q5hLaYwZUMamJ73wlMG68c3WB8ZloOxON/knF5vg==} + engines: {node: ^20.17.0 || >=22.9.0} hasBin: true '@npmcli/fs@4.0.0': @@ -700,9 +700,9 @@ packages: resolution: {integrity: sha512-mnuMuibEbkaBTYj9HQ3dMe6L0ylYW+s/gfz7tBDMFY/la0w9Kf44P9aLn4/+/t3aTR3YUHKoT6XQL9rlicIe3Q==} engines: {node: ^18.17.0 || >=20.5.0} - '@npmcli/metavuln-calculator@8.0.1': - resolution: {integrity: sha512-WXlJx9cz3CfHSt9W9Opi1PTFc4WZLFomm5O8wekxQZmkyljrBRwATwDxfC9iOXJwYVmfiW1C1dUe0W2aN0UrSg==} - engines: {node: ^18.17.0 || >=20.5.0} + '@npmcli/metavuln-calculator@9.0.0': + resolution: {integrity: sha512-znLKqdy1ZEGNK3VB9j/RzGyb/P0BJb3fGpvEbHIAyBAXsps2l1ce8SVHfsGAFLl9s8072PxafqTn7RC8wSnQPg==} + engines: {node: ^20.17.0 || >=22.9.0} '@npmcli/name-from-folder@3.0.0': resolution: {integrity: sha512-61cDL8LUc9y80fXn+lir+iVt8IS0xHqEKwPu/5jCjxQTVoSCmkXvw4vbMrzAMtmghz3/AkiBjhHkDKUH+kf7kA==} @@ -796,98 +796,103 @@ packages: resolution: {integrity: sha512-c83qWb22rNRuB0UaVCI0uRPNRr8Z0FWnEIvT47jiHAmOIUHbBOg5XvV7pM5x+rKn9HRpjxquDbXYSXr3fAKFcw==} engines: {node: '>=12'} - '@rollup/rollup-android-arm-eabi@4.36.0': - resolution: {integrity: sha512-jgrXjjcEwN6XpZXL0HUeOVGfjXhPyxAbbhD0BlXUB+abTOpbPiN5Wb3kOT7yb+uEtATNYF5x5gIfwutmuBA26w==} + '@rollup/rollup-android-arm-eabi@4.37.0': + resolution: {integrity: sha512-l7StVw6WAa8l3vA1ov80jyetOAEo1FtHvZDbzXDO/02Sq/QVvqlHkYoFwDJPIMj0GKiistsBudfx5tGFnwYWDQ==} cpu: [arm] os: [android] - '@rollup/rollup-android-arm64@4.36.0': - resolution: {integrity: sha512-NyfuLvdPdNUfUNeYKUwPwKsE5SXa2J6bCt2LdB/N+AxShnkpiczi3tcLJrm5mA+eqpy0HmaIY9F6XCa32N5yzg==} + '@rollup/rollup-android-arm64@4.37.0': + resolution: {integrity: sha512-6U3SlVyMxezt8Y+/iEBcbp945uZjJwjZimu76xoG7tO1av9VO691z8PkhzQ85ith2I8R2RddEPeSfcbyPfD4hA==} cpu: [arm64] os: [android] - '@rollup/rollup-darwin-arm64@4.36.0': - resolution: {integrity: sha512-JQ1Jk5G4bGrD4pWJQzWsD8I1n1mgPXq33+/vP4sk8j/z/C2siRuxZtaUA7yMTf71TCZTZl/4e1bfzwUmFb3+rw==} + '@rollup/rollup-darwin-arm64@4.37.0': + resolution: {integrity: sha512-+iTQ5YHuGmPt10NTzEyMPbayiNTcOZDWsbxZYR1ZnmLnZxG17ivrPSWFO9j6GalY0+gV3Jtwrrs12DBscxnlYA==} cpu: [arm64] os: [darwin] - '@rollup/rollup-darwin-x64@4.36.0': - resolution: {integrity: sha512-6c6wMZa1lrtiRsbDziCmjE53YbTkxMYhhnWnSW8R/yqsM7a6mSJ3uAVT0t8Y/DGt7gxUWYuFM4bwWk9XCJrFKA==} + '@rollup/rollup-darwin-x64@4.37.0': + resolution: {integrity: sha512-m8W2UbxLDcmRKVjgl5J/k4B8d7qX2EcJve3Sut7YGrQoPtCIQGPH5AMzuFvYRWZi0FVS0zEY4c8uttPfX6bwYQ==} cpu: [x64] os: [darwin] - '@rollup/rollup-freebsd-arm64@4.36.0': - resolution: {integrity: sha512-KXVsijKeJXOl8QzXTsA+sHVDsFOmMCdBRgFmBb+mfEb/7geR7+C8ypAml4fquUt14ZyVXaw2o1FWhqAfOvA4sg==} + '@rollup/rollup-freebsd-arm64@4.37.0': + resolution: {integrity: sha512-FOMXGmH15OmtQWEt174v9P1JqqhlgYge/bUjIbiVD1nI1NeJ30HYT9SJlZMqdo1uQFyt9cz748F1BHghWaDnVA==} cpu: [arm64] os: [freebsd] - '@rollup/rollup-freebsd-x64@4.36.0': - resolution: {integrity: sha512-dVeWq1ebbvByI+ndz4IJcD4a09RJgRYmLccwlQ8bPd4olz3Y213uf1iwvc7ZaxNn2ab7bjc08PrtBgMu6nb4pQ==} + '@rollup/rollup-freebsd-x64@4.37.0': + resolution: {integrity: sha512-SZMxNttjPKvV14Hjck5t70xS3l63sbVwl98g3FlVVx2YIDmfUIy29jQrsw06ewEYQ8lQSuY9mpAPlmgRD2iSsA==} cpu: [x64] os: [freebsd] - '@rollup/rollup-linux-arm-gnueabihf@4.36.0': - resolution: {integrity: sha512-bvXVU42mOVcF4le6XSjscdXjqx8okv4n5vmwgzcmtvFdifQ5U4dXFYaCB87namDRKlUL9ybVtLQ9ztnawaSzvg==} + '@rollup/rollup-linux-arm-gnueabihf@4.37.0': + resolution: {integrity: sha512-hhAALKJPidCwZcj+g+iN+38SIOkhK2a9bqtJR+EtyxrKKSt1ynCBeqrQy31z0oWU6thRZzdx53hVgEbRkuI19w==} cpu: [arm] os: [linux] - '@rollup/rollup-linux-arm-musleabihf@4.36.0': - resolution: {integrity: sha512-JFIQrDJYrxOnyDQGYkqnNBtjDwTgbasdbUiQvcU8JmGDfValfH1lNpng+4FWlhaVIR4KPkeddYjsVVbmJYvDcg==} + '@rollup/rollup-linux-arm-musleabihf@4.37.0': + resolution: {integrity: sha512-jUb/kmn/Gd8epbHKEqkRAxq5c2EwRt0DqhSGWjPFxLeFvldFdHQs/n8lQ9x85oAeVb6bHcS8irhTJX2FCOd8Ag==} cpu: [arm] os: [linux] - '@rollup/rollup-linux-arm64-gnu@4.36.0': - resolution: {integrity: sha512-KqjYVh3oM1bj//5X7k79PSCZ6CvaVzb7Qs7VMWS+SlWB5M8p3FqufLP9VNp4CazJ0CsPDLwVD9r3vX7Ci4J56A==} + '@rollup/rollup-linux-arm64-gnu@4.37.0': + resolution: {integrity: sha512-oNrJxcQT9IcbcmKlkF+Yz2tmOxZgG9D9GRq+1OE6XCQwCVwxixYAa38Z8qqPzQvzt1FCfmrHX03E0pWoXm1DqA==} cpu: [arm64] os: [linux] - '@rollup/rollup-linux-arm64-musl@4.36.0': - resolution: {integrity: sha512-QiGnhScND+mAAtfHqeT+cB1S9yFnNQ/EwCg5yE3MzoaZZnIV0RV9O5alJAoJKX/sBONVKeZdMfO8QSaWEygMhw==} + '@rollup/rollup-linux-arm64-musl@4.37.0': + resolution: {integrity: sha512-pfxLBMls+28Ey2enpX3JvjEjaJMBX5XlPCZNGxj4kdJyHduPBXtxYeb8alo0a7bqOoWZW2uKynhHxF/MWoHaGQ==} cpu: [arm64] os: [linux] - '@rollup/rollup-linux-loongarch64-gnu@4.36.0': - resolution: {integrity: sha512-1ZPyEDWF8phd4FQtTzMh8FQwqzvIjLsl6/84gzUxnMNFBtExBtpL51H67mV9xipuxl1AEAerRBgBwFNpkw8+Lg==} + '@rollup/rollup-linux-loongarch64-gnu@4.37.0': + resolution: {integrity: sha512-yCE0NnutTC/7IGUq/PUHmoeZbIwq3KRh02e9SfFh7Vmc1Z7atuJRYWhRME5fKgT8aS20mwi1RyChA23qSyRGpA==} cpu: [loong64] os: [linux] - '@rollup/rollup-linux-powerpc64le-gnu@4.36.0': - resolution: {integrity: sha512-VMPMEIUpPFKpPI9GZMhJrtu8rxnp6mJR3ZzQPykq4xc2GmdHj3Q4cA+7avMyegXy4n1v+Qynr9fR88BmyO74tg==} + '@rollup/rollup-linux-powerpc64le-gnu@4.37.0': + resolution: {integrity: sha512-NxcICptHk06E2Lh3a4Pu+2PEdZ6ahNHuK7o6Np9zcWkrBMuv21j10SQDJW3C9Yf/A/P7cutWoC/DptNLVsZ0VQ==} cpu: [ppc64] os: [linux] - '@rollup/rollup-linux-riscv64-gnu@4.36.0': - resolution: {integrity: sha512-ttE6ayb/kHwNRJGYLpuAvB7SMtOeQnVXEIpMtAvx3kepFQeowVED0n1K9nAdraHUPJ5hydEMxBpIR7o4nrm8uA==} + '@rollup/rollup-linux-riscv64-gnu@4.37.0': + resolution: {integrity: sha512-PpWwHMPCVpFZLTfLq7EWJWvrmEuLdGn1GMYcm5MV7PaRgwCEYJAwiN94uBuZev0/J/hFIIJCsYw4nLmXA9J7Pw==} + cpu: [riscv64] + os: [linux] + + '@rollup/rollup-linux-riscv64-musl@4.37.0': + resolution: {integrity: sha512-DTNwl6a3CfhGTAOYZ4KtYbdS8b+275LSLqJVJIrPa5/JuIufWWZ/QFvkxp52gpmguN95eujrM68ZG+zVxa8zHA==} cpu: [riscv64] os: [linux] - '@rollup/rollup-linux-s390x-gnu@4.36.0': - resolution: {integrity: sha512-4a5gf2jpS0AIe7uBjxDeUMNcFmaRTbNv7NxI5xOCs4lhzsVyGR/0qBXduPnoWf6dGC365saTiwag8hP1imTgag==} + '@rollup/rollup-linux-s390x-gnu@4.37.0': + resolution: {integrity: sha512-hZDDU5fgWvDdHFuExN1gBOhCuzo/8TMpidfOR+1cPZJflcEzXdCy1LjnklQdW8/Et9sryOPJAKAQRw8Jq7Tg+A==} cpu: [s390x] os: [linux] - '@rollup/rollup-linux-x64-gnu@4.36.0': - resolution: {integrity: sha512-5KtoW8UWmwFKQ96aQL3LlRXX16IMwyzMq/jSSVIIyAANiE1doaQsx/KRyhAvpHlPjPiSU/AYX/8m+lQ9VToxFQ==} + '@rollup/rollup-linux-x64-gnu@4.37.0': + resolution: {integrity: sha512-pKivGpgJM5g8dwj0ywBwe/HeVAUSuVVJhUTa/URXjxvoyTT/AxsLTAbkHkDHG7qQxLoW2s3apEIl26uUe08LVQ==} cpu: [x64] os: [linux] - '@rollup/rollup-linux-x64-musl@4.36.0': - resolution: {integrity: sha512-sycrYZPrv2ag4OCvaN5js+f01eoZ2U+RmT5as8vhxiFz+kxwlHrsxOwKPSA8WyS+Wc6Epid9QeI/IkQ9NkgYyQ==} + '@rollup/rollup-linux-x64-musl@4.37.0': + resolution: {integrity: sha512-E2lPrLKE8sQbY/2bEkVTGDEk4/49UYRVWgj90MY8yPjpnGBQ+Xi1Qnr7b7UIWw1NOggdFQFOLZ8+5CzCiz143w==} cpu: [x64] os: [linux] - '@rollup/rollup-win32-arm64-msvc@4.36.0': - resolution: {integrity: sha512-qbqt4N7tokFwwSVlWDsjfoHgviS3n/vZ8LK0h1uLG9TYIRuUTJC88E1xb3LM2iqZ/WTqNQjYrtmtGmrmmawB6A==} + '@rollup/rollup-win32-arm64-msvc@4.37.0': + resolution: {integrity: sha512-Jm7biMazjNzTU4PrQtr7VS8ibeys9Pn29/1bm4ph7CP2kf21950LgN+BaE2mJ1QujnvOc6p54eWWiVvn05SOBg==} cpu: [arm64] os: [win32] - '@rollup/rollup-win32-ia32-msvc@4.36.0': - resolution: {integrity: sha512-t+RY0JuRamIocMuQcfwYSOkmdX9dtkr1PbhKW42AMvaDQa+jOdpUYysroTF/nuPpAaQMWp7ye+ndlmmthieJrQ==} + '@rollup/rollup-win32-ia32-msvc@4.37.0': + resolution: {integrity: sha512-e3/1SFm1OjefWICB2Ucstg2dxYDkDTZGDYgwufcbsxTHyqQps1UQf33dFEChBNmeSsTOyrjw2JJq0zbG5GF6RA==} cpu: [ia32] os: [win32] - '@rollup/rollup-win32-x64-msvc@4.36.0': - resolution: {integrity: sha512-aRXd7tRZkWLqGbChgcMMDEHjOKudo1kChb1Jt1IfR8cY/KIpgNviLeJy5FUb9IpSuQj8dU2fAYNMPW/hLKOSTw==} + '@rollup/rollup-win32-x64-msvc@4.37.0': + resolution: {integrity: sha512-LWbXUBwn/bcLx2sSsqy7pK5o+Nr+VCoRoAohfJ5C/aBio9nfJmGQqHAhU6pwxV/RmyTk5AqdySma7uwWGlmeuA==} cpu: [x64] os: [win32] @@ -978,11 +983,14 @@ packages: '@types/estree@1.0.6': resolution: {integrity: sha512-AYnb1nQyY49te+VRAVgmzfcgjYS91mY5P0TKUDCLEM+gNnA+3T6rWITXRLYCpahpqSQbN5cE+gHpnPyXjHWxcw==} + '@types/estree@1.0.7': + resolution: {integrity: sha512-w28IoSUCJpidD/TGviZwwMJckNESJZXFu7NBZ5YJ4mEUnNraUn9Pm8HSZm/jDF1pDWYKspWE7oVphigUPRakIQ==} + '@types/json5@0.0.29': resolution: {integrity: sha512-dRLjCWHYg4oaA77cxO64oO+7JwCwnIzkZPdrrC71jQmQtlhM556pwKo5bUzqvZndkVbeFLIIi+9TC40JNF5hNQ==} - '@types/node@22.13.11': - resolution: {integrity: sha512-iEUCUJoU0i3VnrCmgoWCXttklWcvoCIx4jzcP22fioIVSdTmjgoEvmAO/QPw6TcS9k5FrNgn4w7q5lGOd1CT5g==} + '@types/node@22.13.13': + resolution: {integrity: sha512-ClsL5nMwKaBRwPcCvH8E7+nU4GxHVx1axNvMZTFHMEfNI7oahimt26P5zjVCRrjiIWj6YFXfE1v3dEp94wLcGQ==} '@types/normalize-package-data@2.4.4': resolution: {integrity: sha512-37i+OaWTh9qeK4LSHPsyRC7NahnGotNuZvjLSgcPzblpHB3rrCJxAOgI5gCdKm7coonsaX1Of0ILiTcnZjbfxA==} @@ -1157,8 +1165,8 @@ packages: peerDependencies: prettier: '>=2.4.0' - '@webdeveric/utils@0.40.0': - resolution: {integrity: sha512-uVk54jaZUxwQSti92tfIguZp/ppV4Adg3/MsHg6xGIXvT7FOUWMH2KfO6UlEpcBvb3DDRUGXrRGIJWqWXR9b6Q==} + '@webdeveric/utils@0.56.0': + resolution: {integrity: sha512-PSPPuslk4eRVPbafOIyhfBOM7fTprXt9mettpv44n4D9RfBK5CCJemguHLrg9py7NbuUUX3JE+0FtBKGNX0PZw==} engines: {node: '>=18.0.0'} JSONStream@1.3.5: @@ -2597,8 +2605,8 @@ packages: lru-cache@10.4.3: resolution: {integrity: sha512-JNAzZcXrCt42VGLuYz0zfAzDfAvJWW6AfYlDBQyDV5DClI2m5sAmK+OIO7s59XfsRsWHp02jAJrRadPRGTt6SQ==} - lru-cache@11.0.2: - resolution: {integrity: sha512-123qHRfJBmo2jXDbo/a5YOQrJoHF/GNQTLzQ5+IdK5pWpceK17yRc6ozlWd25FxvGKQbIUs91fDFkXmDHTKcyA==} + lru-cache@11.1.0: + resolution: {integrity: sha512-QIXZUBJUx+2zHUdQujWejBkcD9+cs94tLn0+YL8UrCh+D5sCXZ4c7LaEH48pNwRY3MLDgqUFyhlCyjJPf1WP0A==} engines: {node: 20 || >=22} magic-string@0.30.17: @@ -2800,10 +2808,6 @@ packages: resolution: {integrity: sha512-rht9U6nS8WOBDc53eipZNPo5qkAV4X2rhKE2Oj1DYUQ3DieXfj0mKkVmjnf3iuNdtMd8WfLdi2L6ASkD/8a+Kg==} engines: {node: ^20.17.0 || >=22.9.0} - npm-packlist@9.0.0: - resolution: {integrity: sha512-8qSayfmHJQTx3nJWYbbUmflpyarbLMBc6LCAjYsiGtXxDB68HaZpb8re6zeaLGxZzDuMdhsg70jryJe+RrItVQ==} - engines: {node: ^18.17.0 || >=20.5.0} - npm-pick-manifest@10.0.0: resolution: {integrity: sha512-r4fFa4FqYY8xaM7fHecQ9Z2nE9hgNfJR+EmoKv0+chvzWkBcORX3r0FpTByP+CbOVJDladMXnPQGVN8PBLGuTQ==} engines: {node: ^18.17.0 || >=20.5.0} @@ -2995,14 +2999,9 @@ packages: package-json-from-dist@1.0.1: resolution: {integrity: sha512-UEZIS3/by4OC8vL3P2dTXRETpebLI2NiI5vIrjaD/5UtrkFX/tNbwjTSRAGC/+7CAo2pIcBaRgWmcBBHcsaCIw==} - pacote@19.0.1: - resolution: {integrity: sha512-zIpxWAsr/BvhrkSruspG8aqCQUUrWtpwx0GjiRZQhEM/pZXrigA32ElN3vTcCPUDOFmHr6SFxwYrvVUs5NTEUg==} - engines: {node: ^18.17.0 || >=20.5.0} - hasBin: true - - pacote@20.0.0: - resolution: {integrity: sha512-pRjC5UFwZCgx9kUFDVM9YEahv4guZ1nSLqwmWiLUnDbGsjs+U5w7z6Uc8HNR1a6x8qnu5y9xtGE6D1uAuYz+0A==} - engines: {node: ^18.17.0 || >=20.5.0} + pacote@21.0.0: + resolution: {integrity: sha512-lcqexq73AMv6QNLo7SOpz0JJoaGdS3rBFgF122NZVl1bApo2mfu+XzUBU/X/XsiJu+iUmKpekRayqQYAs+PhkA==} + engines: {node: ^20.17.0 || >=22.9.0} hasBin: true parent-module@1.0.1: @@ -3267,8 +3266,8 @@ packages: engines: {node: 20 || >=22} hasBin: true - rollup@4.36.0: - resolution: {integrity: sha512-zwATAXNQxUcd40zgtQG0ZafcRK4g004WtEl7kbuhTWPvf07PsfohXl39jVUvPF7jvNAIkKPQ2XrsDlWuxBd++Q==} + rollup@4.37.0: + resolution: {integrity: sha512-iAtQy/L4QFU+rTJ1YUjXqJOJzuwEghqWzCEYD2FEghT7Gsy1VdABntrO4CLopA5IkflTyqNiLNwPcOJ3S7UKLg==} engines: {node: '>=18.0.0', npm: '>=8.0.0'} hasBin: true @@ -3605,11 +3604,11 @@ packages: resolution: {integrity: sha512-n1cw8k1k0x4pgA2+9XrOkFydTerNcJ1zWCO5Nn9scWHTD+5tp8dghT2x1uduQePZTZgd3Tupf+x9BxJjeJi77Q==} engines: {node: '>=14.0.0'} - tldts-core@6.1.84: - resolution: {integrity: sha512-NaQa1W76W2aCGjXybvnMYzGSM4x8fvG2AN/pla7qxcg0ZHbooOPhA8kctmOZUDfZyhDL27OGNbwAeig8P4p1vg==} + tldts-core@6.1.85: + resolution: {integrity: sha512-DTjUVvxckL1fIoPSb3KE7ISNtkWSawZdpfxGxwiIrZoO6EbHVDXXUIlIuWympPaeS+BLGyggozX/HTMsRAdsoA==} - tldts@6.1.84: - resolution: {integrity: sha512-aRGIbCIF3teodtUFAYSdQONVmDRy21REM3o6JnqWn5ZkQBJJ4gHxhw6OfwQ+WkSAi3ASamrS4N4nyazWx6uTYg==} + tldts@6.1.85: + resolution: {integrity: sha512-gBdZ1RjCSevRPFix/hpaUWeak2/RNUZB4/8frF1r5uYMHjFptkiT0JXIebWvgI/0ZHXvxaUDDJshiA0j6GdL3w==} hasBin: true to-regex-range@5.0.1: @@ -3664,8 +3663,8 @@ packages: resolution: {integrity: sha512-RAH822pAdBgcNMAfWnCBU3CFZcfZ/i1eZjwFU/dsLKumyuuP3niueg2UAukXYF0E2AAoc82ZSSf9J0WQBinzHA==} engines: {node: '>=12.20'} - type-fest@4.37.0: - resolution: {integrity: sha512-S/5/0kFftkq27FPNye0XM1e2NsnoD/3FS+pBmbjmmtLT6I+i344KoOf7pvXreaFsDamWeaJX55nczA1m5PsBDg==} + type-fest@4.38.0: + resolution: {integrity: sha512-2dBz5D5ycHIoliLYLi0Q2V7KRaDlH0uWIvmk7TYlAg5slqwiPv1ezJdZm1QEM0xgk29oYWMCbIG7E6gHpvChlg==} engines: {node: '>=16'} typed-array-buffer@1.0.3: @@ -3749,8 +3748,8 @@ packages: resolution: {integrity: sha512-d7KLgL1LD3U3fgnvWEY1cQXoO/q6EQ1BSz48Sa149V/5zVTAbgmZIpyI8TRi6U9/JNyeYLlTKsEMPtLC27RFUg==} engines: {node: ^18.17.0 || >=20.5.0} - validate-package-exports@0.8.0: - resolution: {integrity: sha512-MLc8INDlV5E7hRtPB8D7x6gnhC1iSqhOUoDbgiTvyhPU9h/f9gg5feAYgidtHOIQJW5qKwZqgeU58XZu7HLKZw==} + validate-package-exports@0.9.0: + resolution: {integrity: sha512-RwUlxGEn/IlqKafowO5HRX6mrCr6vCAAaKV4rM4nOhhkOySugIEK+LvPW7XFwEmrxsI/3YEFZJyKjjYmw26ssQ==} engines: {node: '>=20.17.0'} hasBin: true @@ -3759,8 +3758,8 @@ packages: engines: {node: ^18.0.0 || ^20.0.0 || >=22.0.0} hasBin: true - vite@6.2.2: - resolution: {integrity: sha512-yW7PeMM+LkDzc7CgJuRLMW2Jz0FxMOsVJ8Lv3gpgW9WLcb9cTW+121UEr1hvmfR7w3SegR5ItvYyzVz1vxNJgQ==} + vite@6.2.3: + resolution: {integrity: sha512-IzwM54g4y9JA/xAeBPNaDXiBF8Jsgl3VBQ2YQ/wOY6fyW3xMdSoltIV3Bo59DErdqdE6RxUfv8W69DvUorE4Eg==} engines: {node: ^18.0.0 || ^20.0.0 || >=22.0.0} hasBin: true peerDependencies: @@ -3837,8 +3836,9 @@ packages: resolution: {integrity: sha512-o8qghlI8NZHU1lLPrpi2+Uq7abh4GGPpYANlalzWxyWteJOCsr/P+oPBA49TOLu5FTZO4d3F9MnWJfiMo4BkmA==} engines: {node: '>=18'} - walk-up-path@3.0.1: - resolution: {integrity: sha512-9YlCL/ynK3CTlrSRrDxZvUauLzAswPCrsaCgilqFevUYpeEW0/3ScEjaa3kbW/T0ghhkEr7mv+fpjqn1Y1YuTA==} + walk-up-path@4.0.0: + resolution: {integrity: sha512-3hu+tD8YzSLGuFYtPRb48vdhKMi0KQV5sn+uWr8+7dMEq/2G/dtLrdDinkLjqq5TIbIBjYJ4Ax/n3YiaW7QM8A==} + engines: {node: 20 || >=22} webidl-conversions@7.0.0: resolution: {integrity: sha512-VwddBukDzu71offAQR975unBIGqfKZpM+8ZX6ySk8nYhVoo5CYaZyzt3YBvYtRtO+aoGlqxPg/B87NGVZ/fu6g==} @@ -3976,8 +3976,8 @@ packages: resolution: {integrity: sha512-rVksvsnNCdJ/ohGc6xgPwyN8eheCxsiLM8mxuE/t/mOVqJewPuO1miLpTHQiRgTKCLexL4MeAFVagts7HmNZ2Q==} engines: {node: '>=10'} - yocto-queue@1.2.0: - resolution: {integrity: sha512-KHBC7z61OJeaMGnF3wqNZj+GGNXOyypZviiKpQeiHirG5Ib1ImwcLBH70rbMSkKfSmUNBsdf2PwaEJtKvgmkNw==} + yocto-queue@1.2.1: + resolution: {integrity: sha512-AyeEbWOu/TAXdxlV9wmGcR0+yh2j3vYPGOECcIj2S7MkrLyC7ne+oye2BKTItt0ii2PHk4cDy+95+LshzbXnGg==} engines: {node: '>=12.20'} yoctocolors@2.1.1: @@ -4009,11 +4009,11 @@ snapshots: '@babel/helper-validator-identifier@7.25.9': {} - '@babel/parser@7.26.10': + '@babel/parser@7.27.0': dependencies: - '@babel/types': 7.26.10 + '@babel/types': 7.27.0 - '@babel/types@7.26.10': + '@babel/types@7.27.0': dependencies: '@babel/helper-string-parser': 7.25.9 '@babel/helper-validator-identifier': 7.25.9 @@ -4023,11 +4023,11 @@ snapshots: '@colors/colors@1.5.0': optional: true - '@commitlint/cli@19.8.0(@types/node@22.13.11)(typescript@5.8.2)': + '@commitlint/cli@19.8.0(@types/node@22.13.13)(typescript@5.8.2)': dependencies: '@commitlint/format': 19.8.0 '@commitlint/lint': 19.8.0 - '@commitlint/load': 19.8.0(@types/node@22.13.11)(typescript@5.8.2) + '@commitlint/load': 19.8.0(@types/node@22.13.13)(typescript@5.8.2) '@commitlint/read': 19.8.0 '@commitlint/types': 19.8.0 tinyexec: 0.3.2 @@ -4074,7 +4074,7 @@ snapshots: '@commitlint/rules': 19.8.0 '@commitlint/types': 19.8.0 - '@commitlint/load@19.8.0(@types/node@22.13.11)(typescript@5.8.2)': + '@commitlint/load@19.8.0(@types/node@22.13.13)(typescript@5.8.2)': dependencies: '@commitlint/config-validator': 19.8.0 '@commitlint/execute-rule': 19.8.0 @@ -4082,7 +4082,7 @@ snapshots: '@commitlint/types': 19.8.0 chalk: 5.4.1 cosmiconfig: 9.0.0(typescript@5.8.2) - cosmiconfig-typescript-loader: 6.1.0(@types/node@22.13.11)(cosmiconfig@9.0.0(typescript@5.8.2))(typescript@5.8.2) + cosmiconfig-typescript-loader: 6.1.0(@types/node@22.13.13)(cosmiconfig@9.0.0(typescript@5.8.2))(typescript@5.8.2) lodash.isplainobject: 4.0.6 lodash.merge: 4.6.2 lodash.uniq: 4.5.0 @@ -4555,13 +4555,13 @@ snapshots: transitivePeerDependencies: - supports-color - '@npmcli/arborist@8.0.0': + '@npmcli/arborist@9.0.1': dependencies: '@isaacs/string-locale-compare': 1.1.0 '@npmcli/fs': 4.0.0 '@npmcli/installed-package-contents': 3.0.0 '@npmcli/map-workspaces': 4.0.2 - '@npmcli/metavuln-calculator': 8.0.1 + '@npmcli/metavuln-calculator': 9.0.0 '@npmcli/name-from-folder': 3.0.0 '@npmcli/node-gyp': 4.0.0 '@npmcli/package-json': 6.1.1 @@ -4572,7 +4572,6 @@ snapshots: cacache: 19.0.1 common-ancestor-path: 1.0.1 hosted-git-info: 8.0.2 - json-parse-even-better-errors: 4.0.0 json-stringify-nice: 1.1.4 lru-cache: 10.4.3 minimatch: 9.0.5 @@ -4581,7 +4580,7 @@ snapshots: npm-package-arg: 12.0.2 npm-pick-manifest: 10.0.0 npm-registry-fetch: 18.0.2 - pacote: 19.0.1 + pacote: 21.0.0 parse-conflict-json: 4.0.0 proc-log: 5.0.0 proggy: 3.0.0 @@ -4591,7 +4590,7 @@ snapshots: semver: 7.7.1 ssri: 12.0.0 treeverse: 3.0.0 - walk-up-path: 3.0.1 + walk-up-path: 4.0.0 transitivePeerDependencies: - supports-color @@ -4622,11 +4621,11 @@ snapshots: glob: 10.4.5 minimatch: 9.0.5 - '@npmcli/metavuln-calculator@8.0.1': + '@npmcli/metavuln-calculator@9.0.0': dependencies: cacache: 19.0.1 json-parse-even-better-errors: 4.0.0 - pacote: 20.0.0 + pacote: 21.0.0 proc-log: 5.0.0 semver: 7.7.1 transitivePeerDependencies: @@ -4741,61 +4740,64 @@ snapshots: '@pnpm/network.ca-file': 1.0.2 config-chain: 1.1.13 - '@rollup/rollup-android-arm-eabi@4.36.0': + '@rollup/rollup-android-arm-eabi@4.37.0': optional: true - '@rollup/rollup-android-arm64@4.36.0': + '@rollup/rollup-android-arm64@4.37.0': optional: true - '@rollup/rollup-darwin-arm64@4.36.0': + '@rollup/rollup-darwin-arm64@4.37.0': optional: true - '@rollup/rollup-darwin-x64@4.36.0': + '@rollup/rollup-darwin-x64@4.37.0': optional: true - '@rollup/rollup-freebsd-arm64@4.36.0': + '@rollup/rollup-freebsd-arm64@4.37.0': optional: true - '@rollup/rollup-freebsd-x64@4.36.0': + '@rollup/rollup-freebsd-x64@4.37.0': optional: true - '@rollup/rollup-linux-arm-gnueabihf@4.36.0': + '@rollup/rollup-linux-arm-gnueabihf@4.37.0': optional: true - '@rollup/rollup-linux-arm-musleabihf@4.36.0': + '@rollup/rollup-linux-arm-musleabihf@4.37.0': optional: true - '@rollup/rollup-linux-arm64-gnu@4.36.0': + '@rollup/rollup-linux-arm64-gnu@4.37.0': optional: true - '@rollup/rollup-linux-arm64-musl@4.36.0': + '@rollup/rollup-linux-arm64-musl@4.37.0': optional: true - '@rollup/rollup-linux-loongarch64-gnu@4.36.0': + '@rollup/rollup-linux-loongarch64-gnu@4.37.0': optional: true - '@rollup/rollup-linux-powerpc64le-gnu@4.36.0': + '@rollup/rollup-linux-powerpc64le-gnu@4.37.0': optional: true - '@rollup/rollup-linux-riscv64-gnu@4.36.0': + '@rollup/rollup-linux-riscv64-gnu@4.37.0': optional: true - '@rollup/rollup-linux-s390x-gnu@4.36.0': + '@rollup/rollup-linux-riscv64-musl@4.37.0': optional: true - '@rollup/rollup-linux-x64-gnu@4.36.0': + '@rollup/rollup-linux-s390x-gnu@4.37.0': optional: true - '@rollup/rollup-linux-x64-musl@4.36.0': + '@rollup/rollup-linux-x64-gnu@4.37.0': optional: true - '@rollup/rollup-win32-arm64-msvc@4.36.0': + '@rollup/rollup-linux-x64-musl@4.37.0': optional: true - '@rollup/rollup-win32-ia32-msvc@4.36.0': + '@rollup/rollup-win32-arm64-msvc@4.37.0': optional: true - '@rollup/rollup-win32-x64-msvc@4.36.0': + '@rollup/rollup-win32-ia32-msvc@4.37.0': + optional: true + + '@rollup/rollup-win32-x64-msvc@4.37.0': optional: true '@rtsao/scc@1.1.0': {} @@ -4925,13 +4927,15 @@ snapshots: '@types/conventional-commits-parser@5.0.1': dependencies: - '@types/node': 22.13.11 + '@types/node': 22.13.13 '@types/estree@1.0.6': {} + '@types/estree@1.0.7': {} + '@types/json5@0.0.29': {} - '@types/node@22.13.11': + '@types/node@22.13.13': dependencies: undici-types: 6.20.0 @@ -5055,7 +5059,7 @@ snapshots: '@unrs/rspack-resolver-binding-win32-x64-msvc@1.2.2': optional: true - '@vitest/coverage-v8@3.0.9(vitest@3.0.9(@types/node@22.13.11)(jiti@2.4.2)(jsdom@26.0.0)(yaml@2.7.0))': + '@vitest/coverage-v8@3.0.9(vitest@3.0.9(@types/node@22.13.13)(jiti@2.4.2)(jsdom@26.0.0)(yaml@2.7.0))': dependencies: '@ampproject/remapping': 2.3.0 '@bcoe/v8-coverage': 1.0.2 @@ -5069,7 +5073,7 @@ snapshots: std-env: 3.8.1 test-exclude: 7.0.1 tinyrainbow: 2.0.0 - vitest: 3.0.9(@types/node@22.13.11)(jiti@2.4.2)(jsdom@26.0.0)(yaml@2.7.0) + vitest: 3.0.9(@types/node@22.13.13)(jiti@2.4.2)(jsdom@26.0.0)(yaml@2.7.0) transitivePeerDependencies: - supports-color @@ -5080,13 +5084,13 @@ snapshots: chai: 5.2.0 tinyrainbow: 2.0.0 - '@vitest/mocker@3.0.9(vite@6.2.2(@types/node@22.13.11)(jiti@2.4.2)(yaml@2.7.0))': + '@vitest/mocker@3.0.9(vite@6.2.3(@types/node@22.13.13)(jiti@2.4.2)(yaml@2.7.0))': dependencies: '@vitest/spy': 3.0.9 estree-walker: 3.0.3 magic-string: 0.30.17 optionalDependencies: - vite: 6.2.2(@types/node@22.13.11)(jiti@2.4.2)(yaml@2.7.0) + vite: 6.2.3(@types/node@22.13.13)(jiti@2.4.2)(yaml@2.7.0) '@vitest/pretty-format@3.0.9': dependencies: @@ -5131,7 +5135,7 @@ snapshots: dependencies: prettier: 3.5.3 - '@webdeveric/utils@0.40.0': {} + '@webdeveric/utils@0.56.0': {} JSONStream@1.3.5: dependencies: @@ -5432,9 +5436,9 @@ snapshots: '@commitlint/types': 19.8.0 cspell-lib: 8.17.5 - commitlint@19.8.0(@types/node@22.13.11)(typescript@5.8.2): + commitlint@19.8.0(@types/node@22.13.13)(typescript@5.8.2): dependencies: - '@commitlint/cli': 19.8.0(@types/node@22.13.11)(typescript@5.8.2) + '@commitlint/cli': 19.8.0(@types/node@22.13.13)(typescript@5.8.2) '@commitlint/types': 19.8.0 transitivePeerDependencies: - '@types/node' @@ -5494,9 +5498,9 @@ snapshots: core-util-is@1.0.3: {} - cosmiconfig-typescript-loader@6.1.0(@types/node@22.13.11)(cosmiconfig@9.0.0(typescript@5.8.2))(typescript@5.8.2): + cosmiconfig-typescript-loader@6.1.0(@types/node@22.13.13)(cosmiconfig@9.0.0(typescript@5.8.2))(typescript@5.8.2): dependencies: - '@types/node': 22.13.11 + '@types/node': 22.13.13 cosmiconfig: 9.0.0(typescript@5.8.2) jiti: 2.4.2 typescript: 5.8.2 @@ -5985,7 +5989,7 @@ snapshots: estree-walker@3.0.3: dependencies: - '@types/estree': 1.0.6 + '@types/estree': 1.0.7 esutils@2.0.3: {} @@ -6785,7 +6789,7 @@ snapshots: lru-cache@10.4.3: {} - lru-cache@11.0.2: {} + lru-cache@11.1.0: {} magic-string@0.30.17: dependencies: @@ -6793,8 +6797,8 @@ snapshots: magicast@0.3.5: dependencies: - '@babel/parser': 7.26.10 - '@babel/types': 7.26.10 + '@babel/parser': 7.27.0 + '@babel/types': 7.27.0 source-map-js: 1.2.1 make-dir@4.0.0: @@ -6990,10 +6994,6 @@ snapshots: dependencies: ignore-walk: 7.0.0 - npm-packlist@9.0.0: - dependencies: - ignore-walk: 7.0.0 - npm-pick-manifest@10.0.0: dependencies: npm-install-checks: 7.1.1 @@ -7107,7 +7107,7 @@ snapshots: p-limit@4.0.0: dependencies: - yocto-queue: 1.2.0 + yocto-queue: 1.2.1 p-locate@2.0.0: dependencies: @@ -7129,29 +7129,7 @@ snapshots: package-json-from-dist@1.0.1: {} - pacote@19.0.1: - dependencies: - '@npmcli/git': 6.0.3 - '@npmcli/installed-package-contents': 3.0.0 - '@npmcli/package-json': 6.1.1 - '@npmcli/promise-spawn': 8.0.2 - '@npmcli/run-script': 9.1.0 - cacache: 19.0.1 - fs-minipass: 3.0.3 - minipass: 7.1.2 - npm-package-arg: 12.0.2 - npm-packlist: 9.0.0 - npm-pick-manifest: 10.0.0 - npm-registry-fetch: 18.0.2 - proc-log: 5.0.0 - promise-retry: 2.0.1 - sigstore: 3.1.0 - ssri: 12.0.0 - tar: 6.2.1 - transitivePeerDependencies: - - supports-color - - pacote@20.0.0: + pacote@21.0.0: dependencies: '@npmcli/git': 6.0.3 '@npmcli/installed-package-contents': 3.0.0 @@ -7162,7 +7140,7 @@ snapshots: fs-minipass: 3.0.3 minipass: 7.1.2 npm-package-arg: 12.0.2 - npm-packlist: 9.0.0 + npm-packlist: 10.0.0 npm-pick-manifest: 10.0.0 npm-registry-fetch: 18.0.2 proc-log: 5.0.0 @@ -7203,7 +7181,7 @@ snapshots: dependencies: '@babel/code-frame': 7.26.2 index-to-position: 1.0.0 - type-fest: 4.37.0 + type-fest: 4.38.0 parse-ms@4.0.0: {} @@ -7240,7 +7218,7 @@ snapshots: path-scurry@2.0.0: dependencies: - lru-cache: 11.0.2 + lru-cache: 11.1.0 minipass: 7.1.2 path-type@4.0.0: {} @@ -7326,14 +7304,14 @@ snapshots: dependencies: find-up-simple: 1.0.1 read-pkg: 9.0.1 - type-fest: 4.37.0 + type-fest: 4.38.0 read-pkg@9.0.1: dependencies: '@types/normalize-package-data': 2.4.4 normalize-package-data: 6.0.2 parse-json: 8.2.0 - type-fest: 4.37.0 + type-fest: 4.38.0 unicorn-magic: 0.1.0 readable-stream@2.3.8: @@ -7412,29 +7390,30 @@ snapshots: glob: 11.0.1 package-json-from-dist: 1.0.1 - rollup@4.36.0: + rollup@4.37.0: dependencies: '@types/estree': 1.0.6 optionalDependencies: - '@rollup/rollup-android-arm-eabi': 4.36.0 - '@rollup/rollup-android-arm64': 4.36.0 - '@rollup/rollup-darwin-arm64': 4.36.0 - '@rollup/rollup-darwin-x64': 4.36.0 - '@rollup/rollup-freebsd-arm64': 4.36.0 - '@rollup/rollup-freebsd-x64': 4.36.0 - '@rollup/rollup-linux-arm-gnueabihf': 4.36.0 - '@rollup/rollup-linux-arm-musleabihf': 4.36.0 - '@rollup/rollup-linux-arm64-gnu': 4.36.0 - '@rollup/rollup-linux-arm64-musl': 4.36.0 - '@rollup/rollup-linux-loongarch64-gnu': 4.36.0 - '@rollup/rollup-linux-powerpc64le-gnu': 4.36.0 - '@rollup/rollup-linux-riscv64-gnu': 4.36.0 - '@rollup/rollup-linux-s390x-gnu': 4.36.0 - '@rollup/rollup-linux-x64-gnu': 4.36.0 - '@rollup/rollup-linux-x64-musl': 4.36.0 - '@rollup/rollup-win32-arm64-msvc': 4.36.0 - '@rollup/rollup-win32-ia32-msvc': 4.36.0 - '@rollup/rollup-win32-x64-msvc': 4.36.0 + '@rollup/rollup-android-arm-eabi': 4.37.0 + '@rollup/rollup-android-arm64': 4.37.0 + '@rollup/rollup-darwin-arm64': 4.37.0 + '@rollup/rollup-darwin-x64': 4.37.0 + '@rollup/rollup-freebsd-arm64': 4.37.0 + '@rollup/rollup-freebsd-x64': 4.37.0 + '@rollup/rollup-linux-arm-gnueabihf': 4.37.0 + '@rollup/rollup-linux-arm-musleabihf': 4.37.0 + '@rollup/rollup-linux-arm64-gnu': 4.37.0 + '@rollup/rollup-linux-arm64-musl': 4.37.0 + '@rollup/rollup-linux-loongarch64-gnu': 4.37.0 + '@rollup/rollup-linux-powerpc64le-gnu': 4.37.0 + '@rollup/rollup-linux-riscv64-gnu': 4.37.0 + '@rollup/rollup-linux-riscv64-musl': 4.37.0 + '@rollup/rollup-linux-s390x-gnu': 4.37.0 + '@rollup/rollup-linux-x64-gnu': 4.37.0 + '@rollup/rollup-linux-x64-musl': 4.37.0 + '@rollup/rollup-win32-arm64-msvc': 4.37.0 + '@rollup/rollup-win32-ia32-msvc': 4.37.0 + '@rollup/rollup-win32-x64-msvc': 4.37.0 fsevents: 2.3.3 rrweb-cssom@0.8.0: {} @@ -7840,11 +7819,11 @@ snapshots: tinyspy@3.0.2: {} - tldts-core@6.1.84: {} + tldts-core@6.1.85: {} - tldts@6.1.84: + tldts@6.1.85: dependencies: - tldts-core: 6.1.84 + tldts-core: 6.1.85 to-regex-range@5.0.1: dependencies: @@ -7852,7 +7831,7 @@ snapshots: tough-cookie@5.1.2: dependencies: - tldts: 6.1.84 + tldts: 6.1.85 tr46@5.1.0: dependencies: @@ -7894,7 +7873,7 @@ snapshots: type-fest@2.19.0: {} - type-fest@4.37.0: {} + type-fest@4.38.0: {} typed-array-buffer@1.0.3: dependencies: @@ -7980,21 +7959,21 @@ snapshots: validate-npm-package-name@6.0.0: {} - validate-package-exports@0.8.0: + validate-package-exports@0.9.0: dependencies: - '@npmcli/arborist': 8.0.0 - '@webdeveric/utils': 0.40.0 + '@npmcli/arborist': 9.0.1 + '@webdeveric/utils': 0.56.0 npm-packlist: 10.0.0 transitivePeerDependencies: - supports-color - vite-node@3.0.9(@types/node@22.13.11)(jiti@2.4.2)(yaml@2.7.0): + vite-node@3.0.9(@types/node@22.13.13)(jiti@2.4.2)(yaml@2.7.0): dependencies: cac: 6.7.14 debug: 4.4.0 es-module-lexer: 1.6.0 pathe: 2.0.3 - vite: 6.2.2(@types/node@22.13.11)(jiti@2.4.2)(yaml@2.7.0) + vite: 6.2.3(@types/node@22.13.13)(jiti@2.4.2)(yaml@2.7.0) transitivePeerDependencies: - '@types/node' - jiti @@ -8009,21 +7988,21 @@ snapshots: - tsx - yaml - vite@6.2.2(@types/node@22.13.11)(jiti@2.4.2)(yaml@2.7.0): + vite@6.2.3(@types/node@22.13.13)(jiti@2.4.2)(yaml@2.7.0): dependencies: esbuild: 0.25.1 postcss: 8.5.3 - rollup: 4.36.0 + rollup: 4.37.0 optionalDependencies: - '@types/node': 22.13.11 + '@types/node': 22.13.13 fsevents: 2.3.3 jiti: 2.4.2 yaml: 2.7.0 - vitest@3.0.9(@types/node@22.13.11)(jiti@2.4.2)(jsdom@26.0.0)(yaml@2.7.0): + vitest@3.0.9(@types/node@22.13.13)(jiti@2.4.2)(jsdom@26.0.0)(yaml@2.7.0): dependencies: '@vitest/expect': 3.0.9 - '@vitest/mocker': 3.0.9(vite@6.2.2(@types/node@22.13.11)(jiti@2.4.2)(yaml@2.7.0)) + '@vitest/mocker': 3.0.9(vite@6.2.3(@types/node@22.13.13)(jiti@2.4.2)(yaml@2.7.0)) '@vitest/pretty-format': 3.0.9 '@vitest/runner': 3.0.9 '@vitest/snapshot': 3.0.9 @@ -8039,11 +8018,11 @@ snapshots: tinyexec: 0.3.2 tinypool: 1.0.2 tinyrainbow: 2.0.0 - vite: 6.2.2(@types/node@22.13.11)(jiti@2.4.2)(yaml@2.7.0) - vite-node: 3.0.9(@types/node@22.13.11)(jiti@2.4.2)(yaml@2.7.0) + vite: 6.2.3(@types/node@22.13.13)(jiti@2.4.2)(yaml@2.7.0) + vite-node: 3.0.9(@types/node@22.13.13)(jiti@2.4.2)(yaml@2.7.0) why-is-node-running: 2.3.0 optionalDependencies: - '@types/node': 22.13.11 + '@types/node': 22.13.13 jsdom: 26.0.0 transitivePeerDependencies: - jiti @@ -8067,7 +8046,7 @@ snapshots: dependencies: xml-name-validator: 5.0.0 - walk-up-path@3.0.1: {} + walk-up-path@4.0.0: {} webidl-conversions@7.0.0: {} @@ -8209,6 +8188,6 @@ snapshots: yocto-queue@0.1.0: {} - yocto-queue@1.2.0: {} + yocto-queue@1.2.1: {} yoctocolors@2.1.1: {} diff --git a/src/assertion/assertIsObject.ts b/src/assertion/assertIsObject.ts index 8900044..307cd03 100644 --- a/src/assertion/assertIsObject.ts +++ b/src/assertion/assertIsObject.ts @@ -2,10 +2,12 @@ import { isObject } from '../predicate/isObject.js'; import { getError } from './getError.js'; +import type { UnknownRecord } from '../types/records.js'; + export function assertIsObject( input: unknown, error: string | Error = 'input is not an object', -): asserts input is object { +): asserts input is UnknownRecord { if (!isObject(input)) { throw getError(error); } diff --git a/src/predicate/isAnyObjectWith.ts b/src/predicate/isAnyObjectWith.ts index e2d9fc8..e62b2e7 100644 --- a/src/predicate/isAnyObjectWith.ts +++ b/src/predicate/isAnyObjectWith.ts @@ -1,5 +1,3 @@ -import { asArray } from '../asArray.js'; - import { isAnyObject } from './isAnyObject.js'; /** @@ -7,7 +5,7 @@ import { isAnyObject } from './isAnyObject.js'; */ export const isAnyObjectWith = ( input: T, - properties: P | P[], + properties: P[], ): input is T & Record => { - return isAnyObject(input) && asArray(properties).every((property) => property in input); + return isAnyObject(input) && properties.every((property) => property in input); }; diff --git a/src/predicate/isAnyObjectWithOwn.ts b/src/predicate/isAnyObjectWithOwn.ts index 4ca3079..0770297 100644 --- a/src/predicate/isAnyObjectWithOwn.ts +++ b/src/predicate/isAnyObjectWithOwn.ts @@ -1,5 +1,3 @@ -import { asArray } from '../asArray.js'; - import { isAnyObject } from './isAnyObject.js'; /** @@ -7,7 +5,7 @@ import { isAnyObject } from './isAnyObject.js'; */ export const isAnyObjectWithOwn = ( input: T, - properties: P | P[], + properties: P[], ): input is T & Record => { - return isAnyObject(input) && asArray(properties).every((property) => Object.hasOwn(input, property)); + return isAnyObject(input) && properties.every((property) => Object.hasOwn(input, property)); }; diff --git a/src/predicate/isObject.ts b/src/predicate/isObject.ts index fe47df3..53abe95 100644 --- a/src/predicate/isObject.ts +++ b/src/predicate/isObject.ts @@ -1,5 +1,7 @@ +import type { UnknownRecord } from '../types/records.js'; + /** * Determine if `input` is a non-null object and not an array. */ -export const isObject = (input: unknown): input is object => +export const isObject = (input: unknown): input is UnknownRecord => input !== null && typeof input === 'object' && !Array.isArray(input); diff --git a/src/predicate/isObjectWith.ts b/src/predicate/isObjectWith.ts index e88ce64..d6d5765 100644 --- a/src/predicate/isObjectWith.ts +++ b/src/predicate/isObjectWith.ts @@ -1,13 +1,7 @@ -import { asArray } from '../asArray.js'; - import { isObject } from './isObject.js'; /** * Determine if `input` is an object and has the provided properties. */ -export const isObjectWith = ( - input: T, - properties: P | P[], -): input is T & Record => { - return isObject(input) && asArray(properties).every((property) => property in input); -}; +export const isObjectWith = (input: T, properties: P[]): input is T & Record => + isObject(input) && properties.every((property) => property in input); diff --git a/src/predicate/isPrimitive.ts b/src/predicate/isPrimitive.ts index 6a0063c..f618fde 100644 --- a/src/predicate/isPrimitive.ts +++ b/src/predicate/isPrimitive.ts @@ -1,18 +1,10 @@ -import { isBigInt } from './isBigInt.js'; -import { isBoolean } from './isBoolean.js'; -import { isNull } from './isNull.js'; -import { isNumber } from './isNumber.js'; -import { isString } from './isString.js'; -import { isSymbol } from './isSymbol.js'; -import { isUndefined } from './isUndefined.js'; - import type { Primitive } from '../types/common.js'; export const isPrimitive = (input: unknown): input is Primitive => - isString(input) || - isNumber(input) || - isBigInt(input) || - isBoolean(input) || - isUndefined(input) || - isSymbol(input) || - isNull(input); + input === null || + typeof input === 'string' || + typeof input === 'number' || + typeof input === 'bigint' || + typeof input === 'boolean' || + typeof input === 'undefined' || + typeof input === 'symbol'; diff --git a/src/predicate/isPromiseFulfilledResult.ts b/src/predicate/isPromiseFulfilledResult.ts index 529b473..7a3c48b 100644 --- a/src/predicate/isPromiseFulfilledResult.ts +++ b/src/predicate/isPromiseFulfilledResult.ts @@ -1,5 +1,7 @@ -import { isObjectWith } from './isObjectWith.js'; +import { shape } from './factory/shape.js'; +import { isUnknown } from './isUnknown.js'; -export const isPromiseFulfilledResult = (input: unknown): input is PromiseFulfilledResult => { - return isObjectWith(input, 'status') && input.status === 'fulfilled'; -}; +export const isPromiseFulfilledResult = shape>({ + status: 'fulfilled', + value: isUnknown, +}); diff --git a/src/predicate/isPromiseRejectedResult.ts b/src/predicate/isPromiseRejectedResult.ts index 4782d72..b8ef977 100644 --- a/src/predicate/isPromiseRejectedResult.ts +++ b/src/predicate/isPromiseRejectedResult.ts @@ -1,5 +1,7 @@ -import { isObjectWith } from './isObjectWith.js'; +import { shape } from './factory/shape.js'; +import { isAny } from './isAny.js'; -export const isPromiseRejectedResult = (input: unknown): input is PromiseRejectedResult => { - return isObjectWith(input, ['status', 'reason']) && input.status === 'rejected'; -}; +export const isPromiseRejectedResult = shape({ + status: 'rejected', + reason: isAny, +}); diff --git a/test/predicate/isAnyObjectWith.test.ts b/test/predicate/isAnyObjectWith.test.ts index 112fbac..dd61605 100644 --- a/test/predicate/isAnyObjectWith.test.ts +++ b/test/predicate/isAnyObjectWith.test.ts @@ -4,13 +4,12 @@ import { isAnyObjectWith } from '../../src/predicate/isAnyObjectWith.js'; describe('isAnyObjectWith()', () => { it('Returns true for valid inputs', () => { - expect(isAnyObjectWith({ property: true }, 'property')).toBeTruthy(); + expect(isAnyObjectWith({ property: true }, ['property'])).toBeTruthy(); expect(isAnyObjectWith({ name: 'Test Testerson', age: 100 }, ['name', 'age'])).toBeTruthy(); - expect(isAnyObjectWith(['item'], 'length')).toBeTruthy(); + expect(isAnyObjectWith(['item'], ['length'])).toBeTruthy(); }); it.each([null, false, 'string', Math.PI, Symbol()])('Returns false for invalid inputs', (item) => { - expect(isAnyObjectWith(item, 'property')).toBeFalsy(); expect(isAnyObjectWith(item, ['property'])).toBeFalsy(); }); }); diff --git a/test/predicate/isAnyObjectWithOwn.test.ts b/test/predicate/isAnyObjectWithOwn.test.ts index 50a8af0..feb65de 100644 --- a/test/predicate/isAnyObjectWithOwn.test.ts +++ b/test/predicate/isAnyObjectWithOwn.test.ts @@ -4,9 +4,9 @@ import { isAnyObjectWithOwn } from '../../src/predicate/isAnyObjectWithOwn.js'; describe('isAnyObjectWithOwn()', () => { it('Returns true for valid inputs', () => { - expect(isAnyObjectWithOwn({ property: true }, 'property')).toBeTruthy(); + expect(isAnyObjectWithOwn({ property: true }, ['property'])).toBeTruthy(); expect(isAnyObjectWithOwn({ name: 'Test Testerson', age: 100 }, ['name', 'age'])).toBeTruthy(); - expect(isAnyObjectWithOwn(['item'], 'length')).toBeTruthy(); + expect(isAnyObjectWithOwn(['item'], ['length'])).toBeTruthy(); }); it.each([ @@ -22,7 +22,6 @@ describe('isAnyObjectWithOwn()', () => { }, ), ])('Returns false for invalid inputs', (item) => { - expect(isAnyObjectWithOwn(item, 'property')).toBeFalsy(); expect(isAnyObjectWithOwn(item, ['property'])).toBeFalsy(); }); }); diff --git a/test/predicate/isObjectWith.test.ts b/test/predicate/isObjectWith.test.ts index e7320a4..8d5d4c1 100644 --- a/test/predicate/isObjectWith.test.ts +++ b/test/predicate/isObjectWith.test.ts @@ -4,12 +4,12 @@ import { isObjectWith } from '../../src/predicate/isObjectWith.js'; describe('isObjectWith()', () => { it('Returns true for valid inputs', () => { - expect(isObjectWith({ property: true }, 'property')).toBeTruthy(); + expect(isObjectWith({ property: true }, ['property'])).toBeTruthy(); expect(isObjectWith({ name: 'Test Testerson', age: 100 }, ['name', 'age'])).toBeTruthy(); }); it.each([[], null, false, 'string', Math.PI, Symbol()])('Returns false for invalid inputs', (item) => { - expect(isObjectWith(item, 'property')).toBeFalsy(); + expect(isObjectWith(item, ['property'])).toBeFalsy(); expect(isObjectWith(item, ['property'])).toBeFalsy(); }); });