Skip to content

Commit 4c2e9c2

Browse files
committed
Update typed-firestore to 1.0 and improve timestamps workaround
1 parent 59e1f6f commit 4c2e9c2

File tree

15 files changed

+672
-613
lines changed

15 files changed

+672
-613
lines changed

apps/web/package.json

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -15,12 +15,12 @@
1515
"@radix-ui/react-icons": "^1.3.2",
1616
"@radix-ui/react-slot": "^1.1.1",
1717
"@repo/common": "workspace:*",
18-
"@typed-firestore/react": "1.0.0-0",
18+
"@typed-firestore/react": "1.0.0",
1919
"class-variance-authority": "^0.7.1",
2020
"clsx": "^2.1.1",
2121
"firebase": "^11.2.0",
22-
"lucide-react": "^0.473.0",
23-
"next": "^15.1.5",
22+
"lucide-react": "^0.474.0",
23+
"next": "^15.1.6",
2424
"react": "^19.0.0",
2525
"react-dom": "^19.0.0",
2626
"tailwind-merge": "^2.6.0",
@@ -30,12 +30,12 @@
3030
"devDependencies": {
3131
"@codecompose/typescript-config": "^1.2.0",
3232
"@repo/eslint-config": "workspace:*",
33-
"@types/node": "^22.10.7",
34-
"@types/react": "^19.0.7",
33+
"@types/node": "^22.10.10",
34+
"@types/react": "^19.0.8",
3535
"@types/react-dom": "^19.0.3",
3636
"autoprefixer": "^10.4.20",
3737
"del-cli": "^6.0.0",
38-
"eslint-config-next": "^15.1.5",
38+
"eslint-config-next": "^15.1.6",
3939
"postcss": "^8.5.1",
4040
"tailwindcss": "^3.4.17"
4141
}

apps/web/src/app/components/key-value-list.tsx

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
import type { FsTimestamp } from "@repo/common";
21
import { isDefined } from "@repo/common";
32
import { Timestamp } from "firebase/firestore";
43
import { Table, TableBody, TableCell, TableRow } from "~/components/ui/table";

apps/web/src/globals.d.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
import type { Timestamp } from "firebase/firestore";
2+
3+
declare global {
4+
type FsTimestamp = Timestamp;
5+
}

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,9 +46,9 @@
4646
"firebase-tools-with-isolate": "13.29.1-2",
4747
"prettier": "^3.4.2",
4848
"prettier-plugin-jsdoc": "^1.3.2",
49-
"turbo": "^2.3.3",
49+
"turbo": "^2.3.4",
5050
"typescript": "^5.7.3",
5151
"vercel": "^39.3.0",
52-
"vitest": "^3.0.2"
52+
"vitest": "^3.0.4"
5353
}
5454
}

packages/common/package.json

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -21,18 +21,18 @@
2121
"license": "MIT",
2222
"dependencies": {
2323
"firebase": "^11.2.0",
24-
"remeda": "^2.19.2"
24+
"remeda": "^2.20.0"
2525
},
2626
"devDependencies": {
2727
"@codecompose/typescript-config": "^1.2.0",
28-
"@eslint/js": "^9.18.0",
28+
"@eslint/js": "^9.19.0",
2929
"@repo/eslint-config": "workspace:*",
3030
"del-cli": "^6.0.0",
31-
"eslint": "^9.18.0",
31+
"eslint": "^9.19.0",
3232
"prettier": "^3.4.2",
33-
"tsup": "^8.3.5",
33+
"tsup": "^8.3.6",
3434
"typescript": "^5.7.3",
35-
"typescript-eslint": "^8.20.0",
36-
"vitest": "^3.0.2"
35+
"typescript-eslint": "^8.21.0",
36+
"vitest": "^3.0.4"
3737
}
3838
}

packages/common/src/document-types.ts

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,8 @@
1-
/** This file contains Firestore document types */
2-
3-
import type { Timestamp } from "firebase/firestore";
4-
51
/**
6-
* The firebase-admin SDK 11 contains a Timestamp definition without a toJSON
7-
* method, so in order to freely share the document type definitions between
8-
* client and server code, we need to omit the toJSON method.
2+
* This file contains Firestore document types. The FsTimestamp is an alias
3+
* which is declared globally differently for server and client code, because
4+
* the Firestore SDKs have slightly incompatible types.
95
*/
10-
export type FsTimestamp = Omit<Timestamp, "toJSON">;
11-
126
export type Counter = {
137
value: number;
148
mutated_at: FsTimestamp;

packages/common/src/global.d.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
import type { Timestamp } from "firebase/firestore";
2+
3+
declare global {
4+
type FsTimestamp = Timestamp;
5+
}

packages/core/package.json

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -25,21 +25,21 @@
2525
"@repo/common": "workspace:*",
2626
"@sindresorhus/is": "^7.0.1",
2727
"firebase-admin": "^13.0.2",
28-
"firebase-functions": "^6.2.0",
28+
"firebase-functions": "^6.3.0",
2929
"get-or-throw": "^1.4.0"
3030
},
3131
"devDependencies": {
3232
"@codecompose/typescript-config": "^1.2.0",
33-
"@eslint/js": "^9.18.0",
33+
"@eslint/js": "^9.19.0",
3434
"@repo/eslint-config": "workspace:*",
35-
"@types/node": "^22.10.7",
35+
"@types/node": "^22.10.10",
3636
"del-cli": "^6.0.0",
37-
"eslint": "^9.18.0",
37+
"eslint": "^9.19.0",
3838
"npm-run-all": "^4.1.5",
3939
"tsc-alias": "^1.8.10",
40-
"tsup": "^8.3.5",
40+
"tsup": "^8.3.6",
4141
"typescript": "^5.7.3",
42-
"typescript-eslint": "^8.20.0",
43-
"vitest": "^3.0.2"
42+
"typescript-eslint": "^8.21.0",
43+
"vitest": "^3.0.4"
4444
}
4545
}

packages/eslint-config/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
},
1111
"license": "MIT",
1212
"devDependencies": {
13-
"@eslint/js": "^9.18.0",
14-
"typescript-eslint": "^8.20.0"
13+
"@eslint/js": "^9.19.0",
14+
"typescript-eslint": "^8.21.0"
1515
}
1616
}

0 commit comments

Comments
 (0)