[retry] upgrade to bun 1.0.33 + upgrade deps #5

Merged
qpismont merged 2 commits from bun1.0.33 into main 2024-03-20 20:41:47 +01:00
9 changed files with 34 additions and 26 deletions

View file

@ -10,5 +10,7 @@ steps:
matrix:
BUN_VERSION:
- 1.0.25
- 1.0.26
- 1.0.30
- 1.0.31
- 1.0.32
- 1.0.33

View file

@ -3,7 +3,7 @@ when:
steps:
lint:
image: oven/bun:1.0.26-slim
image: oven/bun:1.0.33-slim
commands:
- bun install
- bun run ci

View file

@ -12,8 +12,9 @@ steps:
matrix:
BUN_VERSION:
- 1.0.25
- 1.0.26
- 1.0.31
- 1.0.32
- 1.0.33
services:
nats:

View file

@ -1,5 +1,5 @@
{
"$schema": "https://biomejs.dev/schemas/1.5.3/schema.json",
"$schema": "https://biomejs.dev/schemas/1.6.1/schema.json",
"organizeImports": {
"enabled": true
},

BIN
bun.lockb

Binary file not shown.

View file

@ -12,7 +12,7 @@
"build": "tsc --project tsconfig.build.json"
},
"devDependencies": {
"@biomejs/biome": "1.5.3",
"@biomejs/biome": "1.6.1",
"@types/bun": "latest",
"typescript": "^5.0.0"
},

View file

@ -52,6 +52,7 @@ export default class NatsAdaptor implements Adaptor {
}
async stop(): Promise<void> {
this.sub?.unsubscribe();
await this.nc?.drain();
}
}

View file

@ -1,4 +1,4 @@
import { z } from "zod";
import type { z } from "zod";
import type Adaptor from "./adaptors/adaptor";
import { RequestError } from "./error";
import {
@ -36,6 +36,7 @@ export default class Service {
async (rawReq) => {
const rawReqJson = JSON.parse(rawReq);
const internalRequestJson = InternalRequestSchema.safeParse(rawReqJson);
if (!internalRequestJson.success) {
return JSON.stringify({
statusCode: 400,
@ -51,12 +52,14 @@ export default class Service {
if (internalRequest.data && schema) {
const validate = schema.safeParse(internalRequest.data);
if (!validate.success) {
return JSON.stringify({
statusCode: 400,
data: validate.error,
} satisfies InternalResponse);
}
req.data = validate.data;
}
@ -75,6 +78,7 @@ export default class Service {
data: err.message,
} satisfies InternalResponse);
}
return JSON.stringify({
statusCode: 500,
data: "unknow error apend",

View file

@ -1,22 +1,22 @@
{
"compilerOptions": {
"lib": ["ESNext"],
"target": "ESNext",
"module": "ESNext",
"moduleDetection": "force",
"jsx": "react-jsx",
"allowJs": true,
"compilerOptions": {
"lib": ["ESNext"],
"target": "ESNext",
"module": "ESNext",
"moduleDetection": "force",
"jsx": "react-jsx",
"allowJs": true,
/* Bundler mode */
"moduleResolution": "bundler",
"allowImportingTsExtensions": true,
"verbatimModuleSyntax": true,
"noEmit": true,
/* Bundler mode */
"moduleResolution": "bundler",
"allowImportingTsExtensions": true,
"verbatimModuleSyntax": true,
"noEmit": true,
/* Linting */
"skipLibCheck": true,
"strict": true,
"noFallthroughCasesInSwitch": true,
"forceConsistentCasingInFileNames": true
}
/* Linting */
"skipLibCheck": true,
"strict": true,
"noFallthroughCasesInSwitch": true,
"forceConsistentCasingInFileNames": true
}
}