v3-docs/docs/generators/changelog/versions/3.0.0.md
Meteor tool
--db option to also remove the local database.Accounts._is2faEnabledForUser(Meteor Method) - generate2faActivationQrCode(Meteor Method) - enableUser2fa(Meteor Method) - disableUser2fa(Meteor Method) - has2faEnabledmethods.removeOtherTokens is now asyncAccounts.destroyToken is now asyncAccounts.insertUserDoc is now asyncAccounts.updateOrCreateUserFromExternalService is now asyncAccounts.expirePasswordToken is now asyncAccounts.setupUsersCollection is now asyncMeteor.user is now async in serverAccounts.sendResetPasswordEmailAccounts.sendEnrollmentEmailAccounts.sendVerificationEmailAccounts.addEmailAccounts.removeEmailAccounts.replaceEmailAsyncAccounts.verifyEmailAccounts.createUserVerifyingEmailAccounts.createUserAccounts.generateVerificationTokenAccounts.generateResetTokenAccounts.forgotPasswordAccounts.setPassword -- no longer exists, you should use Accounts.setPasswordAsync PRAccounts.changePasswordAccounts.setUsernameAccounts.findUserByEmailAccounts.findUserByUsernameAccounts.sendLoginTokenEmail is now async.handlersPromise.await default transform.Build system:
Assets.getTextAssets.getBinarytoHTML is no longer available (it was already deprecated). Use toHTMLStream instead.handlershandlersBrowserPolicy.content.setPolicyBrowserPolicy.content.allowInlineScriptsBrowserPolicy.content.disallowInlineScriptsBrowserPolicy.content.disallowAllBrowserPolicy.setDefaultPolicy[email protected]:
Updated to use async methods from browser-policy-common and browser-policy-content.
afterLink is now async.forEachAsync method.fibers related tests.Some methods are now async. See below:
ConstraintSolver.getVersionCostStepsConstraintSolver.analyzeConstraintSolver.resolveUpdated tests to be async.
Removed a few underscore usage.
Added updated to use async methods
fibers from package.isAsyncCall method to know if call is being made by a async method.fibers from package..fence option.fibers from package.@babel/runtime.@babel/runtime.Email.send is no longer available. Use Email.sendAsync instead.Email.send depracation.ddp to false.http@:
handlersforEachAsync method.@babel/runtime.[email protected]:
Logic.disablingAssertions is now async.
minMaxWS is now async.
promiseEmmiter to help with async methods.fibers from package.Meteor.absoluteUrl in localhost uses 127.0.1 by default.minifyCss is now async.fibers from package.minifyJs is now async.terserMinify no longer takes callbacksfibers from package.[email protected]:
cursor.observe now returns isReady and isReadyPromise wich indicates
if the cursor is ready and if the callbacks are have been called.
If you only use it in the Client or as a LocalCollection things have not
changed.reify version.mongo-decimal@:
async methods.update,insert,remove, fetch are now async, they are
the same as their *Async counterpart.ensureIndex and createIndex are now async.oauth@:
_endOfPopupResponseTemplate and _endOfRedirectResponseTemplate are no longer a property but now a function that returns a promise of the same value as beforeOAuth._renderOauthResultsOAuth._endOfLoginResponseOAuth.renderEndOfLoginResponseOAuth._storePendingCredentialOAuth._retrievePendingCredentialensureConfigured_cleanStaleResultsoauth1@:
OAuth._storeRequestTokenOAuth._retrieveRequestTokenoauth2@:
OAuth._requestHandlers['2'] is now async.forEachAsync method.fibers usageecmascript package to package.jsgetBoilerplate that are now async.createIndexAsync.async code.spiderable@:
handlers that are now using expressfibers usage if flag is set to trueprocessFilesForBundle is now async.async methods.fibers usage.async tests.test name to logs.fibers usage.These methods are now async:
WebAppInternals.reloadClientPrograms()WebAppInternals.pauseClient()WebAppInternals.generateClientProgram()WebAppInternals.generateBoilerplate()WebAppInternals.setInlineScriptsAllowed()WebAppInternals.enableSubresourceIntegrity()WebAppInternals.setBundledJsCssUrlRewriteHook()WebAppInternals.setBundledJsCssPrefix()WebAppInternals.getBoilerplateChanged engine from connect to express and changed api naming to match express. See below:
WebApp.connectHandlers.use(middleware) is now WebApp.handlers.use(middleware)
WebApp.rawConnectHandlers.use(middleware) is now WebApp.rawHandlers.use(middleware)
WebApp.connectApp is now WebApp.expressApp
WebApp.addRuntimeConfigHook accepts async callbacks
Build system PR:
accounts-base: (2.9+)
Meteor.userAsync()callback-hook:forEachAsync
forEachAsyncddp-server: (2.8+)
Meteor.callAsync()minifier-css: (2.9+)
CssTools.minifyCssAsync()mongo:
Mongo.Collection: (2.8+)
createCappedCollectionAsynccreateIndexAsyncdropCollectionAsyncdropIndexAsyncfindOneAsyncinsertAsyncremoveAsyncupdateAsyncupsertAsyncCollection.Cursor: (2.8+)
countAsyncfetchAsyncforEachAsyncmapAsync[Symbol.asyncIterator] so this code should work:
for await (const document of collection.find(query, options)) /* ... */
accounts-base:
_attemptLogin_loginMethod_runLoginHandlersnode-gyp to v9.4.0node-pre-gyp to @mapbox/node-pre-gyp v1.0.11accounts-password:
Accounts._checkPasswordAsyncFor making this great framework even better!