Thursday, May 23, 2024
HomeJavaScriptNew Meteor.js 2.13, Node.js 14.21.4 safety patch and Blaze 2.7.1 launch |...

New Meteor.js 2.13, Node.js 14.21.4 safety patch and Blaze 2.7.1 launch | by Gabriel Grubba | Aug, 2023

Meteor has launched a brand new model, 2.13, with some updates and enhancements. Listed below are a few of the key options of this launch:

Introducing Node.js v14.21.4 with security update, new Blaze.js release and quality of life updates and much more!
Introducing Node.js v14.21.4 with safety updates,
new Blaze.js launch and high quality of life updates, and far more!

As you might have seen on this put up within the boards by our CEO Fred Maia and within the earlier launch weblog put up, we’re making safety updates for Node.js. The PR which added the safety updates is right here. Here’s a hyperlink to a Dockerfile the place you should use the Node with the safety updates.

When you’ve got any issues or doubts about this matter, please ping us together with your query.

On this minor replace, we acquired a long-wanted characteristic, the opportunity of dealing with async values in templates. You possibly can examine the docs for it right here. This characteristic was attainable because of the exhausting work of @radekmie in #412 and #413.

Listed below are some snippets on methods to use async in Blaze now:

Easy values

<template title="foo">
{{#let title=getName}}
{{#if @pending 'title'}}
We're fetching your title...
{{#if @rejected 'title'}}
Sorry, an error occured!
{{#if @resolved 'title'}}
Hello, {{title}}!

getName: async () => {
const sleep = ms => new Promise(r => setTimeout(r, ms));
await sleep(1000);
return 'john'

It will render whereas getting the title for 1000ms, We're fetching your title..., then it is going to render the string john

In Meteor.js v2.8, it was addedMeteor.callAsync, which means that doing a Meteor.callAsync("someMethod") will lead to a promise of the results of that decision. In lots of instances, you need to return an inventory. For such instances, we’ve this snippet the place you’ll be able to iterate over an async checklist:

<template title="hyperlinks">
{{#let hyperlinks=getLinksFromDB}}
{{#if @pending}}
We're fetching your checklist...
{{#if @rejected}}
Sorry, an error occured!
{{#if @resolved }}
{{#every hyperlink in hyperlinks}}

/// in server
getLinks() {
return ['foo','bar','baz'];
/// in shopper
getLinksFromDB: async () => {
const hyperlinks = await Meteor.callAsync('getLinks');
const sleep = ms => new Promise(r => setTimeout(r, ms));
await sleep(1000);
return hyperlinks;

If you wish to check this new characteristic, you should definitely be a minimum of in v2.7.0 in blazejs model.

High quality of life updates:

Whereas this Meteor.js launch has not launched any new characteristic, here’s a checklist of modifications that actually will make our life simpler by fixing a bug or simply making a skeleton extra idiomatic.

Particular thanks

We need to lengthen particular because of the next contributors for his or her contributions to this launch:

Thanks on your exhausting work and dedication to the Meteor.js neighborhood!
We encourage all customers to replace to Meteor.js 2.13 to benefit from these new options and enhancements.
For extra details about Meteor.js, please go to the Meteor.js web site.

Comfortable coding!



Please enter your comment!
Please enter your name here

Most Popular

Recent Comments