From d4d5e41d667b7abefed15c696f31298730dc443f Mon Sep 17 00:00:00 2001 From: Ricardo Mendes Date: Wed, 23 Dec 2020 10:13:55 +0000 Subject: [PATCH 01/11] add post template --- content/ember-3-24-released.md | 106 +++++++++++++++++++++++++++++++++ 1 file changed, 106 insertions(+) create mode 100644 content/ember-3-24-released.md diff --git a/content/ember-3-24-released.md b/content/ember-3-24-released.md new file mode 100644 index 000000000..91388f1a4 --- /dev/null +++ b/content/ember-3-24-released.md @@ -0,0 +1,106 @@ +--- +title: Ember VER Released +author: + - the-crowd # replace with real authors from the author folder (add yourself if you're not there) +date: 2021-XX-XXT00:00:00.000Z +tags: + - releases + - '2021' + - version-3-x +--- + +Today the Ember project is releasing version VER of Ember.js, Ember Data, and Ember CLI. + +This release kicks off the VER+0.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](https://github.com/ember-cli/ember-try) addon is a great way to continuously test your projects against the latest Ember releases. + +You can read more about our general release process here: + +- [Release Dashboard](http://emberjs.com/releases/) +- [The Ember Release Cycle](https://blog.emberjs.com/new-ember-release-process/) +- [The Ember Project](https://blog.emberjs.com/ember-project-at-2-0/) +- [Ember LTS Releases](https://blog.emberjs.com/announcing-embers-first-lts/) + +--- + +## Ember.js + +Ember.js is the core framework for building ambitious web applications. + +### Changes in Ember.js VER + +Ember.js VER is an incremental, backwards compatible release of Ember with bugfixes, performance improvements, and minor deprecations. + +#### Features + +Ember.js VER introduced 2 features. + +1. Feature description +2. Feature description + +#### Deprecations + +Ember.js VER introduced 0 deprecations. + + +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](https://github.com/mixonic/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 VER, please review the [Ember.js VER.0 release page](https://github.com/emberjs/ember.js/releases/tag/vVER.0). + +--- + +## Ember Data + +Ember Data is the official data persistence library for Ember.js applications. + +### Changes in Ember Data VER + +#### Features + +Ember Data VER introduced 0 features. + +#### Deprecations + +Ember Data VER introduced 0 deprecations. + +For more details on changes in Ember Data VER, please review the +[Ember Data VER.0 release page](https://github.com/emberjs/data/releases/tag/vVER.0). + +--- + +## Ember CLI + +Ember CLI is the command line interface for managing and packaging Ember.js applications. + +### Upgrading Ember CLI + + +You may upgrade Ember CLI easily using the ember-cli-update project: + +```bash +npm install -g ember-cli-update +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](https://github.com/ember-cli/ember-cli-update). + +While it is recommended to keep Ember CLI versions in sync with Ember and Ember Data, this is not required. After updating ember-cli, you can keep your current version(s) of Ember or Ember Data by editing `package.json` to revert the changes to the lines containing `ember-source` and `ember-data`. + +### Changes in Ember CLI VER + +#### Features + +Ember CLI VER introduced 0 features. + +#### Deprecations + +Ember CLI VER introduced 0 deprecations. + +For more details on the changes in Ember CLI VER and detailed upgrade +instructions, please review the [Ember CLI VER.0 release page](https://github.com/ember-cli/ember-cli/releases/tag/vVER.0). + +## 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. From c4713d462871a412b8afdc00e5778331e1a1a552 Mon Sep 17 00:00:00 2001 From: ijlee2 Date: Tue, 5 Jan 2021 17:34:32 +0100 Subject: [PATCH 02/11] Updated metadata for Ember 3.24 release blog post --- content/ember-3-24-released.md | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/content/ember-3-24-released.md b/content/ember-3-24-released.md index 91388f1a4..c1ea8bc65 100644 --- a/content/ember-3-24-released.md +++ b/content/ember-3-24-released.md @@ -1,8 +1,9 @@ --- -title: Ember VER Released +title: Ember 3.24 Released author: - - the-crowd # replace with real authors from the author folder (add yourself if you're not there) -date: 2021-XX-XXT00:00:00.000Z + - ricardo-mendes + - isaac-lee +date: 2021-01-07T00:00:00.000Z tags: - releases - '2021' From 6e46ab7450ebeb3ebe9ed06a3e4eb979ca4be594 Mon Sep 17 00:00:00 2001 From: ijlee2 Date: Tue, 5 Jan 2021 17:39:18 +0100 Subject: [PATCH 03/11] Updated the introductory paragraph of Ember 3.24 release blog post --- content/ember-3-24-released.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/content/ember-3-24-released.md b/content/ember-3-24-released.md index c1ea8bc65..a07f325b2 100644 --- a/content/ember-3-24-released.md +++ b/content/ember-3-24-released.md @@ -10,9 +10,9 @@ tags: - version-3-x --- -Today the Ember project is releasing version VER of Ember.js, Ember Data, and Ember CLI. +Today the Ember project is releasing version 3.24 of Ember.js, Ember Data, and Ember CLI. This release of Ember.js is an LTS (Long Term Support) candidate. LTS candidates prioritize stability over the addition of new features, and have an extended support schedule. -This release kicks off the VER+0.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](https://github.com/ember-cli/ember-try) addon is a great way to continuously test your projects against the latest Ember releases. +This release kicks off the 3.25 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](https://github.com/ember-cli/ember-try) addon is a great way to continuously test your projects against the latest Ember releases. You can read more about our general release process here: From 6f7c836df655093b9ff918c37ebfd27e00aec31b Mon Sep 17 00:00:00 2001 From: ijlee2 Date: Tue, 5 Jan 2021 18:48:18 +0100 Subject: [PATCH 04/11] Described bug fixes for ember-source in Ember 3.24 release blog post --- content/ember-3-24-released.md | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/content/ember-3-24-released.md b/content/ember-3-24-released.md index a07f325b2..882cdb66c 100644 --- a/content/ember-3-24-released.md +++ b/content/ember-3-24-released.md @@ -27,9 +27,18 @@ You can read more about our general release process here: Ember.js is the core framework for building ambitious web applications. -### Changes in Ember.js VER +### Changes in Ember.js 3.24 -Ember.js VER is an incremental, backwards compatible release of Ember with bugfixes, performance improvements, and minor deprecations. +Ember.js 3.24 is an incremental, backwards compatible release of Ember with bugfixes, performance improvements, and minor deprecations. + +#### Bug Fixes + +Ember.js 3.24 introduced 4 bug fixes. + +1. When the `router` service is injected (e.g. into a component), the `router` service can automatically work in non-application tests. In other words, we no longer need to call `this.owner.setupRouter()`. ([#19080](https://github.com/emberjs/ember.js/pull/19080)) +2. When there is no template associated with a component class, the low-level API `getComponentTemplate()` now returns `undefined` instead of `null`. The return value of `undefined` is what had been specified in the [Component Templates Colocation RFC](https://github.com/emberjs/rfcs/blob/master/text/0481-component-templates-co-location.md#low-level-primitives). ([#19253](https://github.com/emberjs/ember.js/pull/19253)) +3. In an Ember Engines app, the `` component once again supports [linking within an engine](https://ember-engines.com/docs/links#linking-within-an-engine). Please note, a fix was made possible through a breaking change in the private implementation of ``. When you upgrade your app to v3.24 or above, you will want to upgrade Ember Engines too. You can [track the release status of Ember Engines on GitHub](https://github.com/ember-engines/ember-engines/issues/740). ([#19223](https://github.com/emberjs/ember.js/pull/19223)) ⚠️ +4. When a computed property has a dependent key that includes `@each`, followed by an aliased property, the computed property recomputes when the aliased property's value changes. ([#19280](https://github.com/emberjs/ember.js/pull/19280)) #### Features From 57fd36698e858935ea52436ddfa9aa32e5b96524 Mon Sep 17 00:00:00 2001 From: ijlee2 Date: Tue, 5 Jan 2021 20:27:28 +0100 Subject: [PATCH 05/11] Described features for ember-source in Ember 3.24 release blog post --- content/ember-3-24-released.md | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/content/ember-3-24-released.md b/content/ember-3-24-released.md index 882cdb66c..15cb9b97f 100644 --- a/content/ember-3-24-released.md +++ b/content/ember-3-24-released.md @@ -42,10 +42,11 @@ Ember.js 3.24 introduced 4 bug fixes. #### Features -Ember.js VER introduced 2 features. +Ember.js 3.24 introduced 3 features. -1. Feature description -2. Feature description +1. When `ember-page-title` is installed, the blueprint for a route template creates a `{{page-title}}` helper invocation in addition to `{{outlet}}`. For more information, please see [RFC #645](https://github.com/emberjs/rfcs/blob/master/text/0645-add-ember-page-title-addon.md) and [`ember-page-title` documentation](https://ember-cli.github.io/ember-page-title/). ([#19224](https://github.com/emberjs/ember.js/pull/19224)) +2. The interface of `DeprecationOptions`, which can be passed to the `deprecate()` function, requires the keys `for` and `since` to exist. For more information, please see the [Deprecation Staging RFC](https://github.com/emberjs/rfcs/blob/master/text/0649-deprecation-staging.md#deprecate). ([#19133](https://github.com/emberjs/ember.js/pull/19133)) +3. Glimmer VM, the rendering engine, has been upgraded to version 0.65.0. The upgrade includes a bug fix and a few upstreams. ([#19258](https://github.com/emberjs/ember.js/pull/19258), [#19261](https://github.com/emberjs/ember.js/pull/19261), [#19267](https://github.com/emberjs/ember.js/pull/19267)) #### Deprecations From 369ae1e5f16a7a64a81978301a7c1ede588482e6 Mon Sep 17 00:00:00 2001 From: ijlee2 Date: Tue, 5 Jan 2021 20:55:35 +0100 Subject: [PATCH 06/11] Described deprecations for ember-source in Ember 3.24 release blog post --- content/ember-3-24-released.md | 23 ++++++++++++++++++++--- 1 file changed, 20 insertions(+), 3 deletions(-) diff --git a/content/ember-3-24-released.md b/content/ember-3-24-released.md index 15cb9b97f..efd052112 100644 --- a/content/ember-3-24-released.md +++ b/content/ember-3-24-released.md @@ -50,13 +50,30 @@ Ember.js 3.24 introduced 3 features. #### Deprecations -Ember.js VER introduced 0 deprecations. +Ember.js 3.24 introduced 4 deprecations. + +1. Going back to the interface of `DeprecationOptions` (see Features above), forgetting to pass `for` or `since` will trigger a deprecation message. ([#19133](https://github.com/emberjs/ember.js/pull/19133)) +2. `Ember.String.loc` function, `@ember/string#loc` function, and `{{loc}}` helper have been deprecated in favor of a dedicated localization solution like [ember-intl](https://github.com/ember-intl/ember-intl). For more information, please see the [Deprecations Guide](https://deprecations.emberjs.com/v3.x/#toc_ember-string-loc). ([#19211](https://github.com/emberjs/ember.js/pull/19211)) +3. Calling an [`Ember.String` method](https://api.emberjs.com/ember/3.23/classes/String)—`camelize`, `capitalize`, `classify`, `dasherize`, `decamelize`, `underscore`, or `w`—directly on a string is deprecated. Instead of calling the method on the string, you can import the function from `@ember/string`: + + ```javascript + // 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, please see the [Deprecations Guide](https://deprecations.emberjs.com/v3.x/#toc_ember-string-prototype-extensions). ([#19234](https://github.com/emberjs/ember.js/pull/19234)) +4. Use of `tryInvoke` from `@ember/utils` module has been deprecated in favor of using JavaScript's optional chaining `?.`. For more information, please see the [Deprecations Guide](https://deprecations.emberjs.com/v3.x#toc_ember-utils-try-invoke). - 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](https://github.com/mixonic/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 VER, please review the [Ember.js VER.0 release page](https://github.com/emberjs/ember.js/releases/tag/vVER.0). From 216ccadb1763b42a341911d8e62364f4cc917125 Mon Sep 17 00:00:00 2001 From: ijlee2 Date: Tue, 5 Jan 2021 20:59:15 +0100 Subject: [PATCH 07/11] Added conclusion for ember-source in Ember 3.24 release blog post --- content/ember-3-24-released.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/content/ember-3-24-released.md b/content/ember-3-24-released.md index efd052112..ca1f2a0a8 100644 --- a/content/ember-3-24-released.md +++ b/content/ember-3-24-released.md @@ -75,7 +75,7 @@ Deprecations are added to Ember.js when an API will be removed at a later date. Consider using the [ember-cli-deprecation-workflow](https://github.com/mixonic/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 VER, please review the [Ember.js VER.0 release page](https://github.com/emberjs/ember.js/releases/tag/vVER.0). +Last but not least, Ember.js 3.24 removed a few feature flags and an experimental API called `expandLocalLookup`. For more details on changes in Ember.js 3.24, please review the [Ember.js 3.24.0 release page](https://github.com/emberjs/ember.js/releases/tag/v3.24.0). --- From b9ca445d28335cfc0b0795b712467b2a7351fc54 Mon Sep 17 00:00:00 2001 From: ijlee2 Date: Wed, 6 Jan 2021 20:26:21 +0100 Subject: [PATCH 08/11] Described features and deprecations for ember-data in Ember 3.24 release blog post --- content/ember-3-24-released.md | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/content/ember-3-24-released.md b/content/ember-3-24-released.md index ca1f2a0a8..c894424dc 100644 --- a/content/ember-3-24-released.md +++ b/content/ember-3-24-released.md @@ -83,18 +83,18 @@ Last but not least, Ember.js 3.24 removed a few feature flags and an experimenta Ember Data is the official data persistence library for Ember.js applications. -### Changes in Ember Data VER +### Changes in Ember Data 3.24 #### Features -Ember Data VER introduced 0 features. +Ember Data 3.24 introduced 0 features. #### Deprecations -Ember Data VER introduced 0 deprecations. +Ember Data 3.24 introduced 0 deprecations. -For more details on changes in Ember Data VER, please review the -[Ember Data VER.0 release page](https://github.com/emberjs/data/releases/tag/vVER.0). +For more details on changes in Ember Data 3.24, please review the +[Ember Data 3.24.0 release page](https://github.com/emberjs/data/releases/tag/v3.24.0). --- From 0736a3588e8f8d9d4fd571c69d445bfcefaf3d24 Mon Sep 17 00:00:00 2001 From: ijlee2 Date: Wed, 6 Jan 2021 20:37:25 +0100 Subject: [PATCH 09/11] Described bug fixes for ember-data in Ember 3.24 release blog post --- content/ember-3-24-released.md | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/content/ember-3-24-released.md b/content/ember-3-24-released.md index c894424dc..4efe6f1f3 100644 --- a/content/ember-3-24-released.md +++ b/content/ember-3-24-released.md @@ -85,6 +85,12 @@ Ember Data is the official data persistence library for Ember.js applications. ### Changes in Ember Data 3.24 +#### Bug Fixes + +Ember Data 3.24 introduced 1 bug fix. + +1. In a production environment, an attempt to set something on a deleted record no longer shows the value in the error message. This was done to prevent leaking sensitive data. ([#7370](https://github.com/emberjs/data/pull/7370)) + #### Features Ember Data 3.24 introduced 0 features. From a8b0023f9d809b647eca3d2aad31f0236391f30b Mon Sep 17 00:00:00 2001 From: ijlee2 Date: Wed, 6 Jan 2021 21:29:51 +0100 Subject: [PATCH 10/11] Described bug fixes, features, and deprecations for Ember CLI in Ember 3.24 release blog post --- content/ember-3-24-released.md | 24 +++++++++++++++++------- 1 file changed, 17 insertions(+), 7 deletions(-) diff --git a/content/ember-3-24-released.md b/content/ember-3-24-released.md index 4efe6f1f3..a4c0f5d06 100644 --- a/content/ember-3-24-released.md +++ b/content/ember-3-24-released.md @@ -110,8 +110,7 @@ Ember CLI is the command line interface for managing and packaging Ember.js appl ### Upgrading Ember CLI - -You may upgrade Ember CLI easily using the ember-cli-update project: +You may upgrade Ember CLI using the `ember-cli-update` project: ```bash npm install -g ember-cli-update @@ -122,18 +121,29 @@ This utility will help you to update your app or addon to the latest Ember CLI v While it is recommended to keep Ember CLI versions in sync with Ember and Ember Data, this is not required. After updating ember-cli, you can keep your current version(s) of Ember or Ember Data by editing `package.json` to revert the changes to the lines containing `ember-source` and `ember-data`. -### Changes in Ember CLI VER +### Changes in Ember CLI 3.24 + +#### Bug Fixes + +Ember CLI 3.24 introduced 1 bug fix. + +1. When Embroider v2 addons are present, prevent forming a cycle in the build process. ([#9402](https://github.com/ember-cli/ember-cli/pull/9402)) #### Features -Ember CLI VER introduced 0 features. +Ember CLI 3.24 upgraded the packages that are present in the `package.json` blueprint to their latest version. There are 4 notable changes to the `package.json` blueprint: + +1. `ember-page-title` has been added to the blueprint. For more information, please see [RFC #645](https://github.com/emberjs/rfcs/blob/master/text/0645-add-ember-page-title-addon.md) and [`ember-page-title` documentation](https://ember-cli.github.io/ember-page-title/). ([#9372](https://github.com/ember-cli/ember-cli/pull/9372), [#9382](https://github.com/ember-cli/ember-cli/pull/9382)) +2. `ember-qunit` has been upgraded to [v5](https://github.com/emberjs/ember-qunit/releases/tag/v5.0.0) (a major version change). Following the [migration guide](https://github.com/emberjs/ember-qunit/blob/master/docs/migration.md), the `package.json` blueprint includes `@ember/test-helpers` and `qunit`. The blueprints for `tests/index.html` and `tests/test-helper.js` have been updated as well. ([#9340](https://github.com/ember-cli/ember-cli/pull/9340), [#9371](https://github.com/ember-cli/ember-cli/pull/9371)) +3. `eslint-plugin-ember` has been upgraded to [v10](https://github.com/ember-cli/eslint-plugin-ember/releases/tag/v10.0.0) (a major version change), which promoted `octane` rules to `recommended` and enabled several additional rules as `recommended`. To learn more about these linting rules, please check the [`eslint-plugin-ember` documentation](https://github.com/ember-cli/eslint-plugin-ember/tree/v10.0.0#-rules). ([#9403](https://github.com/ember-cli/ember-cli/pull/9403)) +4. `prettier` (along with `eslint-config-prettier` and `eslint-plugin-prettier`) has been added to the blueprint. To learn more, please see [RFC #628](https://github.com/emberjs/rfcs/blob/master/text/0628-prettier.md) and [Prettier documentation](https://prettier.io/docs/en/index.html). ([#9391](https://github.com/ember-cli/ember-cli/pull/9391), [#9407](https://github.com/ember-cli/ember-cli/pull/9407), [#9410](https://github.com/ember-cli/ember-cli/pull/9410)) #### Deprecations -Ember CLI VER introduced 0 deprecations. +Ember CLI 3.24 introduced 0 deprecations. -For more details on the changes in Ember CLI VER and detailed upgrade -instructions, please review the [Ember CLI VER.0 release page](https://github.com/ember-cli/ember-cli/releases/tag/vVER.0). +For more details on the changes in Ember CLI 3.24 and detailed upgrade +instructions, please review the [Ember CLI 3.24.0 release page](https://github.com/ember-cli/ember-cli/releases/tag/v3.24.0). ## Thank You! From 974fbe69f3137cbfd2345c2a3f6c3fb294cb1065 Mon Sep 17 00:00:00 2001 From: ijlee2 Date: Wed, 6 Jan 2021 21:59:47 +0100 Subject: [PATCH 11/11] Updated prose. Added code example for refactoring tryInvoke. --- content/ember-3-24-released.md | 38 +++++++++++++++++++++++++++++++--- 1 file changed, 35 insertions(+), 3 deletions(-) diff --git a/content/ember-3-24-released.md b/content/ember-3-24-released.md index a4c0f5d06..f88fa4345 100644 --- a/content/ember-3-24-released.md +++ b/content/ember-3-24-released.md @@ -29,7 +29,7 @@ Ember.js is the core framework for building ambitious web applications. ### Changes in Ember.js 3.24 -Ember.js 3.24 is an incremental, backwards compatible release of Ember with bugfixes, performance improvements, and minor deprecations. +Ember.js 3.24 is an incremental, backwards compatible release of Ember with bug fixes, performance improvements, and minor deprecations. #### Bug Fixes @@ -54,22 +54,54 @@ Ember.js 3.24 introduced 4 deprecations. 1. Going back to the interface of `DeprecationOptions` (see Features above), forgetting to pass `for` or `since` will trigger a deprecation message. ([#19133](https://github.com/emberjs/ember.js/pull/19133)) 2. `Ember.String.loc` function, `@ember/string#loc` function, and `{{loc}}` helper have been deprecated in favor of a dedicated localization solution like [ember-intl](https://github.com/ember-intl/ember-intl). For more information, please see the [Deprecations Guide](https://deprecations.emberjs.com/v3.x/#toc_ember-string-loc). ([#19211](https://github.com/emberjs/ember.js/pull/19211)) -3. Calling an [`Ember.String` method](https://api.emberjs.com/ember/3.23/classes/String)—`camelize`, `capitalize`, `classify`, `dasherize`, `decamelize`, `underscore`, or `w`—directly on a string is deprecated. Instead of calling the method on the string, you can import the function from `@ember/string`: +3. Calling `camelize`, `capitalize`, `classify`, `dasherize`, `decamelize`, `underscore`, or `w`—these are [`Ember.String` methods](https://api.emberjs.com/ember/3.23/classes/String)—on a string is deprecated. Instead of calling the method on the string, you can import the function from `@ember/string`: ```javascript // 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, please see the [Deprecations Guide](https://deprecations.emberjs.com/v3.x/#toc_ember-string-prototype-extensions). ([#19234](https://github.com/emberjs/ember.js/pull/19234)) -4. Use of `tryInvoke` from `@ember/utils` module has been deprecated in favor of using JavaScript's optional chaining `?.`. For more information, please see the [Deprecations Guide](https://deprecations.emberjs.com/v3.x#toc_ember-utils-try-invoke). +4. `tryInvoke` from `@ember/utils` module has been deprecated in favor of JavaScript's optional chaining `?.`. + + ```javascript + // 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, please see the [Deprecations Guide](https://deprecations.emberjs.com/v3.x#toc_ember-utils-try-invoke). 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.