Skip to content

Commit 85fa73f

Browse files
authored
Merge pull request #20722 from boris-petrov/remove-template-only-glimmer-components
Remove checks for no longer existing optional features
2 parents a5be201 + d37f2f7 commit 85fa73f

File tree

3 files changed

+6
-25
lines changed

3 files changed

+6
-25
lines changed

lib/index.js

Lines changed: 0 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -78,24 +78,6 @@ module.exports = {
7878
);
7979
}
8080

81-
if (
82-
optionalFeaturesMissing ||
83-
optionalFeatures.isFeatureEnabled('application-template-wrapper')
84-
) {
85-
message.push(
86-
`* The application-template-wrapper optional feature should be disabled under Octane, run \`ember feature:disable application-template-wrapper\` to disable it`
87-
);
88-
}
89-
90-
if (
91-
optionalFeaturesMissing ||
92-
!optionalFeatures.isFeatureEnabled('template-only-glimmer-components')
93-
) {
94-
message.push(
95-
`* The template-only-glimmer-components optional feature should be enabled under Octane, run \`ember feature:enable template-only-glimmer-components\` to enable it`
96-
);
97-
}
98-
9981
if (message.length > 0) {
10082
message.unshift(
10183
`You have configured your application to indicate that it is using the 'octane' edition (via \`setEdition('octane')\`), but the appropriate Octane features were not enabled:\n`

packages/@ember/component/template-only.ts

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,11 @@
99
without adding a wrapping `<div>` (or any of the other element customization behaviors of [@ember/component](/ember/release/classes/Component)).
1010
Specifically, this means that the template will be rendered as "outer HTML".
1111
12-
In general, this method will be used by build time tooling and would not be directly written in an application. However,
13-
at times it may be useful to use directly to leverage the "outer HTML" semantics mentioned above. For example, if an addon would like
14-
to use these semantics for its templates but cannot be certain it will only be consumed by applications that have enabled the
15-
`template-only-glimmer-components` optional feature.
12+
In apps, this method will usually be inserted by build-time tooling the handles converting `.hbs` files into component Javascript modules and
13+
would not be directly written by the application author.
14+
15+
Addons may want to use this method directly to ensure that a template-only component is treated consistently in all Ember versions (Ember versions
16+
before 4.0 have a "template-only-glimmer-components" optional feature that causes a standalone `.hbs` file to be interpreted differently).
1617
1718
@example
1819
Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,4 @@
11
{
2-
"application-template-wrapper": false,
32
"default-async-observers": true,
4-
"jquery-integration": false,
5-
"template-only-glimmer-components": true
3+
"jquery-integration": false
64
}

0 commit comments

Comments
 (0)