diff --git a/tests/core/error.test.ts b/tests/core/error.test.ts new file mode 100644 index 0000000..0820dfd --- /dev/null +++ b/tests/core/error.test.ts @@ -0,0 +1,245 @@ +import { + LlamaAPIClientError, + APIError, + APIUserAbortError, + APIConnectionError, + APIConnectionTimeoutError, + BadRequestError, + AuthenticationError, + PermissionDeniedError, + NotFoundError, + ConflictError, + UnprocessableEntityError, + RateLimitError, + InternalServerError, + } from '../../src/core/error'; + + describe('LlamaAPIClientError', () => { + it('should create an instance of LlamaAPIClientError', () => { + const error = new LlamaAPIClientError(); + expect(error).toBeInstanceOf(LlamaAPIClientError); + expect(error).toBeInstanceOf(Error); + }); + }); + + describe('APIError', () => { + it('should create an APIError with all parameters', () => { + const status = 400; + const headers = new Headers(); + const error = { message: 'Bad request' }; + const message = 'Custom error message'; + + const apiError = new APIError(status, error, message, headers); + + expect(apiError).toBeInstanceOf(APIError); + expect(apiError).toBeInstanceOf(LlamaAPIClientError); + expect(apiError.status).toBe(status); + expect(apiError.headers).toBe(headers); + expect(apiError.error).toBe(error); + expect(apiError.message).toContain('400'); + expect(apiError.message).toContain('Bad request'); + }); + + it('should create an APIError with only status', () => { + const status = 500; + const apiError = new APIError(status, undefined, undefined, undefined); + + expect(apiError.status).toBe(status); + expect(apiError.message).toContain('500 status code (no body)'); + }); + + it('should create an APIError with only message', () => { + const message = 'Something went wrong'; + const apiError = new APIError(undefined, undefined, message, undefined); + + expect(apiError.message).toBe(message); + }); + + it('should create an APIError with no parameters', () => { + const apiError = new APIError(undefined, undefined, undefined, undefined); + + expect(apiError.message).toBe('(no status code or body)'); + }); + + it('should handle errors with string message', () => { + const error = { message: 'String message' }; + const apiError = new APIError(400, error, undefined, undefined); + + expect(apiError.message).toContain('String message'); + }); + + it('should handle errors with non-string message', () => { + const error = { message: { detail: 'Complex message' } }; + const apiError = new APIError(400, error, undefined, undefined); + + expect(apiError.message).toContain('{"detail":"Complex message"}'); + }); + + it('should prioritize error.message over custom message parameter', () => { + const error = { message: 'Error from API' }; + const customMessage = 'Custom message that should be ignored'; + const apiError = new APIError(400, error, customMessage, undefined); + + expect(apiError.message).toContain('Error from API'); + expect(apiError.message).not.toContain('Custom message that should be ignored'); + }); + + it('should stringify error object when error has no message property but error exists', () => { + const error = { someOtherProperty: 'value' }; + const customMessage = 'Custom message'; + const apiError = new APIError(400, error, customMessage, undefined); + + expect(apiError.message).toContain('{"someOtherProperty":"value"}'); + expect(apiError.message).not.toContain('Custom message'); + }); + + it('should use custom message only when error is undefined or null', () => { + const customMessage = 'Custom message'; + const apiError = new APIError(400, undefined, customMessage, undefined); + + expect(apiError.message).toContain('Custom message'); + }); + + it('should stringify error object when no message property exists', () => { + const error = { code: 123, details: 'Some details' }; + const apiError = new APIError(400, error, undefined, undefined); + + expect(apiError.message).toContain('{"code":123,"details":"Some details"}'); + }); + }); + + describe('APIError.generate', () => { + it('should generate a BadRequestError for status 400', () => { + const error = APIError.generate(400, { message: 'Bad request' }, undefined, new Headers()); + expect(error).toBeInstanceOf(BadRequestError); + expect(error.status).toBe(400); + }); + + it('should generate an AuthenticationError for status 401', () => { + const error = APIError.generate(401, { message: 'Unauthorized' }, undefined, new Headers()); + expect(error).toBeInstanceOf(AuthenticationError); + expect(error.status).toBe(401); + }); + + it('should generate a PermissionDeniedError for status 403', () => { + const error = APIError.generate(403, { message: 'Forbidden' }, undefined, new Headers()); + expect(error).toBeInstanceOf(PermissionDeniedError); + expect(error.status).toBe(403); + }); + + it('should generate a NotFoundError for status 404', () => { + const error = APIError.generate(404, { message: 'Not found' }, undefined, new Headers()); + expect(error).toBeInstanceOf(NotFoundError); + expect(error.status).toBe(404); + }); + + it('should generate a ConflictError for status 409', () => { + const error = APIError.generate(409, { message: 'Conflict' }, undefined, new Headers()); + expect(error).toBeInstanceOf(ConflictError); + expect(error.status).toBe(409); + }); + + it('should generate an UnprocessableEntityError for status 422', () => { + const error = APIError.generate(422, { message: 'Unprocessable' }, undefined, new Headers()); + expect(error).toBeInstanceOf(UnprocessableEntityError); + expect(error.status).toBe(422); + }); + + it('should generate a RateLimitError for status 429', () => { + const error = APIError.generate(429, { message: 'Rate limited' }, undefined, new Headers()); + expect(error).toBeInstanceOf(RateLimitError); + expect(error.status).toBe(429); + }); + + it('should generate an InternalServerError for status >= 500', () => { + const error = APIError.generate(500, { message: 'Server error' }, undefined, new Headers()); + expect(error).toBeInstanceOf(InternalServerError); + expect(error.status).toBe(500); + }); + + it('should generate an InternalServerError for status 502', () => { + const error = APIError.generate(502, { message: 'Bad gateway' }, undefined, new Headers()); + expect(error).toBeInstanceOf(InternalServerError); + expect(error.status).toBe(502); + }); + + it('should generate a generic APIError for other status codes', () => { + const error = APIError.generate(418, { message: 'I\'m a teapot' }, undefined, new Headers()); + expect(error).toBeInstanceOf(APIError); + expect(error.status).toBe(418); + }); + + it('should generate an APIConnectionError when status or headers are missing', () => { + const error = APIError.generate(undefined, { message: 'Connection error' }, undefined, undefined); + expect(error).toBeInstanceOf(APIConnectionError); + }); + }); + + describe('APIUserAbortError', () => { + it('should create an APIUserAbortError with default message', () => { + const error = new APIUserAbortError(); + expect(error).toBeInstanceOf(APIUserAbortError); + expect(error).toBeInstanceOf(APIError); + expect(error.message).toBe('Request was aborted.'); + }); + + it('should create an APIUserAbortError with custom message', () => { + const customMessage = 'User cancelled the request'; + const error = new APIUserAbortError({ message: customMessage }); + expect(error.message).toBe(customMessage); + }); + }); + + describe('APIConnectionError', () => { + it('should create an APIConnectionError with default message', () => { + const error = new APIConnectionError({ message: 'Connection error.' }); + expect(error).toBeInstanceOf(APIConnectionError); + expect(error).toBeInstanceOf(APIError); + expect(error.message).toBe('Connection error.'); + }); + + it('should create an APIConnectionError with custom message', () => { + const customMessage = 'Network is down'; + const error = new APIConnectionError({ message: customMessage }); + expect(error.message).toBe(customMessage); + }); + + it('should create an APIConnectionError with cause', () => { + const cause = new Error('Original error'); + const error = new APIConnectionError({ cause }); + expect(error.message).toBe('Connection error.'); + // @ts-ignore - cause property exists + expect(error.cause).toBe(cause); + }); + }); + + describe('APIConnectionTimeoutError', () => { + it('should create an APIConnectionTimeoutError with default message', () => { + const error = new APIConnectionTimeoutError(); + expect(error).toBeInstanceOf(APIConnectionTimeoutError); + expect(error).toBeInstanceOf(APIConnectionError); + expect(error.message).toBe('Request timed out.'); + }); + + it('should create an APIConnectionTimeoutError with custom message', () => { + const customMessage = 'Request took too long'; + const error = new APIConnectionTimeoutError({ message: customMessage }); + expect(error.message).toBe(customMessage); + }); + }); + + describe('Specific error classes', () => { + it('should create instances of specific error classes', () => { + const headers = new Headers(); + const error = { message: 'Test error' }; + + expect(new BadRequestError(400, error, undefined, headers)).toBeInstanceOf(BadRequestError); + expect(new AuthenticationError(401, error, undefined, headers)).toBeInstanceOf(AuthenticationError); + expect(new PermissionDeniedError(403, error, undefined, headers)).toBeInstanceOf(PermissionDeniedError); + expect(new NotFoundError(404, error, undefined, headers)).toBeInstanceOf(NotFoundError); + expect(new ConflictError(409, error, undefined, headers)).toBeInstanceOf(ConflictError); + expect(new UnprocessableEntityError(422, error, undefined, headers)).toBeInstanceOf(UnprocessableEntityError); + expect(new RateLimitError(429, error, undefined, headers)).toBeInstanceOf(RateLimitError); + expect(new InternalServerError(500, error, undefined, headers)).toBeInstanceOf(InternalServerError); + }); + }); \ No newline at end of file diff --git a/yarn.lock b/yarn.lock index 0b5a1b5..385f555 100644 --- a/yarn.lock +++ b/yarn.lock @@ -756,10 +756,10 @@ "@nodelib/fs.scandir" "2.1.5" fastq "^1.6.0" -"@pkgr/core@^0.1.0": - version "0.1.1" - resolved "https://registry.npmjs.org/@pkgr/core/-/core-0.1.1.tgz" - integrity sha512-cq8o4cWH0ibXh9VGi5P20Tu9XF/0fFXl9EUinr9QfTM7a7p0oTA4iJRCQWppXR1Pg8dSM0UCItCkPwsk9qWWYA== +"@pkgr/core@^0.2.4": + version "0.2.7" + resolved "https://registry.yarnpkg.com/@pkgr/core/-/core-0.2.7.tgz#eb5014dfd0b03e7f3ba2eeeff506eed89b028058" + integrity sha512-YLT9Zo3oNPJoBjBc4q8G2mjU4tqIbf5CEOORbUUr48dCD9q3umJ3IPlVqOqDakPfd2HuwccBaqlGhN4Gmr5OWg== "@sinclair/typebox@^0.27.8": version "0.27.8" @@ -996,62 +996,62 @@ dependencies: "@types/yargs-parser" "*" -"@typescript-eslint/eslint-plugin@8.24.0", "@typescript-eslint/eslint-plugin@^8.24.0": - version "8.24.0" - resolved "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-8.24.0.tgz" - integrity sha512-aFcXEJJCI4gUdXgoo/j9udUYIHgF23MFkg09LFz2dzEmU0+1Plk4rQWv/IYKvPHAtlkkGoB3m5e6oUp+JPsNaQ== +"@typescript-eslint/eslint-plugin@8.31.1": + version "8.31.1" + resolved "https://registry.yarnpkg.com/@typescript-eslint/eslint-plugin/-/eslint-plugin-8.31.1.tgz#62f1befe59647524994e89de4516d8dcba7a850a" + integrity sha512-oUlH4h1ABavI4F0Xnl8/fOtML/eu8nI2A1nYd+f+55XI0BLu+RIqKoCiZKNo6DtqZBEQm5aNKA20G3Z5w3R6GQ== dependencies: "@eslint-community/regexpp" "^4.10.0" - "@typescript-eslint/scope-manager" "8.24.0" - "@typescript-eslint/type-utils" "8.24.0" - "@typescript-eslint/utils" "8.24.0" - "@typescript-eslint/visitor-keys" "8.24.0" + "@typescript-eslint/scope-manager" "8.31.1" + "@typescript-eslint/type-utils" "8.31.1" + "@typescript-eslint/utils" "8.31.1" + "@typescript-eslint/visitor-keys" "8.31.1" graphemer "^1.4.0" ignore "^5.3.1" natural-compare "^1.4.0" ts-api-utils "^2.0.1" -"@typescript-eslint/parser@8.24.0", "@typescript-eslint/parser@^8.24.0": - version "8.24.0" - resolved "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-8.24.0.tgz" - integrity sha512-MFDaO9CYiard9j9VepMNa9MTcqVvSny2N4hkY6roquzj8pdCBRENhErrteaQuu7Yjn1ppk0v1/ZF9CG3KIlrTA== +"@typescript-eslint/parser@8.31.1": + version "8.31.1" + resolved "https://registry.yarnpkg.com/@typescript-eslint/parser/-/parser-8.31.1.tgz#e9b0ccf30d37dde724ee4d15f4dbc195995cce1b" + integrity sha512-oU/OtYVydhXnumd0BobL9rkJg7wFJ9bFFPmSmB/bf/XWN85hlViji59ko6bSKBXyseT9V8l+CN1nwmlbiN0G7Q== dependencies: - "@typescript-eslint/scope-manager" "8.24.0" - "@typescript-eslint/types" "8.24.0" - "@typescript-eslint/typescript-estree" "8.24.0" - "@typescript-eslint/visitor-keys" "8.24.0" + "@typescript-eslint/scope-manager" "8.31.1" + "@typescript-eslint/types" "8.31.1" + "@typescript-eslint/typescript-estree" "8.31.1" + "@typescript-eslint/visitor-keys" "8.31.1" debug "^4.3.4" -"@typescript-eslint/scope-manager@8.24.0": - version "8.24.0" - resolved "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-8.24.0.tgz" - integrity sha512-HZIX0UByphEtdVBKaQBgTDdn9z16l4aTUz8e8zPQnyxwHBtf5vtl1L+OhH+m1FGV9DrRmoDuYKqzVrvWDcDozw== +"@typescript-eslint/scope-manager@8.31.1": + version "8.31.1" + resolved "https://registry.yarnpkg.com/@typescript-eslint/scope-manager/-/scope-manager-8.31.1.tgz#1eb52e76878f545e4add142e0d8e3e97e7aa443b" + integrity sha512-BMNLOElPxrtNQMIsFHE+3P0Yf1z0dJqV9zLdDxN/xLlWMlXK/ApEsVEKzpizg9oal8bAT5Sc7+ocal7AC1HCVw== dependencies: - "@typescript-eslint/types" "8.24.0" - "@typescript-eslint/visitor-keys" "8.24.0" + "@typescript-eslint/types" "8.31.1" + "@typescript-eslint/visitor-keys" "8.31.1" -"@typescript-eslint/type-utils@8.24.0": - version "8.24.0" - resolved "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-8.24.0.tgz" - integrity sha512-8fitJudrnY8aq0F1wMiPM1UUgiXQRJ5i8tFjq9kGfRajU+dbPyOuHbl0qRopLEidy0MwqgTHDt6CnSeXanNIwA== +"@typescript-eslint/type-utils@8.31.1": + version "8.31.1" + resolved "https://registry.yarnpkg.com/@typescript-eslint/type-utils/-/type-utils-8.31.1.tgz#be0f438fb24b03568e282a0aed85f776409f970c" + integrity sha512-fNaT/m9n0+dpSp8G/iOQ05GoHYXbxw81x+yvr7TArTuZuCA6VVKbqWYVZrV5dVagpDTtj/O8k5HBEE/p/HM5LA== dependencies: - "@typescript-eslint/typescript-estree" "8.24.0" - "@typescript-eslint/utils" "8.24.0" + "@typescript-eslint/typescript-estree" "8.31.1" + "@typescript-eslint/utils" "8.31.1" debug "^4.3.4" ts-api-utils "^2.0.1" -"@typescript-eslint/types@8.24.0": - version "8.24.0" - resolved "https://registry.npmjs.org/@typescript-eslint/types/-/types-8.24.0.tgz" - integrity sha512-VacJCBTyje7HGAw7xp11q439A+zeGG0p0/p2zsZwpnMzjPB5WteaWqt4g2iysgGFafrqvyLWqq6ZPZAOCoefCw== +"@typescript-eslint/types@8.31.1": + version "8.31.1" + resolved "https://registry.yarnpkg.com/@typescript-eslint/types/-/types-8.31.1.tgz#478ed6f7e8aee1be7b63a60212b6bffe1423b5d4" + integrity sha512-SfepaEFUDQYRoA70DD9GtytljBePSj17qPxFHA/h3eg6lPTqGJ5mWOtbXCk1YrVU1cTJRd14nhaXWFu0l2troQ== -"@typescript-eslint/typescript-estree@8.24.0": - version "8.24.0" - resolved "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-8.24.0.tgz" - integrity sha512-ITjYcP0+8kbsvT9bysygfIfb+hBj6koDsu37JZG7xrCiy3fPJyNmfVtaGsgTUSEuTzcvME5YI5uyL5LD1EV5ZQ== +"@typescript-eslint/typescript-estree@8.31.1": + version "8.31.1" + resolved "https://registry.yarnpkg.com/@typescript-eslint/typescript-estree/-/typescript-estree-8.31.1.tgz#37792fe7ef4d3021c7580067c8f1ae66daabacdf" + integrity sha512-kaA0ueLe2v7KunYOyWYtlf/QhhZb7+qh4Yw6Ni5kgukMIG+iP773tjgBiLWIXYumWCwEq3nLW+TUywEp8uEeag== dependencies: - "@typescript-eslint/types" "8.24.0" - "@typescript-eslint/visitor-keys" "8.24.0" + "@typescript-eslint/types" "8.31.1" + "@typescript-eslint/visitor-keys" "8.31.1" debug "^4.3.4" fast-glob "^3.3.2" is-glob "^4.0.3" @@ -1059,22 +1059,22 @@ semver "^7.6.0" ts-api-utils "^2.0.1" -"@typescript-eslint/utils@8.24.0": - version "8.24.0" - resolved "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-8.24.0.tgz" - integrity sha512-07rLuUBElvvEb1ICnafYWr4hk8/U7X9RDCOqd9JcAMtjh/9oRmcfN4yGzbPVirgMR0+HLVHehmu19CWeh7fsmQ== +"@typescript-eslint/utils@8.31.1": + version "8.31.1" + resolved "https://registry.yarnpkg.com/@typescript-eslint/utils/-/utils-8.31.1.tgz#5628ea0393598a0b2f143d0fc6d019f0dee9dd14" + integrity sha512-2DSI4SNfF5T4oRveQ4nUrSjUqjMND0nLq9rEkz0gfGr3tg0S5KB6DhwR+WZPCjzkZl3cH+4x2ce3EsL50FubjQ== dependencies: "@eslint-community/eslint-utils" "^4.4.0" - "@typescript-eslint/scope-manager" "8.24.0" - "@typescript-eslint/types" "8.24.0" - "@typescript-eslint/typescript-estree" "8.24.0" + "@typescript-eslint/scope-manager" "8.31.1" + "@typescript-eslint/types" "8.31.1" + "@typescript-eslint/typescript-estree" "8.31.1" -"@typescript-eslint/visitor-keys@8.24.0": - version "8.24.0" - resolved "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-8.24.0.tgz" - integrity sha512-kArLq83QxGLbuHrTMoOEWO+l2MwsNS2TGISEdx8xgqpkbytB07XmlQyQdNDrCc1ecSqx0cnmhGvpX+VBwqqSkg== +"@typescript-eslint/visitor-keys@8.31.1": + version "8.31.1" + resolved "https://registry.yarnpkg.com/@typescript-eslint/visitor-keys/-/visitor-keys-8.31.1.tgz#6742b0e3ba1e0c1e35bdaf78c03e759eb8dd8e75" + integrity sha512-I+/rgqOVBn6f0o7NDTmAPWWC6NuqhV174lfYvAm9fUaWeiefLdux9/YI3/nLugEn9L8fcSi0XmpKi/r5u0nmpw== dependencies: - "@typescript-eslint/types" "8.24.0" + "@typescript-eslint/types" "8.31.1" eslint-visitor-keys "^4.2.0" acorn-jsx@^5.3.2: @@ -1565,13 +1565,13 @@ escape-string-regexp@^4.0.0: resolved "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-4.0.0.tgz" integrity sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA== -eslint-plugin-prettier@^5.2.3: - version "5.2.3" - resolved "https://registry.npmjs.org/eslint-plugin-prettier/-/eslint-plugin-prettier-5.2.3.tgz" - integrity sha512-qJ+y0FfCp/mQYQ/vWQ3s7eUlFEL4PyKfAJxsnYTJ4YT73nsJBWqmEpFryxV9OeUiqmsTsYJ5Y+KDNaeP31wrRw== +eslint-plugin-prettier@^5.4.1: + version "5.5.1" + resolved "https://registry.yarnpkg.com/eslint-plugin-prettier/-/eslint-plugin-prettier-5.5.1.tgz#470820964de9aedb37e9ce62c3266d2d26d08d15" + integrity sha512-dobTkHT6XaEVOo8IO90Q4DOSxnm3Y151QxPJlM/vKC0bVy+d6cVWQZLlFiuZPP0wS6vZwSKeJgKkcS+KfMBlRw== dependencies: prettier-linter-helpers "^1.0.0" - synckit "^0.9.1" + synckit "^0.11.7" eslint-plugin-unused-imports@^4.1.4: version "4.1.4" @@ -3187,13 +3187,12 @@ supports-preserve-symlinks-flag@^1.0.0: resolved "https://registry.npmjs.org/supports-preserve-symlinks-flag/-/supports-preserve-symlinks-flag-1.0.0.tgz" integrity sha512-ot0WnXS9fgdkgIcePe6RHNk1WA8+muPa6cSjeR3V8K27q9BB1rTE3R1p7Hv0z1ZyAc8s6Vvv8DIyWf681MAt0w== -synckit@0.8.8, synckit@^0.9.1: - version "0.8.8" - resolved "https://registry.yarnpkg.com/synckit/-/synckit-0.8.8.tgz#fe7fe446518e3d3d49f5e429f443cf08b6edfcd7" - integrity sha512-HwOKAP7Wc5aRGYdKH+dw0PRRpbO841v2DENBtjnR5HFWoiNByAl7vrx3p0G/rCyYXQsrxqtX48TImFtPcIHSpQ== +synckit@^0.11.7: + version "0.11.8" + resolved "https://registry.yarnpkg.com/synckit/-/synckit-0.11.8.tgz#b2aaae998a4ef47ded60773ad06e7cb821f55457" + integrity sha512-+XZ+r1XGIJGeQk3VvXhT6xx/VpbHsRzsTkGgF6E5RX9TTXD0118l87puaEBZ566FhqblC6U0d4XnubznJDm30A== dependencies: - "@pkgr/core" "^0.1.0" - tslib "^2.6.2" + "@pkgr/core" "^0.2.4" test-exclude@^6.0.0: version "6.0.0" @@ -3273,10 +3272,9 @@ ts-node@^10.5.0: v8-compile-cache-lib "^3.0.0" yn "3.1.1" -"tsc-multi@https://github.com/stainless-api/tsc-multi/releases/download/v1.1.3/tsc-multi.tgz": - version "1.1.3" - resolved "https://github.com/stainless-api/tsc-multi/releases/download/v1.1.3/tsc-multi.tgz" - integrity sha512-HzZvpxS+N2VtJ2UEBAUHi5JfFfUz5QSPBcPoojJgwfKEHrwRfOxFd0U+9t7uZOSJMGHaL3uoLaOgdl9CQL6uBQ== +"tsc-multi@https://github.com/stainless-api/tsc-multi/releases/download/v1.1.8/tsc-multi.tgz": + version "1.1.8" + resolved "https://github.com/stainless-api/tsc-multi/releases/download/v1.1.8/tsc-multi.tgz#f544b359b8f05e607771ffacc280e58201476b04" dependencies: debug "^4.3.7" fast-glob "^3.3.2" @@ -3298,7 +3296,7 @@ tsconfig-paths@^4.0.0: minimist "^1.2.6" strip-bom "^3.0.0" -tslib@^2.6.2, tslib@^2.8.1: +tslib@^2.8.1: version "2.8.1" resolved "https://registry.npmjs.org/tslib/-/tslib-2.8.1.tgz" integrity sha512-oJFu94HQb+KVduSUQL7wnpmqnfmLsOA/nAh6b6EH0wCEoK0/mPeXU6c3wKDV83MkOuHPRHtSXKKU99IBazS/2w== @@ -3320,24 +3318,24 @@ type-fest@^0.21.3: resolved "https://registry.npmjs.org/type-fest/-/type-fest-0.21.3.tgz" integrity sha512-t0rzBq87m3fVcduHDUFhKmyyX+9eo6WQjZvf51Ea/M0Q7+T374Jp1aUiyUl0GKxp8M/OETVHSDvmkyPgvX+X2w== -typescript-eslint@^8.24.0: - version "8.24.0" - resolved "https://registry.npmjs.org/typescript-eslint/-/typescript-eslint-8.24.0.tgz" - integrity sha512-/lmv4366en/qbB32Vz5+kCNZEMf6xYHwh1z48suBwZvAtnXKbP+YhGe8OLE2BqC67LMqKkCNLtjejdwsdW6uOQ== +typescript-eslint@8.31.1: + version "8.31.1" + resolved "https://registry.yarnpkg.com/typescript-eslint/-/typescript-eslint-8.31.1.tgz#b77ab1e48ced2daab9225ff94bab54391a4af69b" + integrity sha512-j6DsEotD/fH39qKzXTQRwYYWlt7D+0HmfpOK+DVhwJOFLcdmn92hq3mBb7HlKJHbjjI/gTOqEcc9d6JfpFf/VA== dependencies: - "@typescript-eslint/eslint-plugin" "8.24.0" - "@typescript-eslint/parser" "8.24.0" - "@typescript-eslint/utils" "8.24.0" + "@typescript-eslint/eslint-plugin" "8.31.1" + "@typescript-eslint/parser" "8.31.1" + "@typescript-eslint/utils" "8.31.1" typescript@5.6.1-rc: version "5.6.1-rc" resolved "https://registry.npmjs.org/typescript/-/typescript-5.6.1-rc.tgz" integrity sha512-E3b2+1zEFu84jB0YQi9BORDjz9+jGbwwy1Zi3G0LUNw7a7cePUrHMRNy8aPh53nXpkFGVHSxIZo5vKTfYaFiBQ== -typescript@^4.8.2: - version "4.9.5" - resolved "https://registry.npmjs.org/typescript/-/typescript-4.9.5.tgz" - integrity sha512-1FXk9E2Hm+QzZQ7z+McJiHL4NW1F2EzMu9Nq9i3zAaGqibafqYwCVU6WyWAuyQRRzOlxou8xZSyXLEN8oKj24g== +typescript@5.8.3: + version "5.8.3" + resolved "https://registry.yarnpkg.com/typescript/-/typescript-5.8.3.tgz#92f8a3e5e3cf497356f4178c34cd65a7f5e8440e" + integrity sha512-p1diW6TqL9L07nNxvRMM7hMMw4c5XOo/1ibL4aAIGmSAt9slTE1Xgw5KWuof2uTOvCg9BY7ZRi+GaF+7sfgPeQ== undici-types@~6.19.2: version "6.19.8"