Ember 5.0 Released


EmberJS 5.0 embodies the commitment to stability and reliability that developers have come to expect from the Ember ecosystem. The Ember team has worked hard to remove all the deprecations and make us move towards Polaris. Get up-to-date with the latest in Ember and enjoy!
This post will cover our release strategy, how to upgrade, what to expect, and deprecated APIs that were removed.
This is the first major release under the new release strategy and goals proposed in RFC 830, Evolving Ember's Major Version Process.
To summarize, every 12 minor releases, Ember will ship a new major release, which removes any
deprecated code targeted for that major version.
When it comes to introducing new features, Ember generally aims to ship new features in minor releases, offering backwards compatibility for existing code at the same time as giving developers the chance to try out new capabilities.
This approach reduces the challenges that teams face for major upgrades, compared to producing big, breaking, splashy major versions with lots of new features.

In Ember 4.x minor releases, we landed a bunch of features (along with various bug fixes, of course):

  • In Ember 4.1, we shipped a bunch of quality-of-life improvements:
    • the @cached decorator for caching expensive getters
    • the @service decorator so you don't have to import { inject as service } anymore
    • the refresh method on the Ember router, making it easier to refresh the data for the whole current route tree
  • In Ember 4.4, we shipped a {{unique-id}} helper to make it easier to write accessible forms and made it easier to customize tests with improved blueprints for setupTest.
  • In Ember 4.5, we made it possible to use plain old JavaScript functions as helpers: no need to wrap them with helper() any more!

    We also shipped a new testing primitive, renderSettled, which lets you wait for when Ember has re-rendered but other promises are still in flight—handy for testing your loading spinners, for example.

  • In Ember 4.8, we shipped a preview of our native TypeScript support, starting out with hand-authored types.
  • In Ember 4.9, we did a ton of internal polish work on our types and started testing Ember itself against our supported range of TypeScript versions.
  • In Ember 4.10, we introduced a new, carefully-designed API for Ember's Dependency Injection system: Owner is a subset of the ApplicationInstance type which covers all of its APIs with less duplication and confusion about what to use.
  • In Ember 4.11, we published the first TypeScript types in Ember generated from Ember's own source code.
  • In Ember 4.12, we enabled generating TypeScript blueprints with ember generate.

We also made significant strides in key parts of the ecosystem outside the core framework itself over the past 18 months:

  • We committed to shipping a new component format using tags to get the best parts of “single-file components” and formats like JSX, while keeping the best parts of Ember’s declarative templates.
    We shipped support for tags in .gjs and .gts files over the course of 2022.
    For details, check out the ember-template-imports addon, which provides support for the new format today!
    That includes ESLint integration and a Prettier plugin, as well as ember-template-lint support!
    We expect to recommend as the default authoring format during Ember 5.x.
  • We shipped Glint 1.0, providing top-notch editor tooling for Ember's templates in both JavaScript and TypeScript code bases, powered by TypeScript under the hood.
  • EmberData massively improved performance and laid a foundation for a total overhaul in the 5.x series.

Ember 5.0 has no new features, because we did all that work in minor releases instead.
You can read more about our general release process here:

Beta cycle
This release kicks off the 5.1 beta cycle for all sub-projects. We encourage our community (especially addon authors) to help test these beta builds and report any bugs before they are published as a final release in six weeks' time. The ember-try addon is a great way to continuously test your projects against the latest Ember releases.
How to upgrade to Ember 5
The most common approach for upgrading to 5.0 is to upgrade your app to the last
version of Ember 4, which is 4.12, resolve all deprecation warnings, and then upgrade to 5.0. If your app or addon runs with no deprecations in the latest release of 4.12,
you should be able to upgrade to Ember 5 with no additional changes. Step by step directions are below.
If your app is at a much earlier version in the 4.x series, we
recommend upgrading in steps across the LTS versions: 4.4, 4.8, and then 4.12.
Follow these steps in order:

  1. Consider upgrading addons used in your app
    to the latest version that you can. This will reduce the uses of deprecated APIs in your dependencies.
  2. Upgrade your project to the latest patch version of Ember 4.12.
    Many developers can do this by running
    npx ember-cli-update --to 4.12. The
    general Ember upgrade guide
    has more details about how to upgrade your Ember app/addon.
  3. Make sure your app builds successfully.
  4. Resolve all deprecation warnings. These Deprecated APIs are removed in Ember 5.0. You may need to upgrade some of your addon dependencies if they are using deprecated APIs.
    See the Ember Deprecation Guide
    for more details about specific deprecations and how to resolve them.
    Applications that need to upgrade through several versions may want to
    consider isolating individual deprecations by using
    ember-cli-deprecation-workflow.
  5. Make sure your app builds successfully and your test suite passes with no
    deprecations.
  6. Upgrade your app to Ember 5.0. Again,
    many developers can do this by running
    npx ember-cli-update --to 5.0. Refer to the
    general Ember upgrade guide
    for more details about how to upgrade your Ember app/addon.

