Skip to content
Open
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
5,262 changes: 2,820 additions & 2,442 deletions package-lock.json

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@
"@release-it/keep-a-changelog": "^7.0.0",
"@testing-library/jest-dom": "^6.6.3",
"@testing-library/react": "^16.2.0",
"@types/node": "^25.6.0",
"@types/react": "^19.0.10",
"@vitest/browser": "^3.0.8",
"@vitest/coverage-v8": "^3.0.8",
Expand Down
12 changes: 6 additions & 6 deletions site/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,10 +29,10 @@
"frimousse": "file:../",
"lucide-react": "^0.482.0",
"motion": "^12.5.0",
"next": "16.0.10",
"next": "^16.2.4",
"next-themes": "^0.4.6",
"react": "^19.0.0",
"react-dom": "^19.0.0",
"react": "^19.2.5",
"react-dom": "^19.2.5",
"react-error-boundary": "^5.0.0",
"shiki": "^3.2.1",
"slugify": "^1.6.6",
Expand All @@ -42,8 +42,8 @@
"vaul": "^1.1.2"
},
"devDependencies": {
"@tailwindcss/postcss": "^4.1.2",
"postcss": "^8.5.3",
"tailwindcss": "^4.1.2"
"@tailwindcss/postcss": "^4.2.4",
"postcss": "^8.5.12",
"tailwindcss": "^4.2.4"
}
}
9 changes: 6 additions & 3 deletions site/src/app/api/liveblocks-auth/route.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,18 @@ import { ipAddress } from "@vercel/functions";
import { type NextRequest, NextResponse } from "next/server";
import { createUserId } from "./create-user-id";

const liveblocks = new Liveblocks({
secret: process.env.LIVEBLOCKS_SECRET_KEY!,
});
function getLiveblocks() {
return new Liveblocks({
secret: process.env.LIVEBLOCKS_SECRET_KEY!,
});
}

export async function POST(request: NextRequest) {
if (!process.env.LIVEBLOCKS_SECRET_KEY) {
return new NextResponse("Missing LIVEBLOCKS_SECRET_KEY", { status: 403 });
}

const liveblocks = getLiveblocks();
const userId = createUserId(
ipAddress(request),
process.env.LIVEBLOCKS_USER_ID_SALT,
Expand Down
18 changes: 13 additions & 5 deletions site/src/components/reactions.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,14 @@ import {
ReactionsList,
} from "./reactions.client";

const liveblocks = new LiveblocksClient({
secret: process.env.LIVEBLOCKS_SECRET_KEY!,
});
function getLiveblocksClient() {
const secret = process.env.LIVEBLOCKS_SECRET_KEY;
if (!secret?.startsWith("sk_")) {
return null;
}

return new LiveblocksClient({ secret });
}

async function ServerReactions() {
"use cache";
Expand All @@ -23,9 +28,12 @@ async function ServerReactions() {

let reactions: ReactionsJson;

const liveblocks = getLiveblocksClient();

try {
reactions = (await liveblocks.getStorageDocument(ROOM_ID, "json"))
.reactions;
reactions = liveblocks
? (await liveblocks.getStorageDocument(ROOM_ID, "json")).reactions
: DEFAULT_REACTIONS;
} catch {
reactions = DEFAULT_REACTIONS;
}
Expand Down
20 changes: 0 additions & 20 deletions site/turbo.json

This file was deleted.

1 change: 1 addition & 0 deletions test/setup-emojibase.ts
Original file line number Diff line number Diff line change
Expand Up @@ -113,4 +113,5 @@ beforeEach(() => {

afterEach(() => {
vi.restoreAllMocks();
fetchMocker.enableMocks();
});
1 change: 1 addition & 0 deletions tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
"module": "es2022",
"moduleResolution": "node",
"types": [
"node",
"react",
"@vitest/browser/matchers",
"@vitest/browser/providers/playwright",
Expand Down
17 changes: 16 additions & 1 deletion turbo.json
Original file line number Diff line number Diff line change
@@ -1,17 +1,28 @@
{
"$schema": "https://turborepo.org/schema.json",
"extends": ["//"],
"tasks": {
"dev": {
"cache": false
},
"site#dev": {
"dependsOn": ["^build"],
"cache": false
},
"build": {
"outputs": ["dist/**"]
},
"site#build": {
"dependsOn": ["^build"],
"outputs": [".next/**", "out/**", "!.next/cache/**"],
"env": ["LIVEBLOCKS_SECRET_KEY", "LIVEBLOCKS_USER_ID_SALT"]
},
"test": {
"inputs": ["src/**/*.ts", "src/**/*.tsx", "test/**/*.ts"],
"outputs": ["coverage/**"]
},
"site#test": {
"outputs": []
},
"lint:tsc": {
"outputs": []
},
Expand All @@ -22,6 +33,10 @@
"dependsOn": ["build"],
"outputs": []
},
"site#lint:package": {
"dependsOn": [],
"outputs": []
},
"format": {
"cache": false,
"outputs": []
Expand Down
Loading