Skip to content

Commit d5a1f51

Browse files
authored
Update package (#64)
* chore(packages): update to latest non-breaking versions * chore(packages): update to latest breaking versions * format(*): formatted all files with `pretter` * fix(web): pipe all valibot transform * packages(web): downgrade `@tanstack/react-query` from `v5` to `v4`
1 parent 7e105fa commit d5a1f51

File tree

6 files changed

+6847
-5790
lines changed

6 files changed

+6847
-5790
lines changed

apps/web/package.json

+20-20
Original file line numberDiff line numberDiff line change
@@ -14,10 +14,10 @@
1414
},
1515
"dependencies": {
1616
"@chakra-ui/react": "^2.8.2",
17-
"@emotion/react": "^11.11.4",
18-
"@emotion/styled": "^11.11.5",
17+
"@emotion/react": "^11.13.0",
18+
"@emotion/styled": "^11.13.0",
1919
"@poolofdeath20/util": "^0.8.0",
20-
"@supabase/supabase-js": "^2.43.4",
20+
"@supabase/supabase-js": "^2.44.4",
2121
"@tanstack/react-query": "^4.36.1",
2222
"@trpc/client": "^10.45.2",
2323
"@trpc/next": "^10.45.2",
@@ -31,7 +31,7 @@
3131
"hex-rgb": "^5.0.0",
3232
"iwanthue": "^2.0.0",
3333
"jszip": "^3.10.1",
34-
"next": "^14.2.3",
34+
"next": "^14.2.5",
3535
"next-seo": "^6.5.0",
3636
"react": "^18.3.1",
3737
"react-dom": "^18.3.1",
@@ -40,34 +40,34 @@
4040
"react-syntax-highlighter": "^15.5.0",
4141
"react-toastify": "^10.0.5",
4242
"superjson": "^2.2.1",
43-
"valibot": "^0.30.0"
43+
"valibot": "^0.36.0"
4444
},
4545
"devDependencies": {
46-
"@ducanh2912/next-pwa": "^10.2.7",
47-
"@poolofdeath20/eslint-config": "^0.3.2",
48-
"@poolofdeath20/tsconfig": "^0.0.0",
46+
"@ducanh2912/next-pwa": "^10.2.8",
47+
"@poolofdeath20/eslint-config": "^0.3.4",
48+
"@poolofdeath20/tsconfig": "^0.1.0",
4949
"@types/cors": "^2.8.17",
5050
"@types/file-saver": "^2.0.7",
5151
"@types/jest-image-snapshot": "^6.4.0",
5252
"@types/react": "^18.3.3",
5353
"@types/react-dom": "^18.3.0",
5454
"@types/react-syntax-highlighter": "^15.5.13",
55-
"@typescript-eslint/eslint-plugin": "^7.11.0",
56-
"@typescript-eslint/parser": "^7.11.0",
55+
"@typescript-eslint/eslint-plugin": "^7.16.1",
56+
"@typescript-eslint/parser": "^7.16.1",
5757
"ci-info": "^4.0.0",
5858
"eslint": "^8.57.0",
59-
"eslint-plugin-jsx-a11y": "^6.8.0",
60-
"eslint-plugin-react": "^7.34.2",
59+
"eslint-plugin-jsx-a11y": "^6.9.0",
60+
"eslint-plugin-react": "^7.35.0",
6161
"gen-env-type-def": "^0.0.4",
6262
"jest-image-snapshot": "^6.4.0",
63-
"knip": "^5.17.3",
63+
"knip": "^5.26.0",
6464
"next-sitemap": "^4.2.3",
65-
"prettier": "^3.2.5",
66-
"puppeteer": "^22.10.0",
67-
"sql-formatter": "15.3.1",
68-
"supabase": "^1.169.8",
69-
"typescript": "^5.4.5",
70-
"vite-node": "^1.6.0",
71-
"vitest": "^1.6.0"
65+
"prettier": "^3.3.3",
66+
"puppeteer": "^22.13.1",
67+
"sql-formatter": "15.3.2",
68+
"supabase": "^1.183.5",
69+
"typescript": "^5.5.3",
70+
"vite-node": "^2.0.3",
71+
"vitest": "^2.0.3"
7272
}
7373
}

apps/web/pages/templates/index.tsx

+1-12
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ import {
2424

2525
import styled from '@emotion/styled';
2626

27-
import { parse, object, array, string, transform, nullable } from 'valibot';
27+
import { parse, object, array, string } from 'valibot';
2828

2929
import Fuse from 'fuse.js';
3030

@@ -55,17 +55,6 @@ type Template = Templates[number];
5555

5656
const schemas = {
5757
names: string(),
58-
cacheOrdinaryTemplates: transform(
59-
nullable(
60-
array(
61-
object({
62-
name: string(),
63-
content: string(),
64-
})
65-
)
66-
),
67-
Optional.from
68-
),
6958
selectedOrdinaryTemplatesId: array(
7059
object({
7160
value: string(),

apps/web/src/api/scrapper/index.ts

+10-7
Original file line numberDiff line numberDiff line change
@@ -2,25 +2,28 @@ import { AsyncOperation, Defined } from '@poolofdeath20/util';
22

33
import axios from 'axios';
44

5-
import { parse, object, array, string, transform } from 'valibot';
5+
import { parse, object, array, string, transform, pipe } from 'valibot';
66
import { singleFlowParser } from '../../common/parser';
77

88
const schemas = {
9-
latestTimeCommitted: transform(string(), (value) => {
10-
return new Date(value);
11-
}),
9+
latestTimeCommitted: pipe(
10+
string(),
11+
transform((value) => {
12+
return new Date(value);
13+
})
14+
),
1215
template: {
1316
properties: {
1417
content: string(),
1518
},
1619
list: array(
17-
transform(
20+
pipe(
1821
object({
1922
path: string(),
2023
}),
21-
({ path }) => {
24+
transform(({ path }) => {
2225
return path;
23-
}
26+
})
2427
)
2528
),
2629
},

apps/web/supabase/migrations/20240119031215_create-templates.sql

+1-1
Original file line numberDiff line numberDiff line change
@@ -10,4 +10,4 @@ CREATE TABLE template (
1010
name TEXT NOT NULL UNIQUE,
1111
content TEXT NOT NULL,
1212
created_at TIMESTAMPTZ DEFAULT NOW() NOT NULL
13-
);
13+
);
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1-
ALTER TABLE template DROP CONSTRAINT template_name_key;
1+
ALTER TABLE template
2+
DROP CONSTRAINT template_name_key;
23

3-
ALTER TABLE template ADD UNIQUE (batch_id, name);
4+
ALTER TABLE template
5+
ADD UNIQUE (batch_id, name);

0 commit comments

Comments
 (0)