For help or advice along the way, visit Ember's forums or chat groups.
The journey towards Ember Polaris
Polaris is the name of an upcoming edition of Ember, first announced at EmberConf 2021. Over the course of 5.x, new features will be added to Ember that will eventually make up the new edition.
Since our major versions tend to be uneventful, Editions are the moment where the Ember community comes together to learn and build in new ways.
An edition is a set of features, corresponding documentation, and tools that create a cohesive programming model.
An edition marks a shift and step forward in the framework, beyond what individual features would accomplish.
Ember Octane was the first new edition that was added to Ember.
Stay tuned for future blog posts with more details and calls for contributors!

Ember.js
Ember.js is the core framework for building ambitious web applications.
Changes in Ember.js 5.0
Ember.js 5.0 introduces no new public API. Instead, it is comprised of bug fixes and the removal of previously deprecated public API from the 4.x cycle.
This release drops support for Node 14. Node 14 became end of life (it no longer receives security updates) as of April 2023.
Bug Fixes
Ember.js 5.0 introduced 4 bug fixes in the preview types.
Features
Ember.js 5.0 introduced no new features.
Deprecations
Ember.js 5.0 introduced 0 deprecations. It removed all deprecations that were
introduced before 4.10 and slated for removal in 5.0.
Ember 5.0 removes five features deprecated during 4.x:

  • Removing Ember's assign, a polyfill for the Object.assign static function, since the built-in is supported by all major browsers in Ember's support matrix.
  • Removing the API for implicit injections. These were deprecated in Ember 3.26, and became no-ops in Ember 4.0; 5.0 removes them.
  • Removing the AutoLocation class in favor of having apps explicitly choose to use one of the built-in HistoryLocation, HashLocation, NoneLocation classes, or to supply their own.
  • Removing the @ember/error package, which for many years has only re-exported the Error built-in type.
  • Removing support for Ember.String: developers who are using its utilities should explicitly install the @ember/string package and use it instead of the Ember.String namespace. We also encourage users to use other tools than the @ember/string package, including browser builtins like Intl.PluralRules or other libraries from the JavaScript ecosystem, but the package is still supported. Note! There is currently a bug in the implementation of the @ember/string deprecation. Adding @ember/string to your project may not be enough to silence the deprecation. However, so long as the @ember/string package has been installed to your project you can upgrade to 5.0 without worrying about the deprecation. Please see the deprecation guide for more information.

For more details on how to resolve these deprecations in your app, see the deprecations guide.

Deprecations are added to Ember.js when an API will be removed at a later date. Each deprecation has an entry in the deprecation guide describing the migration path to a more stable API. Deprecated public APIs are not removed until a major release of the framework.
Consider using the ember-cli-deprecation-workflow addon if you would like to upgrade your application without immediately addressing deprecations.

For more details on changes in Ember.js 5.0, please review the Ember.js 5.0.0 release page.

EmberData
EmberData is the official data persistence library for Ember.js applications.
EmberData 4.12 will remain an actively supported LTS for the entire duration of the 5.x cycle, extending until the first 6.x LTS is released. This is in addition to our regular LTS support policy, and only applies to the EmberData project.
This support extends beyond bug-fixes. If minor enhancements can be made to better support new presentation class implementations that support the 4.x series we will willingly accept them. Our goal is that we want no one left behind.
To learn about the motivation and goals for upcoming changes to EmberData in 5.x,
read the blog post, EmberData 5.X Update.

