A new MeteorJS has landed with awesome new things such as the new Scaffolds API for quickly generating scaffolds using the CLI, upgraded typescript to 4.6.4, removed insecure by default, upgraded MongoDB driver version with the inclusion of countDocuments and estimatedDocumentCount and the brand-new Vue3 Skeleton.I will start giving a status update on our migration to a Fibers-Free MeteorJS. As you all have seen in our latest update, we decided to take a more aggressive approach. With this release, we have changed a few of our packages:email : we now have a method called Email.sendAsync. You can check the PR here.oauth packages:
- accounts-base
- google-oauth
- github-oauth
- facebook-oauth
- meteor-developer-oauth
- accounts-password
- twitter-oauth
- meetup-oauth
- weibo-oauth
- oauth
- oauth1
- oauth2
All of these packages have changes related to async, and if you rely on them, please check out our migration guide. For the accounts-base package, we have the addition of Meteor.userAsync() and Meteor.loginWithPassword accepting async functions.Without further ado, let’s talk about this newest MeteorJS release.Scaffolds in the CLIFor a long time, the community and great companies have created and seen powerful abstractions in their projects. We wanted some of these to be baked inside the framework and also give the power to the end user to make their own, so in this release, we are launching the Scaffolds API that will help you create and iterate quicker over your ideas, having an opinionated set of scaffolds that can be called thought the CLI. The full docs about this feature can be found here or in its pull request.You can start by just calling meteor generate in a project having the 2.9 CLI installed in your system. The wizard will ask a few questions:If you say yes to every option, it will create a full-blown API with publications to you, which will already be declared in your main.js file. Ready to be tested and used.Bring your templateThe standard CLI is excellent, but you can also bring custom functions. With the --replaceFn flag, you can pass custom functions that can change your code. To use this functionality, you need to call the flag, giving the model's name and where the replace function is located. Like this:meteor generate feed --replaceFn=/fn/replace.jsBeing feed the name of the model and /fn/replace.js where the function is located. Every replaces function file should have two functions, transformFilename and transformContents. The community can create their packages for templating and share them; since it is just JS, you can also use NPM or atmosphere.Other notable changesVue Skeleton updated to Vue 3We have updated our Vue skeleton to default to Vue 3 instead of Vue 2, but you can still use the Vue 2 skeleton by passing the flag —-vue2 when you are creating a new app.Big thanks to:
- @henriquealbert on his PR
MongoDB Driver updatesWe have updated our mongo driver to version 4.12.1 and also included some new methods, those being, countDocuments and estimatedDocumentCount you can see more about them in there PRsBig thanks to:
- Update MongoDB driver to 4.12.1 by @Grubba27
- Implemented Fibers-less MongoDB count methods by @radekmie
Not using insecure & autopublish by defaultThere is this misconception that MeteorJS is insecure or can only be used to prototype things. We all know that are just misconceptions but having packages called insecure that is awesome for prototyping and bringing ideas to life as quickly as possible that could go to production without any warning. To address that issue, starting from 2.9, all new apps will require the —-prototype flag to enable the insecure.Big thanks to:
Notable mentionsThanks to all contributors who have worked hard to make this release possible with issues, discussions, and PRs.And a big and warm hug to these contributors:
- @fredmaiaarantes
- @henriquealbert
- @edimarlnx
- @matheusccastroo
- @Grubba27
- @StorytellerCZ
- @radekmie
- @piotrpospiech
- @harryadel
Appreciate the work that you all did to make this great framework even better!New MeteorJS 2.9 and the new Scaffold API was originally published in Meteor Blog on Medium, where people are continuing the conversation by highlighting and responding to this story.