Wednesday, March 27, 2024
HomeJavaScriptEmber 3.13 Launched (Octane Preview)

Ember 3.13 Launched (Octane Preview)


Right this moment, the Ember challenge is releasing model 3.13 of Ember.js, Ember Information, and Ember CLI.

Ember 3.13 is the ultimate launch of Ember earlier than Octane. Ember 3.13 can be the Octane preview. The preview permits adventurous group members to begin utilizing its steady options and assist put the ultimate spherical of polish on supporting instruments and documentation earlier than Octane turns into official in 3.14. You’ll be able to study extra about what to anticipate from Octane and tips on how to put together your apps in a earlier weblog submit.

Moreover, model 3.12 of Ember is now promoted to LTS (Lengthy Time period Help). An LTS model of Ember continues to obtain safety updates for 9 launch cycles (54 weeks) and bugfixes for six cycles (36 weeks). LTS releases usually happen each 4 minor variations. The earlier LTS model of Ember was 3.8.

The Octane Preview

The Octane options in 3.13 are steady public APIs with our regular SemVer ensures. In case you construct an app utilizing APIs within the Octane preview, it’s going to proceed to work in future variations.

So why is that this a preview and never the ultimate Octane launch?

An enormous a part of Octane is about delivering a wonderful developer expertise, whether or not you’re a newbie or an influence person. Whereas these APIs are steady, not all Octane options are suitable with common addons but. We’re additionally nonetheless updating documentation, and necessary instruments just like the Ember Inspector don’t but work with some Octane options. Octane is just not full till these supporting items are in place.

Then, when Ember 3.14 arrives, Octane would be the really useful means to make use of Ember and new apps can have Octane’s non-obligatory options enabled by default. The guides and tutorials will present Octane examples, and codemods will likely be accessible to assist customers migrate to Octane. Go to the Octane touchdown web page for hyperlinks to the training sources, that are deployed to a short lived URL.

The Ember tutorial has already been fully rewritten for Octane, and the best technique to perceive the massive image of Octane, particularly if you happen to’re already an skilled Ember developer, is to work by means of the brand new tutorial, which you will discover by means of the Octane touchdown web page.


You’ll be able to check out the Octane preview by performing just a few steps:

Add the next packages if they don’t seem to be already current at this model:

npm set up --save-dev @ember/version-utils@^1.1.1
npm set up --save-dev @glimmer/element@^0.14.0-alpha.13

Disable legacy conduct by setting the next function flags:

ember function:disable jquery-integration
ember function:allow template-only-glimmer-components
ember function:disable application-template-wrapper

Specify the Octane version in .ember-cli.js by including the next strains to the start of the file:

// .ember-cli.js
const { setEdition } = require('@ember/edition-utils');

setEdition('octane');

In case you have an .ember-cli file as a substitute of an .ember-cli.js file, you possibly can convert it by renaming it to .ember-cli.js, then taking the present JSON object and assigning it to module.exports. For instance, if in case you have an .ember-cli file with:

// .ember-cli
{
  "disableAnalytics": false
}

The equal .ember-cli.js file could be:

// .ember-cli.js
module.exports = {
  "disableAnalytics": false
}

In case you want extra info on tips on how to migrate away from these legacy options, try the Octane launch plan weblog submit.


Ember.js

Ember.js is the core framework for constructing bold net functions.

Adjustments in Ember.js 3.13

Ember.js 3.13 is an incremental, backwards suitable launch of Ember with bugfixes, efficiency enhancements, and minor deprecations. There are 5 (5) new options, one (1) deprecation, and a number of other bugfixes on this model.

New Options (5)

Tracked Properties and Tracked Property Updates (1 of 5)

Tracked properties introduce an easier and extra ergonomic system for monitoring state change in Ember functions. Tracked properties enable Ember to cut back its API floor space whereas producing code that’s each extra intuitive and fewer error-prone.

Take a look on the [guides] to study extra about tracked properties. For design particulars, try RFC 410 and RFC 478.

Element Templates Co-location: Half One (2 of 5)

Element co-location is accessible in Ember 3.13. This function lets you group a element’s template and JavaScript information collectively within the file system. For instance, a element named user-profile could be made up of the next information:

app
└── elements
    ├── user-profile.hbs
    └── user-profile.js

Be aware: Beforehand, in 3.13, this function was not accessible until you enabled the Octane preview. That modified as soon as a efficiency problem was addressed.

The RFC accommodates an in depth rationalization of the design of this function.

component-class generator (3 of 5)

