-
Notifications
You must be signed in to change notification settings - Fork 56
[WIP] Update/meteor v3.0 #484
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
base: master
Are you sure you want to change the base?
Conversation
This is most likely going to be a major version update, so minimum version of Meteor 2.8.1 is fine. |
I'm going to release v1.5 in the coming days, most likely (pester me if I don't). After that the only releases I will do on the 1.x branch will be dependencies updates. |
@harryadel it will be once we make the rounds. denormalize 0.7 will be released soon. |
publish-composite and denormalize updated to their latest versions.
Updated dependencies for denormalize and publish-composite. |
If the tests pass I will release another beta. I think we could probably move to rc at this point. Thoughts? @bhunjadi @harryadel |
@StorytellerCZ Thank you for continuously pushing this. Yes, a new beta would be nice for sure. |
@StorytellerCZ Yes, let's go with RC. @harryadel reported that beta is working ok |
Published cultofcoders:grapher@2.0.0-rc.0. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've read the migration. Can't believe the amount of work that went into it. Truly inspirational. Thank you @bhunjadi for this amazing gift. I've forked this endeavor and tried to make some changes, I'll ping you guys once I'm done.
async code not work in reduce func. Users.addReducers({
roles: {
body: {
_id: 1,
}
reduce: async (object) => {
result = await Roles.getRolesForUserAsync(object._id)
console.log('roles reducer', result)
return result
}
},
}) This query: Users.createQuery({
$filters: query,
$options: options,
roles: 1
}) return in roles = {} |
Add PR for async reducers bhunjadi#3 |
Revive subscription-scope & Replace sift with mingo
I pushed an update for async reducers. I went with Option B outlined in this comment, bhunjadi#3 (comment). Breaking change is that cc @harryadel |
This is amazing work, thank you @bhunjadi 🙏 |
Good, please make sure that the breaking change is documented. |
Please review and merge |
After doing some additional testing, async reducers are tougher to crack than I thought (see #484 (comment)) In the end we will need to have a breaking change and fetching in subscription will have to be done with the new method The backwards compatible sync fetch() with cache workaround was not working as desired. The thing is that
Works when subscription just becomes ready, but it doesn't work on subsequent changes because Tracker.autorun callback is not triggered. Why? Because query.fetch() only uses cache and not collection.find().fetch() which would register that collection as dependency. Correct Tracker call is:
I checked my codebase which is pretty large and it appears this won't cause lot of changes because I have a React hook wrapper around reactive queries. |
I started working on Meteor 3.0 and managed to make some progress on the server-side. I started with links and also started adding types and use them in JS files which might help with this migration.
I managed to get the 4 tests in linker.tests.js working and will update progress here as I continue the work.
I'm replacing all calls to their *Async equivalents so I had to bump the minimal Meteor version to 2.8.1.
Tests todos:
3rd party deps:
Other:
Compatibility with Meteor v2
How to test
Package.json in test (see scripts for convenience methods)