Skip to content

TypeScript SDK: Rename address to connection ID #133

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Feb 10, 2025

Conversation

gefjon
Copy link
Contributor

@gefjon gefjon commented Feb 7, 2025

Description of Changes

Typescript SDK companion to Rename Address to ConnectionId.

Re-generate the WS API schema bindings, rename address.ts, replace all instances of the word "address." All mechanical. Diff is artificially large because this PR is also the first time we've re-run spacetime generate since the new subscription API landed in public, which means there's a bunch of new WS messages in the client API folder. We don't use them, pending @cloutiertyler 's PR.

Note that this PR does not change the behavior where the SDK generates its connection ID locally, and passes it to the /database/subscribe endpoint. This can be changed in a follow-up.

API

  • This is an API breaking change to the SDK

Address is now called ConnectionId.

Requires SpacetimeDB PRs

clockworklabs/SpacetimeDB#2220

Copy link

changeset-bot bot commented Feb 7, 2025

⚠️ No Changeset found

Latest commit: 460479e

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

Copy link

pkg-pr-new bot commented Feb 7, 2025

Open in Stackblitz

npm i https://pkg.pr.new/@clockworklabs/spacetimedb-sdk@133

commit: 460479e

@gefjon gefjon marked this pull request as ready for review February 7, 2025 17:05
@gefjon gefjon requested a review from jsdt February 7, 2025 19:41
Copy link
Contributor

@jsdt jsdt left a comment

Choose a reason for hiding this comment

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

This looks right to me.

@gefjon gefjon changed the title Rename address to connection ID TypeScript SDK: Rename address to connection ID Feb 10, 2025
@gefjon gefjon self-assigned this Feb 10, 2025
@gefjon
Copy link
Contributor Author

gefjon commented Feb 10, 2025

While merging master into this PR, detected a bug in the Timestamp #114 impl: somehow that PR merged with the wrong field name in timestamp.ts. It should be __timestamp_micros_since_unix_epoch__, but it had been written as __timestamp_micros_since_unix_epoch (without the trailing double underscores). I've included the fix here.

@cloutiertyler
Copy link
Contributor

I am force overriding the tests. I was in a meeting with Phoebe and this is because of a weird code gen merging order in SpacetimeDB. It is a known issue.

@cloutiertyler cloutiertyler merged commit 18c7b34 into main Feb 10, 2025
7 of 8 checks passed
@cloutiertyler cloutiertyler deleted the phoebe/rename-address-to-connection-id branch February 10, 2025 21:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants