Skip to content
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

Refactor space updates #180

Merged
merged 3 commits into from
Sep 22, 2023
Merged

Refactor space updates #180

merged 3 commits into from
Sep 22, 2023

Conversation

dpiatek
Copy link
Contributor

@dpiatek dpiatek commented Sep 21, 2023

This refactors space updates so we have a single class responsible for managing the shape of the updates.

This also fixes:

@dpiatek dpiatek self-assigned this Sep 21, 2023
Comment on lines 9 to +12
import type { PresenceMember } from './utilities/types.js';
import type Space from './Space.js';
import { ERR_NOT_ENTERED_SPACE } from './Errors.js';
import SpaceUpdate from './SpaceUpdate.js';
Copy link
Contributor

Choose a reason for hiding this comment

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

I'm confused, why do imports have extensions? Is that normal?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Have a look at this issue microsoft/TypeScript#16577 (comment) and our own here #76. .js extensions provide the widest compatibility when loading in different environments, after bundling.

Copy link
Contributor

@snikidev snikidev left a comment

Choose a reason for hiding this comment

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

Don't understand much of what's happening but from what I see, I see nothing wrong 😁

Dominik Piatek added 3 commits September 22, 2023 09:56
This class is responsible for creating objects that will be passed to presence. It takes care of creating an update id and encapsulates the structure of the update.
@dpiatek dpiatek force-pushed the refactor-space-update branch from db8f16d to 221d988 Compare September 22, 2023 08:56
@dpiatek dpiatek merged commit 0cbad07 into main Sep 22, 2023
5 checks passed
@dpiatek dpiatek deleted the refactor-space-update branch September 22, 2023 09:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants