From 56a83bd73636d8aa6491d77b2d1848919e543e4d Mon Sep 17 00:00:00 2001 From: filipenevola Date: Tue, 28 Mar 2023 09:52:13 -0400 Subject: [PATCH] Updates 3.0.md temp readme with more async methods and changes --- docs/generators/changelog/versions/3.0.md | 209 ++++++++++++---------- 1 file changed, 117 insertions(+), 92 deletions(-) diff --git a/docs/generators/changelog/versions/3.0.md b/docs/generators/changelog/versions/3.0.md index bb49d4dfa6..4bf2a0c9ae 100644 --- a/docs/generators/changelog/versions/3.0.md +++ b/docs/generators/changelog/versions/3.0.md @@ -1,125 +1,150 @@ - - ## v3.0, TBD ### Highlights #### Breaking Changes -* `webapp`: - - These methods are now async: - - `WebAppInternals.reloadClientPrograms()` - - `WebAppInternals.pauseClient()` - - `WebAppInternals.generateClientProgram()` - - `WebAppInternals.generateBoilerplate()` - - `WebAppInternals.setInlineScriptsAllowed()` - - `WebAppInternals.enableSubresourceIntegrity()` - - `WebAppInternals.setBundledJsCssUrlRewriteHook()` - - `WebAppInternals.setBundledJsCssPrefix()` +- `webapp`: -* `email`: - - `Email.send` is no longer available. Use `Email.sendAsync` instead. + - These methods are now async: + - `WebAppInternals.reloadClientPrograms()` + - `WebAppInternals.pauseClient()` + - `WebAppInternals.generateClientProgram()` + - `WebAppInternals.generateBoilerplate()` + - `WebAppInternals.setInlineScriptsAllowed()` + - `WebAppInternals.enableSubresourceIntegrity()` + - `WebAppInternals.setBundledJsCssUrlRewriteHook()` + - `WebAppInternals.setBundledJsCssPrefix()` -* `accounts-2fa`: - - Some methods are now async. See below: - - `Accounts._is2faEnabledForUser` - - `(Meteor Method) - generate2faActivationQrCode` - - `(Meteor Method) - enableUser2fa` - - `(Meteor Method) - disableUser2fa` - - `(Meteor Method) - has2faEnabled` +- `email`: -* `accounts-base`: - **TODO** - - `methods.removeOtherTokens` is now async - - `Accounts.destroyToken` is now async + - `Email.send` is no longer available. Use `Email.sendAsync` instead. -* `accounts-password`: - - Some server methods are now async: - - `Accounts.sendResetPasswordEmail` - - `Accounts.sendEnrollmentEmail` - - `Accounts.sendVerificationEmail` - - `Accounts.addEmail` - - `Accounts.removeEmail` - - `Accounts.verifyEmail` - - `Accounts.createUserVerifyingEmail` - - `Accounts.createUser` - - `Accounts.generateVerificationToken` - - `Accounts.generateResetToken` - - `Accounts.forgotPassword` - - `Accounts.setPassword` - - `Accounts.changePassword` - - `Accounts.setUsername` - - `Accounts.findUserByEmail` - - `Accounts.findUserByUsername` +- `accounts-2fa`: -* `accounts-passwordless`: - - `Accounts.sendLoginTokenEmail` is now async + - Some methods are now async. See below: + - `Accounts._is2faEnabledForUser` + - `(Meteor Method) - generate2faActivationQrCode` + - `(Meteor Method) - enableUser2fa` + - `(Meteor Method) - disableUser2fa` + - `(Meteor Method) - has2faEnabled` -* `boilerplate-generator`: - - `toHTML` is no longer available (it was already deprecated). Use `toHTMLStream` instead. +- `accounts-base`: -* `ddp`: -- Added method `Meteor.isAsyncCall` that can be used to check if the current method call is async or not. + - `methods.removeOtherTokens` is now async + - `Accounts.destroyToken` is now async -* `oauth`: - - `_endOfPopupResponseTemplate` and `_endOfRedirectResponseTemplate` are no longer a property but now a function that returns a promise of the same value as before - - the following server methods are now async: - - `OAuth._renderOauthResults` - - `OAuth._endOfLoginResponse` - - `OAuth.renderEndOfLoginResponse` - - `OAuth._storePendingCredential` - - `OAuth._retrievePendingCredential` - - `ensureConfigured` - - `_cleanStaleResults` +- `accounts-password`: -* `oauth1`: - - the following server methods are now async: - - `OAuth._storeRequestToken` - - `OAuth._retrieveRequestToken` + - Some server methods are now async: + - `Accounts.sendResetPasswordEmail` + - `Accounts.sendEnrollmentEmail` + - `Accounts.sendVerificationEmail` + - `Accounts.addEmail` + - `Accounts.removeEmail` + - `Accounts.verifyEmail` + - `Accounts.createUserVerifyingEmail` + - `Accounts.createUser` + - `Accounts.generateVerificationToken` + - `Accounts.generateResetToken` + - `Accounts.forgotPassword` + - `Accounts.setPassword` + - `Accounts.changePassword` + - `Accounts.setUsername` + - `Accounts.findUserByEmail` + - `Accounts.findUserByUsername` -* `oauth2`: - - `OAuth._requestHandlers['2']` is now async. +- `accounts-passwordless`: -* `minifier-css`: - - `minifyCss` is now async. + - `Accounts.sendLoginTokenEmail` is now async -* `webapp`: - - `WebAppInternals.getBoilerplate` is now async. - - Changed engine from connect to express and changed api naming to match express. See below: - - `WebApp.connectHandlers.use(middleware)` is now `WebApp.expressHandlers.use(middleware)` - - `WebApp.rawConnectHandlers.use(middleware)` is now `WebApp.rawExpressHandlers.use(middleware)` - - `WebApp.connectApp` is now `WebApp.expressApp` +- `boilerplate-generator`: -#### Internal API changes + - `toHTML` is no longer available (it was already deprecated). Use `toHTMLStream` instead. +- `ddp`: -#### Migration Steps + - Added method `Meteor.isAsyncCall` that can be used to check if the current method call is async or not. -You can follow in [here](https://guide.meteor.com/3.0-migration.html). +- `oauth`: -#### Meteor Version Release + - `_endOfPopupResponseTemplate` and `_endOfRedirectResponseTemplate` are no longer a property but now a function that returns a promise of the same value as before + - the following server methods are now async: + - `OAuth._renderOauthResults` + - `OAuth._endOfLoginResponse` + - `OAuth.renderEndOfLoginResponse` + - `OAuth._storePendingCredential` + - `OAuth._retrievePendingCredential` + - `ensureConfigured` + - `_cleanStaleResults` -#### Special thanks to +- `oauth1`: -For making this great framework even better!ifier-css`: -- `minifyCss` is now async. + - the following server methods are now async: + - `OAuth._storeRequestToken` + - `OAuth._retrieveRequestToken` -* `webapp`: - - `WebAppInternals.getBoilerplate` is now async. - - Changed engine from connect to express and changed api naming to match express. See below: - - `WebApp.connectHandlers.use(middleware)` is now `WebApp.expressHandlers.use(middleware)` - - `WebApp.rawConnectHandlers.use(middleware)` is now `WebApp.rawExpressHandlers.use(middleware)` - - `WebApp.connectApp` is now `WebApp.expressApp` +- `oauth2`: -#### Internal API changes + - `OAuth._requestHandlers['2']` is now async. +- `minifier-css`: -#### Migration Steps + - `minifyCss` is now async. -You can follow in [here](https://guide.meteor.com/3.0-migration.html). +- `webapp`: + - `WebAppInternals.getBoilerplate` is now async. + - Changed engine from connect to express and changed api naming to match express. See below: + - `WebApp.connectHandlers.use(middleware)` is now `WebApp.expressHandlers.use(middleware)` + - `WebApp.rawConnectHandlers.use(middleware)` is now `WebApp.rawExpressHandlers.use(middleware)` + - `WebApp.connectApp` is now `WebApp.expressApp` -#### Meteor Version Release +#### New Public API -#### Special thanks to +- `accounts-base`: (2.9+) + - `Meteor.userAsync()` -For making this great framework even better! +- `callback-hook`:forEachAsync + - `forEachAsync` + +- `ddp-server`: (2.8+) + - `Meteor.callAsync()` + +- `minifier-css`: (2.9+) + - `CssTools.minifyCssAsync()` + +- `mongo`: + + - `Mongo.Collection`: (2.8+) + - `createCappedCollectionAsync` + - `createIndexAsync` + - `dropCollectionAsync` + - `dropIndexAsync` + - `findOneAsync` + - `insertAsync` + - `removeAsync` + - `updateAsync` + - `upsertAsync` + - `Collection.Cursor`: (2.8+) + - `countAsync` + - `fetchAsync` + - `forEachAsync` + - `mapAsync` + - `[Symbol.asyncIterator]` so this code should work: + ```js + for await (const document of collection.find(query, options)) /* ... */ + ``` + +#### Internal API changes + +`accounts-base`: + +- `_attemptLogin` +- `_loginMethod` +- `_runLoginHandlers` + +#### New Internal API + +`accounts-password`: + +- `Accounts._checkPasswordAsync`