From fdec5f2ea6ea20144abd0ed94d231302f9ee2fbf Mon Sep 17 00:00:00 2001 From: Jan Dvorak Date: Tue, 27 Dec 2022 10:06:57 +0900 Subject: [PATCH 1/2] #12398 doc fix --- docs/history.md | 2 +- guide/source/2.9-migration.md | 6 ++++++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/docs/history.md b/docs/history.md index 2c41408d65..a1ebdc3b7a 100644 --- a/docs/history.md +++ b/docs/history.md @@ -31,7 +31,7 @@ by [henriquealbert](https://github.com/henriquealbert). #### Breaking Changes - N/A +* `Accounts.createUserVerifyingEmail` is now async #### Internal API changes * Internal methods from `OAuth` that are now async: diff --git a/guide/source/2.9-migration.md b/guide/source/2.9-migration.md index 6da327420a..41e18525dd 100644 --- a/guide/source/2.9-migration.md +++ b/guide/source/2.9-migration.md @@ -70,6 +70,12 @@ We now have async version of methods that you already use. They are: - [Meteor.userAsync()](https://github.com/meteor/meteor/pull/12274) - [CssTools.minifyCssAsync()](https://github.com/meteor/meteor/pull/12105) +

Breaking async

+ +`Accounts.createUserVerifyingEmail` is now completely async: + +- [Accounts.createUserVerifyingEmail](https://github.com/meteor/meteor/issues/12398) +

Accounts-base without service-configuration

Now `accounts-base` is [no longer tied up](https://github.com/meteor/meteor/pull/12202) with `service-configuration`. So, if you don't use third-party login on your project, you don't need to add the package `service-configuration` anymore. From a134c818752ff0094edad7ab138bd9e33809069e Mon Sep 17 00:00:00 2001 From: Jan Dvorak Date: Tue, 27 Dec 2022 10:11:10 +0900 Subject: [PATCH 2/2] #12398 add migration example --- guide/source/2.9-migration.md | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) diff --git a/guide/source/2.9-migration.md b/guide/source/2.9-migration.md index 41e18525dd..0ea83e0730 100644 --- a/guide/source/2.9-migration.md +++ b/guide/source/2.9-migration.md @@ -76,6 +76,37 @@ We now have async version of methods that you already use. They are: - [Accounts.createUserVerifyingEmail](https://github.com/meteor/meteor/issues/12398) +To upgrade change from +```js +Meteor.methods({ + createUserAccount (user) { + /** + * This seems to be the issue. + * Using the other method `createUser` works as expected. + */ + Accounts.createUserVerifyingEmail({ + username: user.username, + email: user.email, + password: user.password, + }); + } +}); +``` + +to + +```js +Meteor.methods({ + async createUserAccount (user) { + await Accounts.createUserVerifyingEmail({ + username: user.username, + email: user.email, + password: user.password, + }); + } +}); +``` +

Accounts-base without service-configuration

Now `accounts-base` is [no longer tied up](https://github.com/meteor/meteor/pull/12202) with `service-configuration`. So, if you don't use third-party login on your project, you don't need to add the package `service-configuration` anymore.