Skip to content

Commit 23d6750

Browse files
locksmixonic
andauthored
Ember 3.27 Release (#965)
Co-authored-by: Matthew Beale <[email protected]>
1 parent 6e231f2 commit 23d6750

File tree

1 file changed

+287
-0
lines changed

1 file changed

+287
-0
lines changed

content/ember-3-27-released.md

Lines changed: 287 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,287 @@
1+
---
2+
title: Ember 3.27 Released
3+
authors:
4+
- matthew-beale
5+
- ricardo-mendes
6+
date: 2021-07-02T00:00:00.000Z
7+
tags:
8+
- releases
9+
- '2021'
10+
- version-3-x
11+
---
12+
13+
Today the Ember project is announcing release 3.27 of Ember.js, Ember Data, and Ember CLI. This is a minor version, stable release.
14+
15+
We're also announcing the start of the 3.28 beta cycle for all sub-projects. We encourage our community (especially addon authors) to help test beta builds and report any bugs before they are published as a stable 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.
16+
17+
Ember.js 3.28 (again, starting **beta** today) is the final planned version of the 3.x release cycle, and will
18+
become an LTS release. As of the 3.28-beta being released, the main development
19+
branch of all Ember projects will become 4.0. Look for more information on Ember
20+
4.0 here on the blog this coming week.
21+
22+
<!-- READMORE -->
23+
24+
You can read more about our general release process with these resources:
25+
26+
- [Release Dashboard](http://emberjs.com/releases/)
27+
- [The Ember Release Cycle](https://blog.emberjs.com/new-ember-release-process/)
28+
- [The Ember Project](https://blog.emberjs.com/ember-project-at-2-0/)
29+
- [Ember LTS Releases](https://blog.emberjs.com/announcing-embers-first-lts/)
30+
31+
---
32+
33+
## Ember.js
34+
35+
Ember.js is the core framework for building ambitious web applications.
36+
37+
### Changes in Ember.js 3.27
38+
39+
Ember.js 3.27 is an incremental, backwards compatible release of Ember with bug fixes, performance improvements, and deprecations.
40+
For a full set of changes see [`CHANGELOG.md`](https://github.com/emberjs/ember.js/blob/master/CHANGELOG.md#v3275-june-10-2021).
41+
42+
### Notable Bug Fixes
43+
44+
- Prior to 3.27 `<:inverse>` would not always alias else blocks. This is
45+
corrected in [glimmerjs/glimmer-vm#1296](https://github.com/glimmerjs/glimmer-vm/pull/1296).
46+
- Ember.js 3.27.0 was released in early May and included several regressions.
47+
These were largely related to the changes in the glimmer VM and and the
48+
implementation of several deprecations, and have been corrected in patch
49+
releases leading up to 3.27.5.
50+
51+
### Feature Additions
52+
53+
#### Contextual Helpers & Modifiers
54+
55+
For several years Ember has provided a mechanism called "contextual components".
56+
This API allows a developer to yield a component, optionally with arguments
57+
to apply, into a block.
58+
59+
In [RFC #432](https://github.com/emberjs/rfcs/blob/master/text/0432-contextual-helpers.md)
60+
additional APIs were proposed which allow helpers and modifiers to be used in
61+
the same way.
62+
63+
For example the layout for a `SuperForm` component might be implemented as:
64+
65+
```handlebars
66+
// app/components/super-form.hbs
67+
<form>
68+
{{yield (hash
69+
70+
Input=(component "super-input" form=this model=this.model)
71+
Textarea=(component "super-textarea" form=this model=this.model)
72+
Submit=(component "super-submit" form=this model=this.model)
73+
74+
is-valid=(helper "super-is-valid" form=this model=this.model)
75+
error-for=(helper "super-error-for" form=this model=this.model)
76+
77+
auto-resize=(modifier "super-auto-resize")
78+
79+
)}}
80+
</form>
81+
```
82+
83+
And be used as:
84+
85+
```handlebars
86+
// app/templates/index.hbs
87+
<SuperForm @model={{this.post}} as |f|>
88+
89+
{{! Invoke a contextual component }}
90+
<f.Input @name="title" />
91+
92+
{{! Invoke contextual helpers }}
93+
{{#unless (f.is-valid "title")}}
94+
<div class="error">This field {{f.error-for "title"}}</div>
95+
{{/unless}}
96+
97+
{{! Invoke a contextual modifier on a contextual component invocation }}
98+
<f.Textarea @name="body" {{f.auto-resize maxHeight="500"}} />
99+
100+
<f.Submit />
101+
</SuperForm>
102+
```
103+
104+
These APIs open the doors for the creation of new, more powerful UI abstractions.
105+
106+
### Deprecations
107+
108+
Ember 3.27 introduces the final set of deprecations targeting Ember 4.0. The
109+
newly introduced deprecations primarily impact uncommonly used APIs. As always,
110+
deprecated APIs are documented with a transition path in the [deprecation
111+
guides](https://deprecations.emberjs.com/v3.x).
112+
113+
Several notable deprecations added in 3.27 are:
114+
115+
#### Invoking Helpers Without Arguments and Parentheses in Named Argument Positions
116+
117+
In some templates, a helper passed as an argument can be treated as an
118+
invocation instead of passing the uninvoked helper as a value. For example:
119+
120+
```handlebars
121+
{{! is someHelper invoked, or passed as a reference? }}
122+
<SomeComponent @arg={{someHelper}} />
123+
```
124+
125+
To better align helpers with how component and modifiers behave in the same
126+
setting, parenthesis are now required to cause an invocation:
127+
128+
```handlebars
129+
{{! (someHelper) is clearly an invocation with no arguments }}
130+
<SomeComponent @arg={{(someHelper)}} />
131+
```
132+
133+
The non-param version of helper passing will pass a reference to the helper
134+
in Ember 4.0. See the [deprecation guide
135+
entry](https://deprecations.emberjs.com/v3.x#toc_argument-less-helper-paren-less-invocation)
136+
for more details.
137+
138+
#### Importing Legacy Built-in Components
139+
140+
Historically, Ember applications have been able to import the base classes which
141+
define `<Input>`, `<Textarea>`, and `<LinkTo>` for reopening or subclassing. In
142+
Ember 4.0, we intend to improve the internal implementation of those built-ins.
143+
To allow this, we've been steadily deprecating parts of the built-in APIs
144+
throughout the 3.x release series.
145+
146+
In 3.27, importing a the base classes of Ember built-ins is deprecated. In Ember
147+
4.0 these modules will be unavailable. The specific deprecated imports are:
148+
149+
```js
150+
import Checkbox from '@ember/component/checkbox';
151+
import Textarea from '@ember/component/text-area';
152+
import TextField from '@ember/component/text-field';
153+
import LinkToComponent from '@ember/routing/link-component';
154+
```
155+
156+
Accessing these classes through other paths, like the owner interface, is also
157+
deprecated.
158+
159+
See the [deprecation guide
160+
entry](https://deprecations.emberjs.com/v3.x#toc_ember-built-in-components-import)
161+
for more details and guidance on migrating away from these APIs.
162+
163+
Additionally, reopening these classes (for example to change the `tagName` on a
164+
`<LinkTo>`) has been deprecated and will be unsupported in 4.0. See [the
165+
deprecation guide for migration strategies](https://deprecations.emberjs.com/v3.x/#toc_ember-built-in-components-reopen).
166+
167+
#### Deprecate Legacy Arguments to Built-ins
168+
169+
Ember's built-in components had a public interface largely defined by their
170+
implementation as classic Ember components. In order to refactor these built-ins
171+
to more modern implementations and improve their interfaces, large parts of
172+
their API is deprecated in 3.27.
173+
174+
These deprecations break down into two sections. First, there are arguments
175+
which are essentially setting HTML attributes or dealing with events. See [this
176+
guide entry on legacy attribute
177+
arguments](https://deprecations.emberjs.com/v3.x/#toc_ember-built-in-components-legacy-attribute-arguments)
178+
for a detailed list of deprecated arguments and migration paths.
179+
180+
Second, there is a set of arguments which were effectively leaks of the private
181+
implemention, or which no longer have a clear meaning (or usefulness) in modern
182+
application development. See [this guide entry on legacy arguments](https://deprecations.emberjs.com/v3.x/#toc_ember-built-in-components-legacy-arguments) for a detailed list and migration paths.
183+
184+
#### Deprecate the Ember Global
185+
186+
Ember has long set a property on the `window` or `globalThis` global so that
187+
it can be accessed via `window.Ember`, for example. This approach to using Ember
188+
is incompatible with static analysis tools that can result in more optimized
189+
application payloads.
190+
191+
In Ember 3.27, accessing the `Ember` object via a non-module-import is
192+
deprecated. Support for using Ember this way will be removed in Ember 4.0.
193+
194+
Instead, applications should adopt the Ember module API. This means importing
195+
either the `Ember` object or a specific API from the module API:
196+
197+
```js
198+
// Bad, deprecated
199+
export default Ember.Component.extend({});
200+
```
201+
202+
```js
203+
// Better
204+
import Ember from 'ember';
205+
export default Ember.Component.extend({});
206+
```
207+
208+
```js
209+
// Best
210+
import Component from '@ember/component';
211+
export default Component.extend({});
212+
```
213+
214+
See [the deprecation
215+
guide](https://deprecations.emberjs.com/v3.x/#toc_ember-global) and [RFC 706](https://github.com/emberjs/rfcs/blob/master/text/0706-deprecate-ember-global.md)
216+
for more details and transition paths for other use cases.
217+
218+
### Further Information On Upgrade Timelines
219+
220+
For application maintainers who want to upgrade apps to Ember.js 4.0 on its release date, the list of
221+
deprecations in this release means their challenge is now well defined.
222+
Application maintainers should consider using the
223+
[ember-cli-deprecation-workflow](https://github.com/mixonic/ember-cli-deprecation-workflow)
224+
addon to address deprecations incrementally after upgrading to 3.27.
225+
ember-cli-deprecation-workflow 2.0 was released *today* in preperation for
226+
applications addressing Ember 3.x deprecations. Give us feedback in the issues
227+
on that repo.
228+
229+
For app maintainers who are in less of a hurry, **please note that the upcoming
230+
release of Ember.js 3.28
231+
will contain no new deprecations targeting Ember.js 4.0**. Additionally, Ember.js
232+
3.28 will be promoted to LTS on the same day Ember.js 4.0 is released.
233+
234+
We recommend that applications using LTS releases wait for the first LTS of
235+
Ember.js 4.x to upgrade, which will be Ember.js 4.4. Ember's 6 week release
236+
cycle means we expect there is about 44 weeks (from today) for apps upgrading from LTS-to-LTS
237+
to address 4.0-targeted deprecations before Ember.js 4.4-LTS is made available.
238+
239+
For more details on changes in Ember.js 3.27, please review the [Ember.js 3.27.5 release page](https://github.com/emberjs/ember.js/blob/master/CHANGELOG.md#v3275-june-10-2021).
240+
241+
---
242+
243+
## Ember Data
244+
245+
Ember Data is the official data persistence library for Ember.js applications.
246+
Ember Data's 3.27 release largely consists of compatability work with Ember.js.
247+
248+
For more details on changes in Ember Data 3.27, please review the
249+
[Ember Data 3.27.0 release page](https://github.com/emberjs/data/releases/tag/v3.27.0).
250+
251+
---
252+
253+
## Ember CLI
254+
255+
Ember CLI is the command line interface for managing and packaging Ember.js applications.
256+
257+
### Upgrading Ember CLI
258+
259+
You may upgrade Ember CLI using the `ember-cli-update` project:
260+
261+
```bash
262+
npx ember-cli-update
263+
```
264+
265+
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).
266+
267+
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`.
268+
269+
### Changes in Ember CLI 3.27
270+
271+
Ember CLI 3.27 introduces a flag for enabling Embroider (Ember CLI's new build
272+
pipeline) for new applications and addons. For example:
273+
274+
```bash
275+
ember new my-app --embroider
276+
```
277+
278+
Learn more about what Embroider offers and how to best configure it on the
279+
[embroider-build/embroider](https://github.com/embroider-build/embroider) repo.
280+
281+
For more details on changes and bugfixes in Ember CLI 3.27, see the [Ember 2.7.0
282+
changelog](https://github.com/ember-cli/ember-cli/blob/v3.27.0/CHANGELOG.md#v3270)
283+
and [Ember CLI 3.27.0 release page](https://github.com/ember-cli/ember-cli/releases/tag/v3.27.0).
284+
285+
## Thank You!
286+
287+
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.

0 commit comments

Comments
 (0)