Skip to content

Commit d6a2547

Browse files
authored
Merge pull request #13 from leepoeaik/feature/collaborative-code-editor
fix: Fix minor errors when testing locally
2 parents 5d6b3d8 + 25f0c45 commit d6a2547

File tree

3 files changed

+5
-7
lines changed

3 files changed

+5
-7
lines changed

collaboration-service/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
"main": "index.js",
66
"type": "module",
77
"scripts": {
8-
"dev": "npx partykit dev --live",
8+
"dev": "partykit dev --live --var SUPABASE_URL:$SUPABASE_URL --var SUPABASE_KEY:$SUPABASE_KEY",
99
"lint": "cd .. && npm run lint:service collaboration-service --ext .ts",
1010
"lint:fix": "cd .. && npm run lint:service collaboration-service --ext .ts --fix",
1111
"format": "prettier --write \"**/*.{js,jsx,ts,tsx,json,css,md}\"",
@@ -17,8 +17,8 @@
1717
"dependencies": {
1818
"@supabase/supabase-js": "^2.39.7",
1919
"express": "^5.1.0",
20-
"y-partykit": "^0.0.23",
2120
"partykit": "^0.0.115",
21+
"y-partykit": "^0.0.23",
2222
"yjs": "^13.6.10"
2323
},
2424
"devDependencies": {

collaboration-service/src/server.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import type * as Party from 'partykit/server';
2-
import {onConnect} from 'y-partykit';
2+
import {onConnect as y_onConnect} from 'y-partykit';
33

44
import {createClient} from '@supabase/supabase-js';
55
import {Buffer} from 'node:buffer';
@@ -18,7 +18,7 @@ export default class YjsServer implements Party.Server {
1818
constructor(public room: Party.Room) {}
1919
async onConnect(connection: Party.Connection) {
2020
const room = this.room;
21-
await onConnect(connection, this.room, {
21+
await y_onConnect(connection, this.room, {
2222
async load() {
2323
// This is called once per "room" when the first user connects
2424

package.json

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -63,11 +63,9 @@
6363
"dotenv": "^17.2.3",
6464
"express": "^5.1.0",
6565
"express-validator": "^7.2.1",
66-
"fast-csv": "^5.0.5",
6766
"helmet": "^8.1.0",
68-
"pg": "^8.16.3"
69-
"fast-csv": "^5.0.5",
7067
"pg": "^8.16.3",
68+
"fast-csv": "^5.0.5",
7169
"bcrypt": "^6.0.0",
7270
"cookie-parser": "^1.4.7",
7371
"cors": "^2.8.5",

0 commit comments

Comments
 (0)