Skip to content
This repository has been archived by the owner on Feb 15, 2024. It is now read-only.

Felicia/dis 1592 jamsocket javascript add socketio back in #9

Merged

Conversation

feliciachang
Copy link
Contributor

No description provided.

src/client.ts Outdated
this.openSocket()
this._isReady = true
this._onReady.forEach((cb) => cb())
this._onReady = []
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think a rebase/merge will remove these changes from this PR (since this has already landed in main). Let me know if you run into any problems with this!

@@ -13,6 +13,7 @@
"./server": "./dist/server.js",
"./client": "./dist/client.js",
"./react": "./dist/react.js",
"./socketio": "./dist/socketio.js",
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we need to update the examples in the README now that we've factored out the socketio stuff into its own import.

src/react.tsx Outdated
@@ -16,6 +16,7 @@ export function SessionBackendProvider({

useEffect(() => {
setBackend(new SessionBackend(url, statusUrl))
console.log('session')
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we can drop this?

src/socketio.tsx Outdated
Comment on lines 38 to 40
backendUrl.pathname[backendUrl.pathname.length - 1] === '/'
? backendUrl.pathname.substring(0, backendUrl.pathname.length - 1)
: backendUrl.pathname
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

you can replace this whole expression with

const path = backendUrl.pathname.replace(/\/$/, '')

@rolyatmax
Copy link
Member

From the Slack convo we had - I've got a few small changes I pushed to a separate branch that I think gets things working here. You can see the changes (along with some comments) here: c73b9f3

Copy link
Member

@rolyatmax rolyatmax left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@rolyatmax
Copy link
Member

Once this is landed, we'll want to cut a new version and publish to @jamsocket/javascript

@feliciachang feliciachang merged commit d522a50 into main Jan 31, 2024
1 check passed
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants