Upgrade to Meteor 3.4 - #126
Open
harryadel wants to merge 11 commits into
Open
Conversation
Move shared code to imports/both/, templates to imports/ui/, server lib to imports/server-lib/, router to imports/router.js. Add client/main.js and server/main.js entry points.
Methods use findOneAsync/updateAsync/insertAsync/fetchAsync, replace HTTP.post with fetch, Email.send with Email.sendAsync, replace Restivus with WebApp.connectHandlers for REST API, replace lampe:rssfeed and gadicohen:sitemaps with manual routes.
Replace UI.registerHelper with Template.registerHelper, replace moment with native Date/Intl.RelativeTimeFormat, replace peppelg:bootstrap-3-modal with custom Modal helper, add custom AutoForm summernote input type via npm, add isActiveRoute and \$eq template helpers, add imports for template HTML files from imports/ui/.
Replace iron:router with vlasky:galvanized-iron-router, replace useraccounts:* with communitypackages:* forks, replace copleykj:stripe-sync with stripe npm, replace djedi:sanitize-html with sanitize-html npm, remove moment/underscore/nemo64:bootstrap/nimble:restivus and other dead packages, add rspack, jquery 3 via npm, add meteor-accounts-t9n for auth translations.
Use summernote-lite with hidden input for AutoForm value tracking, improve modal backdrop and cleanup logic, bypass recaptcha gracefully in development with test keys.
Templates now expose collection references via helpers for AutoForm, add separate JobCreateSchema for client-side job creation validation, add form submit validation handler for jobNew.
Add proper click-outside-to-close for user menu dropdown, add avatar template, improve featured job button loading state.
Add communitypackages:autoform-bootstrap3, remove accounts-ui, load autoform theme in client entry point, update styles.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Full upgrade from Meteor 2.7.1 (Node 8) to Meteor 3.4 (Node 22) with mainModule restructuring and async/await conversion. I've not tested this thoroughly I'd greatly appreciate if you can help out with that part and point me to where it needs more work @nate-strauser
What changed
Architecture
mainModulewith explicitclient/main.jsandserver/main.jsentry pointsimports/both/, templates toimports/ui/, server lib toimports/server-lib/import/exportinstead of implicit globalsServer-side async conversion
async/await(findOneAsync,updateAsync,insertAsync,fetchAsync)HTTP.post→ nativefetch,Email.send→Email.sendAsyncWebApp.connectHandlerslampe:rssfeed→ manual WebApp routegadicohen:sitemaps→ manual WebApp routeRoles.userIsInRole()→Roles.userIsInRoleAsync()on serverPackage replacements
iron:router→vlasky:galvanized-iron-router(Meteor 3 fork)useraccounts:bootstrap+useraccounts:iron-routing→communitypackages:bootstrap+communitypackages:iron-routingalanning:roles→ corerolespackagecopleykj:stripe-sync→stripenpm (native async)djedi:sanitize-html→sanitize-htmlnpmjparker:crypto-md5→ Node.js built-incryptopeppelg:bootstrap-3-modal→ custom lightweight Modal helpermpowaga:autoform-summernote→ custom AutoForm input type +summernotenpmnemo64:bootstrap→ removed (CSS already inlined in LESS files)moment→ nativeDate+Intl.RelativeTimeFormatunderscore→ native array methodsaldeed:simple-schemav1 → v2 (Atmosphere wrapper for simpl-schema npm)aldeed:collection2v2 → v4,aldeed:autoformv5 → v8Packages removed
lampe:rssfeed, nimble:restivus, copleykj:stripe-sync, djedi:sanitize-html, jparker:crypto-md5, ongoworks:speakingurl, momentjs:moment, peppelg:bootstrap-3-modal, nemo64:bootstrap, raix:handlebar-helpers, gadicohen:sitemaps, percolate:migrations, meteorhacks:subs-manager, percolatestudio:synced-cron, reywood:publish-composite, natestrauser:publish-performant-counts, utilities:avatar, mpowaga:autoform-summernote, coffeescript, http
Dead code removed
server/hooks.js,server/cron.js,server/migrations.js(all commented out / already executed)Client fixes
UI.registerHelper→Template.registerHelperTemplate.xxx.rendered→Template.xxx.onRenderedsubs.subscribe()→Meteor.subscribe()(SubsManager removed)isActiveRouteand$eqtemplate helpers (replacing removed packages)Modal.show()/Modal.hide()implementationcommunitypackages:autoform-bootstrap3