Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions packages/app-client/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
"@solid-primitives/i18n": "^2.1.1",
"@solid-primitives/storage": "^4.2.1",
"@solidjs/router": "^0.14.3",
"@unocss/reset": "^0.64.0",
"@unocss/reset": "^66.0.0",
"class-variance-authority": "^0.7.0",
"clsx": "^2.1.1",
"jszip": "^3.10.1",
Expand All @@ -55,9 +55,9 @@
"jsdom": "^25.0.0",
"tsx": "^4.19.3",
"typescript": "catalog:",
"unocss": "^0.64.0",
"vite": "^5.0.11",
"vite-plugin-solid": "^2.11.6",
"unocss": "^66.0.0",
"vite": "^8.0.10",
"vite-plugin-solid": "^2.11.12",
"vitest": "catalog:"
}
}
2 changes: 1 addition & 1 deletion packages/app-client/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"jsxImportSource": "solid-js",
"baseUrl": "./",
"module": "ESNext",
"moduleResolution": "node",
"moduleResolution": "bundler",
"paths": {
"@/*": ["./src/*"]
},
Expand Down
3 changes: 1 addition & 2 deletions packages/app-client/vite.config.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
import path from 'node:path';
import process from 'node:process';
import unoCssPlugin from 'unocss/vite';
import { defineConfig } from 'vite';
import solidPlugin from 'vite-plugin-solid';
import { configDefaults } from 'vitest/config';
import { configDefaults, defineConfig } from 'vitest/config';

export default defineConfig({
plugins: [
Expand Down
9 changes: 4 additions & 5 deletions packages/app-server/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,23 +30,22 @@
"dependencies": {
"@corentinth/chisels": "catalog:",
"@enclosed/lib": "workspace:*",
"@hono/node-server": "^1.12.1",
"bcryptjs": "^2.4.3",
"@hono/node-server": "^2.0.0",
"bcryptjs": "^3.0.3",
"date-fns": "^4.0.0",
"figue": "^2.1.0",
"figue": "^3.2.0",
"hono": "^4.5.8",
"lodash-es": "^4.17.21",
"node-cron": "^3.0.3",
"pino": "^9.3.2",
"ulid-workers": "^2.1.0",
"unstorage": "^1.10.2",
"zod": "^3.23.8"
"zod": "^4.3.6"
},
"devDependencies": {
"@antfu/eslint-config": "catalog:",
"@cloudflare/workers-types": "^4.20240821.1",
"@total-typescript/ts-reset": "^0.6.1",
"@types/bcryptjs": "^2.4.6",
"@types/lodash-es": "^4.17.12",
"@types/node-cron": "^3.0.11",
"@vitest/coverage-v8": "catalog:",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ describe('e2e', () => {
message: 'Invalid request body',
details: [
{
message: 'Invalid enum value. Expected \'cbor-array\', received \'foo\'',
message: 'Invalid input: expected "cbor-array"',
path: 'serializationFormat',
},
],
Expand Down Expand Up @@ -115,7 +115,7 @@ describe('e2e', () => {
message: 'Invalid request body',
details: [
{
message: 'Invalid enum value. Expected \'aes-256-gcm\', received \'foo\'',
message: 'Invalid input: expected "aes-256-gcm"',
path: 'encryptionAlgorithm',
},
],
Expand Down
2 changes: 0 additions & 2 deletions packages/app-server/src/modules/notes/notes.routes.ts
Original file line number Diff line number Diff line change
Expand Up @@ -96,9 +96,7 @@ function setupCreateNoteRoute({ app }: { app: ServerInstance }) {
.max(ONE_MONTH_IN_SECONDS)
.optional(),

// @ts-expect-error zod wants strict non empty array
encryptionAlgorithm: z.enum(encryptionAlgorithms),
// @ts-expect-error zod wants strict non empty array
serializationFormat: z.enum(serializationFormats),

isPublic: z.boolean().optional().default(true),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ describe('validation', () => {
describe('validateJsonBody', () => {
describe('validateJsonBody creates a validation middleware that check the request json body against a schema', async () => {
test('an invalid payload should trigger a 400 error', async () => {
const app = new Hono().post('/', validateJsonBody(z.object({ name: z.string({ required_error: 'The name is required' }) })), (context) => {
const app = new Hono().post('/', validateJsonBody(z.object({ name: z.string({ error: 'The name is required' }) })), (context) => {
return context.json({ ok: true });
});

Expand Down Expand Up @@ -60,7 +60,7 @@ describe('validation', () => {
message: 'Invalid request body',
code: 'server.invalid_request.body',
details: [{
message: 'Unrecognized key(s) in object: \'foo\'',
message: 'Unrecognized key: "foo"',
}],
},
});
Expand All @@ -71,7 +71,7 @@ describe('validation', () => {
describe('validateQuery', () => {
describe('validateQuery creates a validation middleware that check the request query parameters against a schema', async () => {
test('an invalid query should trigger a 400 error', async () => {
const app = new Hono().get('/', validateQuery(z.object({ name: z.string({ required_error: 'The name is required' }) })), (context) => {
const app = new Hono().get('/', validateQuery(z.object({ name: z.string({ error: 'The name is required' }) })), (context) => {
return context.json({ ok: true });
});

Expand Down Expand Up @@ -123,7 +123,7 @@ describe('validation', () => {
details: [
{
path: 'name',
message: 'Invalid input: must start with "foo-"',
message: 'Invalid string: must start with "foo-"',
},
],
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import type z from 'zod';
import { validator } from 'hono/validator';

function formatValidationError({ error }: { error: z.ZodError }) {
const details = (error.errors ?? []).map((e) => {
const details = (error.issues ?? []).map((e) => {
return {
...(e.path.length === 0 ? {} : { path: e.path.join('.') }),
message: e.message,
Expand Down
5 changes: 2 additions & 3 deletions packages/docs/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,14 +20,13 @@
"lint:fix": "eslint --fix ."
},
"dependencies": {
"bcryptjs": "^2.4.3"
"bcryptjs": "^3.0.3"
},
"devDependencies": {
"@antfu/eslint-config": "catalog:",
"@types/bcryptjs": "^2.4.6",
"@types/lodash-es": "^4.17.12",
"eslint": "catalog:",
"figue": "^2.1.0",
"figue": "^3.2.0",
"less": "^4.2.0",
"lodash-es": "^4.17.21",
"typescript": "catalog:",
Expand Down
Loading
Loading