Ember 3.24 released


Today, the Ember project released version 3.24 of Ember.js, Ember Data, and Ember CLI. This version of Ember.js is the LTS (Long Term Support) release candidate. LTS candidates prioritize stability rather than adding new features, and have an extended support timeline.

This version started the 3.25 test cycle of all sub-projects. We encourage our community (especially plugin authors) to help test these beta versions and report any bugs before they are released as the final version in six weeks.This Embers try Plugins are a great way to continuously test your project against the latest Ember version.

You can read more about our general publishing process here:


Ember.js

Ember.js is the core framework for building ambitious web applications.

Changes in Ember.js 3.24

Ember.js 3.24 is an incremental and backward compatible version of Ember, with bug fixes, performance improvements, and a few deprecations.

Bug fix

Ember.js 3.24 introduced 4 bug fixes.

  1. when. . .when router The service is injected (for example into the component), router Services can work automatically in non-application testing.In other words, we no longer need to call this.owner.setupRouter(). (#19080)
  2. When there is no template associated with the component class, low-level API getComponentTemplate() Back now undefined instead null. The return value undefined Is in Component template hosting RFC. (#19253)
  3. In the Ember Engines application, <LinkTo> Components again support Link within the enginePlease note that it is possible to fix major changes to the private implementation <LinkTo>. When you upgrade your application to v3.24 or later, you must at least upgrade Ember Engines to ember-engines@0.8.9 (Look Release notes here Details). (#19223)⚠️
  4. When the calculated attribute has a dependent key that contains @each, Followed by the alias attribute, when the value of the alias attribute changes, the calculated attribute will be recalculated. (#19280)

feature

Ember.js 3.24 introduced 3 features.

  1. When ember-page-title After installation, the blueprint of the routing template will create a {{page-title}} In addition to auxiliary calls {{outlet}}. For more information, see RFC #645 with ember-page-title file. (#19224)
  2. Interface DeprecationOptions, Can be passed to deprecate() Function, need button for with since exist.For more information, see Deprecation of staging RFC. (#19133)
  3. The rendering engine Glimmer VM has been upgraded to version 0.65.0. The upgrade includes bug fixes and some upstream. (#19258, #19261, #19267)

Deprecated

Ember.js 3.24 introduced 4 deprecations.

  1. Back to the interface DeprecationOptions (See function above), forgot to pass for or since Will trigger a deprecation message. (#19133)

  2. Ember.String.loc Features, @ember/string#loc Function, and {{loc}} The helper has been deprecated and replaced by a dedicated localization solution, such as Artificial International. For more information, see Deprecation guide. (#19211)

  3. Make a call camelize, capitalize, classify, dasherize, decamelize, underscore, Or w-all these are Ember.String method— The use of strings is not recommended.You can import the function from the following locations instead of calling the method on the string @ember/string:

    // Before
    let mascot = 'Empress Zoey';
    
    console.log(mascot.camelize());  // empressZoey
    
    // After
    import { camelize } from '@ember/string';
    
    let mascot = 'Empress Zoey';
    
    console.log(camelize(mascot));  // empressZoey
    

    For more information, see Deprecation guide. (#19234)

  4. tryInvoke From @ember/utils The module has been deprecated and replaced by JavaScript’s optional chain ?..

    // Before
    import { tryInvoke } from '@ember/utils';
    
    let today = new Date('01/07/2021');
    
    tryInvoke(today, 'getTime');              // 1609974000000
    tryInvoke(today, 'setFullYear', [2014]);  // 1389049200000
    tryInvoke(today, 'noSuchMethod', [2014]); // undefined
    
    // After
    let today = new Date('01/07/2021');
    
    today.getTime?.();          // 1609974000000
    today.setFullYear?.(2014);  // 1389049200000
    today.noSuchMethod?.(2014); // undefined
    
    /*
      Note, `today` is used in the context of `tryInvoke`.
      As a result, we can assume that `today` is an object
      and write `today.getTime` instead of `today?.getTime`.
    
      The examples exist only to illustrate how to refactor
      `tryInvoke`. Please don't write `today.getTime?.()`
      in practice. :)
    */
    

    For more information, see Deprecation guide.

When the API will be removed in the future, a deprecation will be added to Ember.js. Each deprecation guide has an entry in the deprecation guide that describes the migration path to a more stable API. Before the major version of the framework is released, the deprecated public API will not be removed.

Consider using ember-cli-deprecated-workflow addon If you want to upgrade your application without immediately solving the deprecation issue.

Last but not least, Ember.js 3.24 removed some feature flags and a feature called expandLocalLookup. For more details about the changes in Ember.js 3.24, please check Ember.js 3.24.0 release page.


Embers data

Ember Data is the official data persistence library for Ember.js applications.

Ember data 3.24 changes

Bug fix

Ember Data 3.24 introduced 1 bug fix.

  1. In a production environment, trying to set something on a deleted record no longer displays the value in the error message. This is done to prevent leakage of sensitive data. (#7370)

feature

Ember Data 3.24 introduced 0 features.

Deprecated

Ember Data 3.24 introduced 0 deprecations.

For more details about the changes in Ember Data 3.24, please check
Ember Data 3.24.0 release page.


Ember command line interface

Ember CLI is a command line interface for managing and packaging Ember.js applications.

Upgrade Ember CLI

You can upgrade Ember CLI with the following command ember-cli-update project:

npx ember-cli-update

This utility will help you update your application or plug-in to the latest Ember CLI version. You may encounter merge conflicts, where the default behavior is to let you resolve the conflict yourself.For more information ember-cli-update Item, see GitHub Readme.

Although it is recommended to keep the Ember CLI version synchronized with Ember and Ember Data, it is not required. After updating ember-cli, you can keep the current version of Ember or Ember Data by editing package.json Revert changes to contained lines ember-source with ember-data.

Changes in Ember CLI 3.24

Bug fix

Ember CLI 3.24 introduces a bug fix.

  1. When the Embroider v2 plug-in exists, prevent loops from forming during the build process. (#9402)

feature

Ember CLI 3.24 has been upgraded to exist in package.json Blueprint to their latest version.There are 4 significant changes package.json blueprint:

  1. ember-page-title Added to the blueprint.For more information, see RFC #645 with ember-page-title file. (#9372, #9382)
  2. ember-qunit Has been upgraded to v5 (Major version changes).Following Migration guide, This package.json The blueprint includes @ember/test-helpers with qunit. Blueprint tests/index.html with tests/test-helper.js Has also been updated. (#9340, Chapter 9371)
  3. eslint-plugin-ember Has been upgraded to v10 (A major version change), it promotes octane rule recommended And enabled several additional rules as recommended. To learn more about these linting rules, check out eslint-plugin-ember file. (#9403)
  4. prettier (along with eslint-config-prettier with eslint-plugin-prettier) Has been added to the blueprint.To learn more, see RFC #628 with Prettier documents. (Chapter 9391, #9407, #9410)

Deprecated

Ember CLI 3.24 introduced 0 deprecations.

For more details about the changes in Ember CLI 3.24 and detailed upgrade instructions, please check Ember CLI 3.24.0 release page.

thank you!

As an ambitious community-driven open source project, each of these versions reminds us that without your continued support, the Ember project is impossible to achieve. We are very grateful for the efforts of our contributors.

Leave a Reply

Your email address will not be published. Required fields are marked *