@teardown/errors 0.1.46 → 0.1.48

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@teardown/errors",
3
- "version": "0.1.46",
3
+ "version": "0.1.48",
4
4
  "private": false,
5
5
  "publishConfig": {
6
6
  "access": "public"
@@ -21,9 +21,9 @@
21
21
  "./package.json": "./package.json"
22
22
  },
23
23
  "scripts": {
24
- "build": "tsc --project ./tsconfig.lib.json",
25
- "dev": "tsc --watch --project ./tsconfig.lib.json",
26
- "typecheck": "tsc --noEmit --project ./tsconfig.lib.json",
24
+ "build": "bun x tsgo --project ./tsconfig.lib.json",
25
+ "dev": "bun x tsgo --watch --project ./tsconfig.lib.json",
26
+ "typecheck": "bun x tsgo --noEmit --project ./tsconfig.lib.json",
27
27
  "fmt": "bun x biome format --write ./src",
28
28
  "lint": "bun x biome lint --write ./src",
29
29
  "check": "bun x biome check ./src",
@@ -31,7 +31,7 @@
31
31
  },
32
32
  "devDependencies": {
33
33
  "@biomejs/biome": "2.3.8",
34
- "@teardown/tsconfig": "0.1.46",
34
+ "@teardown/tsconfig": "0.1.47",
35
35
  "@types/bun": "1.3.4"
36
36
  },
37
37
  "peerDependencies": {
@@ -39,6 +39,6 @@
39
39
  "zod": "4.1.13"
40
40
  },
41
41
  "dependencies": {
42
- "elysia": "1.4.17"
42
+ "elysia": "1.4.19"
43
43
  }
44
44
  }
package/src/index.test.ts CHANGED
@@ -127,4 +127,3 @@ describe("Errors", () => {
127
127
  });
128
128
  });
129
129
  });
130
-
package/src/index.ts CHANGED
@@ -197,6 +197,7 @@ const handleZodError = (error: ZodError): ErrorHandlerResult => {
197
197
  };
198
198
  };
199
199
 
200
+ // biome-ignore lint/complexity/noExcessiveCognitiveComplexity: Complex error handling logic that requires multiple conditional branches
200
201
  export function handleError(error: unknown, code: number | string = 500): ErrorHandlerResult {
201
202
  // Handle Elysia ValidationError (duck-typed check)
202
203
  if (code === "VALIDATION" || (error && typeof error === "object" && "type" in error && error.type === "validation")) {