bubonicfred / 4minitz

MIT License
9 stars 1 forks source link

Update code for Meteor 3 #794

Open bubonicfred opened 4 months ago

bubonicfred commented 4 months ago

Parent: #602 Meteor 3 has made a lot of methods async, we need to refactor code to suit. Main ones are here

Changes to check

callback-hook:forEachAsync forEachAsync ddp-server Meteor.callAsync() countAsync fetchAsync forEachAsync mapAsync Complete list below: Breaking Changes accounts-2fa@3.0.0: Some methods are now async. See below: Accounts._is2faEnabledForUser (Meteor Method) - generate2faActivationQrCode (Meteor Method) - enableUser2fa (Meteor Method) - disableUser2fa (Meteor Method) - has2faEnabled accounts-base@3.0.0: methods.removeOtherTokens is now async Accounts.destroyToken is now async Accounts.insertUserDoc is now async Accounts.updateOrCreateUserFromExternalService is now async Accounts.expirePasswordToken is now async Accounts.setupUsersCollection is now async Meteor.user is now async in server accounts-password@3.0.0: 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-passwordless@3.0.0: Accounts.sendLoginTokenEmail is now async. allow-deny@2.0.0: Updated to accept async functions. appcache@2.0.0: Updated internal api to use expressHandlers autoupdate@2.0.0: Updated api to be async, with asyncronous queueing. babel-compiler@8.0.0: Removed Promise.await default transform. Added top-level-await to packages. blaze@3.0.0: Todo boilerplate-generator@2.0.0: toHTML is no longer available (it was already deprecated). Use toHTMLStream instead. Updated to use expressHandlers browser-policy-common@2.0.0: Updated to use expressHandlers browser-policy-content@2.0.0: Some methods are now async. See below: BrowserPolicy.content.setPolicy BrowserPolicy.content.allowInlineScripts BrowserPolicy.content.disallowInlineScripts BrowserPolicy.content.disallowAll BrowserPolicy.setDefaultPolicy browser-policy@2.0.0: Updated to use async methods from browser-policy-common and browser-policy-content. caching-compiler@2.0.0: afterLink is now async. Updated to use now async API. callback-hook@2.0.0: Added forEachAsync method. check@2.0.0: Removed fibers related tests. constraint-solver@2.0.0: Some methods are now async. See below: ConstraintSolver.getVersionCostSteps ConstraintSolver.analyze ConstraintSolver.resolve Updated tests to be async. Removed a few underscore usage. Added updated to use async methods context@1.0.0: Removed fibers from package. core-runtime@2.0.0: Created package to load packages and the app. This is the pakcages that sets up the Runtime. ddp-client@3.0.0: Added isAsyncCall method to know if call is being made by a async method. Removed fibers from package. Updated tests to use async methods. ddp-common@2.0.0: Added .fence option. ddp-server@3.0.0: Updated to use async methods. Removed fibers from package. Updated tests to use async methods. Turned server implementation to async. ecmascript-runtime@1.0.0: Added dependency to @babel/runtime. ecmascript@1.0.0: Added dependency to @babel/runtime. Moved runtime tests. email@3.0.0: Email.send is no longer available. Use Email.sendAsync instead. Updated types to reflext async methods and Email.send depracation. facts-base@2.0.0: turned unorderd deps on ddp to false. http@: Updated handlers to use expressHandlers id-map@2.0.0: Added forEachAsync method. logging@2.0.0: Added dependency to @babel/runtime. logic-solver@3.0.0: Logic.disablingAssertions is now async. minMaxWS is now async. meteor-tool@3.0.0: Changes to how meteor apps are being created https://github.com/meteor/meteor/pull/12697 meteor@2.0.0: Async local storage was added to help deal with async methods. Added promiseEmmiter to help with async methods. Removed fibers from package. minifier-css@2.0.0: minifyCss is now async. Removed fibers from package. minifier-js@3.0.0: minifyJs is now async. terserMinify no longer takes callbacks Removed fibers from package. minimongo@2.0.0: 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. modules@1.0.0: Updated reify version. mongo-decimal@: Updated to use async methods. mongo@2.0.0: Updated to unify 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 before the following server methods are now async: OAuth._renderOauthResults OAuth._endOfLoginResponse OAuth.renderEndOfLoginResponse OAuth._storePendingCredential OAuth._retrievePendingCredential ensureConfigured _cleanStaleResults oauth1@: the following server methods are now async: OAuth._storeRequestToken OAuth._retrieveRequestToken oauth2@: OAuth._requestHandlers['2'] is now async. ordered-dict@2.0.0: Added forEachAsync method. promise@1.0.0: Removed fibers usage reload-safetybelt@2.0.0: Added ecmascript package to package.js server-render@1.0.0: Updated usage with getBoilerplate that are now async. service-configuration@2.0.0: Updated to use createIndexAsync. shell-server@1.0.0: Updated to handle promises results. socket-stream-client@1.0.0: Updated tests to handle async code. spiderable@: Updated handlers to use expressHandlers removed fibers usage if flag is set to true standard-minifier-js@3.0.0: processFilesForBundle is now async. test-helpers@2.0.0: Updated to use async methods. Removed fibers usage. Added possibliy to use async tests. underscore@2.0.0: Removed dependency in meteor package. webapp@2.0.0: These methods are now async: WebAppInternals.reloadClientPrograms() WebAppInternals.pauseClient() WebAppInternals.generateClientProgram() WebAppInternals.generateBoilerplate() WebAppInternals.setInlineScriptsAllowed() WebAppInternals.enableSubresourceIntegrity() WebAppInternals.setBundledJsCssUrlRewriteHook() WebAppInternals.setBundledJsCssPrefix() WebAppInternals.getBoilerplate 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

Child issues:

github-actions[bot] commented 4 months ago

Issue update changelog:

github-actions[bot] commented 4 months ago

Issue update changelog:

github-actions[bot] commented 4 months ago

Issue update changelog: