From fb8a320ea82650829f982c0e7225081a884471fd Mon Sep 17 00:00:00 2001 From: trapcodeio Date: Sun, 16 Jun 2024 21:37:10 +0100 Subject: [PATCH 01/15] Update Packages --- others/yup.ts | 25 ++- package.json | 21 +-- yarn.lock | 450 +++++++++++++++++++++++++++----------------------- 3 files changed, 262 insertions(+), 234 deletions(-) diff --git a/others/yup.ts b/others/yup.ts index 4934c1f..b5db1a3 100644 --- a/others/yup.ts +++ b/others/yup.ts @@ -2,16 +2,16 @@ import * as Yup from "yup"; import type { TypeOfAbolishOrInstance } from "../src/Abolish"; import type { AbolishValidator } from "../src/types"; import { AddValidatorToClassOrInstance } from "./index"; -import type { ValidateOptions } from "yup/es/types"; +import type { ValidateOptions, AnySchema } from "yup"; -export type YupSchemaOption = { schema: T; options?: ValidateOptions }; +export type YupSchemaOption = { schema: T; options?: ValidateOptions }; type YupHelper = (y: typeof Yup) => T; declare module "../src/validator" { module AvailableValidators { interface Options { - $yup: Yup.BaseSchema | YupSchemaOption; - $yupAsync: Yup.BaseSchema | YupSchemaOption; + $yup: Yup.AnySchema | YupSchemaOption; + $yupAsync: Yup.AnySchema | YupSchemaOption; } } } @@ -19,18 +19,15 @@ declare module "../src/validator" { /** * $yup Schema Helper */ -export function $yup( +export function $yup( schema: YupHelper, options?: ValidateOptions ): Record<"$yup", YupSchemaOption>; -export function $yup( +export function $yup( schema: T, options?: ValidateOptions ): Record<"$yup", YupSchemaOption>; -export function $yup( - schema: T | YupHelper, - options?: ValidateOptions -) { +export function $yup(schema: T | YupHelper, options?: ValidateOptions) { // if input is a function, call it if (typeof schema === "function") { schema = schema(Yup) as T; @@ -42,15 +39,15 @@ export function $yup( /** * $yup Async Helper */ -export function $yupAsync( +export function $yupAsync( schema: YupHelper, options?: ValidateOptions ): Record<"$yupAsync", YupSchemaOption>; -export function $yupAsync( +export function $yupAsync( schema: T, options?: ValidateOptions ): Record<"$yupAsync", YupSchemaOption>; -export function $yupAsync( +export function $yupAsync( schema: T | YupHelper, options?: ValidateOptions ) { @@ -65,7 +62,7 @@ export function $yupAsync( * Check if this is a yup input option * @param schema */ -function isSchemaOption(schema: Yup.BaseSchema | YupSchemaOption) { +function isSchemaOption(schema: Yup.AnySchema | YupSchemaOption) { const keys = Object.keys(schema); return keys.includes("schema"); } diff --git a/package.json b/package.json index 8edd962..3ee273f 100644 --- a/package.json +++ b/package.json @@ -20,7 +20,7 @@ "bundle": "node bundle.js", "prepublishOnly": "npm run test", "watch": "npx tsc --watch", - "play": "npx ts-node-dev --respawn dev/play.ts", + "play": "npx tsx watch dev/play.ts", "play:dev": "npx nodemon dev/play.js", "test-browser": "npx vite --host", "test": "npm run build && node japaFile.js", @@ -28,21 +28,22 @@ "benchmark": "node benchmarks" }, "dependencies": { - "lodash": "^4.17.21" + "lodash": "^4.17.21", + "tsx": "^4.15.5" }, "devDependencies": { "@trapcode/benchmark": "^0.1.3", - "@types/lodash": "^4.14.191", - "@types/node": "^18.11.18", - "esbuild": "^0.17.2", + "@types/lodash": "^4.17.5", + "@types/node": "^20.14.2", + "esbuild": "^0.21.5", "japa": "^4.0.0", - "joi": "^17.7.0", + "joi": "^17.13.1", "lodash-es": "^4.17.21", - "prettier": "^2.8.3", - "ts-node": "^10.9.1", + "prettier": "^3.3.2", + "ts-node": "^10.9.2", "ts-node-dev": "^2.0.0", - "typescript": "^4.9.4", - "yup": "^0.32.11" + "typescript": "^5.4.5", + "yup": "^1.4.0" }, "keywords": [ "abolish", diff --git a/yarn.lock b/yarn.lock index 079bcf5..a32e822 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2,13 +2,6 @@ # yarn lockfile v1 -"@babel/runtime@^7.15.4": - version "7.17.8" - resolved "https://registry.npmjs.org/@babel/runtime/-/runtime-7.17.8.tgz" - integrity sha512-dQpEpK0O9o6lj6oPu0gRDbbnk+4LeHlNcBpspf6Olzt3GIX4P1lWF1gS+pHLDFlaJvbR6q7jCfQ08zA4QJBnmA== - dependencies: - regenerator-runtime "^0.13.4" - "@cspotcode/source-map-support@^0.8.0": version "0.8.1" resolved "https://registry.npmjs.org/@cspotcode/source-map-support/-/source-map-support-0.8.1.tgz" @@ -16,125 +9,135 @@ dependencies: "@jridgewell/trace-mapping" "0.3.9" -"@esbuild/android-arm64@0.17.2": - version "0.17.2" - resolved "https://registry.yarnpkg.com/@esbuild/android-arm64/-/android-arm64-0.17.2.tgz#73aa058f1fdc43770afd9a7b39654ce7e1b2e774" - integrity sha512-QSkmYISXr2uFoR+NdmmKyR5svYb0cXDCfzwNblLsrC8wTpx/I1L7u/zrjrf4aLoHoRTycZFIewJwBiUrO5DWtQ== - -"@esbuild/android-arm@0.17.2": - version "0.17.2" - resolved "https://registry.yarnpkg.com/@esbuild/android-arm/-/android-arm-0.17.2.tgz#7cdb67672350177edbaa1de1bedd71b295989fab" - integrity sha512-Art7v3xYfqH1gEMUSP0Nx67pNAlC/Y3qSg3mOw8Wg7MP9bJLXL0DrmJaV1Qz1o4FwagtvDgkVOeBDpZgxdj13Q== - -"@esbuild/android-x64@0.17.2": - version "0.17.2" - resolved "https://registry.yarnpkg.com/@esbuild/android-x64/-/android-x64-0.17.2.tgz#58cb40ea9502a619551dab8145ec19de3192f3d8" - integrity sha512-5VOaFBI0RK8jJVDHdeU1YJmpxXoOf1RPoiOBhk/Tvpulw7R1SwCsxHvC3eDQcoF0gV7YM4V2wJO0PR9tem6gCQ== - -"@esbuild/darwin-arm64@0.17.2": - version "0.17.2" - resolved "https://registry.yarnpkg.com/@esbuild/darwin-arm64/-/darwin-arm64-0.17.2.tgz#d9d60f704e13611db85acf2cc1ce2ed34fe5e46a" - integrity sha512-iQJu1Zn1Wi91D5x/sslEn/jwae1tgSAEHK0R/kYzIr5jO992IJwDDuWhSGll23jHt18RECxahhGG0BWY/bVUTw== - -"@esbuild/darwin-x64@0.17.2": - version "0.17.2" - resolved "https://registry.yarnpkg.com/@esbuild/darwin-x64/-/darwin-x64-0.17.2.tgz#4ae5735e1cd09b584cff4b8066a246cc62b06c97" - integrity sha512-j750nyrwoRZd3VnPo5sd12/5U27TxFGmvmoDv93G2jiaGJPYKJ/+5IfRAvHahGePTUIRPyOlE5YLFw9MlzuBnw== - -"@esbuild/freebsd-arm64@0.17.2": - version "0.17.2" - resolved "https://registry.yarnpkg.com/@esbuild/freebsd-arm64/-/freebsd-arm64-0.17.2.tgz#0265bd51eb1951b27eb693fd4989a4154e32bd58" - integrity sha512-ti7GU+/KUQQXEPmSUep7efZpA3KR2SkKsVuSL2FE7Yxka9apuqKfymAgQmVPMxstzAgCRBIu8uEu0KFmTfs3/Q== - -"@esbuild/freebsd-x64@0.17.2": - version "0.17.2" - resolved "https://registry.yarnpkg.com/@esbuild/freebsd-x64/-/freebsd-x64-0.17.2.tgz#7b29d68def0ab7c5a21e3d8ec67a7a47db5f9993" - integrity sha512-NgooSKWSnrNKRuiumY1dg7KAGpsyXIMcwyOXN9imnqe8VFjqqrEOMqZRik0C1wlfLjiSCuMsj+YUSmBMAJMt0A== - -"@esbuild/linux-arm64@0.17.2": - version "0.17.2" - resolved "https://registry.yarnpkg.com/@esbuild/linux-arm64/-/linux-arm64-0.17.2.tgz#4ac9edc5011e0d5e3f8673c3c3b00dc5c9bf4459" - integrity sha512-jcJ4cxwQyqEqgDwkqj7820nKx9cM5WBPCCU4oUXvTeG+DkkJE6/P75od0VPHmItFfEJu+/2vV85ebvFVomZcBg== - -"@esbuild/linux-arm@0.17.2": - version "0.17.2" - resolved "https://registry.yarnpkg.com/@esbuild/linux-arm/-/linux-arm-0.17.2.tgz#5b3f46608b682e32255f6dce10ddcc150826df4d" - integrity sha512-8dfrRTd39n+THdAetwQKNwK6zBPR5oPjMtgRNXvRq8gsn/J5o69zTaOWVi3QO09BljqdShxU2dxDA09lDhdIqQ== - -"@esbuild/linux-ia32@0.17.2": - version "0.17.2" - resolved "https://registry.yarnpkg.com/@esbuild/linux-ia32/-/linux-ia32-0.17.2.tgz#21e123e2557236c847b38c2ea4dac3d8fbd1081c" - integrity sha512-dXZ3m++zaRVD2fqOUPP8QTh1Lfg6WO6uZDo/QJ3KdfnIR7dDToDtaA12AgKYvCed9Nuzf/gpKs/7/f6I02b/sg== - -"@esbuild/linux-loong64@0.17.2": - version "0.17.2" - resolved "https://registry.yarnpkg.com/@esbuild/linux-loong64/-/linux-loong64-0.17.2.tgz#05e2ca319a925de0a28fe2d8a31e158f8172dac9" - integrity sha512-/vntXkzSe9TUp0Rh35Wgye1EOhDtmIMjwC4rtahHcALmDXL+iuQGvwGFvXrP+sBigia/ltLryMAvCiqGV6plqw== - -"@esbuild/linux-mips64el@0.17.2": - version "0.17.2" - resolved "https://registry.yarnpkg.com/@esbuild/linux-mips64el/-/linux-mips64el-0.17.2.tgz#98f0e25b86153d725d4379bc267a2cd4c9bcdd24" - integrity sha512-guYcNHjMRO1BMxWAeb8LDfgQaU8oeUO65xtlclwBD+hX3163KBifEHyao1hK96J10BP9n0UmZug6GhtGZaNm2Q== - -"@esbuild/linux-ppc64@0.17.2": - version "0.17.2" - resolved "https://registry.yarnpkg.com/@esbuild/linux-ppc64/-/linux-ppc64-0.17.2.tgz#45252f5343c5178dae93f8f7fc97aa4304cc5cca" - integrity sha512-fzHTnIGIVqgUGZcFnnisguKD4UneF4uwWwkG+i8kBspMDdU1wJ0jha1VdtxWP7Ob1KGxuXcoUlrQkCVO+Z5iOw== - -"@esbuild/linux-riscv64@0.17.2": - version "0.17.2" - resolved "https://registry.yarnpkg.com/@esbuild/linux-riscv64/-/linux-riscv64-0.17.2.tgz#6c4446ad19a4d8b070ea0ddf124b6ea53750d5e2" - integrity sha512-Sa+z7csvNVeAsTD83tVSggOb8CAU7EdDuihC8WhtoJfuDVkF5+Vi0imaiCjXQ7Ci5rz/a8IJ1H1MWX3eI9AmuQ== - -"@esbuild/linux-s390x@0.17.2": - version "0.17.2" - resolved "https://registry.yarnpkg.com/@esbuild/linux-s390x/-/linux-s390x-0.17.2.tgz#5c03feb73b0c3fa80834eb150cd9c14206681b4e" - integrity sha512-jUFCO+/VA1Y/oeauSNBubp2UtGu4xjBUEFVgMPm0qLuw6xw18yOagKwBOPVmyE3ZSFqGd9BAPZM/JrtadgBryA== - -"@esbuild/linux-x64@0.17.2": - version "0.17.2" - resolved "https://registry.yarnpkg.com/@esbuild/linux-x64/-/linux-x64-0.17.2.tgz#60405f2a40fb792557293a11ba0c380cfe744fcc" - integrity sha512-naygxkSmr6x9tuvpa8iGefnXo3Rc3Noz7c4+Dn0MSfSWJwLaN2YR686e7HkI09irfjDdU5UAq9wcxUwjkYQNUA== - -"@esbuild/netbsd-x64@0.17.2": - version "0.17.2" - resolved "https://registry.yarnpkg.com/@esbuild/netbsd-x64/-/netbsd-x64-0.17.2.tgz#be8afb6d91827ecb8a8f42a43c63b528bbdd9c53" - integrity sha512-Hagbdq4EpiG9XXJY6Ozfrl2RN5jkXZXd6BD39f43tWz0d8yyOrRZlofM1eA6JYQbdv6c8BUsUOcgopavIqwx4Q== - -"@esbuild/openbsd-x64@0.17.2": - version "0.17.2" - resolved "https://registry.yarnpkg.com/@esbuild/openbsd-x64/-/openbsd-x64-0.17.2.tgz#18e9f4c8284ade701039df1de246a35161dd382e" - integrity sha512-Pkby+VEXY7+aWP8J2RUCfqWbbZz2M1GavRGGnE2kEPzwarba/BOk3B45PSaKwc3iKdK2rgCPCTjC/p9JoKNejA== - -"@esbuild/sunos-x64@0.17.2": - version "0.17.2" - resolved "https://registry.yarnpkg.com/@esbuild/sunos-x64/-/sunos-x64-0.17.2.tgz#c45c5b6fa406af451e3ebe2ba610bfaad106d20b" - integrity sha512-WAyg4dBTUsAPJ9cRnuQ23cwJWYRhP4e4y0M/l2+EpRjWW+g1MNAXKQQNNhRQ71zc8UixRVrqj+43ReHeZC8mJQ== - -"@esbuild/win32-arm64@0.17.2": - version "0.17.2" - resolved "https://registry.yarnpkg.com/@esbuild/win32-arm64/-/win32-arm64-0.17.2.tgz#6b6d31077cba24bd8bc9e173b9ae052b0bef5b0c" - integrity sha512-rMbO3gPpxuENd+AnZLgo4J/g+BkwxT3NK7nYpSZ0KlYtSdlxYMIMG5pznX7a1ISZKo67aGStne+K41jdkBywpA== - -"@esbuild/win32-ia32@0.17.2": - version "0.17.2" - resolved "https://registry.yarnpkg.com/@esbuild/win32-ia32/-/win32-ia32-0.17.2.tgz#88bb3a510006114d8291506b6ec9ff93f66d0d5c" - integrity sha512-73dWKDMhFk+4owS19OjEVbEDGFPRS1fyga3qOu5HPd5eTxJTjtlVTT/fG/S7AchA0vXS7hOqY70AAir1CkmICg== - -"@esbuild/win32-x64@0.17.2": - version "0.17.2" - resolved "https://registry.yarnpkg.com/@esbuild/win32-x64/-/win32-x64-0.17.2.tgz#a7ce1ae475e14febb80e2690430e399491206a61" - integrity sha512-QFJlhf73HCBjTqAWWSIlD8JQBtmue0Dd6UV+KGccycJ3HKj1dCkXdRKJGwc5bZWiI9hrxcWsVEa1kVFaltC4vQ== +"@esbuild/aix-ppc64@0.21.5": + version "0.21.5" + resolved "https://registry.yarnpkg.com/@esbuild/aix-ppc64/-/aix-ppc64-0.21.5.tgz#c7184a326533fcdf1b8ee0733e21c713b975575f" + integrity sha512-1SDgH6ZSPTlggy1yI6+Dbkiz8xzpHJEVAlF/AM1tHPLsf5STom9rwtjE4hKAF20FfXXNTFqEYXyJNWh1GiZedQ== + +"@esbuild/android-arm64@0.21.5": + version "0.21.5" + resolved "https://registry.yarnpkg.com/@esbuild/android-arm64/-/android-arm64-0.21.5.tgz#09d9b4357780da9ea3a7dfb833a1f1ff439b4052" + integrity sha512-c0uX9VAUBQ7dTDCjq+wdyGLowMdtR/GoC2U5IYk/7D1H1JYC0qseD7+11iMP2mRLN9RcCMRcjC4YMclCzGwS/A== + +"@esbuild/android-arm@0.21.5": + version "0.21.5" + resolved "https://registry.yarnpkg.com/@esbuild/android-arm/-/android-arm-0.21.5.tgz#9b04384fb771926dfa6d7ad04324ecb2ab9b2e28" + integrity sha512-vCPvzSjpPHEi1siZdlvAlsPxXl7WbOVUBBAowWug4rJHb68Ox8KualB+1ocNvT5fjv6wpkX6o/iEpbDrf68zcg== + +"@esbuild/android-x64@0.21.5": + version "0.21.5" + resolved "https://registry.yarnpkg.com/@esbuild/android-x64/-/android-x64-0.21.5.tgz#29918ec2db754cedcb6c1b04de8cd6547af6461e" + integrity sha512-D7aPRUUNHRBwHxzxRvp856rjUHRFW1SdQATKXH2hqA0kAZb1hKmi02OpYRacl0TxIGz/ZmXWlbZgjwWYaCakTA== + +"@esbuild/darwin-arm64@0.21.5": + version "0.21.5" + resolved "https://registry.yarnpkg.com/@esbuild/darwin-arm64/-/darwin-arm64-0.21.5.tgz#e495b539660e51690f3928af50a76fb0a6ccff2a" + integrity sha512-DwqXqZyuk5AiWWf3UfLiRDJ5EDd49zg6O9wclZ7kUMv2WRFr4HKjXp/5t8JZ11QbQfUS6/cRCKGwYhtNAY88kQ== + +"@esbuild/darwin-x64@0.21.5": + version "0.21.5" + resolved "https://registry.yarnpkg.com/@esbuild/darwin-x64/-/darwin-x64-0.21.5.tgz#c13838fa57372839abdddc91d71542ceea2e1e22" + integrity sha512-se/JjF8NlmKVG4kNIuyWMV/22ZaerB+qaSi5MdrXtd6R08kvs2qCN4C09miupktDitvh8jRFflwGFBQcxZRjbw== + +"@esbuild/freebsd-arm64@0.21.5": + version "0.21.5" + resolved "https://registry.yarnpkg.com/@esbuild/freebsd-arm64/-/freebsd-arm64-0.21.5.tgz#646b989aa20bf89fd071dd5dbfad69a3542e550e" + integrity sha512-5JcRxxRDUJLX8JXp/wcBCy3pENnCgBR9bN6JsY4OmhfUtIHe3ZW0mawA7+RDAcMLrMIZaf03NlQiX9DGyB8h4g== + +"@esbuild/freebsd-x64@0.21.5": + version "0.21.5" + resolved "https://registry.yarnpkg.com/@esbuild/freebsd-x64/-/freebsd-x64-0.21.5.tgz#aa615cfc80af954d3458906e38ca22c18cf5c261" + integrity sha512-J95kNBj1zkbMXtHVH29bBriQygMXqoVQOQYA+ISs0/2l3T9/kj42ow2mpqerRBxDJnmkUDCaQT/dfNXWX/ZZCQ== + +"@esbuild/linux-arm64@0.21.5": + version "0.21.5" + resolved "https://registry.yarnpkg.com/@esbuild/linux-arm64/-/linux-arm64-0.21.5.tgz#70ac6fa14f5cb7e1f7f887bcffb680ad09922b5b" + integrity sha512-ibKvmyYzKsBeX8d8I7MH/TMfWDXBF3db4qM6sy+7re0YXya+K1cem3on9XgdT2EQGMu4hQyZhan7TeQ8XkGp4Q== + +"@esbuild/linux-arm@0.21.5": + version "0.21.5" + resolved "https://registry.yarnpkg.com/@esbuild/linux-arm/-/linux-arm-0.21.5.tgz#fc6fd11a8aca56c1f6f3894f2bea0479f8f626b9" + integrity sha512-bPb5AHZtbeNGjCKVZ9UGqGwo8EUu4cLq68E95A53KlxAPRmUyYv2D6F0uUI65XisGOL1hBP5mTronbgo+0bFcA== + +"@esbuild/linux-ia32@0.21.5": + version "0.21.5" + resolved "https://registry.yarnpkg.com/@esbuild/linux-ia32/-/linux-ia32-0.21.5.tgz#3271f53b3f93e3d093d518d1649d6d68d346ede2" + integrity sha512-YvjXDqLRqPDl2dvRODYmmhz4rPeVKYvppfGYKSNGdyZkA01046pLWyRKKI3ax8fbJoK5QbxblURkwK/MWY18Tg== + +"@esbuild/linux-loong64@0.21.5": + version "0.21.5" + resolved "https://registry.yarnpkg.com/@esbuild/linux-loong64/-/linux-loong64-0.21.5.tgz#ed62e04238c57026aea831c5a130b73c0f9f26df" + integrity sha512-uHf1BmMG8qEvzdrzAqg2SIG/02+4/DHB6a9Kbya0XDvwDEKCoC8ZRWI5JJvNdUjtciBGFQ5PuBlpEOXQj+JQSg== + +"@esbuild/linux-mips64el@0.21.5": + version "0.21.5" + resolved "https://registry.yarnpkg.com/@esbuild/linux-mips64el/-/linux-mips64el-0.21.5.tgz#e79b8eb48bf3b106fadec1ac8240fb97b4e64cbe" + integrity sha512-IajOmO+KJK23bj52dFSNCMsz1QP1DqM6cwLUv3W1QwyxkyIWecfafnI555fvSGqEKwjMXVLokcV5ygHW5b3Jbg== + +"@esbuild/linux-ppc64@0.21.5": + version "0.21.5" + resolved "https://registry.yarnpkg.com/@esbuild/linux-ppc64/-/linux-ppc64-0.21.5.tgz#5f2203860a143b9919d383ef7573521fb154c3e4" + integrity sha512-1hHV/Z4OEfMwpLO8rp7CvlhBDnjsC3CttJXIhBi+5Aj5r+MBvy4egg7wCbe//hSsT+RvDAG7s81tAvpL2XAE4w== + +"@esbuild/linux-riscv64@0.21.5": + version "0.21.5" + resolved "https://registry.yarnpkg.com/@esbuild/linux-riscv64/-/linux-riscv64-0.21.5.tgz#07bcafd99322d5af62f618cb9e6a9b7f4bb825dc" + integrity sha512-2HdXDMd9GMgTGrPWnJzP2ALSokE/0O5HhTUvWIbD3YdjME8JwvSCnNGBnTThKGEB91OZhzrJ4qIIxk/SBmyDDA== + +"@esbuild/linux-s390x@0.21.5": + version "0.21.5" + resolved "https://registry.yarnpkg.com/@esbuild/linux-s390x/-/linux-s390x-0.21.5.tgz#b7ccf686751d6a3e44b8627ababc8be3ef62d8de" + integrity sha512-zus5sxzqBJD3eXxwvjN1yQkRepANgxE9lgOW2qLnmr8ikMTphkjgXu1HR01K4FJg8h1kEEDAqDcZQtbrRnB41A== + +"@esbuild/linux-x64@0.21.5": + version "0.21.5" + resolved "https://registry.yarnpkg.com/@esbuild/linux-x64/-/linux-x64-0.21.5.tgz#6d8f0c768e070e64309af8004bb94e68ab2bb3b0" + integrity sha512-1rYdTpyv03iycF1+BhzrzQJCdOuAOtaqHTWJZCWvijKD2N5Xu0TtVC8/+1faWqcP9iBCWOmjmhoH94dH82BxPQ== + +"@esbuild/netbsd-x64@0.21.5": + version "0.21.5" + resolved "https://registry.yarnpkg.com/@esbuild/netbsd-x64/-/netbsd-x64-0.21.5.tgz#bbe430f60d378ecb88decb219c602667387a6047" + integrity sha512-Woi2MXzXjMULccIwMnLciyZH4nCIMpWQAs049KEeMvOcNADVxo0UBIQPfSmxB3CWKedngg7sWZdLvLczpe0tLg== + +"@esbuild/openbsd-x64@0.21.5": + version "0.21.5" + resolved "https://registry.yarnpkg.com/@esbuild/openbsd-x64/-/openbsd-x64-0.21.5.tgz#99d1cf2937279560d2104821f5ccce220cb2af70" + integrity sha512-HLNNw99xsvx12lFBUwoT8EVCsSvRNDVxNpjZ7bPn947b8gJPzeHWyNVhFsaerc0n3TsbOINvRP2byTZ5LKezow== + +"@esbuild/sunos-x64@0.21.5": + version "0.21.5" + resolved "https://registry.yarnpkg.com/@esbuild/sunos-x64/-/sunos-x64-0.21.5.tgz#08741512c10d529566baba837b4fe052c8f3487b" + integrity sha512-6+gjmFpfy0BHU5Tpptkuh8+uw3mnrvgs+dSPQXQOv3ekbordwnzTVEb4qnIvQcYXq6gzkyTnoZ9dZG+D4garKg== + +"@esbuild/win32-arm64@0.21.5": + version "0.21.5" + resolved "https://registry.yarnpkg.com/@esbuild/win32-arm64/-/win32-arm64-0.21.5.tgz#675b7385398411240735016144ab2e99a60fc75d" + integrity sha512-Z0gOTd75VvXqyq7nsl93zwahcTROgqvuAcYDUr+vOv8uHhNSKROyU961kgtCD1e95IqPKSQKH7tBTslnS3tA8A== + +"@esbuild/win32-ia32@0.21.5": + version "0.21.5" + resolved "https://registry.yarnpkg.com/@esbuild/win32-ia32/-/win32-ia32-0.21.5.tgz#1bfc3ce98aa6ca9a0969e4d2af72144c59c1193b" + integrity sha512-SWXFF1CL2RVNMaVs+BBClwtfZSvDgtL//G/smwAc5oVK/UPu2Gu9tIaRgFmYFFKrmg3SyAjSrElf0TiJ1v8fYA== + +"@esbuild/win32-x64@0.21.5": + version "0.21.5" + resolved "https://registry.yarnpkg.com/@esbuild/win32-x64/-/win32-x64-0.21.5.tgz#acad351d582d157bb145535db2a6ff53dd514b5c" + integrity sha512-tQd/1efJuzPC6rCFwEvLtci/xNFcTZknmXs98FYDfGE4wP9ClFV98nyKrzJKVPMhdDnjzLhdUyMX4PsQAPjwIw== "@hapi/hoek@^9.0.0": version "9.2.0" resolved "https://registry.npmjs.org/@hapi/hoek/-/hoek-9.2.0.tgz" integrity sha512-sqKVVVOe5ivCaXDWivIJYVSaEgdQK9ul7a4Kity5Iw7u9+wBAPbX1RMSnLLmp7O4Vzj0WOWwMAJsTL00xwaNug== -"@hapi/topo@^5.0.0": - version "5.0.0" - resolved "https://registry.npmjs.org/@hapi/topo/-/topo-5.0.0.tgz" - integrity sha512-tFJlT47db0kMqVm3H4nQYgn6Pwg10GTZHb1pwmSiv1K4ks6drQOtfEF5ZnPjkvC+y4/bUPHK+bc87QvLcL+WMw== +"@hapi/hoek@^9.3.0": + version "9.3.0" + resolved "https://registry.yarnpkg.com/@hapi/hoek/-/hoek-9.3.0.tgz#8368869dcb735be2e7f5cb7647de78e167a251fb" + integrity sha512-/c6rf4UJlmHlC9b5BaNvzAcFv7HZ2QHaV0D4/HNlBdvFnvQq8RI4kYdhyPCl7Xj+oWvTWQ8ujhqS53LIgAe6KQ== + +"@hapi/topo@^5.1.0": + version "5.1.0" + resolved "https://registry.yarnpkg.com/@hapi/topo/-/topo-5.1.0.tgz#dc448e332c6c6e37a4dc02fd84ba8d44b9afb012" + integrity sha512-foQZKJig7Ob0BMAYBfcJk8d77QtOe7Wo4ox7ff1lQYoNNAb6jwcY1ncdoy2e9wQZzvNy7ODZCYJkK8kzmcAnAg== dependencies: "@hapi/hoek" "^9.0.0" @@ -188,17 +191,17 @@ "@nodelib/fs.scandir" "2.1.5" fastq "^1.6.0" -"@sideway/address@^4.1.3": - version "4.1.3" - resolved "https://registry.npmjs.org/@sideway/address/-/address-4.1.3.tgz" - integrity sha512-8ncEUtmnTsMmL7z1YPB47kPUq7LpKWJNFPsRzHiIajGC5uXlWGn+AmkYPcHNl8S4tcEGx+cnORnNYaw2wvL+LQ== +"@sideway/address@^4.1.5": + version "4.1.5" + resolved "https://registry.yarnpkg.com/@sideway/address/-/address-4.1.5.tgz#4bc149a0076623ced99ca8208ba780d65a99b9d5" + integrity sha512-IqO/DUQHUkPeixNQ8n0JA6102hT9CmaljNTPmQ1u8MEhBo/R4Q8eKLN/vGZxuebwOroDB4cbpjheD4+/sKFK4Q== dependencies: "@hapi/hoek" "^9.0.0" -"@sideway/formula@^3.0.0": - version "3.0.0" - resolved "https://registry.npmjs.org/@sideway/formula/-/formula-3.0.0.tgz" - integrity sha512-vHe7wZ4NOXVfkoRb8T5otiENVlT7a3IAiw7H5M2+GO+9CDgcVUUsX1zalAztCmwyOr2RUTGJdgB+ZvSVqmdHmg== +"@sideway/formula@^3.0.1": + version "3.0.1" + resolved "https://registry.yarnpkg.com/@sideway/formula/-/formula-3.0.1.tgz#80fcbcbaf7ce031e0ef2dd29b1bfc7c3f583611f" + integrity sha512-/poHZJJVjx3L+zVD6g9KgHfYnb443oi7wLu/XKojDviHy6HOEOA6z1Trk5aR1dGcmPenJEgb2sK2I80LeS3MIg== "@sideway/pinpoint@^2.0.0": version "2.0.0" @@ -257,25 +260,22 @@ dependencies: "@types/istanbul-lib-report" "*" -"@types/lodash@^4.14.175": - version "4.14.180" - resolved "https://registry.npmjs.org/@types/lodash/-/lodash-4.14.180.tgz" - integrity sha512-XOKXa1KIxtNXgASAnwj7cnttJxS4fksBRywK/9LzRV5YxrF80BXZIGeQSuoESQ/VkUj30Ae0+YcuHc15wJCB2g== - -"@types/lodash@^4.14.191": - version "4.14.191" - resolved "https://registry.yarnpkg.com/@types/lodash/-/lodash-4.14.191.tgz#09511e7f7cba275acd8b419ddac8da9a6a79e2fa" - integrity sha512-BdZ5BCCvho3EIXw6wUCXHe7rS53AIDPLE+JzwgT+OsJk53oBfbSmZZ7CX4VaRoN78N+TJpFi9QPlfIVNmJYWxQ== +"@types/lodash@^4.17.5": + version "4.17.5" + resolved "https://registry.yarnpkg.com/@types/lodash/-/lodash-4.17.5.tgz#e6c29b58e66995d57cd170ce3e2a61926d55ee04" + integrity sha512-MBIOHVZqVqgfro1euRDWX7OO0fBVUUMrN6Pwm8LQsz8cWhEpihlvR70ENj3f40j58TNxZaWv2ndSkInykNBBJw== "@types/node@*": version "18.11.9" resolved "https://registry.npmjs.org/@types/node/-/node-18.11.9.tgz" integrity sha512-CRpX21/kGdzjOpFsZSkcrXMGIBWMGNIHXXBVFSH+ggkftxg+XYP20TESbh+zFvFj3EQOl5byk0HTRn1IL6hbqg== -"@types/node@^18.11.18": - version "18.11.18" - resolved "https://registry.yarnpkg.com/@types/node/-/node-18.11.18.tgz#8dfb97f0da23c2293e554c5a50d61ef134d7697f" - integrity sha512-DHQpWGjyQKSHj3ebjFI/wRKcqQcdR+MoFBygntYOZytCqNfkd2ZC4ARDJ2DQqhjH5p85Nnd3jhUJIXrszFX/JA== +"@types/node@^20.14.2": + version "20.14.2" + resolved "https://registry.yarnpkg.com/@types/node/-/node-20.14.2.tgz#a5f4d2bcb4b6a87bffcaa717718c5a0f208f4a18" + integrity sha512-xyu6WAMVwv6AKFLB+e/7ySZVr/0zLCzOa7rSpq6jNwpqOrUbcACDWC+53d4n2QHOnDou0fbIsg8wZu/sxrnI4Q== + dependencies: + undici-types "~5.26.4" "@types/strip-bom@^3.0.0": version "3.0.0" @@ -481,33 +481,34 @@ dynamic-dedupe@^0.3.0: dependencies: xtend "^4.0.0" -esbuild@^0.17.2: - version "0.17.2" - resolved "https://registry.yarnpkg.com/esbuild/-/esbuild-0.17.2.tgz#c37ee608434be1c0e79f872c8bd484fb46af59df" - integrity sha512-odaHSgtYafOXt2nSISwdWlfRkb4ceMX3akY1mWspQpT08jsqVYEK1XtVusr250Rmbx8AVNWjMPI/yyvKqxOKMw== +esbuild@^0.21.5, esbuild@~0.21.4: + version "0.21.5" + resolved "https://registry.yarnpkg.com/esbuild/-/esbuild-0.21.5.tgz#9ca301b120922959b766360d8ac830da0d02997d" + integrity sha512-mg3OPMV4hXywwpoDxu3Qda5xCKQi+vCTZq8S9J/EpkhB2HzKXq4SNFZE3+NK93JYxc8VMSep+lOUSC/RVKaBqw== optionalDependencies: - "@esbuild/android-arm" "0.17.2" - "@esbuild/android-arm64" "0.17.2" - "@esbuild/android-x64" "0.17.2" - "@esbuild/darwin-arm64" "0.17.2" - "@esbuild/darwin-x64" "0.17.2" - "@esbuild/freebsd-arm64" "0.17.2" - "@esbuild/freebsd-x64" "0.17.2" - "@esbuild/linux-arm" "0.17.2" - "@esbuild/linux-arm64" "0.17.2" - "@esbuild/linux-ia32" "0.17.2" - "@esbuild/linux-loong64" "0.17.2" - "@esbuild/linux-mips64el" "0.17.2" - "@esbuild/linux-ppc64" "0.17.2" - "@esbuild/linux-riscv64" "0.17.2" - "@esbuild/linux-s390x" "0.17.2" - "@esbuild/linux-x64" "0.17.2" - "@esbuild/netbsd-x64" "0.17.2" - "@esbuild/openbsd-x64" "0.17.2" - "@esbuild/sunos-x64" "0.17.2" - "@esbuild/win32-arm64" "0.17.2" - "@esbuild/win32-ia32" "0.17.2" - "@esbuild/win32-x64" "0.17.2" + "@esbuild/aix-ppc64" "0.21.5" + "@esbuild/android-arm" "0.21.5" + "@esbuild/android-arm64" "0.21.5" + "@esbuild/android-x64" "0.21.5" + "@esbuild/darwin-arm64" "0.21.5" + "@esbuild/darwin-x64" "0.21.5" + "@esbuild/freebsd-arm64" "0.21.5" + "@esbuild/freebsd-x64" "0.21.5" + "@esbuild/linux-arm" "0.21.5" + "@esbuild/linux-arm64" "0.21.5" + "@esbuild/linux-ia32" "0.21.5" + "@esbuild/linux-loong64" "0.21.5" + "@esbuild/linux-mips64el" "0.21.5" + "@esbuild/linux-ppc64" "0.21.5" + "@esbuild/linux-riscv64" "0.21.5" + "@esbuild/linux-s390x" "0.21.5" + "@esbuild/linux-x64" "0.21.5" + "@esbuild/netbsd-x64" "0.21.5" + "@esbuild/openbsd-x64" "0.21.5" + "@esbuild/sunos-x64" "0.21.5" + "@esbuild/win32-arm64" "0.21.5" + "@esbuild/win32-ia32" "0.21.5" + "@esbuild/win32-x64" "0.21.5" fast-glob@^3.2.2: version "3.2.11" @@ -544,6 +545,11 @@ fsevents@~2.3.1: resolved "https://registry.npmjs.org/fsevents/-/fsevents-2.3.1.tgz" integrity sha512-YR47Eg4hChJGAB1O3yEAOkGO+rlzutoICGqGo9EZ4lKWokzZRSyIW1QmTzqjtw8MJdj9srP869CuWw/hyzSiBw== +fsevents@~2.3.3: + version "2.3.3" + resolved "https://registry.yarnpkg.com/fsevents/-/fsevents-2.3.3.tgz#cac6407785d03675a2a5e1a5305c697b347d90d6" + integrity sha512-5xoDfX+fL7faATnagmWPpbFtwh/R77WmMMqqHGS65C3vvB0YHrgF+B1YmZ3441tMj5n63k0212XNoJwzlhffQw== + function-bind@^1.1.1: version "1.1.1" resolved "https://registry.npmjs.org/function-bind/-/function-bind-1.1.1.tgz" @@ -554,6 +560,13 @@ get-func-name@^2.0.0: resolved "https://registry.npmjs.org/get-func-name/-/get-func-name-2.0.0.tgz" integrity sha1-6td0q+5y4gQJQzoGY2YCPdaIekE= +get-tsconfig@^4.7.5: + version "4.7.5" + resolved "https://registry.yarnpkg.com/get-tsconfig/-/get-tsconfig-4.7.5.tgz#5e012498579e9a6947511ed0cd403272c7acbbaf" + integrity sha512-ZCuZCnlqNzjb4QprAzXKdpp/gh6KTxSJuw3IBsPnV/7fV4NxC9ckB+vPTt8w7fJA0TaSD7c55BR47JD6MEDyDw== + dependencies: + resolve-pkg-maps "^1.0.0" + glob-parent@^5.1.2: version "5.1.2" resolved "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.2.tgz" @@ -673,15 +686,15 @@ jest-get-type@^26.3.0: resolved "https://registry.npmjs.org/jest-get-type/-/jest-get-type-26.3.0.tgz" integrity sha512-TpfaviN1R2pQWkIihlfEanwOXK0zcxrKEE4MlU6Tn7keoXdN6/3gK/xl0yEh8DOunn5pOVGKf8hB4R9gVh04ig== -joi@^17.7.0: - version "17.7.0" - resolved "https://registry.npmjs.org/joi/-/joi-17.7.0.tgz" - integrity sha512-1/ugc8djfn93rTE3WRKdCzGGt/EtiYKxITMO4Wiv6q5JL1gl9ePt4kBsl1S499nbosspfctIQTpYIhSmHA3WAg== +joi@^17.13.1: + version "17.13.1" + resolved "https://registry.yarnpkg.com/joi/-/joi-17.13.1.tgz#9c7b53dc3b44dd9ae200255cc3b398874918a6ca" + integrity sha512-vaBlIKCyo4FCUtCm7Eu4QZd/q02bWcxfUO6YSXAZOWF6gzcLBeba8kwotUdYJjDLW8Cz8RywsSOqiNJZW0mNvg== dependencies: - "@hapi/hoek" "^9.0.0" - "@hapi/topo" "^5.0.0" - "@sideway/address" "^4.1.3" - "@sideway/formula" "^3.0.0" + "@hapi/hoek" "^9.3.0" + "@hapi/topo" "^5.1.0" + "@sideway/address" "^4.1.5" + "@sideway/formula" "^3.0.1" "@sideway/pinpoint" "^2.0.0" lodash-es@^4.17.21: @@ -746,11 +759,6 @@ ms@^2.1.2: resolved "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz" integrity sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA== -nanoclone@^0.2.1: - version "0.2.1" - resolved "https://registry.npmjs.org/nanoclone/-/nanoclone-0.2.1.tgz" - integrity sha512-wynEP02LmIbLpcYw8uBKpcfF6dmg2vcpKqxeH5UcoKEYdExslsdUA4ugFauuaeYdTB76ez6gJW8XAZ6CgkXYxA== - normalize-path@^3.0.0, normalize-path@~3.0.0: version "3.0.0" resolved "https://registry.npmjs.org/normalize-path/-/normalize-path-3.0.0.tgz" @@ -793,10 +801,10 @@ platform@^1.3.3: resolved "https://registry.npmjs.org/platform/-/platform-1.3.6.tgz" integrity sha512-fnWVljUchTro6RiCFvCXBbNhJc2NijN7oIQxbwsyL0buWJPG85v81ehlHI9fXrJsMNgTofEoWIQeClKpgxFLrg== -prettier@^2.8.3: - version "2.8.3" - resolved "https://registry.yarnpkg.com/prettier/-/prettier-2.8.3.tgz#ab697b1d3dd46fb4626fbe2f543afe0cc98d8632" - integrity sha512-tJ/oJ4amDihPoufT5sM0Z1SKEuKay8LfVAMlbbhnnkvt6BUserZylqo2PN+p9KeljLr0OHa2rXHU1T8reeoTrw== +prettier@^3.3.2: + version "3.3.2" + resolved "https://registry.yarnpkg.com/prettier/-/prettier-3.3.2.tgz#03ff86dc7c835f2d2559ee76876a3914cec4a90a" + integrity sha512-rAVeHYMcv8ATV5d508CFdn+8/pHPpXeIid1DdrPwXnaAdH7cqjVbpJaT5eq4yRAFU/lsbwYwSF/n5iNrdJHPQA== pretty-format@^26.6.2: version "26.6.2" @@ -808,10 +816,10 @@ pretty-format@^26.6.2: ansi-styles "^4.0.0" react-is "^17.0.1" -property-expr@^2.0.4: - version "2.0.5" - resolved "https://registry.npmjs.org/property-expr/-/property-expr-2.0.5.tgz" - integrity sha512-IJUkICM5dP5znhCckHSv30Q4b5/JA5enCtkRHYaOVOAocnH/1BQEYTC5NMfT3AVl/iXKdr3aqQbQn9DxyWknwA== +property-expr@^2.0.5: + version "2.0.6" + resolved "https://registry.yarnpkg.com/property-expr/-/property-expr-2.0.6.tgz#f77bc00d5928a6c748414ad12882e83f24aec1e8" + integrity sha512-SVtmxhRE/CGkn3eZY1T6pC8Nln6Fr/lu1mKSgRud0eC73whjGfoAogbn78LkD8aFL0zz3bAFerKSnOl7NlErBA== queue-microtask@^1.2.2: version "1.2.3" @@ -830,10 +838,10 @@ readdirp@~3.5.0: dependencies: picomatch "^2.2.1" -regenerator-runtime@^0.13.4: - version "0.13.9" - resolved "https://registry.npmjs.org/regenerator-runtime/-/regenerator-runtime-0.13.9.tgz" - integrity sha512-p3VT+cOEgxFsRRA9X4lkI1E+k2/CtnKtU4gcxyaCUreilL/vqI6CdZ3wxVUx3UOUg+gnUOQQcRI7BmSI656MYA== +resolve-pkg-maps@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/resolve-pkg-maps/-/resolve-pkg-maps-1.0.0.tgz#616b3dc2c57056b5588c31cdf4b3d64db133720f" + integrity sha512-seS2Tj26TBVOC2NIc2rOe2y2ZO7efxITtLZcGSOnHHNOQ7CkiUBfw0Iw2ck6xkIhPwLhKNLS8BO+hEpngQlqzw== resolve@^1.0.0: version "1.19.0" @@ -904,6 +912,11 @@ time-span@^4.0.0: dependencies: convert-hrtime "^3.0.0" +tiny-case@^1.0.3: + version "1.0.3" + resolved "https://registry.yarnpkg.com/tiny-case/-/tiny-case-1.0.3.tgz#d980d66bc72b5d5a9ca86fb7c9ffdb9c898ddd03" + integrity sha512-Eet/eeMhkO6TX8mnUteS9zgPbUMQa4I6Kkp5ORiBD5476/m+PIRiumP5tmh5ioJpH7k51Kehawy2UDfsnxxY8Q== + to-regex-range@^5.0.1: version "5.0.1" resolved "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz" @@ -956,10 +969,10 @@ ts-node@^10.4.0: v8-compile-cache-lib "^3.0.1" yn "3.1.1" -ts-node@^10.9.1: - version "10.9.1" - resolved "https://registry.npmjs.org/ts-node/-/ts-node-10.9.1.tgz" - integrity sha512-NtVysVPkxxrwFGUUxGYhfux8k78pQB3JqYBXlLRZgdGUqTO5wU/UyHop5p70iEbGhB7q5KmiZiU0Y3KlJrScEw== +ts-node@^10.9.2: + version "10.9.2" + resolved "https://registry.yarnpkg.com/ts-node/-/ts-node-10.9.2.tgz#70f021c9e185bccdca820e26dc413805c101c71f" + integrity sha512-f0FFpIdcHgn8zcPSbf1dRevwt047YMnaiJM3u2w2RewrB+fob/zePZcrOyQoLMMO7aBIddLcQIEK5dYjkLnGrQ== dependencies: "@cspotcode/source-map-support" "^0.8.0" "@tsconfig/node10" "^1.0.7" @@ -985,15 +998,35 @@ tsconfig@^7.0.0: strip-bom "^3.0.0" strip-json-comments "^2.0.0" +tsx@^4.15.5: + version "4.15.5" + resolved "https://registry.yarnpkg.com/tsx/-/tsx-4.15.5.tgz#9c1ddb10ed0035c595c9b3e00ae40a3647a94c82" + integrity sha512-iKi8jQ2VBmZ2kU/FkGkL2OSHBHsazsUzsdC/W/RwhKIEsIoZ1alCclZHP5jGfNHEaEWUJFM1GquzCf+4db3b0w== + dependencies: + esbuild "~0.21.4" + get-tsconfig "^4.7.5" + optionalDependencies: + fsevents "~2.3.3" + type-detect@^4.0.0, type-detect@^4.0.5: version "4.0.8" resolved "https://registry.npmjs.org/type-detect/-/type-detect-4.0.8.tgz" integrity sha512-0fr/mIH1dlO+x7TlcMy+bIDqKPsw/70tVyeHW787goQjhmqaZe10uwLujubK9q9Lg6Fiho1KUKDYz0Z7k7g5/g== -typescript@^4.9.4: - version "4.9.4" - resolved "https://registry.yarnpkg.com/typescript/-/typescript-4.9.4.tgz#a2a3d2756c079abda241d75f149df9d561091e78" - integrity sha512-Uz+dTXYzxXXbsFpM86Wh3dKCxrQqUcVMxwU54orwlJjOpO3ao8L7j5lH+dWfTwgCwIuM9GQ2kvVotzYJMXTBZg== +type-fest@^2.19.0: + version "2.19.0" + resolved "https://registry.yarnpkg.com/type-fest/-/type-fest-2.19.0.tgz#88068015bb33036a598b952e55e9311a60fd3a9b" + integrity sha512-RAH822pAdBgcNMAfWnCBU3CFZcfZ/i1eZjwFU/dsLKumyuuP3niueg2UAukXYF0E2AAoc82ZSSf9J0WQBinzHA== + +typescript@^5.4.5: + version "5.4.5" + resolved "https://registry.yarnpkg.com/typescript/-/typescript-5.4.5.tgz#42ccef2c571fdbd0f6718b1d1f5e6e5ef006f611" + integrity sha512-vcI4UpRgg81oIRUFwR0WSIHKt11nJ7SAVlYNIu+QpqeyXP+gpQJy/Z4+F0aGxSE4MqwjyXvW/TzgkLAx2AGHwQ== + +undici-types@~5.26.4: + version "5.26.5" + resolved "https://registry.yarnpkg.com/undici-types/-/undici-types-5.26.5.tgz#bcd539893d00b56e964fd2657a4866b221a65617" + integrity sha512-JlCMO+ehdEIKqlFxk6IfVoAUVmgz7cU7zD/h9XZ0qzeosSHmUJVOzSQvvYSYWXkFXC+IfLKSIffhv0sVZup6pA== v8-compile-cache-lib@^3.0.1: version "3.0.1" @@ -1015,15 +1048,12 @@ yn@3.1.1: resolved "https://registry.npmjs.org/yn/-/yn-3.1.1.tgz" integrity sha512-Ux4ygGWsu2c7isFWe8Yu1YluJmqVhxqK2cLXNQA5AcC3QfbGNpM7fu0Y8b/z16pXLnFxZYvWhd3fhBY9DLmC6Q== -yup@^0.32.11: - version "0.32.11" - resolved "https://registry.npmjs.org/yup/-/yup-0.32.11.tgz" - integrity sha512-Z2Fe1bn+eLstG8DRR6FTavGD+MeAwyfmouhHsIUgaADz8jvFKbO/fXc2trJKZg+5EBjh4gGm3iU/t3onKlXHIg== +yup@^1.4.0: + version "1.4.0" + resolved "https://registry.yarnpkg.com/yup/-/yup-1.4.0.tgz#898dcd660f9fb97c41f181839d3d65c3ee15a43e" + integrity sha512-wPbgkJRCqIf+OHyiTBQoJiP5PFuAXaWiJK6AmYkzQAh5/c2K9hzSApBZG5wV9KoKSePF7sAxmNSvh/13YHkFDg== dependencies: - "@babel/runtime" "^7.15.4" - "@types/lodash" "^4.14.175" - lodash "^4.17.21" - lodash-es "^4.17.21" - nanoclone "^0.2.1" - property-expr "^2.0.4" + property-expr "^2.0.5" + tiny-case "^1.0.3" toposort "^2.0.2" + type-fest "^2.19.0" From 7eb146b476c46d53315caad0c408d05ba47bb3cc Mon Sep 17 00:00:00 2001 From: trapcodeio Date: Mon, 17 Jun 2024 00:46:17 +0100 Subject: [PATCH 02/15] Add $strict rule support --- japaFile.js | 2 +- src/Abolish.ts | 78 ++++++++++++++-- src/Compiler.ts | 49 +++++++++- src/types.ts | 2 +- tests/compiler.spec.ts | 6 +- tests/play.ts | 0 tests/super_rules.spec.ts | 190 ++++++++++++++++++++++++++++++++++++++ 7 files changed, 312 insertions(+), 15 deletions(-) delete mode 100644 tests/play.ts create mode 100644 tests/super_rules.spec.ts diff --git a/japaFile.js b/japaFile.js index 2519d26..db81f96 100644 --- a/japaFile.js +++ b/japaFile.js @@ -4,7 +4,7 @@ const { configure } = require("japa"); configure({ files: [ - // "tests/compiler.spec.ts" + // "tests/super_rules.spec.ts" "tests/*.spec.ts", "tests/*/**/*.spec.ts" ] diff --git a/src/Abolish.ts b/src/Abolish.ts index eb3c3b8..07bd081 100644 --- a/src/Abolish.ts +++ b/src/Abolish.ts @@ -31,6 +31,7 @@ import { CompiledValidator } from "./Compiler"; import { assertType } from "./types-checker"; +import { string } from "joi"; type Job = { $name: string | false; @@ -68,7 +69,7 @@ export class AttemptError extends Error { */ export const SuperKeys = Object.freeze({ Wildcards: new Set(["*", "$"]), - Fields: new Set(["*", "$", "$include"]), + Fields: new Set(["*", "$", "$include", "$strict"]), Rules: new Set(["$name", "$skip", "$error", "$errors"]) }); @@ -294,10 +295,46 @@ class Abolish { if (!Array.isArray(includeKeys)) throw new Error(`$include has to be an array!`); } - let keysToBeValidated = Object.keys(rules); - // remove SUPER_RULES from keysToBeValidated - keysToBeValidated = keysToBeValidated.filter((key) => !SuperKeys.Fields.has(key)); + let keysToBeValidated = Object.keys(rules).filter((key) => !SuperKeys.Fields.has(key)); + + let allowedKeys: string[] | undefined = undefined; + + if (rules.hasOwnProperty("$strict")) { + if (rules["$strict"] === true) { + allowedKeys = keysToBeValidated; + } else if (Array.isArray(rules["$strict"])) { + // if strict is an array, then append it to allowedKeys + allowedKeys = rules["$strict"]; + + for (const key of keysToBeValidated) { + if (!allowedKeys.includes(key)) allowedKeys.push(key); + } + } else { + throw new Error(`$strict must be a boolean or an array of allowed keys.`); + } + + // add $include keys to allowedKeys + allowedKeys = allowedKeys.concat(includeKeys); + + // check if all keys in object are allowed + const objectKeys = Object.keys(validated); + const unknownKeys = objectKeys.filter((key) => !allowedKeys!.includes(key)); + + if (unknownKeys.length > 0) { + return [ + { + code: "object.unknown", + type: "internal", + key: "$strict", + validator: "$strict", + message: "Data contains unknown fields!", + data: { unknown: unknownKeys } + }, + {} as R + ]; + } + } // Loop through defined rules for (const rule of keysToBeValidated) { @@ -903,10 +940,12 @@ class Abolish { const compiled = new AbolishCompiled(Schema(schema)); - let internalWildcardRules: AbolishRule | undefined; + let internalWildcardRules: AbolishRule | boolean | undefined; let includeFields: string[] = []; + let allowedKeys: string[] | undefined = undefined; + let schemaEntries = Object.entries(schema); - for (const [field, rules] of Object.entries(schema)) { + for (const [field, rules] of schemaEntries) { /** * Check for wildcard rules (*, $) */ @@ -919,15 +958,27 @@ class Abolish { */ if (typeof internalWildcardRules === "string") internalWildcardRules = StringToRules(internalWildcardRules); - } else if (field === "$include") { + } + + if (field === "$include") { includeFields = rules as string[]; } + + if (field === "$strict") { + if (rules === true) { + allowedKeys = Object.keys(schema); + } else if (Array.isArray(rules)) { + allowedKeys = rules as string[]; + } else { + throw new Error(`$strict must be a boolean or an array of allowed keys.`); + } + } } /** * Loop Through each field and rule */ - for (const [field, rules] of Object.entries(schema)) { + for (const [field, rules] of schemaEntries) { if (SuperKeys.Fields.has(field)) continue; const compiledRule: CompiledRule = { validators: {} }; @@ -1104,6 +1155,17 @@ class Abolish { // Check if any field has dot notation compiled.fieldsHasDotNotation = compiled.fields.some(hasDotNotation); + // add allowedKeys + if (allowedKeys) { + // add $include keys to allowedKeys + allowedKeys = compiled.fields.concat(includeFields).concat(allowedKeys); + + // remove SUPER_RULES from allowedKeys + allowedKeys = allowedKeys.filter((key) => !SuperKeys.Fields.has(key)); + + compiled.allowedFields = allowedKeys; + } + return compiled as AbolishCompiledObject; } diff --git a/src/Compiler.ts b/src/Compiler.ts index 19f5c77..3a31a43 100644 --- a/src/Compiler.ts +++ b/src/Compiler.ts @@ -56,7 +56,12 @@ export class AbolishCompiled { /** * Fields included */ - public includedFields: string[] = []; + public includedFields?: string[]; + + /** + * Allowed Fields when $strict rule is used + */ + public allowedFields?: string[]; /** * If fields has any dot notation set to true @@ -113,6 +118,25 @@ export class AbolishCompiled { */ const validated: Record = { ...data }; + if (this.allowedFields) { + const objKeys = Object.keys(validated); + const unknownKeys = objKeys.filter((key) => !this.allowedFields!.includes(key)); + + if (unknownKeys.length) { + return [ + { + code: "object.unknown", + type: "internal", + key: "$strict", + validator: "$strict", + message: "Data contains unknown fields!", + data: { unknown: unknownKeys } + }, + {} as R + ]; + } + } + /** * Hold current fields * This will be used in the skip section to remove fields that are not included in the input @@ -139,7 +163,7 @@ export class AbolishCompiled { if ($skip) { // if field is not in included fields, remove it from fields - if (!this.includedFields.includes(field)) { + if (this.includedFields && !this.includedFields.includes(field)) { fields = fields.filter((f) => f !== field); } @@ -216,6 +240,25 @@ export class AbolishCompiled { */ const validated: Record = { ...data }; + if (this.allowedFields) { + const objKeys = Object.keys(validated); + const unknownKeys = objKeys.filter((key) => !this.allowedFields!.includes(key)); + + if (unknownKeys.length) { + return [ + { + code: "object.unknown", + type: "internal", + key: "$strict", + validator: "$strict", + message: "Data contains unknown fields!", + data: { unknown: unknownKeys } + }, + {} as R + ]; + } + } + /** * Hold current fields * This will be used in the skip section to remove fields that are not included in the input @@ -242,7 +285,7 @@ export class AbolishCompiled { if ($skip) { // if field is not in included fields, remove it from fields - if (!this.includedFields.includes(field)) { + if (this.includedFields && !this.includedFields.includes(field)) { fields = fields.filter((f) => f !== field); } diff --git a/src/types.ts b/src/types.ts index be182e6..3707532 100644 --- a/src/types.ts +++ b/src/types.ts @@ -74,5 +74,5 @@ export type AbolishRule = string | string[] | Record | AbolishRule[ // >; export type AbolishSchema = Record> = Record< keyof Keys | string, - AbolishRule + AbolishRule | boolean >; diff --git a/tests/compiler.spec.ts b/tests/compiler.spec.ts index 2e1375b..96bbc66 100644 --- a/tests/compiler.spec.ts +++ b/tests/compiler.spec.ts @@ -33,7 +33,8 @@ test.group("Compiler", () => { assert.isTrue(compiledKeys.every((key) => compiled.fields.includes(key))); // check that fields has included fields - assert.isTrue(compiled.includedFields.every((key) => compiled.fields.includes(key))); + if (compiled.includedFields) + assert.isTrue(compiled.includedFields.every((key) => compiled.fields.includes(key))); }); test("compileObject", (assert) => { @@ -57,7 +58,8 @@ test.group("Compiler", () => { // check that fields has included fields assert.deepEqual(compiled.includedFields, ["age"]); - assert.isTrue(compiled.includedFields.every((key) => compiled.fields.includes(key))); + if (compiled.includedFields) + assert.isTrue(compiled.includedFields.every((key) => compiled.fields.includes(key))); }); test("Validate Variable", (assert) => { diff --git a/tests/play.ts b/tests/play.ts deleted file mode 100644 index e69de29..0000000 diff --git a/tests/super_rules.spec.ts b/tests/super_rules.spec.ts new file mode 100644 index 0000000..947d79c --- /dev/null +++ b/tests/super_rules.spec.ts @@ -0,0 +1,190 @@ +import test from "japa"; +import { Abolish } from "../index"; +import { AbolishSchema } from "../src/types"; +import { $skip } from "../src/helpers"; +import { Assert } from "japa/build/src/Assert"; + +function mayCompile(schema: AbolishSchema, compile: boolean): any { + return compile ? Abolish.compileObject(schema) : schema; +} + +function TestWildcardKeys(key: "*" | "$", assert: Assert, compiled: boolean) { + /** + * ======== Passes ========= + */ + let rules = mayCompile({ [key]: "required|typeof:string", email: true }, compiled); + let data: Record = { email: "mail@example.com" }; + let [err, body] = Abolish.validate(data, rules); + + assert.isUndefined(err); + assert.deepEqual(body, data); + + // test with email rule having extra rules + rules = mayCompile({ [key]: "required|typeof:string", email: "minLength:5" }, compiled); + [err, body] = Abolish.validate(data, rules); + + assert.isUndefined(err); + assert.deepEqual(body, data); + + /** + * ======== Fails ========= + */ + rules = mayCompile({ [key]: "required|typeof:string", email: true }, compiled); + data = { email: 123 }; + [err] = Abolish.validate(data, rules); + + assert.isDefined(err); + assert.equal(err!.key, "email"); + assert.equal(err!.validator, "typeof"); + + // test with email rule having extra rules + rules = mayCompile({ [key]: "required|typeof:string", email: "minLength:5" }, compiled); + // use ____ as email to trigger minLength error + body = { email: "____" }; + [err] = Abolish.validate(body, rules); + + assert.isDefined(err); + assert.equal(err!.key, "email"); + assert.equal(err!.validator, "minLength"); +} + +function Test$Include(assert: Assert, compiled: boolean) { + /** + * ======== Passes ========= + */ + let rules: AbolishSchema = mayCompile( + { $include: ["password"], email: "required|typeof:string" }, + compiled + ); + let data: Record = { email: "mail@example.com", password: "12345" }; + let [err, body] = Abolish.validate(data, rules); + + assert.isUndefined(err); + assert.deepEqual(body, data); + + /** + * ======== Fails ========= + */ + rules = mayCompile({ email: "required|typeof:string" }, compiled); + [err, body] = Abolish.validate(data, rules); + + assert.isUndefined(err); + assert.deepEqual(body, { email: data.email }); +} + +function Test$Strict(assert: Assert, compiled: boolean) { + /** + * Test with $strict set to true + */ + let rules: AbolishSchema = mayCompile( + { $strict: true, email: "required|typeof:string" }, + compiled + ); + let data: Record = { email: "mail@example.com", password: "12345" }; + let [err, body] = Abolish.validate(data, rules); + + // there should be an error because password is not defined in the rules + assert.isDefined(err); + assert.equal(err!.code, "object.unknown"); + assert.isDefined(err!.data); + assert.deepEqual(err!.data["unknown"], ["password"]); + + /** + * Test with $strict set to array of keys + */ + rules = mayCompile({ $strict: ["password"], email: "required|typeof:string" }, compiled); + [err, body] = Abolish.validate(data, rules); + + // there should be no error because password is defined in the rules + assert.isUndefined(err); + assert.deepEqual(body, { email: data.email }); + + /** + * Test with $strict set to true and $include is set + */ + rules = mayCompile( + { $strict: true, $include: ["password"], email: "required|typeof:string" }, + compiled + ); + [err, body] = Abolish.validate(data, rules); + + // there should be no error because $include field is appended to the rules + assert.isUndefined(err); + assert.deepEqual(body, data); +} + +function Test$skip(compiled: boolean) { + let data: Record = { email: 123 }; + const name = compiled ? "$skip Compiled" : "$skip"; + + test(`${name}: true`, (assert) => { + const rules = mayCompile({ email: [{ $skip: true }, "required|typeof:string"] }, compiled); + + let [err, body] = Abolish.validate(data, rules); + assert.isUndefined(err); + assert.deepEqual(body, {}); + }); + + test(`${name}: function resolved true`, (assert) => { + const rules = mayCompile( + { email: [$skip((v) => v === 123), "required|typeof:string"] }, + compiled + ); + let [err, body] = Abolish.validate(data, rules); + assert.isUndefined(err); + assert.deepEqual(body, {}); + }); + + test(`${name}: function resolved false`, (assert) => { + const rules = mayCompile( + { email: [$skip((v) => v !== 123), "required|typeof:string"] }, + compiled + ); + let [err, body] = Abolish.validate(data, rules); + assert.isDefined(err); + assert.equal(err!.key, "email"); + assert.equal(err!.validator, "typeof"); + }); +} + +test.group("Super Wildcard Keys", () => { + test("*", (assert) => { + TestWildcardKeys("*", assert, false); + }); + + test("* Compiled", (assert) => { + TestWildcardKeys("*", assert, true); + }); + + test("$", (assert) => { + TestWildcardKeys("$", assert, false); + }); + + test("$ Compiled", (assert) => { + TestWildcardKeys("$", assert, true); + }); +}); + +test.group("Super Field Keys", () => { + test("$include", (assert) => { + Test$Include(assert, false); + }); + + test("$include Compiled", (assert) => { + Test$Include(assert, true); + }); + + test("$strict", (assert) => { + Test$Strict(assert, false); + }); + + test("$strict Compiled", (assert) => { + Test$Strict(assert, true); + }); +}); + +test.group("Super Rules Keys", () => { + Test$skip(false); + // Compiled + Test$skip(true); +}); From b6dbcd9866e7b4307253bc5dae5e7d6ed6e3b00d Mon Sep 17 00:00:00 2001 From: trapcodeio Date: Mon, 17 Jun 2024 00:47:31 +0100 Subject: [PATCH 03/15] 6.6.0 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 3ee273f..6548e0d 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "abolish", - "version": "6.5.3", + "version": "6.6.0", "description": "A javascript object validator.", "main": "index.js", "module": "index.esm.js", From d5bb7887ef951a06957f6d080a9bc7c999c944ef Mon Sep 17 00:00:00 2001 From: trapcodeio Date: Mon, 17 Jun 2024 00:54:57 +0100 Subject: [PATCH 04/15] make allowed keys unique --- src/Abolish.ts | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/src/Abolish.ts b/src/Abolish.ts index 07bd081..3e8b527 100644 --- a/src/Abolish.ts +++ b/src/Abolish.ts @@ -305,17 +305,13 @@ class Abolish { allowedKeys = keysToBeValidated; } else if (Array.isArray(rules["$strict"])) { // if strict is an array, then append it to allowedKeys - allowedKeys = rules["$strict"]; - - for (const key of keysToBeValidated) { - if (!allowedKeys.includes(key)) allowedKeys.push(key); - } + allowedKeys = keysToBeValidated.concat(rules["$strict"] as string[]); } else { throw new Error(`$strict must be a boolean or an array of allowed keys.`); } // add $include keys to allowedKeys - allowedKeys = allowedKeys.concat(includeKeys); + allowedKeys = Array.from(new Set(allowedKeys.concat(includeKeys))); // check if all keys in object are allowed const objectKeys = Object.keys(validated); @@ -1163,7 +1159,8 @@ class Abolish { // remove SUPER_RULES from allowedKeys allowedKeys = allowedKeys.filter((key) => !SuperKeys.Fields.has(key)); - compiled.allowedFields = allowedKeys; + // make sure allowedKeys are unique + compiled.allowedFields = Array.from(new Set(allowedKeys)); } return compiled as AbolishCompiledObject; From 02d57dd844a148af3c82b4d29230f9cf2ea81fdd Mon Sep 17 00:00:00 2001 From: trapcodeio Date: Mon, 17 Jun 2024 00:55:04 +0100 Subject: [PATCH 05/15] 6.6.1 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 6548e0d..42c3676 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "abolish", - "version": "6.6.0", + "version": "6.6.1", "description": "A javascript object validator.", "main": "index.js", "module": "index.esm.js", From a0f2b4423bd80d06278dbc9e384961ac90360e5c Mon Sep 17 00:00:00 2001 From: trapcodeio Date: Sat, 20 Jul 2024 17:06:35 +0100 Subject: [PATCH 06/15] update email validator --- validators/string/email.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/validators/string/email.ts b/validators/string/email.ts index 064606e..644ca3f 100644 --- a/validators/string/email.ts +++ b/validators/string/email.ts @@ -8,7 +8,7 @@ export = { if (action === false) return true; // Check if email is valid - const isValidMail = /^\w+([.-]?\w+)*@\w+([.-]?\w+)*(\.\w{2,3})+$/.test(email); + const isValidMail = /^\w+([.-]?\w+)*@\w+([.-]?\w+)*(\.\w{2,6})+$/.test(email); // Convert to lowercase if action is set to lowercase if (isValidMail && action === "lowercase" && modifier) { From 2283834f1e65e9992c893ce9e77654514444c497 Mon Sep 17 00:00:00 2001 From: trapcodeio Date: Sat, 20 Jul 2024 17:08:19 +0100 Subject: [PATCH 07/15] 6.6.2 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 42c3676..05f852d 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "abolish", - "version": "6.6.1", + "version": "6.6.2", "description": "A javascript object validator.", "main": "index.js", "module": "index.esm.js", From 9ec5a8d4a2f1bcfc82285a057712f3e7bed885ee Mon Sep 17 00:00:00 2001 From: trapcodeio Date: Sun, 1 Sep 2024 08:55:16 +0100 Subject: [PATCH 08/15] Add gt and lt --- japaFile.js | 6 ++-- src/ValidatorHelpers.ts | 5 ++- tests/validators/number-validators.spec.ts | 41 ++++++++++++++++++++++ validators/number/gt.ts | 17 +++++++++ validators/number/index.ts | 7 ++++ validators/number/lt.ts | 17 +++++++++ 6 files changed, 89 insertions(+), 4 deletions(-) create mode 100644 tests/validators/number-validators.spec.ts create mode 100644 validators/number/gt.ts create mode 100644 validators/number/index.ts create mode 100644 validators/number/lt.ts diff --git a/japaFile.js b/japaFile.js index db81f96..f151e60 100644 --- a/japaFile.js +++ b/japaFile.js @@ -4,8 +4,8 @@ const { configure } = require("japa"); configure({ files: [ - // "tests/super_rules.spec.ts" - "tests/*.spec.ts", - "tests/*/**/*.spec.ts" + "tests/validators/number-validators.spec.ts" + // "tests/*.spec.ts", + // "tests/*/**/*.spec.ts" ] }); diff --git a/src/ValidatorHelpers.ts b/src/ValidatorHelpers.ts index b71ecd8..ff4fa08 100644 --- a/src/ValidatorHelpers.ts +++ b/src/ValidatorHelpers.ts @@ -10,6 +10,7 @@ export function registerAllValidators(abolish: T) { registerValidators(abolish, "object"); registerValidators(abolish, "string"); registerValidators(abolish, "utils"); + registerValidators(abolish, "number"); return abolish; } @@ -21,7 +22,7 @@ export function registerAllValidators(abolish: T) { */ export function registerValidators( abolish: T, - validators: "string" | "array" | "utils" | "object" | "date" + validators: "string" | "array" | "utils" | "object" | "date" | "number" ) { switch (validators) { case "string": @@ -34,5 +35,7 @@ export function registerValidators( return abolish.addGlobalValidators(require("../validators/utils")); case "object": return abolish.addGlobalValidators(require("../validators/object")); + case "number": + return abolish.addGlobalValidators(require("../validators/number")); } } diff --git a/tests/validators/number-validators.spec.ts b/tests/validators/number-validators.spec.ts new file mode 100644 index 0000000..6d0addf --- /dev/null +++ b/tests/validators/number-validators.spec.ts @@ -0,0 +1,41 @@ +/** + * Test all number validators + */ + +import test from "japa"; +import Abolish from "../../src/Abolish"; +import NumberValidators from "../../validators/number"; +import { RuleTyped } from "../../src/functions"; + +test.group("Number Validators", (group) => { + group.before(() => { + Abolish.addGlobalValidators(NumberValidators); + }); + + test("gt", (assert) => { + const [err, value] = Abolish.check(11, RuleTyped({ + gt: 10 + })); + + assert.isUndefined(err); + assert.equal(value, 11); + }) + + test.failing("gt should fail", () => { + Abolish.attempt(10, "gt:10"); + }) + + test("lt", (assert) => { + const [err, value] = Abolish.check(9, RuleTyped({ + lt: 10 + })); + + assert.isUndefined(err); + assert.equal(value, 9); + }) + + test.failing("lt should fail", () => { + Abolish.attempt(10, "lt:10"); + }) + +}); \ No newline at end of file diff --git a/validators/number/gt.ts b/validators/number/gt.ts new file mode 100644 index 0000000..642633b --- /dev/null +++ b/validators/number/gt.ts @@ -0,0 +1,17 @@ +import type { AbolishValidator } from "../../src/types"; + +export = { + name: "gt", + error: ":param must be greater than :option", + validator: (param, option: number, { modifier }) => { + return Number(param) > option + } +}; + +declare module "../../src/validator" { + module AvailableValidators { + interface Options { + gt: number; + } + } +} diff --git a/validators/number/index.ts b/validators/number/index.ts new file mode 100644 index 0000000..b27b129 --- /dev/null +++ b/validators/number/index.ts @@ -0,0 +1,7 @@ +import gt from "./gt"; +import lt from "./lt"; + +export = { + gt, + lt +}; \ No newline at end of file diff --git a/validators/number/lt.ts b/validators/number/lt.ts new file mode 100644 index 0000000..aa3b8ed --- /dev/null +++ b/validators/number/lt.ts @@ -0,0 +1,17 @@ +import type { AbolishValidator } from "../../src/types"; + +export = { + name: "lt", + error: ":param must be less than :option", + validator: (param, option: number, { modifier }) => { + return Number(param) < option + } +}; + +declare module "../../src/validator" { + module AvailableValidators { + interface Options { + lt: number; + } + } +} From 79939a62269428ce9ab18c1e695145c5744c0062 Mon Sep 17 00:00:00 2001 From: trapcodeio Date: Sun, 1 Sep 2024 08:57:41 +0100 Subject: [PATCH 09/15] Update Pkgs --- yarn.lock | 215 +++++++++++++++++++++++++++++++++++++++++++++--------- 1 file changed, 180 insertions(+), 35 deletions(-) diff --git a/yarn.lock b/yarn.lock index a32e822..53129e9 100644 --- a/yarn.lock +++ b/yarn.lock @@ -14,122 +14,237 @@ resolved "https://registry.yarnpkg.com/@esbuild/aix-ppc64/-/aix-ppc64-0.21.5.tgz#c7184a326533fcdf1b8ee0733e21c713b975575f" integrity sha512-1SDgH6ZSPTlggy1yI6+Dbkiz8xzpHJEVAlF/AM1tHPLsf5STom9rwtjE4hKAF20FfXXNTFqEYXyJNWh1GiZedQ== +"@esbuild/aix-ppc64@0.23.1": + version "0.23.1" + resolved "https://registry.yarnpkg.com/@esbuild/aix-ppc64/-/aix-ppc64-0.23.1.tgz#51299374de171dbd80bb7d838e1cfce9af36f353" + integrity sha512-6VhYk1diRqrhBAqpJEdjASR/+WVRtfjpqKuNw11cLiaWpAT/Uu+nokB+UJnevzy/P9C/ty6AOe0dwueMrGh/iQ== + "@esbuild/android-arm64@0.21.5": version "0.21.5" resolved "https://registry.yarnpkg.com/@esbuild/android-arm64/-/android-arm64-0.21.5.tgz#09d9b4357780da9ea3a7dfb833a1f1ff439b4052" integrity sha512-c0uX9VAUBQ7dTDCjq+wdyGLowMdtR/GoC2U5IYk/7D1H1JYC0qseD7+11iMP2mRLN9RcCMRcjC4YMclCzGwS/A== +"@esbuild/android-arm64@0.23.1": + version "0.23.1" + resolved "https://registry.yarnpkg.com/@esbuild/android-arm64/-/android-arm64-0.23.1.tgz#58565291a1fe548638adb9c584237449e5e14018" + integrity sha512-xw50ipykXcLstLeWH7WRdQuysJqejuAGPd30vd1i5zSyKK3WE+ijzHmLKxdiCMtH1pHz78rOg0BKSYOSB/2Khw== + "@esbuild/android-arm@0.21.5": version "0.21.5" resolved "https://registry.yarnpkg.com/@esbuild/android-arm/-/android-arm-0.21.5.tgz#9b04384fb771926dfa6d7ad04324ecb2ab9b2e28" integrity sha512-vCPvzSjpPHEi1siZdlvAlsPxXl7WbOVUBBAowWug4rJHb68Ox8KualB+1ocNvT5fjv6wpkX6o/iEpbDrf68zcg== +"@esbuild/android-arm@0.23.1": + version "0.23.1" + resolved "https://registry.yarnpkg.com/@esbuild/android-arm/-/android-arm-0.23.1.tgz#5eb8c652d4c82a2421e3395b808e6d9c42c862ee" + integrity sha512-uz6/tEy2IFm9RYOyvKl88zdzZfwEfKZmnX9Cj1BHjeSGNuGLuMD1kR8y5bteYmwqKm1tj8m4cb/aKEorr6fHWQ== + "@esbuild/android-x64@0.21.5": version "0.21.5" resolved "https://registry.yarnpkg.com/@esbuild/android-x64/-/android-x64-0.21.5.tgz#29918ec2db754cedcb6c1b04de8cd6547af6461e" integrity sha512-D7aPRUUNHRBwHxzxRvp856rjUHRFW1SdQATKXH2hqA0kAZb1hKmi02OpYRacl0TxIGz/ZmXWlbZgjwWYaCakTA== +"@esbuild/android-x64@0.23.1": + version "0.23.1" + resolved "https://registry.yarnpkg.com/@esbuild/android-x64/-/android-x64-0.23.1.tgz#ae19d665d2f06f0f48a6ac9a224b3f672e65d517" + integrity sha512-nlN9B69St9BwUoB+jkyU090bru8L0NA3yFvAd7k8dNsVH8bi9a8cUAUSEcEEgTp2z3dbEDGJGfP6VUnkQnlReg== + "@esbuild/darwin-arm64@0.21.5": version "0.21.5" resolved "https://registry.yarnpkg.com/@esbuild/darwin-arm64/-/darwin-arm64-0.21.5.tgz#e495b539660e51690f3928af50a76fb0a6ccff2a" integrity sha512-DwqXqZyuk5AiWWf3UfLiRDJ5EDd49zg6O9wclZ7kUMv2WRFr4HKjXp/5t8JZ11QbQfUS6/cRCKGwYhtNAY88kQ== +"@esbuild/darwin-arm64@0.23.1": + version "0.23.1" + resolved "https://registry.yarnpkg.com/@esbuild/darwin-arm64/-/darwin-arm64-0.23.1.tgz#05b17f91a87e557b468a9c75e9d85ab10c121b16" + integrity sha512-YsS2e3Wtgnw7Wq53XXBLcV6JhRsEq8hkfg91ESVadIrzr9wO6jJDMZnCQbHm1Guc5t/CdDiFSSfWP58FNuvT3Q== + "@esbuild/darwin-x64@0.21.5": version "0.21.5" resolved "https://registry.yarnpkg.com/@esbuild/darwin-x64/-/darwin-x64-0.21.5.tgz#c13838fa57372839abdddc91d71542ceea2e1e22" integrity sha512-se/JjF8NlmKVG4kNIuyWMV/22ZaerB+qaSi5MdrXtd6R08kvs2qCN4C09miupktDitvh8jRFflwGFBQcxZRjbw== +"@esbuild/darwin-x64@0.23.1": + version "0.23.1" + resolved "https://registry.yarnpkg.com/@esbuild/darwin-x64/-/darwin-x64-0.23.1.tgz#c58353b982f4e04f0d022284b8ba2733f5ff0931" + integrity sha512-aClqdgTDVPSEGgoCS8QDG37Gu8yc9lTHNAQlsztQ6ENetKEO//b8y31MMu2ZaPbn4kVsIABzVLXYLhCGekGDqw== + "@esbuild/freebsd-arm64@0.21.5": version "0.21.5" resolved "https://registry.yarnpkg.com/@esbuild/freebsd-arm64/-/freebsd-arm64-0.21.5.tgz#646b989aa20bf89fd071dd5dbfad69a3542e550e" integrity sha512-5JcRxxRDUJLX8JXp/wcBCy3pENnCgBR9bN6JsY4OmhfUtIHe3ZW0mawA7+RDAcMLrMIZaf03NlQiX9DGyB8h4g== +"@esbuild/freebsd-arm64@0.23.1": + version "0.23.1" + resolved "https://registry.yarnpkg.com/@esbuild/freebsd-arm64/-/freebsd-arm64-0.23.1.tgz#f9220dc65f80f03635e1ef96cfad5da1f446f3bc" + integrity sha512-h1k6yS8/pN/NHlMl5+v4XPfikhJulk4G+tKGFIOwURBSFzE8bixw1ebjluLOjfwtLqY0kewfjLSrO6tN2MgIhA== + "@esbuild/freebsd-x64@0.21.5": version "0.21.5" resolved "https://registry.yarnpkg.com/@esbuild/freebsd-x64/-/freebsd-x64-0.21.5.tgz#aa615cfc80af954d3458906e38ca22c18cf5c261" integrity sha512-J95kNBj1zkbMXtHVH29bBriQygMXqoVQOQYA+ISs0/2l3T9/kj42ow2mpqerRBxDJnmkUDCaQT/dfNXWX/ZZCQ== +"@esbuild/freebsd-x64@0.23.1": + version "0.23.1" + resolved "https://registry.yarnpkg.com/@esbuild/freebsd-x64/-/freebsd-x64-0.23.1.tgz#69bd8511fa013b59f0226d1609ac43f7ce489730" + integrity sha512-lK1eJeyk1ZX8UklqFd/3A60UuZ/6UVfGT2LuGo3Wp4/z7eRTRYY+0xOu2kpClP+vMTi9wKOfXi2vjUpO1Ro76g== + "@esbuild/linux-arm64@0.21.5": version "0.21.5" resolved "https://registry.yarnpkg.com/@esbuild/linux-arm64/-/linux-arm64-0.21.5.tgz#70ac6fa14f5cb7e1f7f887bcffb680ad09922b5b" integrity sha512-ibKvmyYzKsBeX8d8I7MH/TMfWDXBF3db4qM6sy+7re0YXya+K1cem3on9XgdT2EQGMu4hQyZhan7TeQ8XkGp4Q== +"@esbuild/linux-arm64@0.23.1": + version "0.23.1" + resolved "https://registry.yarnpkg.com/@esbuild/linux-arm64/-/linux-arm64-0.23.1.tgz#8050af6d51ddb388c75653ef9871f5ccd8f12383" + integrity sha512-/93bf2yxencYDnItMYV/v116zff6UyTjo4EtEQjUBeGiVpMmffDNUyD9UN2zV+V3LRV3/on4xdZ26NKzn6754g== + "@esbuild/linux-arm@0.21.5": version "0.21.5" resolved "https://registry.yarnpkg.com/@esbuild/linux-arm/-/linux-arm-0.21.5.tgz#fc6fd11a8aca56c1f6f3894f2bea0479f8f626b9" integrity sha512-bPb5AHZtbeNGjCKVZ9UGqGwo8EUu4cLq68E95A53KlxAPRmUyYv2D6F0uUI65XisGOL1hBP5mTronbgo+0bFcA== +"@esbuild/linux-arm@0.23.1": + version "0.23.1" + resolved "https://registry.yarnpkg.com/@esbuild/linux-arm/-/linux-arm-0.23.1.tgz#ecaabd1c23b701070484990db9a82f382f99e771" + integrity sha512-CXXkzgn+dXAPs3WBwE+Kvnrf4WECwBdfjfeYHpMeVxWE0EceB6vhWGShs6wi0IYEqMSIzdOF1XjQ/Mkm5d7ZdQ== + "@esbuild/linux-ia32@0.21.5": version "0.21.5" resolved "https://registry.yarnpkg.com/@esbuild/linux-ia32/-/linux-ia32-0.21.5.tgz#3271f53b3f93e3d093d518d1649d6d68d346ede2" integrity sha512-YvjXDqLRqPDl2dvRODYmmhz4rPeVKYvppfGYKSNGdyZkA01046pLWyRKKI3ax8fbJoK5QbxblURkwK/MWY18Tg== +"@esbuild/linux-ia32@0.23.1": + version "0.23.1" + resolved "https://registry.yarnpkg.com/@esbuild/linux-ia32/-/linux-ia32-0.23.1.tgz#3ed2273214178109741c09bd0687098a0243b333" + integrity sha512-VTN4EuOHwXEkXzX5nTvVY4s7E/Krz7COC8xkftbbKRYAl96vPiUssGkeMELQMOnLOJ8k3BY1+ZY52tttZnHcXQ== + "@esbuild/linux-loong64@0.21.5": version "0.21.5" resolved "https://registry.yarnpkg.com/@esbuild/linux-loong64/-/linux-loong64-0.21.5.tgz#ed62e04238c57026aea831c5a130b73c0f9f26df" integrity sha512-uHf1BmMG8qEvzdrzAqg2SIG/02+4/DHB6a9Kbya0XDvwDEKCoC8ZRWI5JJvNdUjtciBGFQ5PuBlpEOXQj+JQSg== +"@esbuild/linux-loong64@0.23.1": + version "0.23.1" + resolved "https://registry.yarnpkg.com/@esbuild/linux-loong64/-/linux-loong64-0.23.1.tgz#a0fdf440b5485c81b0fbb316b08933d217f5d3ac" + integrity sha512-Vx09LzEoBa5zDnieH8LSMRToj7ir/Jeq0Gu6qJ/1GcBq9GkfoEAoXvLiW1U9J1qE/Y/Oyaq33w5p2ZWrNNHNEw== + "@esbuild/linux-mips64el@0.21.5": version "0.21.5" resolved "https://registry.yarnpkg.com/@esbuild/linux-mips64el/-/linux-mips64el-0.21.5.tgz#e79b8eb48bf3b106fadec1ac8240fb97b4e64cbe" integrity sha512-IajOmO+KJK23bj52dFSNCMsz1QP1DqM6cwLUv3W1QwyxkyIWecfafnI555fvSGqEKwjMXVLokcV5ygHW5b3Jbg== +"@esbuild/linux-mips64el@0.23.1": + version "0.23.1" + resolved "https://registry.yarnpkg.com/@esbuild/linux-mips64el/-/linux-mips64el-0.23.1.tgz#e11a2806346db8375b18f5e104c5a9d4e81807f6" + integrity sha512-nrFzzMQ7W4WRLNUOU5dlWAqa6yVeI0P78WKGUo7lg2HShq/yx+UYkeNSE0SSfSure0SqgnsxPvmAUu/vu0E+3Q== + "@esbuild/linux-ppc64@0.21.5": version "0.21.5" resolved "https://registry.yarnpkg.com/@esbuild/linux-ppc64/-/linux-ppc64-0.21.5.tgz#5f2203860a143b9919d383ef7573521fb154c3e4" integrity sha512-1hHV/Z4OEfMwpLO8rp7CvlhBDnjsC3CttJXIhBi+5Aj5r+MBvy4egg7wCbe//hSsT+RvDAG7s81tAvpL2XAE4w== +"@esbuild/linux-ppc64@0.23.1": + version "0.23.1" + resolved "https://registry.yarnpkg.com/@esbuild/linux-ppc64/-/linux-ppc64-0.23.1.tgz#06a2744c5eaf562b1a90937855b4d6cf7c75ec96" + integrity sha512-dKN8fgVqd0vUIjxuJI6P/9SSSe/mB9rvA98CSH2sJnlZ/OCZWO1DJvxj8jvKTfYUdGfcq2dDxoKaC6bHuTlgcw== + "@esbuild/linux-riscv64@0.21.5": version "0.21.5" resolved "https://registry.yarnpkg.com/@esbuild/linux-riscv64/-/linux-riscv64-0.21.5.tgz#07bcafd99322d5af62f618cb9e6a9b7f4bb825dc" integrity sha512-2HdXDMd9GMgTGrPWnJzP2ALSokE/0O5HhTUvWIbD3YdjME8JwvSCnNGBnTThKGEB91OZhzrJ4qIIxk/SBmyDDA== +"@esbuild/linux-riscv64@0.23.1": + version "0.23.1" + resolved "https://registry.yarnpkg.com/@esbuild/linux-riscv64/-/linux-riscv64-0.23.1.tgz#65b46a2892fc0d1af4ba342af3fe0fa4a8fe08e7" + integrity sha512-5AV4Pzp80fhHL83JM6LoA6pTQVWgB1HovMBsLQ9OZWLDqVY8MVobBXNSmAJi//Csh6tcY7e7Lny2Hg1tElMjIA== + "@esbuild/linux-s390x@0.21.5": version "0.21.5" resolved "https://registry.yarnpkg.com/@esbuild/linux-s390x/-/linux-s390x-0.21.5.tgz#b7ccf686751d6a3e44b8627ababc8be3ef62d8de" integrity sha512-zus5sxzqBJD3eXxwvjN1yQkRepANgxE9lgOW2qLnmr8ikMTphkjgXu1HR01K4FJg8h1kEEDAqDcZQtbrRnB41A== +"@esbuild/linux-s390x@0.23.1": + version "0.23.1" + resolved "https://registry.yarnpkg.com/@esbuild/linux-s390x/-/linux-s390x-0.23.1.tgz#e71ea18c70c3f604e241d16e4e5ab193a9785d6f" + integrity sha512-9ygs73tuFCe6f6m/Tb+9LtYxWR4c9yg7zjt2cYkjDbDpV/xVn+68cQxMXCjUpYwEkze2RcU/rMnfIXNRFmSoDw== + "@esbuild/linux-x64@0.21.5": version "0.21.5" resolved "https://registry.yarnpkg.com/@esbuild/linux-x64/-/linux-x64-0.21.5.tgz#6d8f0c768e070e64309af8004bb94e68ab2bb3b0" integrity sha512-1rYdTpyv03iycF1+BhzrzQJCdOuAOtaqHTWJZCWvijKD2N5Xu0TtVC8/+1faWqcP9iBCWOmjmhoH94dH82BxPQ== +"@esbuild/linux-x64@0.23.1": + version "0.23.1" + resolved "https://registry.yarnpkg.com/@esbuild/linux-x64/-/linux-x64-0.23.1.tgz#d47f97391e80690d4dfe811a2e7d6927ad9eed24" + integrity sha512-EV6+ovTsEXCPAp58g2dD68LxoP/wK5pRvgy0J/HxPGB009omFPv3Yet0HiaqvrIrgPTBuC6wCH1LTOY91EO5hQ== + "@esbuild/netbsd-x64@0.21.5": version "0.21.5" resolved "https://registry.yarnpkg.com/@esbuild/netbsd-x64/-/netbsd-x64-0.21.5.tgz#bbe430f60d378ecb88decb219c602667387a6047" integrity sha512-Woi2MXzXjMULccIwMnLciyZH4nCIMpWQAs049KEeMvOcNADVxo0UBIQPfSmxB3CWKedngg7sWZdLvLczpe0tLg== +"@esbuild/netbsd-x64@0.23.1": + version "0.23.1" + resolved "https://registry.yarnpkg.com/@esbuild/netbsd-x64/-/netbsd-x64-0.23.1.tgz#44e743c9778d57a8ace4b72f3c6b839a3b74a653" + integrity sha512-aevEkCNu7KlPRpYLjwmdcuNz6bDFiE7Z8XC4CPqExjTvrHugh28QzUXVOZtiYghciKUacNktqxdpymplil1beA== + +"@esbuild/openbsd-arm64@0.23.1": + version "0.23.1" + resolved "https://registry.yarnpkg.com/@esbuild/openbsd-arm64/-/openbsd-arm64-0.23.1.tgz#05c5a1faf67b9881834758c69f3e51b7dee015d7" + integrity sha512-3x37szhLexNA4bXhLrCC/LImN/YtWis6WXr1VESlfVtVeoFJBRINPJ3f0a/6LV8zpikqoUg4hyXw0sFBt5Cr+Q== + "@esbuild/openbsd-x64@0.21.5": version "0.21.5" resolved "https://registry.yarnpkg.com/@esbuild/openbsd-x64/-/openbsd-x64-0.21.5.tgz#99d1cf2937279560d2104821f5ccce220cb2af70" integrity sha512-HLNNw99xsvx12lFBUwoT8EVCsSvRNDVxNpjZ7bPn947b8gJPzeHWyNVhFsaerc0n3TsbOINvRP2byTZ5LKezow== +"@esbuild/openbsd-x64@0.23.1": + version "0.23.1" + resolved "https://registry.yarnpkg.com/@esbuild/openbsd-x64/-/openbsd-x64-0.23.1.tgz#2e58ae511bacf67d19f9f2dcd9e8c5a93f00c273" + integrity sha512-aY2gMmKmPhxfU+0EdnN+XNtGbjfQgwZj43k8G3fyrDM/UdZww6xrWxmDkuz2eCZchqVeABjV5BpildOrUbBTqA== + "@esbuild/sunos-x64@0.21.5": version "0.21.5" resolved "https://registry.yarnpkg.com/@esbuild/sunos-x64/-/sunos-x64-0.21.5.tgz#08741512c10d529566baba837b4fe052c8f3487b" integrity sha512-6+gjmFpfy0BHU5Tpptkuh8+uw3mnrvgs+dSPQXQOv3ekbordwnzTVEb4qnIvQcYXq6gzkyTnoZ9dZG+D4garKg== +"@esbuild/sunos-x64@0.23.1": + version "0.23.1" + resolved "https://registry.yarnpkg.com/@esbuild/sunos-x64/-/sunos-x64-0.23.1.tgz#adb022b959d18d3389ac70769cef5a03d3abd403" + integrity sha512-RBRT2gqEl0IKQABT4XTj78tpk9v7ehp+mazn2HbUeZl1YMdaGAQqhapjGTCe7uw7y0frDi4gS0uHzhvpFuI1sA== + "@esbuild/win32-arm64@0.21.5": version "0.21.5" resolved "https://registry.yarnpkg.com/@esbuild/win32-arm64/-/win32-arm64-0.21.5.tgz#675b7385398411240735016144ab2e99a60fc75d" integrity sha512-Z0gOTd75VvXqyq7nsl93zwahcTROgqvuAcYDUr+vOv8uHhNSKROyU961kgtCD1e95IqPKSQKH7tBTslnS3tA8A== +"@esbuild/win32-arm64@0.23.1": + version "0.23.1" + resolved "https://registry.yarnpkg.com/@esbuild/win32-arm64/-/win32-arm64-0.23.1.tgz#84906f50c212b72ec360f48461d43202f4c8b9a2" + integrity sha512-4O+gPR5rEBe2FpKOVyiJ7wNDPA8nGzDuJ6gN4okSA1gEOYZ67N8JPk58tkWtdtPeLz7lBnY6I5L3jdsr3S+A6A== + "@esbuild/win32-ia32@0.21.5": version "0.21.5" resolved "https://registry.yarnpkg.com/@esbuild/win32-ia32/-/win32-ia32-0.21.5.tgz#1bfc3ce98aa6ca9a0969e4d2af72144c59c1193b" integrity sha512-SWXFF1CL2RVNMaVs+BBClwtfZSvDgtL//G/smwAc5oVK/UPu2Gu9tIaRgFmYFFKrmg3SyAjSrElf0TiJ1v8fYA== +"@esbuild/win32-ia32@0.23.1": + version "0.23.1" + resolved "https://registry.yarnpkg.com/@esbuild/win32-ia32/-/win32-ia32-0.23.1.tgz#5e3eacc515820ff729e90d0cb463183128e82fac" + integrity sha512-BcaL0Vn6QwCwre3Y717nVHZbAa4UBEigzFm6VdsVdT/MbZ38xoj1X9HPkZhbmaBGUD1W8vxAfffbDe8bA6AKnQ== + "@esbuild/win32-x64@0.21.5": version "0.21.5" resolved "https://registry.yarnpkg.com/@esbuild/win32-x64/-/win32-x64-0.21.5.tgz#acad351d582d157bb145535db2a6ff53dd514b5c" integrity sha512-tQd/1efJuzPC6rCFwEvLtci/xNFcTZknmXs98FYDfGE4wP9ClFV98nyKrzJKVPMhdDnjzLhdUyMX4PsQAPjwIw== -"@hapi/hoek@^9.0.0": - version "9.2.0" - resolved "https://registry.npmjs.org/@hapi/hoek/-/hoek-9.2.0.tgz" - integrity sha512-sqKVVVOe5ivCaXDWivIJYVSaEgdQK9ul7a4Kity5Iw7u9+wBAPbX1RMSnLLmp7O4Vzj0WOWwMAJsTL00xwaNug== +"@esbuild/win32-x64@0.23.1": + version "0.23.1" + resolved "https://registry.yarnpkg.com/@esbuild/win32-x64/-/win32-x64-0.23.1.tgz#81fd50d11e2c32b2d6241470e3185b70c7b30699" + integrity sha512-BHpFFeslkWrXWyUPnbKm+xYYVYruCinGcftSBaa8zoF9hZO4BcSCFUvHVTtzpIY6YzUnYtuEhZ+C9iEXjxnasg== -"@hapi/hoek@^9.3.0": +"@hapi/hoek@^9.0.0", "@hapi/hoek@^9.3.0": version "9.3.0" resolved "https://registry.yarnpkg.com/@hapi/hoek/-/hoek-9.3.0.tgz#8368869dcb735be2e7f5cb7647de78e167a251fb" integrity sha512-/c6rf4UJlmHlC9b5BaNvzAcFv7HZ2QHaV0D4/HNlBdvFnvQq8RI4kYdhyPCl7Xj+oWvTWQ8ujhqS53LIgAe6KQ== @@ -205,7 +320,7 @@ "@sideway/pinpoint@^2.0.0": version "2.0.0" - resolved "https://registry.npmjs.org/@sideway/pinpoint/-/pinpoint-2.0.0.tgz" + resolved "https://registry.yarnpkg.com/@sideway/pinpoint/-/pinpoint-2.0.0.tgz#cff8ffadc372ad29fd3f78277aeb29e632cc70df" integrity sha512-RNiOoTPkptFtSVzQevY/yWtZwf/RxyVnPy/OcA9HBM3MlGDnBEYL5B41H0MTn0Uec8Hi+2qUtTfG2WWZBmMejQ== "@trapcode/benchmark@^0.1.3": @@ -261,9 +376,9 @@ "@types/istanbul-lib-report" "*" "@types/lodash@^4.17.5": - version "4.17.5" - resolved "https://registry.yarnpkg.com/@types/lodash/-/lodash-4.17.5.tgz#e6c29b58e66995d57cd170ce3e2a61926d55ee04" - integrity sha512-MBIOHVZqVqgfro1euRDWX7OO0fBVUUMrN6Pwm8LQsz8cWhEpihlvR70ENj3f40j58TNxZaWv2ndSkInykNBBJw== + version "4.17.7" + resolved "https://registry.yarnpkg.com/@types/lodash/-/lodash-4.17.7.tgz#2f776bcb53adc9e13b2c0dfd493dfcbd7de43612" + integrity sha512-8wTvZawATi/lsmNu10/j2hk1KEP0IvjubqPE3cu1Xz7xfXXt5oCq3SNUz4fMIP4XGF9Ky+Ue2tBA3hcS7LSBlA== "@types/node@*": version "18.11.9" @@ -271,11 +386,11 @@ integrity sha512-CRpX21/kGdzjOpFsZSkcrXMGIBWMGNIHXXBVFSH+ggkftxg+XYP20TESbh+zFvFj3EQOl5byk0HTRn1IL6hbqg== "@types/node@^20.14.2": - version "20.14.2" - resolved "https://registry.yarnpkg.com/@types/node/-/node-20.14.2.tgz#a5f4d2bcb4b6a87bffcaa717718c5a0f208f4a18" - integrity sha512-xyu6WAMVwv6AKFLB+e/7ySZVr/0zLCzOa7rSpq6jNwpqOrUbcACDWC+53d4n2QHOnDou0fbIsg8wZu/sxrnI4Q== + version "20.16.2" + resolved "https://registry.yarnpkg.com/@types/node/-/node-20.16.2.tgz#9e388f503a5af306e8c63319334887390966a11e" + integrity sha512-91s/n4qUPV/wg8eE9KHYW1kouTfDk2FPGjXbBMfRWP/2vg1rCXNQL1OCabwGs0XSdukuK+MwCDXE30QpSeMUhQ== dependencies: - undici-types "~5.26.4" + undici-types "~6.19.2" "@types/strip-bom@^3.0.0": version "3.0.0" @@ -481,7 +596,7 @@ dynamic-dedupe@^0.3.0: dependencies: xtend "^4.0.0" -esbuild@^0.21.5, esbuild@~0.21.4: +esbuild@^0.21.5: version "0.21.5" resolved "https://registry.yarnpkg.com/esbuild/-/esbuild-0.21.5.tgz#9ca301b120922959b766360d8ac830da0d02997d" integrity sha512-mg3OPMV4hXywwpoDxu3Qda5xCKQi+vCTZq8S9J/EpkhB2HzKXq4SNFZE3+NK93JYxc8VMSep+lOUSC/RVKaBqw== @@ -510,6 +625,36 @@ esbuild@^0.21.5, esbuild@~0.21.4: "@esbuild/win32-ia32" "0.21.5" "@esbuild/win32-x64" "0.21.5" +esbuild@~0.23.0: + version "0.23.1" + resolved "https://registry.yarnpkg.com/esbuild/-/esbuild-0.23.1.tgz#40fdc3f9265ec0beae6f59824ade1bd3d3d2dab8" + integrity sha512-VVNz/9Sa0bs5SELtn3f7qhJCDPCF5oMEl5cO9/SSinpE9hbPVvxbd572HH5AKiP7WD8INO53GgfDDhRjkylHEg== + optionalDependencies: + "@esbuild/aix-ppc64" "0.23.1" + "@esbuild/android-arm" "0.23.1" + "@esbuild/android-arm64" "0.23.1" + "@esbuild/android-x64" "0.23.1" + "@esbuild/darwin-arm64" "0.23.1" + "@esbuild/darwin-x64" "0.23.1" + "@esbuild/freebsd-arm64" "0.23.1" + "@esbuild/freebsd-x64" "0.23.1" + "@esbuild/linux-arm" "0.23.1" + "@esbuild/linux-arm64" "0.23.1" + "@esbuild/linux-ia32" "0.23.1" + "@esbuild/linux-loong64" "0.23.1" + "@esbuild/linux-mips64el" "0.23.1" + "@esbuild/linux-ppc64" "0.23.1" + "@esbuild/linux-riscv64" "0.23.1" + "@esbuild/linux-s390x" "0.23.1" + "@esbuild/linux-x64" "0.23.1" + "@esbuild/netbsd-x64" "0.23.1" + "@esbuild/openbsd-arm64" "0.23.1" + "@esbuild/openbsd-x64" "0.23.1" + "@esbuild/sunos-x64" "0.23.1" + "@esbuild/win32-arm64" "0.23.1" + "@esbuild/win32-ia32" "0.23.1" + "@esbuild/win32-x64" "0.23.1" + fast-glob@^3.2.2: version "3.2.11" resolved "https://registry.npmjs.org/fast-glob/-/fast-glob-3.2.11.tgz" @@ -561,9 +706,9 @@ get-func-name@^2.0.0: integrity sha1-6td0q+5y4gQJQzoGY2YCPdaIekE= get-tsconfig@^4.7.5: - version "4.7.5" - resolved "https://registry.yarnpkg.com/get-tsconfig/-/get-tsconfig-4.7.5.tgz#5e012498579e9a6947511ed0cd403272c7acbbaf" - integrity sha512-ZCuZCnlqNzjb4QprAzXKdpp/gh6KTxSJuw3IBsPnV/7fV4NxC9ckB+vPTt8w7fJA0TaSD7c55BR47JD6MEDyDw== + version "4.8.0" + resolved "https://registry.yarnpkg.com/get-tsconfig/-/get-tsconfig-4.8.0.tgz#125dc13a316f61650a12b20c97c11b8fd996fedd" + integrity sha512-Pgba6TExTZ0FJAn1qkJAjIeKoDJ3CsI2ChuLohJnZl/tTU8MVrq3b+2t5UOPfRa4RMsorClBjJALkJUMjG1PAw== dependencies: resolve-pkg-maps "^1.0.0" @@ -687,9 +832,9 @@ jest-get-type@^26.3.0: integrity sha512-TpfaviN1R2pQWkIihlfEanwOXK0zcxrKEE4MlU6Tn7keoXdN6/3gK/xl0yEh8DOunn5pOVGKf8hB4R9gVh04ig== joi@^17.13.1: - version "17.13.1" - resolved "https://registry.yarnpkg.com/joi/-/joi-17.13.1.tgz#9c7b53dc3b44dd9ae200255cc3b398874918a6ca" - integrity sha512-vaBlIKCyo4FCUtCm7Eu4QZd/q02bWcxfUO6YSXAZOWF6gzcLBeba8kwotUdYJjDLW8Cz8RywsSOqiNJZW0mNvg== + version "17.13.3" + resolved "https://registry.yarnpkg.com/joi/-/joi-17.13.3.tgz#0f5cc1169c999b30d344366d384b12d92558bcec" + integrity sha512-otDA4ldcIx+ZXsKHWmp0YizCweVRZG96J10b0FevjfuncLO1oX59THoAmHkNubYJ+9gWsYsp5k8v4ib6oDv1fA== dependencies: "@hapi/hoek" "^9.3.0" "@hapi/topo" "^5.1.0" @@ -802,9 +947,9 @@ platform@^1.3.3: integrity sha512-fnWVljUchTro6RiCFvCXBbNhJc2NijN7oIQxbwsyL0buWJPG85v81ehlHI9fXrJsMNgTofEoWIQeClKpgxFLrg== prettier@^3.3.2: - version "3.3.2" - resolved "https://registry.yarnpkg.com/prettier/-/prettier-3.3.2.tgz#03ff86dc7c835f2d2559ee76876a3914cec4a90a" - integrity sha512-rAVeHYMcv8ATV5d508CFdn+8/pHPpXeIid1DdrPwXnaAdH7cqjVbpJaT5eq4yRAFU/lsbwYwSF/n5iNrdJHPQA== + version "3.3.3" + resolved "https://registry.yarnpkg.com/prettier/-/prettier-3.3.3.tgz#30c54fe0be0d8d12e6ae61dbb10109ea00d53105" + integrity sha512-i2tDNA0O5IrMO757lfrdQZCc2jPNDVntV0m/+4whiDfWaTKfMNgR7Qz0NAeGz/nRqF4m5/6CLzbP4/liHt12Ew== pretty-format@^26.6.2: version "26.6.2" @@ -999,11 +1144,11 @@ tsconfig@^7.0.0: strip-json-comments "^2.0.0" tsx@^4.15.5: - version "4.15.5" - resolved "https://registry.yarnpkg.com/tsx/-/tsx-4.15.5.tgz#9c1ddb10ed0035c595c9b3e00ae40a3647a94c82" - integrity sha512-iKi8jQ2VBmZ2kU/FkGkL2OSHBHsazsUzsdC/W/RwhKIEsIoZ1alCclZHP5jGfNHEaEWUJFM1GquzCf+4db3b0w== + version "4.19.0" + resolved "https://registry.yarnpkg.com/tsx/-/tsx-4.19.0.tgz#6166cb399b17d14d125e6158d23384045cfdf4f6" + integrity sha512-bV30kM7bsLZKZIOCHeMNVMJ32/LuJzLVajkQI/qf92J2Qr08ueLQvW00PUZGiuLPP760UINwupgUj8qrSCPUKg== dependencies: - esbuild "~0.21.4" + esbuild "~0.23.0" get-tsconfig "^4.7.5" optionalDependencies: fsevents "~2.3.3" @@ -1019,14 +1164,14 @@ type-fest@^2.19.0: integrity sha512-RAH822pAdBgcNMAfWnCBU3CFZcfZ/i1eZjwFU/dsLKumyuuP3niueg2UAukXYF0E2AAoc82ZSSf9J0WQBinzHA== typescript@^5.4.5: - version "5.4.5" - resolved "https://registry.yarnpkg.com/typescript/-/typescript-5.4.5.tgz#42ccef2c571fdbd0f6718b1d1f5e6e5ef006f611" - integrity sha512-vcI4UpRgg81oIRUFwR0WSIHKt11nJ7SAVlYNIu+QpqeyXP+gpQJy/Z4+F0aGxSE4MqwjyXvW/TzgkLAx2AGHwQ== - -undici-types@~5.26.4: - version "5.26.5" - resolved "https://registry.yarnpkg.com/undici-types/-/undici-types-5.26.5.tgz#bcd539893d00b56e964fd2657a4866b221a65617" - integrity sha512-JlCMO+ehdEIKqlFxk6IfVoAUVmgz7cU7zD/h9XZ0qzeosSHmUJVOzSQvvYSYWXkFXC+IfLKSIffhv0sVZup6pA== + version "5.5.4" + resolved "https://registry.yarnpkg.com/typescript/-/typescript-5.5.4.tgz#d9852d6c82bad2d2eda4fd74a5762a8f5909e9ba" + integrity sha512-Mtq29sKDAEYP7aljRgtPOpTvOfbwRWlS6dPRzwjdE+C0R4brX/GUyhHSecbHMFLNBLcJIPt9nl9yG5TZ1weH+Q== + +undici-types@~6.19.2: + version "6.19.8" + resolved "https://registry.yarnpkg.com/undici-types/-/undici-types-6.19.8.tgz#35111c9d1437ab83a7cdc0abae2f26d88eda0a02" + integrity sha512-ve2KP6f/JnbPBFyobGHuerC9g1FYGn/F8n1LWTwNxCEzd6IfqTwUQcNXgEtmmQ6DlRrC1hrSrBnCZPokRrDHjw== v8-compile-cache-lib@^3.0.1: version "3.0.1" From 2f8b0b0a3b1cab02404357f2fb8a902738df3b41 Mon Sep 17 00:00:00 2001 From: trapcodeio Date: Sun, 1 Sep 2024 08:58:21 +0100 Subject: [PATCH 10/15] 6.7.0 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 05f852d..b9147fc 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "abolish", - "version": "6.6.2", + "version": "6.7.0", "description": "A javascript object validator.", "main": "index.js", "module": "index.esm.js", From d6eea641b71515b2457539742c379b9a51b50ce4 Mon Sep 17 00:00:00 2001 From: trapcodeio Date: Sun, 1 Sep 2024 08:59:40 +0100 Subject: [PATCH 11/15] add all tests --- japaFile.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/japaFile.js b/japaFile.js index f151e60..fec2858 100644 --- a/japaFile.js +++ b/japaFile.js @@ -4,8 +4,8 @@ const { configure } = require("japa"); configure({ files: [ - "tests/validators/number-validators.spec.ts" - // "tests/*.spec.ts", - // "tests/*/**/*.spec.ts" + // "tests/validators/number-validators.spec.ts" + "tests/*.spec.ts", + "tests/*/**/*.spec.ts" ] }); From 7207e0af7690229797aeb774d85e7dde89632c6a Mon Sep 17 00:00:00 2001 From: trapcodeio Date: Sun, 1 Sep 2024 08:59:50 +0100 Subject: [PATCH 12/15] 6.7.1 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index b9147fc..a311687 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "abolish", - "version": "6.7.0", + "version": "6.7.1", "description": "A javascript object validator.", "main": "index.js", "module": "index.esm.js", From efe57627814cd749f7ce352da75b9ebae7d218c1 Mon Sep 17 00:00:00 2001 From: trapcodeio Date: Sun, 1 Sep 2024 17:57:51 +0100 Subject: [PATCH 13/15] Save --- tests/validators/dates-validators.spec.ts | 18 ++++++++++++++++++ validators/date/age.ts | 20 +++++++++++++++++++- 2 files changed, 37 insertions(+), 1 deletion(-) diff --git a/tests/validators/dates-validators.spec.ts b/tests/validators/dates-validators.spec.ts index bfb8a01..e657f8b 100644 --- a/tests/validators/dates-validators.spec.ts +++ b/tests/validators/dates-validators.spec.ts @@ -53,4 +53,22 @@ test.group("Date Validators", (group) => { test.failing("Fail: Between Age", () => { Abolish.attempt(seventeenYearsAgo, RuleTyped({ age: "18-19" })); }); + + test("Pass: Gte Age", () => { + Abolish.attempt(eighteenYearsAgo, RuleTyped({ age: ">=18" })); + }); + + test.failing("Fail: Gte Age", () => { + Abolish.attempt(seventeenYearsAgo, RuleTyped({ age: ">=18" })); + }); + + test("Pass: Lte Age", () => { + Abolish.attempt(eighteenYearsAgo, RuleTyped({ age: "<=18" })); + }); + + test.failing("Fail: Lte Age", () => { + Abolish.attempt(nineteenYearsAgo, RuleTyped({ age: "<=18" })); + }); + + }); diff --git a/validators/date/age.ts b/validators/date/age.ts index f001272..2eaefec 100644 --- a/validators/date/age.ts +++ b/validators/date/age.ts @@ -1,6 +1,14 @@ import type { AbolishValidator } from "../../src/types"; -type AgeString = `>${number}` | `<${number}` | `=${string}` | `${string}-${string}`; +type Gt = `>${number}`; +type Lt = `<${number}`; +type Gte = `>=${number}`; +type Lte = `<=${number}`; +type Eq = `=${number}`; +type Between = `${number}-${number}`; + + +type AgeString = Gt | Lt | Gte | Lte | Eq | Between; export = { name: "age", @@ -30,11 +38,21 @@ export = { ? true : error(`:param is not ${ageString} years old!`); } + // check if age is >= + else if (o.startsWith(">=")) { + const minAge = Number(o.slice(2)); + return age >= minAge ? true : error(`:param is too young! Must be older than ${minAge}`); + } // check if age is > else if (o.startsWith(">")) { const minAge = Number(o.slice(1)); return age > minAge ? true : error(`:param is too young! Must be older than ${minAge}`); } + // check if age is <= + else if (o.startsWith("<=")) { + const maxAge = Number(o.slice(2)); + return age <= maxAge ? true : error(`:param is too old! Must be younger than ${maxAge}`); + } // check if age is < else if (o.startsWith("<")) { const maxAge = Number(o.slice(1)); From 881549faf0efe80df51a057fecdcdbee9d7fb1ba Mon Sep 17 00:00:00 2001 From: trapcodeio Date: Sun, 1 Sep 2024 17:58:12 +0100 Subject: [PATCH 14/15] 6.7.2 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index a311687..75821c6 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "abolish", - "version": "6.7.1", + "version": "6.7.2", "description": "A javascript object validator.", "main": "index.js", "module": "index.esm.js", From 235a53b85e8ff7f3808f0a57b46f53589c4e8b0a Mon Sep 17 00:00:00 2001 From: trapcodeio Date: Sun, 1 Sep 2024 20:52:27 +0100 Subject: [PATCH 15/15] use only node 20 --- .github/workflows/node.js.yml | 2 +- package.json | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/node.js.yml b/.github/workflows/node.js.yml index 04a82b8..d9a494e 100644 --- a/.github/workflows/node.js.yml +++ b/.github/workflows/node.js.yml @@ -16,7 +16,7 @@ jobs: strategy: matrix: - node-version: [14.x, 16.x, 18.x] + node-version: [20.x] # See supported Node.js release schedule at https://nodejs.org/en/about/releases/ steps: diff --git a/package.json b/package.json index 75821c6..5566511 100644 --- a/package.json +++ b/package.json @@ -24,7 +24,7 @@ "play:dev": "npx nodemon dev/play.js", "test-browser": "npx vite --host", "test": "npm run build && node japaFile.js", - "test-dev": "npx nodemon japaFile.js --watch '*/**' --ext 'ts'", + "test-dev": "npx nodemon japaFile.js --watch '*/* *' --ext 'ts'", "benchmark": "node benchmarks" }, "dependencies": { @@ -52,4 +52,4 @@ "object-validator", "async-object-validator" ] -} +} \ No newline at end of file