Announcing Meteor 1.8.2

Official TypeScript package included in new applications and a reference for how to make TypeScript and Meteor work together

Filipe Névola
Meteor Blog

--

We’re pleased to announce Meteor 1.8.2, an incremental release that’s packed with improvements as well as TypeScript integration 📣

This release was made possible thanks to 38 participants involved in its development (#10522).

How to install from scratch

If this is your first time using Meteor, or you would prefer to reinstall Meteor from scratch to reclaim some disk space, the following commands will download Meteor 1.8.2 and install a system-wide meteor command.

Mac and Linux

curl https://install.meteor.com/ | sh

Windows

First install the Chocolatey package manager, then run this command using an Administrator command prompt:

choco install meteor

How to upgrade

Mac, Linux, and Windows

1 — As usual, running meteor update in an application directory will update the application to Meteor 1.8.2. Running meteor update outside of an application directory will download Meteor 1.8.2 for later use, and meteor create new-appwill create a new Meteor 1.8.2 application.

2 — Execute the following commands to update @babel/runtime and meteor-node-stubs:
If you use npm to manage your npm packages:

meteor npm install @babel/runtime@latest
meteor npm install meteor-node-stubs@next

Or if you use yarn:

meteor yarn add @babel/runtime@latest
meteor yarn add meteor-node-stubs@next

For more information check out the History.

3 — Make sure your packages are up-to-date:

meteor update —-all-packages

See the updated packages and read each package release notes carefully.

4 — You are ready to run your Meteor project as usual.

Rolling back

In the unlikely event that the update leaves your application in a bad state, and you don’t feel like debugging it right away, please make sure your application’s .meteor directory is committed to your version control system (e.g. Git, Mercurial, etc.) before the update, so that it’s easy to revert the changes if you encounter problems.

TypeScript

TypeScript is growing in popularity and Meteor integrates very well with it. Now every new Meteor application includes the official typescript package, supporting TypeScript compilation of .ts and .tsx modules, which can be added to existing apps by running meteor add typescript.

If you want to try TypeScript with Meteor you can create a new project by running

meteor create --typescript new-typescript-app

This project will be already configured and using TypeScript. It is also a great reference for how to use TypeScript with Meteor.

Other highlights

  • The Meteor build process is now able (again for packages) to detect whether files changed in development were actually used by the server bundle, so that a full server restart can be avoided when no files used by the server bundle have changed. Client-only refreshes are typically much faster than server restarts. Run meteor add autoupdate to enable client refreshes, if you are not already using the autoupdate package. (#10686)
  • Dynamic modules are great to speed up your app load time in the client and Meteor implements this in a very smart way, only delivering each module a single time and also caching these modules in the client. In some edge cases modules were not found resulting in Cannot find module errors. This was also fixed in this release and then you can use dynamic modules everywhere in your apps. This issue was only affecting projects with many local packages and using nested and dynamic imports but as Meteor is used in many large projects it is great to have dynamic imports working on every case. (#10730)
  • Added the ability to run multiple Cordova apps that are built from the same application source code at the same time on iOS, this is now possible because we added a new build and deploy option called --cordova-server-port where you can specify in which port your app should run. (#10577)
  • Import code from node_modules that uses modern syntax beyond module syntax, it is now possible to enable recompilation for specific npm packages using the meteor.nodeModules.recompile option in your application’s package.json file. (#10603)
  • In addition to the .js and .jsx file extensions, the ecmascript compiler plugin now automatically handles JavaScript modules with the .mjs file extension.
  • Check the full list of improvements here

Meteor 1.9 is already under development and we will update the Node.js version used by Meteor from 8.16.1 (in Meteor 1.8.2) to 12.10.0 (the most recent current version).

Package updates

We have also updated some Meteor packages:

  • accounts-password@1.5.2: underscore was removed (thanks to sebakerckhof)
  • mdg:camera@1.4.2: fixed deprecated createObjectURL method (thanks to rafahoro)
  • mdg:camera@1.4.3: added localization (thanks to mertyildiran)
  • react-meteor-data@2.0.0: added useTracker hook (thanks to CaptainN and many other community members)

Community

The Meteor community is very active and you could join our Meteor forums and Community Slack to exchange experiences with other developers and also to be aware of everything that is happening around Meteor.

For example, the React version of “Todos” example app was updated thanks to cvolant and now it uses function components instead of classes. This is a great resource if you want to use Meteor with React using the latest best practices.

Also, I recently joined Meteor as Developer Evangelist and this is just my first post here. I’m very happy and excited about the future of Meteor!

Now go forth and meteor update! 💫

--

--