This will help you form the mental model of what to expect across the 5.x series,
and understand deprecation removals in the context of the upcoming goals.
The sections below will provide a high-level summary of what has changed between
EmberData 4.12 and 5.0.
Changes in EmberData 5.0
Bug Fixes
EmberData 5.0 introduced 7 bug fixes:

  • #8621 - normalizeErrorResponse will provide serialized JSON instead of [object Object] if an object is part of the return.
  • #8598 - api docs generation should maintain a stable relative path, fixing Edit on Github and Defined in: links.
  • #8566 - previously, an identity notification was being triggered unnecessarily every time a record was saved.
  • #8597 - this fix ensures that promise caches are not shared among different fields.
  • #8594 - regression that caused the Store class to no longer extend from EmberObject has been fixed.
  • #8570 - fixes an issue where the entire RecordArray was being cleared, even if the remaining record did not match the record that was removed.
  • #8555 - fixes polymorphic assertions when deprecated code is removed and improves polymorphic developer experience.

Features
EmberData 5.0 introduced 0 features.
Deprecations
EmberData 5.0 introduced 0 deprecations. It removed all deprecations that were
introduced before 4.12 and slated for removal in 5.0.
There were more than 20 deprecation removals in 5.0 so we will not detail them in this post. Instead, for an exhaustive list of removals, see the EmberData 4.x deprecation guide, the corresponding Ember Data API docs CurrentDeprecations list and #8550. You can also follow the instructions here for learning about how to opt-in and remove code that exists to support deprecated behaviors.
For more details on changes in EmberData 5.0, please review the
EmberData 5.0.0 release page.

Ember CLI
Ember CLI is the command line interface for managing and packaging Ember.js applications.
Upgrading Ember CLI
You may upgrade Ember CLI using the ember-cli-update project:
npx ember-cli-update

This utility will help you to update your app or addon to the latest Ember CLI version. You will probably encounter merge conflicts, in which the default behavior is to let you resolve conflicts on your own. For more information on the ember-cli-update project, see the GitHub README.
While it is recommended to keep Ember CLI versions in sync with Ember and EmberData, this is not required. After updating ember-cli, you can keep your current version(s) of Ember or EmberData by editing package.json to revert the changes to the lines containing ember-source and ember-data.
Changes in Ember CLI 5.0
Bug Fixes

  • minifyCSS behavior was extracted to an addon, ember-cli-clean-css, that is now included in the default blueprint. This addon version currently uses an old version of clean-css so as to exactly match the previous built-in behavior. If you upgrade the addon (and thus clean-css) be aware that your built CSS may change.

Features
Ember CLI 5.0 introduced 0 features.
Deprecations
Ember CLI 5.0 introduced 0 deprecations.
Ember CLI 5.0 removed features and APIs that were deprecated in 4.x or earlier, please see the Deprecation guide for more information:

  • Removed the blacklist and whitelist build options, they have been renamed to exclude and include.
  • Removed various bower related APIs
  • Removed support for ember-cli-jshint
  • Removed the vendor-shim blueprint in favor of ember-auto-import
  • Removed support for baseURL environment option (deprecated way back in v2.7)

A special thanks to Bert De Block for singlehandedly cleaning up ember-cli for v5.0
For more details on the changes in Ember CLI 5.0 and detailed upgrade
instructions, please review the Ember CLI 5.0.0 release page.
Changes for TypeScript
There are no specific changes to Ember's TypeScript support for Ember 5.0. However, Ember now ships a preview of its own types, and will be shipping a stable version early in the 5.x series. Accordingly, the Ember TypeScript team does not plan to update the @types packages on DefinitelyTyped for Ember 5.0. We will publish a dedicated blog post covering more details on the plan for stabilizing Ember's types in the next few weeks.
Thank You!
As a community-driven open-source project with an ambitious scope, each of these releases serves as a reminder that the Ember project would not have been possible without your continued support. We are extremely grateful to our contributors for their efforts.