With the Octane preview enabled, a element generated utilizing ember generate element <element identify> will not embrace a element class by default.

In instances the place you want a element class file, you possibly can both move the --with-component-class flag to the element generator, or add one after the very fact with the brand new ember generate component-class <element identify> generator.

Detect the version that’s in use (4 of 5)

For addon authors, it’s now potential to detect which version is in use at build-time with @ember/edition-utils.

import { has } from '@ember/edition-utils';

let isOctane = has('octane');
Add updateHook component-manager functionality (5 of 5)

There’s a new functionality for element managers which lets you opt-in or opt-out of whether or not to have an updateComponent hook in your element supervisor.

In case you’re not an addon writer or preserve a element supervisor, then you’re unlikely to wish use this new function.

Deprecations (1)

Deprecations are added to Ember.js when an API will likely be eliminated at a later date. Every deprecation has an entry within the deprecation information describing the migration path to a extra steady API. Deprecated public APIs usually are not eliminated till a significant launch of the framework.

Think about using the ember-cli-deprecation-workflow addon if you want to improve your software with out instantly addressing deprecations.

For extra particulars on modifications in Ember.js 3.13, please evaluate the Ember.js 3.13.0 launch web page.

Deprecate help for mouseEnter/Go away/Transfer Ember occasions (1 of 1)

Ember.js 3.13 deprecates help for mouseEnter, mouseLeave and mouseMove Ember occasions. The deprecation information accommodates steerage on tips on how to migrate away from these occasions.


Ember Information

Ember Information is the official information persistence library for Ember.js functions.

Adjustments in Ember Information 3.13

New Options (0)

No new options launched in Ember Information 3.13.

Deprecations (0)

No new deprecations launched in Ember Information 3.13.

For extra particulars on modifications in Ember Information 3.13, please evaluate the
Ember Information 3.13.0 launch web page.


Ember CLI

Ember CLI is the command line interface for managing and packaging Ember.js functions.

Upgrading Ember CLI

Chances are you’ll improve Ember CLI simply utilizing the ember-cli-update challenge:

npm set up -g ember-cli-update
ember-cli-update

This utility will assist you to to replace your app or add-on to the most recent Ember CLI model. You’ll in all probability encounter merge conflicts, wherein the default conduct is to allow you to resolve conflicts by yourself. For extra info on the ember-cli-update challenge, see the github README.

Whereas it is suggested to maintain Ember CLI variations in sync with Ember and Ember Information, this isn’t required. After updating ember-cli, you possibly can preserve your present model(s) of Ember or Ember Information by modifying package deal.json to revert the modifications to the strains containing ember-source and ember-data.

Adjustments in Ember CLI 3.13

No new options in Ember CLI 3.13.


For extra particulars on the modifications in Ember CLI 3.13 and detailed improve
directions, please evaluate the Ember CLI 3.13.0 launch web page.

Ember 3.12 is an LTS Launch

In case you are upgrading from the earlier LTS model (3.8) to three.12 then you’re gaining access to these options:

  • router service
  • Help for native lessons
  • The array helper
  • Aspect Modifier Supervisor (and modifiers normally)
  • Nested angle bracket element invocation
  • Angle bracket invocation for built-in elements
  • Help for native decorators
  • The {{fn}} and {{on}} modifiers

3.14 Beta

This launch kicks off the three.14 beta cycle for all sub-projects. We encourage our group (particularly addon authors) to assist check these beta builds and report any bugs earlier than they’re revealed as a ultimate launch in six weeks’ time. The ember-try addon is a good way to constantly check your initiatives towards the most recent Ember releases.

Amongst different issues, the @mannequin named argument will likely be accessible to route templates. Whereas not formally an “Octane function”, this function will accessible for the primary time within the 3.14 launch, which coincides with the Octane launch. Because the Octane guides and documentation are focusing on the identical model, you will note them utilizing this function, however please be aware that the function is just not accessible within the 3.13 Octane preview.

This beta launch additionally included a brand new debug render tree API, which will likely be built-in into the Ember Inspector someday through the beta cycle to provide it full Octane help.
You’ll be able to learn extra about our normal launch course of right here:

Thank You!

As a community-driven open-source challenge with an bold scope, every of those releases serves as a reminder that the Ember challenge wouldn’t have been potential with out the continued efforts of everybody in the neighborhood. We’re extraordinarily grateful to our contributors for his or her efforts.

RELATED ARTICLES

LEAVE A REPLY

Please enter your comment!
Please enter your name here

Most Popular

Recent Comments