New Meteor 2.8.1 and adding types to the core


New MeteorJS 2.8.1 and adding types to the coreWe plan to modernize MeteorJS and keep up with the latest releases for NodeJS, bringing our version to 14.21. We have other awesome updates in this version, such as MongoDB Driver's updated to version 4.11. When the MeteorJS server restarts, it shows which port it is running and the addition of the types in the core.As this is just a minor upgrade, our highlight will be targeting how to add the type definitions to your project’s core.Adding typesThe package zodern:types allows you to use the TypeScript types for the Meteor core packages in your TypeScript or JavaScript code. In order to use the types, you need to install the package by running the command: meteor add zodern:typesAnd add the following line to your tsconfig.json file (if you do not have one, create one and add the code below):{ “compilerOptions”: { “preserveSymlinks”: true, “paths”: { “meteor”: [ “node_modules/@types/meteor/”, “.meteor/local/types/packages.d.ts” ] } }}then run the command:meteor lint this will create a file within your .meteor folder with your types for the core packages.You can continue to use your code as you did before, but now you have access to those types for the core packages even if you are in JavaScript, which makes it easier and also brings a lot more type safety for your projects. For more information about the package, please visit the zodern:types.You can see this same tutorial in the docs with this link here.If you want to start using this version today, just run in your project the update command below and enjoy this new Meteor versionmeteor update --release=2.8.1Notable mentionsI thank 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 in particular that I have not mentioned yet:

Appreciate the work that you all did to make this great framework even better!New Meteor 2.8.1 and adding types to the core was originally published in Meteor Blog on Medium, where people are continuing the conversation by highlighting and responding to this story.