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

useUser fixes for Realm React #6206

Merged
merged 5 commits into from
Oct 31, 2023
Merged

useUser fixes for Realm React #6206

merged 5 commits into from
Oct 31, 2023

Conversation

takameyer
Copy link
Contributor

What, How & Why?

  • Used a different type declaration generation method which solved typing issues
  • Updated UserProvider to always update the user reference on user events
  • Updated connection example to include a delete user function to test this feature

This closes #6196 and #6186

☑️ ToDos

  • 📝 Changelog entry
  • 📝 Compatibility label is updated or copied from previous entry
  • 📝 Update COMPATIBILITY.md
  • 🚦 Tests
  • 📦 Updated internal package version in consuming package.jsons (if updating internal packages)
  • 📱 Check the React Native/other sample apps work if necessary
  • 💥 Breaking label has been applied or is not necessary

@coveralls-official
Copy link

coveralls-official bot commented Oct 20, 2023

Coverage Status

coverage: 85.397%. remained the same when pulling 792328c on andrew/delete-user into eca95b6 on main.

Copy link
Contributor

@elle-j elle-j left a comment

Choose a reason for hiding this comment

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

Awesome to get this fix in! LGTM when this PR is merged into the current one 🙂

@@ -16,7 +16,7 @@
},
"wireit": {
"bundle": {
"command": "rollup --config",
"command": "rollup --config && tsc -p tsconfig.types.json",
Copy link
Member

Choose a reason for hiding this comment

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

Should this be a separate types command? Since technically this isn't bundling the types now.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

As our ci assumes a single command for preparing packages for release, I would be hesitant to put this in a separate command.
Otherwise, we can make a follow up PR which adds a types command to every package (or simply build, which contains bundle and types) and update our workflows to call this as well.

Copy link
Contributor Author

@takameyer takameyer Oct 23, 2023

Choose a reason for hiding this comment

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

@kraenhansen I put this in our next roundtable. I think you bring up a good point.

My suggestion is to create a script in each of our mono-repo packages called prepack, which can include whatever scripts it needs to prepare for being consumed by another project. This could include bundle, generateTypes, build, etc.
Then the CI workflows would be updated to run this command instead of bundle.

Copy link
Member

Choose a reason for hiding this comment

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

It was the idea that these inter-package task dependencies should be configured via wireit. It's much more capable as it'll cache outputs and potentially execute tasks in parallel.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I don't disagree, I just want to unify on a script that specifically deals with preparing for release.

takameyer and others added 4 commits October 31, 2023 14:18
* Used a different type declaration generation method which solved typing issues
* Updated `UserProvider` to always update the user reference on user events
* Updated connection example to include a delete user function to test this feature
@takameyer takameyer merged commit 7c11ceb into main Oct 31, 2023
8 checks passed
@takameyer takameyer deleted the andrew/delete-user branch October 31, 2023 13:47
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Mar 14, 2024
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.

Mismatch type when passing user from useUser as parameter
4 participants