Ember 7.0 Released


The Ember Project is excited to announce the release of Ember v7.0. Following Ember’s major version policy, major consists only of removing features that were made obsolete by 7.0 as well as other bug fixes. This release of Ember.js means that the previous version, 6.12, is now an LTS (long term support) version.

When it comes to introducing new features, the goal of Ember is generally to ship new features in smaller releases, while still providing backward compatibility for existing code while giving developers a chance to try out new capabilities. This approach reduces the challenges faced by teams for major upgrades compared to producing big, breaking, flashy major versions with lots of new features.

Taking a look at the improvements in the 6.x series

In the Ember 6.x minor release, we found several notable features:

  • In Ember 6.1 we started publishing ember-source As a v2 addon, which enabled Embroider consume ember-source directly.
  • In Ember 6.3 we added support for template-tagged components as route templates according to RFC #1046.
  • In Ember 6.8 we introduced a new App Blueprint Embroider And Vite-based build system as default.
  • We also moved to Ember 6.8 strict-mode (aka template-tag) component authoring format as default.
  • We also added this in Ember 6.8 renderComponent API that allows individual components to be rendered without a complete project.
  • Also in Ember 6.8 we created tracked versions of JavaScript’s native collection types: trackedArray, trackedObject, trackedMap, trackedSet, trackedWeakMapAnd trackedWeakSet.

Ember v6.8 was the biggest change in the way Ember projects are built in recent memory. The Ember core teams have been working on the Embed+Write build system and strict-mode-templates (aka template-tags) for literally years, and this is the first version we’ve made them the default experience for newly generated Ember apps. Early adopters have been opting for these features for quite some time, but building an app with Ember v6.8 (or newer) now gives you an incredibly modern developer experience 🙏

With these features, countless bug fixes, and condemnations clearing the way for future improvements, the RFC set the stage for new features, even in the 6.x community:

  • merged to glimmer-vm in monorepo ember.js To facilitate rapid iteration and integration on rendering engines ember.js.
  • merged to router.js repo in ember.js The repo is experimenting with a new router architecture and preparing for the implementation of the Route Manager RFC.
  • Updated our packages to publish via OIDC.
  • update broccoli and other dependencies in an ongoing effort to reduce the number of security vulnerabilities. The current vulnerability warnings are only of concern in development mode and should not be exploited, but they are annoying.
  • An effort was made to reduce the number of deprecation warnings when creating a new Ember app. This is a continuous task.
  • v2 of Glint was released. This enabled us to make the template-tag component authoring format the default.
  • Created template tag codemod to aid migration to the new authoring format.
  • Created white codemod to aid migration to the new build system.
  • Created a legacy classic blueprint (@ember-tooling/classic-build-app-blueprint) and supported it in ember-cli-update so that projects can update if necessary without having to go to the new build system.

Thanks to all the contributors who helped make this major-version cycle possible!

How to upgrade to Ember 7.0

The most common approach to upgrading to 7.0 is to upgrade your app to the last version of Ember 6, which is 6.12, resolve all deprecation warnings, and then upgrade to 7.0. If your app or addon runs flawlessly in the latest release of 6.12, you should be able to upgrade to Ember 7 without any additional changes. Step-by-step instructions are below.

If your app is in a very old version in the 6.x series, we recommend upgrading to LTS versions in steps: 6.4, 6.8 and then 6.12.

Follow these steps in order:

  1. Consider upgrading the addons used in your app to the latest version that you can. This will reduce the use of obsolete APIs in your dependencies.

  2. Upgrade your project to the latest patch version of Ember 6.12. This can be done by running multiple projects
    npx ember-cli-update --to 6.12.

    When upgrading across the 6.8 border, due to changes in the build system, you need to adjust the configuration for Ember-CLI.

  3. Make sure your app is created successfully.

  4. Resolve all deprecation warnings. These obsolete APIs have been removed in Ember 7.0. If some of your addon dependencies are using obsolete APIs you may need to upgrade them. See the Amber Deprecation guide for more information on specific exclusions and how to resolve them. Applications that need to upgrade through multiple versions may consider separating individual deprecations using the ember-cli-deprecation-workflow.

  5. Make sure your app is built successfully and your test suite passes without any hiccups.

  6. Upgrade your app to Ember 7.0. Then, many developers can do this by running
    npx ember-cli-update --to 7.0.

For help or advice along the way, visit Amber’s forums or chat groups.

ember.js 7.0

Ember.js 7.0 does not introduce any new public APIs. Instead, it consists of bug fixes and breaking of previously obsolete public APIs from the 6.x cycle.

Condemnation

Ember.js 7.0 did not introduce any new deprecations. This removed all deprecations that were introduced before 6.10 and were scheduled for removal in 7.0.

Ember 7.0 removes the following features obsolete during 6.x:

  • takes out import Ember from 'ember'. See the RFC or deprecation in your project for a guide on the replacement API.
  • Removes publication of AMD bundles by ember-source. This can be selected before 7.0 using an optional feature: see the deprecation guide for more details. It also requires some dependency updates.
  • deletes import inject From @ember/service. it is now import { service } from '@ember/service'.

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

bug fixes

Ember.js 7.0 includes several bug fixes, some of the more notable of which are the following:

  • #21076 Support default globals for strict mode Order Template compiler according to RFC #1070.
  • Add support for #21098 this within clear scope for Order Template compiler.
  • fix #21107 LinkTo Inline SVG reloads your application
  • #21109 Fix missing value attribute on radio/checkbox inputs associated with empty strings.
  • #21122 Fix tracked collections delete() Returning true for non-existent entries
  • fix #21124 {{#each}} Runtime crashes when array contains null/undefined items with key
  • #21125 Fix crash when reaching negative index of helper positional args.
  • fix #21128 trackedMap And trackedWeakMap Responsiveness to existing keys
  • #21139 port BrandedArray Fix array-as-parent bug in destructible objects
  • fix #21168 EmberArray.reduce to match the original behavior
  • #21189 Clear old metadata references after destruction to allow GC
  • fix #21202 ‘S @current-when Logic with nested routes with dynamic segments

Ember CLI v7.0

Ember CLI 7.0 introduces no new public APIs, adds no new deprecations, and adds no new bugfixes. This release simply adds an automatic breakage to the already obsolete public API from the 6.x cycle. This code will be cleaned up in a future release. You can read more about exclusions in the exclusion guide

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 be possible without your continued support. We are extremely grateful for the efforts of our contributors.



<a href

Leave a Comment