As we speak the Ember mission is releasing model 3.25 of Ember.js, Ember Information, and Ember CLI.
This launch kicks off the three.26 beta cycle for all sub-projects. We encourage our neighborhood (particularly addon authors) to assist take a look at these beta builds and report any bugs earlier than they’re printed as a remaining launch in six weeks’ time. The ember-try addon is a good way to constantly take a look at your tasks in opposition to the newest Ember releases.
You’ll be able to learn extra about our basic launch course of right here:
Ember.js
Ember.js is the core framework for constructing bold net purposes.
Adjustments in Ember.js 3.25
Ember.js 3.25 is an incremental, backwards appropriate launch of Ember with bug fixes, efficiency enhancements, and minor deprecations.
Bug Fixes
Ember.js 3.25 accommodates a number of bug fixes, together with:
- Empty
htmlSafe
strings are actually thought of false. (#18148) - Template locals now not clobber part invocations of the identical title. (#19351)
- Improved error message when invoking nested elements, e.g.
<Foo:Bar />
. (#19336) - Improved error messages and stack traces for
<LinkTo />
. (#19342)
Options
Ember.js 3.25 launched 2 options.
Whereas this function will not have an effect for Ember builders fairly but, it is a crucial step in direction of permitting extra experimental work in templates, like template imports and single-file elements.
If these matters curiosity you, control our RFCs repository for exercise and an opportunity to take part!
- Named blocks (#19318)
This function permits builders to yield distinct blocks from a part, unlocking highly effective composition patterns for elements.
This function is helpful whenever you need to render various things relying on passed-in information.
Allow us to implement a procuring cart that lists the gadgets in it, or reveals a message that claims it’s empty.
We shall be utilizing {{gt}}
from ember-truth-helpers
to assist implement this.
First we write the part template:
// app/elements/cart.hbs
<ul>
<li></li>
</ul>
Which can be utilized like so:
<Cart @record=>
<:default as |listItem|>
<p>You might have a .</p>
</:default>
<:empty>
<p>Your cart is empty.</p>
</:empty>
</Cart>
Then when shoppingList
accommodates a number of components, like [ "apple", "pear", "banana" ]
, it renders the next:
<ul>
<li><p>You might have a apple.</p></li>
<li><p>You might have a pear.</p></li>
<li><p>You might have a banana.</p></li>
</ul>
But when shoppingList
is empty, it renders the next as an alternative:
<p>Your cart is empty.</p>
Named blocks are additionally helpful if you wish to guarantee a sure construction to your HTML, however need to allow customization of the content material.
An instance of this may be an <Article>
part, as proven within the yieldable named blocks RFC (#460).
Yow will discover extra info within the Element API documentation.
Deprecations
Ember.js 3.25 launched 0 deprecations.
For extra particulars on adjustments in Ember.js 3.25, please evaluation the Ember.js 3.25.0 launch web page.
Ember Information
Ember Information is the official information persistence library for Ember.js purposes.
Adjustments in Ember Information 3.25
Other than documentation fixes and inside cleanup of function flags, there have been no adjustments.
For extra particulars on adjustments in Ember Information 3.25, please evaluation the
Ember Information 3.25.0 launch web page.
Ember CLI
Ember CLI is the command line interface for managing and packaging Ember.js purposes.
Upgrading Ember CLI
You could improve Ember CLI utilizing the ember-cli-update
mission:
npx ember-cli-update
This utility will allow you to to replace your app or addon to the newest Ember CLI model. You’ll most likely encounter merge conflicts, by which the default conduct is to allow you to resolve conflicts by yourself. For extra info on the ember-cli-update
mission, see the GitHub README.
Whereas it is strongly recommended to maintain Ember CLI variations in sync with Ember and Ember Information, this isn’t required. After updating ember-cli, you’ll be able to preserve your present model(s) of Ember or Ember Information by enhancing package deal.json
to revert the adjustments to the strains containing ember-source
and ember-data
.
Adjustments in Ember CLI 3.25
Other than up to date dependencies within the app and addon blueprints, there have been no adjustments.
For extra particulars on the adjustments in Ember CLI 3.25 and detailed improve
directions, please evaluation the Ember CLI 3.25.0 launch web page.
Thank You!
As a community-driven open-source mission with an bold scope, every of those releases serves as a reminder that the Ember mission wouldn’t have been attainable with out your continued assist. We’re extraordinarily grateful to our contributors for his or her efforts.