From c7e7525c0ed519e331060494f8d4a17171f81547 Mon Sep 17 00:00:00 2001 From: Kenneth Larsen Date: Mon, 27 May 2019 08:41:07 +0200 Subject: [PATCH 01/16] Add initial blog post --- source/2019-06-16-ember-3-11-released.md | 94 ++++++++++++++++++++++++ 1 file changed, 94 insertions(+) create mode 100644 source/2019-06-16-ember-3-11-released.md diff --git a/source/2019-06-16-ember-3-11-released.md b/source/2019-06-16-ember-3-11-released.md new file mode 100644 index 000000000..bc8f518d2 --- /dev/null +++ b/source/2019-06-16-ember-3-11-released.md @@ -0,0 +1,94 @@ +--- +title: Ember 3.11 Released +author: Kenneth Larsen +tags: Releases, 2019, 3, 3.11 +responsive: true +--- + +Today the Ember project is releasing version 3.11 of Ember.js, Ember Data, and Ember CLI. This release kicks off the 3.5 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/builds/) +- [The Ember Release Cycle](http://emberjs.com/blog/2013/09/06/new-ember-release-process.html) +- [The Ember Project](http://emberjs.com/blog/2015/06/16/ember-project-at-2-0.html) +- [Ember LTS Releases](http://emberjs.com/blog/2016/02/25/announcing-embers-first-lts.html) + +--- + +## Ember.js + +Ember.js is the core framework for building ambitious web applications. + +### Changes in Ember.js 3.11 +Ember.js 3.11 is an incremental, backwards compatible release of Ember with bugfixes, performance improvements, and minor deprecations. There is COUNT (#) new feature, COUNT (#) deprecations, and COUNT (#) bugfixes in this version. + +#### New Features (2) + +First new feature (1 of 2) + +Second new feature (2 of 2) + + +#### Deprecations (0) + +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 3.11, please review the [Ember.js 3.11.0 release page](https://github.com/emberjs/ember.js/releases/tag/v3.11.0). + +--- + +## Ember Data + +Ember Data is the official data persistence library for Ember.js applications. + +### Changes in Ember Data 3.11 + +#### New Features (0) + +No new features introduced in Ember Data 3.11. + +#### Deprecations (0) + +No new deprecations introduced in Ember Data 3.11. + + +For more details on changes in Ember Data 3.11, please review the +[Ember Data 3.11.0 release page](https://github.com/emberjs/data/releases/tag/v3.11.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 add-on 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 3.11 + +#### New Features (X) + + +#### Deprecations (X) + +--- + +For more details on the changes in Ember CLI 3.11 and detailed upgrade +instructions, please review the [Ember CLI 3.11.0 release page](https://github.com/ember-cli/ember-cli/releases/tag/v3.11.0). + +## Thank You! + +As a community-driven open-source project with an ambitious scope, each of these releases serve 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 b369fb1ee513cf5a494763a407b6e904241cf189 Mon Sep 17 00:00:00 2001 From: Kenneth Larsen Date: Mon, 27 May 2019 08:42:28 +0200 Subject: [PATCH 02/16] Update 2019-06-16-ember-3-11-released.md --- source/2019-06-16-ember-3-11-released.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/2019-06-16-ember-3-11-released.md b/source/2019-06-16-ember-3-11-released.md index bc8f518d2..801f85f63 100644 --- a/source/2019-06-16-ember-3-11-released.md +++ b/source/2019-06-16-ember-3-11-released.md @@ -5,7 +5,7 @@ tags: Releases, 2019, 3, 3.11 responsive: true --- -Today the Ember project is releasing version 3.11 of Ember.js, Ember Data, and Ember CLI. This release kicks off the 3.5 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. +Today the Ember project is releasing version 3.11 of Ember.js, Ember Data, and Ember CLI. This release kicks off the 3.12 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 2a26eedef2adc0402226431fd4de96cc562e3740 Mon Sep 17 00:00:00 2001 From: Kenneth Larsen Date: Fri, 28 Jun 2019 08:01:18 +0200 Subject: [PATCH 03/16] Wrote blog post --- source/2019-06-16-ember-3-11-released.md | 105 ++++++++++++++++++++++- 1 file changed, 101 insertions(+), 4 deletions(-) diff --git a/source/2019-06-16-ember-3-11-released.md b/source/2019-06-16-ember-3-11-released.md index bc8f518d2..ac1166a8f 100644 --- a/source/2019-06-16-ember-3-11-released.md +++ b/source/2019-06-16-ember-3-11-released.md @@ -23,14 +23,103 @@ Ember.js is the core framework for building ambitious web applications. ### Changes in Ember.js 3.11 Ember.js 3.11 is an incremental, backwards compatible release of Ember with bugfixes, performance improvements, and minor deprecations. There is COUNT (#) new feature, COUNT (#) deprecations, and COUNT (#) bugfixes in this version. -#### New Features (2) +#### New Features (4) -First new feature (1 of 2) +Forwarding Element Modifiers with "Splattributes" (1 of 4) -Second new feature (2 of 2) +Angle bracket component invocation was introduced in Ember.js 3.7. Aside from the syntatic differences, the angle bracket invocation syntax enabled passing HTML attributes to components, which can then be applied the underlying HTML element(s) in the component's layout using the ...attributes "splattributes" syntax. +For example, given the following invocation: -#### Deprecations (0) +```hbs + +``` + +...and the following layout for the `FooBar` component: + + +```hbs +
foo bar!
+``` + +Ember will render the following HTML content: + +```html +
foo bar!
+ +The {{fn}} helper (2 of 4) + +This new helper aims to remove some of the complexity of the current `action` helper. Some of these complex behaviors are: + +1. Argument partial application (currying) +2. `this` context binding +3. `send` checks for Component and Controllers + +The `fn` helper will take in a function and then the set of arguments that will be partially applied to the function. + +Here's a simple case on argument curry: + +```hbs +{{fn this.log 1}} +``` + +```js +return function() { + this.log.call(this, 1); +} +``` + +To see even more examples please refer to [the RFC](https://github.com/emberjs/rfcs/blob/master/text/0470-fn-helper.md#detailed-design). + + +The {{on}} modifier (3 of 4) + +Currently, there are two ways to bind event listeners to elements in Ember templates with built-in, official Ember APIs: + + - Use the `{{action}}` element modifier + - Use the `on*=` property bindings + +Both of these solutions are problematic for a number of reasons. + +The `{{on}}` modifier will recieve: + + - The event name as a string as the first positional parameter + - The event listener function as the second positional parameter + Named parameters as options + +The following usages are equivalent: + +```hbs +
+```` + +```js +element.addEventListener('click', this.handleClick, { passive: true }); +``` + +For more examlpes please refer to [the RFC](https://github.com/emberjs/rfcs/blob/master/text/0471-on-modifier.md#detailed-design). + +Inject Parameter Normalization (4 of 4) + +Inject Parameter Normalization normalizes this contract for all Ember base classes - that is, framework classes that are provided by Ember: + + - `GlimmerComponent` + - `EmberComponent` + - `Service` + - `Route` + - `Controller` + - `Helper` + +Along with framework clases provided by Ember Data: + + - `Model` + - `Adapter` + - `Serializer` + - `Transform` + +For more info please refer to [the RFC](https://github.com/emberjs/rfcs/blob/master/text/0451-injection-parameter-normalization.md). + +#### Deprecations (1) 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. @@ -38,6 +127,14 @@ Consider using the [ember-cli-deprecation-workflow](https://github.com/mixonic/e For more details on changes in Ember.js 3.11, please review the [Ember.js 3.11.0 release page](https://github.com/emberjs/ember.js/releases/tag/v3.11.0). + +Deprecate Function.prototype.observes (1 of 1) + +Historically, Ember has extended the `Function.prototype` with a few functions (`on`, `observes`, `property`), over time we have moved away from using these prototype extended functions in favor of using the official ES modules based API. + +Please refer to [the deprecation guides](https://deprecations.emberjs.com/v3.x/#toc_function-prototype-extensions-observes) for information on how to migrate away from `Function.prototype`. + + --- ## Ember Data From debfb9f9248375d066cd8f69b7310b838e65db12 Mon Sep 17 00:00:00 2001 From: Kenneth Larsen Date: Fri, 28 Jun 2019 08:04:54 +0200 Subject: [PATCH 04/16] Update --- source/2019-06-16-ember-3-11-released.md | 18 ++---------------- 1 file changed, 2 insertions(+), 16 deletions(-) diff --git a/source/2019-06-16-ember-3-11-released.md b/source/2019-06-16-ember-3-11-released.md index 1d7bc404a..dcfe4c367 100644 --- a/source/2019-06-16-ember-3-11-released.md +++ b/source/2019-06-16-ember-3-11-released.md @@ -29,23 +29,9 @@ Forwarding Element Modifiers with "Splattributes" (1 of 4) Angle bracket component invocation was introduced in Ember.js 3.7. Aside from the syntatic differences, the angle bracket invocation syntax enabled passing HTML attributes to components, which can then be applied the underlying HTML element(s) in the component's layout using the ...attributes "splattributes" syntax. -For example, given the following invocation: +This features clarifies how the "splattributes" feature interact with element modifiers. -```hbs - -``` - -...and the following layout for the `FooBar` component: - - -```hbs -
foo bar!
-``` - -Ember will render the following HTML content: - -```html -
foo bar!
+For more information please refer to [the RFC](https://github.com/emberjs/rfcs/blob/master/text/0435-modifier-splattributes.md). The {{fn}} helper (2 of 4) From 3048150ccbb6946f6c8c18779360040c0d7820d9 Mon Sep 17 00:00:00 2001 From: Kenneth Larsen Date: Fri, 28 Jun 2019 11:02:41 +0200 Subject: [PATCH 05/16] Update 2019-06-16-ember-3-11-released.md --- source/2019-06-16-ember-3-11-released.md | 87 +++++++++++++++--------- 1 file changed, 54 insertions(+), 33 deletions(-) diff --git a/source/2019-06-16-ember-3-11-released.md b/source/2019-06-16-ember-3-11-released.md index dcfe4c367..fc68cfe05 100644 --- a/source/2019-06-16-ember-3-11-released.md +++ b/source/2019-06-16-ember-3-11-released.md @@ -25,7 +25,7 @@ Ember.js 3.11 is an incremental, backwards compatible release of Ember with bugf #### New Features (4) -Forwarding Element Modifiers with "Splattributes" (1 of 4) +**Forwarding Element Modifiers with "Splattributes" (1 of 4)** Angle bracket component invocation was introduced in Ember.js 3.7. Aside from the syntatic differences, the angle bracket invocation syntax enabled passing HTML attributes to components, which can then be applied the underlying HTML element(s) in the component's layout using the ...attributes "splattributes" syntax. @@ -33,59 +33,80 @@ This features clarifies how the "splattributes" feature interact with element mo For more information please refer to [the RFC](https://github.com/emberjs/rfcs/blob/master/text/0435-modifier-splattributes.md). -The {{fn}} helper (2 of 4) +**The {{fn}} helper (2 of 4)** -This new helper aims to remove some of the complexity of the current `action` helper. Some of these complex behaviors are: +The `{{fn}}` helper provides a way to pass arguments to actions, particularly with native classes and the `@action` decorator. -1. Argument partial application (currying) -2. `this` context binding -3. `send` checks for Component and Controllers - -The `fn` helper will take in a function and then the set of arguments that will be partially applied to the function. - -Here's a simple case on argument curry: - -```hbs -{{fn this.log 1}} -``` +With the `@action` decorator, it is very straightforward to pass actions to other components ("data-down, actions-up"): ```js -return function() { - this.log.call(this, 1); +import Component from "@ember/component"; + +class CounterComponent extends Component { + count = 0; + + @action + countUp(increment = 1) { + this.incrementProperty("count", increment); + } } ``` + +```hbs +Current count: {{this.count}} -To see even more examples please refer to [the RFC](https://github.com/emberjs/rfcs/blob/master/text/0470-fn-helper.md#detailed-design). +Add One +``` +The `@action` decorator ensures that the `this` value in the `countUp` action will always be the component instance, which allows it to be freely passed to other components. Where this falls short is when we need to pass arguments to these actions. -The {{on}} modifier (3 of 4) +The `{{fn}}` helper provides a way to pass arguments into actions and "bundle" them up, so that they can be passed around to other components and still retain the provided arguments when called: -Currently, there are two ways to bind event listeners to elements in Ember templates with built-in, official Ember APIs: +```hbs +Current count: {{this.count}} - - Use the `{{action}}` element modifier - - Use the `on*=` property bindings +{{!-- when not passing arguments, these are equivalent --}} +Add One +Add One -Both of these solutions are problematic for a number of reasons. +{{!-- calls this.countUp(10) when clicked --}} +Add Ten +``` -The `{{on}}` modifier will recieve: +In addition to the basic use case shown here, the `{{fn}}` helper supports other advanced use cases, such as adding more arguments to an existing function. - - The event name as a string as the first positional parameter - - The event listener function as the second positional parameter - Named parameters as options +It should also be noted that the `{{action}}` helper can previously be used to accomplish similar functionalities, but due to some historical decisions, it may produce surprising results in some cases. Therefore, Ember users are encouraged to migrate to the `{{fn}}` helper along with the `@action` decorator where possible and appropriate. Refer to [the RFC](https://github.com/emberjs/rfcs/blob/master/text/0470-fn-helper.md#detailed-design) for more details and examples. -The following usages are equivalent: -```hbs -
-```` +**The {{on}} modifier (3 of 4)** + +The `{{on}}` modifier provides a straightforward way to listen to DOM events on arbitrary elements. ```js -element.addEventListener('click', this.handleClick, { passive: true }); +import Component from "@ember/component"; + +class CounterComponent extends Component { + count = 0; + + @action + countUp() { + this.incrementProperty("count"); + } +} +``` +```hbs +Current count: {{this.count}} + + ``` + +The `{{on}}` modifier in this example attaches a passive "click" event listener on the button, such that when the button is clicked, the `countUp` action will be called. Again, the `@action` decorator ensures the `countUp` action will have the right `this` value at runtime. -For more examlpes please refer to [the RFC](https://github.com/emberjs/rfcs/blob/master/text/0471-on-modifier.md#detailed-design). +By default, the action passed to the `{{on}}` modifier will receive the DOM event as an argument. The `fn` helper can be used in conjunction with the `{{on}}` modifier to alter this behavior. Along with the "Splattributes" feature mentioned above, the `{{on}}` modifier can also be applied to component elements as well. + +Finally, it should be noted that the `{{action}}` modifier, and in some case, DOM properties like `onclick=` can previously be used to accomplish similar functionalities. However, both of these approaches have their own drawbacks. Therefore, Ember users are encouraged to migrate to the `{{on}}` modifier along with the `@action` decorator where possible and appropriate. See [the RFC](https://github.com/emberjs/rfcs/blob/master/text/0471-on-modifier.md) for more details and examples. -Inject Parameter Normalization (4 of 4) +**Inject Parameter Normalization (4 of 4)** Inject Parameter Normalization normalizes this contract for all Ember base classes - that is, framework classes that are provided by Ember: From 49dea78ec269bec99a24cf0224fd76e3d040e964 Mon Sep 17 00:00:00 2001 From: Kenneth Larsen Date: Fri, 28 Jun 2019 12:31:04 +0200 Subject: [PATCH 06/16] Update 2019-06-16-ember-3-11-released.md --- source/2019-06-16-ember-3-11-released.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/source/2019-06-16-ember-3-11-released.md b/source/2019-06-16-ember-3-11-released.md index fc68cfe05..ea7a57302 100644 --- a/source/2019-06-16-ember-3-11-released.md +++ b/source/2019-06-16-ember-3-11-released.md @@ -41,7 +41,8 @@ With the `@action` decorator, it is very straightforward to pass actions to othe ```js import Component from "@ember/component"; - +import { action } from '@ember/object'; + class CounterComponent extends Component { count = 0; @@ -84,6 +85,7 @@ The `{{on}}` modifier provides a straightforward way to listen to DOM events on ```js import Component from "@ember/component"; +import { action } from '@ember/object'; class CounterComponent extends Component { count = 0; From ff45290249e3bcf2520290a8061cdeaba2bf1f09 Mon Sep 17 00:00:00 2001 From: Kenneth Larsen Date: Fri, 28 Jun 2019 14:45:36 +0200 Subject: [PATCH 07/16] Apply suggestions from code review Co-Authored-By: Ricardo Mendes --- source/2019-06-16-ember-3-11-released.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/source/2019-06-16-ember-3-11-released.md b/source/2019-06-16-ember-3-11-released.md index ea7a57302..a036a56b9 100644 --- a/source/2019-06-16-ember-3-11-released.md +++ b/source/2019-06-16-ember-3-11-released.md @@ -25,15 +25,15 @@ Ember.js 3.11 is an incremental, backwards compatible release of Ember with bugf #### New Features (4) -**Forwarding Element Modifiers with "Splattributes" (1 of 4)** +**Forwarding Element Modifiers with `...attributes` (1 of 4)** -Angle bracket component invocation was introduced in Ember.js 3.7. Aside from the syntatic differences, the angle bracket invocation syntax enabled passing HTML attributes to components, which can then be applied the underlying HTML element(s) in the component's layout using the ...attributes "splattributes" syntax. +Angle bracket component invocation was introduced in Ember.js 3.7. Aside from the syntatic differences, the angle bracket invocation syntax enabled passing HTML attributes to components, which can then be applied the underlying HTML element(s) in the component's layout using the `...attributes` syntax. This is also known informally as the "splattributes" feature. This features clarifies how the "splattributes" feature interact with element modifiers. For more information please refer to [the RFC](https://github.com/emberjs/rfcs/blob/master/text/0435-modifier-splattributes.md). -**The {{fn}} helper (2 of 4)** +**The `{{fn}}` helper (2 of 4)** The `{{fn}}` helper provides a way to pass arguments to actions, particularly with native classes and the `@action` decorator. @@ -79,7 +79,7 @@ In addition to the basic use case shown here, the `{{fn}}` helper supports other It should also be noted that the `{{action}}` helper can previously be used to accomplish similar functionalities, but due to some historical decisions, it may produce surprising results in some cases. Therefore, Ember users are encouraged to migrate to the `{{fn}}` helper along with the `@action` decorator where possible and appropriate. Refer to [the RFC](https://github.com/emberjs/rfcs/blob/master/text/0470-fn-helper.md#detailed-design) for more details and examples. -**The {{on}} modifier (3 of 4)** +**The `{{on}}` modifier (3 of 4)** The `{{on}}` modifier provides a straightforward way to listen to DOM events on arbitrary elements. From c9a2c02d5aaf521de8157f537ba86b48711bc5cc Mon Sep 17 00:00:00 2001 From: Kenneth Larsen Date: Sat, 29 Jun 2019 10:51:55 +0200 Subject: [PATCH 08/16] Update source/2019-06-16-ember-3-11-released.md Co-Authored-By: Godfrey Chan --- source/2019-06-16-ember-3-11-released.md | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/source/2019-06-16-ember-3-11-released.md b/source/2019-06-16-ember-3-11-released.md index a036a56b9..1343e64c8 100644 --- a/source/2019-06-16-ember-3-11-released.md +++ b/source/2019-06-16-ember-3-11-released.md @@ -76,6 +76,19 @@ Current count: {{this.count}} In addition to the basic use case shown here, the `{{fn}}` helper supports other advanced use cases, such as adding more arguments to an existing function. +```hbs +{{#let (fn this.log "hello") as |hello|}} + {{!-- calls this.log("hello", "world") --}} + + Hello World + + + {{!-- calls this.log("hello", "Tomster", "Zoey") --}} + + Hello Tomster and Zoey + +{{/let}} + It should also be noted that the `{{action}}` helper can previously be used to accomplish similar functionalities, but due to some historical decisions, it may produce surprising results in some cases. Therefore, Ember users are encouraged to migrate to the `{{fn}}` helper along with the `@action` decorator where possible and appropriate. Refer to [the RFC](https://github.com/emberjs/rfcs/blob/master/text/0470-fn-helper.md#detailed-design) for more details and examples. From c863997fcd144c2b228332558bf30fe1f6ac47a7 Mon Sep 17 00:00:00 2001 From: Kenneth Larsen Date: Thu, 4 Jul 2019 10:15:44 +0200 Subject: [PATCH 09/16] Add Data section --- source/2019-06-16-ember-3-11-released.md | 40 ++++++++++++++++++++++-- 1 file changed, 37 insertions(+), 3 deletions(-) diff --git a/source/2019-06-16-ember-3-11-released.md b/source/2019-06-16-ember-3-11-released.md index 1343e64c8..e72216378 100644 --- a/source/2019-06-16-ember-3-11-released.md +++ b/source/2019-06-16-ember-3-11-released.md @@ -21,7 +21,7 @@ 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 3.11 -Ember.js 3.11 is an incremental, backwards compatible release of Ember with bugfixes, performance improvements, and minor deprecations. There is COUNT (#) new feature, COUNT (#) deprecations, and COUNT (#) bugfixes in this version. +Ember.js 3.11 is an incremental, backwards compatible release of Ember with bugfixes, performance improvements, and minor deprecations. There is four (4) new feature, one (1) deprecations, and several bugfixes in this version. #### New Features (4) @@ -163,11 +163,45 @@ Please refer to [the deprecation guides](https://deprecations.emberjs.com/v3.x/# Ember Data is the official data persistence library for Ember.js applications. +**Important note about Ember Data 3.11** + +There is a known bug in 3.11.0 which means `ember generate model something` doesn't work. We are currently working a patch for this. + ### Changes in Ember Data 3.11 -#### New Features (0) +#### New Features (1) + +**Packages feature (1 of 1)** + +In addition to several bug fixes and small documentation fixes, this release is the first release that ships ember-data as a collection of smaller packages. [Over time, some of these packages will become optional](https://github.com/emberjs/data/issues/6166). + +The packages feature also introduces a new import syntax. + +Previously: + +```js +import Model from 'ember-data/model'; +import attr from 'ember-data/attr'; +import { belongsTo, hasMany } from 'ember-data/relationships'; +``` + +or: + +```js +import DS from 'ember-data'; + +const { Model, attr, belongsTo, hasMany } = DS; +``` + +Can now be achieved like this: + +```js +import Model, { attr, belongsTo, hasMay } from '@ember-data/model'; +``` + +With the landing of this feature, the previous import styles will become deprecated in an upcoming release. Lint rules and a codemod will be available before that time to ensure a seamless transition to the new syntax. -No new features introduced in Ember Data 3.11. +You can read more about the new package syntax [in the RFC](https://emberjs.github.io/rfcs/0395-ember-data-packages.html) #### Deprecations (0) From d676d8dc024c2350599e7dcc94fe16f67dcd8e1e Mon Sep 17 00:00:00 2001 From: Kenneth Larsen Date: Thu, 4 Jul 2019 10:18:13 +0200 Subject: [PATCH 10/16] Fixed date --- ...6-ember-3-11-released.md => 2019-07-05-ember-3-11-released.md} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename source/{2019-06-16-ember-3-11-released.md => 2019-07-05-ember-3-11-released.md} (100%) diff --git a/source/2019-06-16-ember-3-11-released.md b/source/2019-07-05-ember-3-11-released.md similarity index 100% rename from source/2019-06-16-ember-3-11-released.md rename to source/2019-07-05-ember-3-11-released.md From 0f5174c47c986d9a3a5091fb16f0bc7f82023ae4 Mon Sep 17 00:00:00 2001 From: Sergey Astapov Date: Fri, 5 Jul 2019 17:02:58 -0400 Subject: [PATCH 11/16] Fix couple typos --- source/2019-07-05-ember-3-11-released.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/2019-07-05-ember-3-11-released.md b/source/2019-07-05-ember-3-11-released.md index e72216378..d71af6a4f 100644 --- a/source/2019-07-05-ember-3-11-released.md +++ b/source/2019-07-05-ember-3-11-released.md @@ -21,7 +21,7 @@ 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 3.11 -Ember.js 3.11 is an incremental, backwards compatible release of Ember with bugfixes, performance improvements, and minor deprecations. There is four (4) new feature, one (1) deprecations, and several bugfixes in this version. +Ember.js 3.11 is an incremental, backwards compatible release of Ember with bugfixes, performance improvements, and minor deprecations. There are four (4) new features, one (1) deprecation, and several bugfixes in this version. #### New Features (4) From 7b255ec9075aef5625f7ff8d341f2fa53f6deae4 Mon Sep 17 00:00:00 2001 From: ijlee2 Date: Tue, 9 Jul 2019 07:57:05 -0500 Subject: [PATCH 12/16] Fixed typo and styling --- source/2019-07-05-ember-3-11-released.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/source/2019-07-05-ember-3-11-released.md b/source/2019-07-05-ember-3-11-released.md index d71af6a4f..2f6d7421c 100644 --- a/source/2019-07-05-ember-3-11-released.md +++ b/source/2019-07-05-ember-3-11-released.md @@ -150,7 +150,7 @@ Consider using the [ember-cli-deprecation-workflow](https://github.com/mixonic/e For more details on changes in Ember.js 3.11, please review the [Ember.js 3.11.0 release page](https://github.com/emberjs/ember.js/releases/tag/v3.11.0). -Deprecate Function.prototype.observes (1 of 1) +**Deprecate Function.prototype.observes (1 of 1)** Historically, Ember has extended the `Function.prototype` with a few functions (`on`, `observes`, `property`), over time we have moved away from using these prototype extended functions in favor of using the official ES modules based API. @@ -196,7 +196,7 @@ const { Model, attr, belongsTo, hasMany } = DS; Can now be achieved like this: ```js -import Model, { attr, belongsTo, hasMay } from '@ember-data/model'; +import Model, { attr, belongsTo, hasMany } from '@ember-data/model'; ``` With the landing of this feature, the previous import styles will become deprecated in an upcoming release. Lint rules and a codemod will be available before that time to ensure a seamless transition to the new syntax. @@ -240,7 +240,7 @@ While it is recommended to keep Ember CLI versions in sync with Ember and Ember --- For more details on the changes in Ember CLI 3.11 and detailed upgrade -instructions, please review the [Ember CLI 3.11.0 release page](https://github.com/ember-cli/ember-cli/releases/tag/v3.11.0). +instructions, please review the [Ember CLI 3.11.0 release page](https://github.com/ember-cli/ember-cli/releases/tag/v3.11.0). ## Thank You! From 980350df961cf2d2545708b978b708feddca8a13 Mon Sep 17 00:00:00 2001 From: Kenneth Larsen Date: Mon, 15 Jul 2019 22:04:05 +0200 Subject: [PATCH 13/16] Add CLI --- source/2019-07-05-ember-3-11-released.md | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/source/2019-07-05-ember-3-11-released.md b/source/2019-07-05-ember-3-11-released.md index 2f6d7421c..6e6f74963 100644 --- a/source/2019-07-05-ember-3-11-released.md +++ b/source/2019-07-05-ember-3-11-released.md @@ -165,7 +165,7 @@ Ember Data is the official data persistence library for Ember.js applications. **Important note about Ember Data 3.11** -There is a known bug in 3.11.0 which means `ember generate model something` doesn't work. We are currently working a patch for this. +There is a **known bug in 3.11.0** which means `ember generate model something` doesn't work. We are currently working a patch for this. ### Changes in Ember Data 3.11 @@ -232,10 +232,15 @@ While it is recommended to keep Ember CLI versions in sync with Ember and Ember ### Changes in Ember CLI 3.11 -#### New Features (X) +Ember CLI 3.11 contains several bug fixes. Have a look at the [complete changelog](https://github.com/ember-cli/ember-cli/releases/tag/v3.11.0)for an overview. +#### New Features (0) -#### Deprecations (X) +No new features in Ember CLI 3.11. + +#### Deprecations (0) + +No new deprecations in Ember CLI 3.11. --- From 74a8d04f478f052640d3eb1b8ba77ae261491948 Mon Sep 17 00:00:00 2001 From: Kenneth Larsen Date: Mon, 15 Jul 2019 22:04:28 +0200 Subject: [PATCH 14/16] Rename 2019-07-05-ember-3-11-released.md to 2019-07-15-ember-3-11-released.md --- ...5-ember-3-11-released.md => 2019-07-15-ember-3-11-released.md} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename source/{2019-07-05-ember-3-11-released.md => 2019-07-15-ember-3-11-released.md} (100%) diff --git a/source/2019-07-05-ember-3-11-released.md b/source/2019-07-15-ember-3-11-released.md similarity index 100% rename from source/2019-07-05-ember-3-11-released.md rename to source/2019-07-15-ember-3-11-released.md From 1b51832e38e7a98d35a144b2ccec398d74d4adcd Mon Sep 17 00:00:00 2001 From: Jen Weber Date: Mon, 15 Jul 2019 22:31:26 -0400 Subject: [PATCH 15/16] Fix code fences, add links to API docs for on/fn --- source/2019-07-15-ember-3-11-released.md | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/source/2019-07-15-ember-3-11-released.md b/source/2019-07-15-ember-3-11-released.md index 6e6f74963..d9d7651d8 100644 --- a/source/2019-07-15-ember-3-11-released.md +++ b/source/2019-07-15-ember-3-11-released.md @@ -35,7 +35,7 @@ For more information please refer to [the RFC](https://github.com/emberjs/rfcs/b **The `{{fn}}` helper (2 of 4)** -The `{{fn}}` helper provides a way to pass arguments to actions, particularly with native classes and the `@action` decorator. +The [`{{fn}}`](http://api.emberjs.com/ember/3.11/classes/Ember.Templates.helpers/methods/fn?anchor=fn) helper provides a way to pass arguments to actions, particularly with native classes and the `@action` decorator. With the `@action` decorator, it is very straightforward to pass actions to other components ("data-down, actions-up"): @@ -88,13 +88,14 @@ In addition to the basic use case shown here, the `{{fn}}` helper supports other Hello Tomster and Zoey {{/let}} +``` It should also be noted that the `{{action}}` helper can previously be used to accomplish similar functionalities, but due to some historical decisions, it may produce surprising results in some cases. Therefore, Ember users are encouraged to migrate to the `{{fn}}` helper along with the `@action` decorator where possible and appropriate. Refer to [the RFC](https://github.com/emberjs/rfcs/blob/master/text/0470-fn-helper.md#detailed-design) for more details and examples. **The `{{on}}` modifier (3 of 4)** -The `{{on}}` modifier provides a straightforward way to listen to DOM events on arbitrary elements. +The [`{{on}}`](http://api.emberjs.com/ember/3.11/classes/Ember.Templates.helpers/methods/fn?anchor=on) modifier provides a straightforward way to listen to DOM events on arbitrary elements. ```js import Component from "@ember/component"; From 4fce9ba018e0b0eb0624347f46c7bea72bc5eacd Mon Sep 17 00:00:00 2001 From: Jen Weber Date: Mon, 15 Jul 2019 22:49:16 -0400 Subject: [PATCH 16/16] Add a note about api docs being broken --- source/2019-07-15-ember-3-11-released.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/source/2019-07-15-ember-3-11-released.md b/source/2019-07-15-ember-3-11-released.md index d9d7651d8..79f40e678 100644 --- a/source/2019-07-15-ember-3-11-released.md +++ b/source/2019-07-15-ember-3-11-released.md @@ -164,9 +164,11 @@ Please refer to [the deprecation guides](https://deprecations.emberjs.com/v3.x/# Ember Data is the official data persistence library for Ember.js applications. -**Important note about Ember Data 3.11** +### Important note about Ember Data 3.11 There is a **known bug in 3.11.0** which means `ember generate model something` doesn't work. We are currently working a patch for this. +Likewise there is a known bug for displaying the 3.11 API documentation on [api.emberjs.com](https://api.emberjs.com), which will also be fixed in a patch. +This blog post will be updated once these issues are resolved. ### Changes in Ember Data 3.11