Skip to content

Commit 1a399d1

Browse files
committed
merge from main
2 parents aa29779 + 57faa50 commit 1a399d1

File tree

7 files changed

+318
-1959
lines changed

7 files changed

+318
-1959
lines changed

README.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,10 @@ We chose typescript over other solutions (such as ELM, ReasonML or ClojureScript
2727
Since the type system is compile-time only, we need some way to assert that the data we think we're parsing from Mongo / HTTP
2828
actually complies to the schema we defined. Zod is a good TypeScript-first solution for schema management.
2929

30+
#### Fastify
31+
32+
Express is dated, its latest release in October 2022 (as of September 2023) and its API is not Typescript-friendly. Fastify supports Typescript out of the box, with Zod support for schema definition supported by a plugin.
33+
3034
#### React
3135

3236
#### Vite

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
],
1212
"packageManager": "[email protected]",
1313
"devDependencies": {
14-
"@types/cookie-parser": "^1.4.3",
14+
"@types/cookie-parser": "^1.4.4",
1515
"cookie-parser": "^1.4.6",
1616
"jsdom": "^21.1.2"
1717
},

packages/client/package.json

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -11,16 +11,16 @@
1111
"author": "",
1212
"license": "ISC",
1313
"devDependencies": {
14-
"@babel/plugin-proposal-explicit-resource-management": "^7.22.6",
14+
"@babel/plugin-proposal-explicit-resource-management": "^7.23.0",
1515
"@nirelko/jest-environment-jsdom": "^29.6.7",
16-
"@testing-library/dom": "^9.3.1",
16+
"@testing-library/dom": "^9.3.3",
1717
"@testing-library/jest-dom": "^5.17.0",
18-
"@testing-library/react": "^13.4.0",
19-
"@testing-library/user-event": "^14.4.3",
20-
"@types/js-cookie": "^3.0.3",
21-
"@types/react": "^18.2.21",
22-
"@types/react-dom": "^18.2.7",
23-
"@vitejs/plugin-react": "^4.0.4",
18+
"@testing-library/react": "^14.0.0",
19+
"@testing-library/user-event": "^14.5.1",
20+
"@types/js-cookie": "^3.0.4",
21+
"@types/react": "^18.2.23",
22+
"@types/react-dom": "^18.2.8",
23+
"@vitejs/plugin-react": "^4.1.0",
2424
"fastify": "^4.23.2",
2525
"typescript": "^5.2.2",
2626
"vite": "^4.4.9",
@@ -29,11 +29,11 @@
2929
},
3030
"dependencies": {
3131
"@ts-react-tdd/server": "1.0.0",
32-
"axios": "^0.27.2",
32+
"axios": "^1.5.1",
3333
"nanoid": "^4.0.2",
3434
"react": "^18.2.0",
3535
"react-dom": "^18.2.0",
3636
"react-query": "^3.39.3",
37-
"react-router-dom": "^6.15.0"
37+
"react-router-dom": "^6.16.0"
3838
}
3939
}

packages/e2e/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,9 @@
55
},
66
"packageManager": "[email protected]",
77
"devDependencies": {
8-
"@playwright/test": "^1.37.1",
8+
"@playwright/test": "^1.38.1",
99
"@types/axios": "^0.14.0",
10-
"axios": "^1.4.0",
10+
"axios": "^1.5.1",
1111
"typescript": "^5.2.2"
1212
}
1313
}

packages/server/package.json

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -12,13 +12,12 @@
1212
"author": "",
1313
"license": "ISC",
1414
"devDependencies": {
15-
"@faker-js/faker": "^7.6.0",
1615
"@nestjs/testing": "^10.3.7",
16+
"@faker-js/faker": "^8.1.0",
1717
"@types/jest": "^28.1.8",
18-
"@types/morgan": "^1.9.5",
19-
"@types/node": "^17.0.45",
18+
"@types/node": "^20.7.1",
2019
"jest": "^28.1.3",
21-
"nodemon": "^2.0.22",
20+
"nodemon": "^3.0.1",
2221
"ts-jest": "^28.0.8"
2322
},
2423
"dependencies": {
@@ -28,7 +27,7 @@
2827
"@nestjs/platform-express": "^10.3.7",
2928
"fastify": "^4.23.2",
3029
"fastify-type-provider-zod": "^1.1.9",
31-
"mongodb": "^4.17.1",
30+
"mongodb": "^6.1.0",
3231
"nanoid": "^4.0.2",
3332
"reflect-metadata": "^0.2.2",
3433
"rxjs": "^7.8.1",

packages/server/src/builders.ts

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
1-
import { faker } from '@faker-js/faker';
2-
import { builderFor } from 'ts-byob';
3-
import { ProductTemplate } from './types';
1+
import {faker} from '@faker-js/faker';
2+
import {builderFor} from 'ts-byob';
3+
import {ProductTemplate} from './types';
44

5-
export const aProduct = builderFor<ProductTemplate>(() => ({title: faker.name.fullName(), price: Math.round(Math.random() * 1000)}));
5+
export const aProduct = builderFor<ProductTemplate>(() => ({
6+
title: faker.person.fullName(),
7+
price: Math.round(Math.random() * 1000)
8+
}));

0 commit comments

Comments
 (0)