Skip to content

Commit 5bcc5f9

Browse files
committed
Remove EMBER_DEFAULT_HELPER_MANAGER flag
1 parent 6ed9a27 commit 5bcc5f9

File tree

5 files changed

+16
-32
lines changed

5 files changed

+16
-32
lines changed

FEATURES.md

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,8 @@ for a detailed explanation.
55

66
## Feature Flags
77

8-
* `EMBER_DEFAULT_HELPER_MANAGER`
8+
<!--
9+
* `FLAG_NAME_HERE`
910
10-
Provides a default manager for unrecognized helpers as specified in
11-
[RFC-756](https://github.com/emberjs/rfcs/blob/master/text/0756-helper-default-manager.md).
11+
Flag description here.
12+
-->

packages/@ember/-internals/glimmer/lib/environment.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@ import { get, set, _getProp, _setProp } from '@ember/-internals/metal';
33
import type { InternalOwner } from '@ember/-internals/owner';
44
import { getDebugName } from '@ember/-internals/utils';
55
import { constructStyleDeprecationMessage } from '@ember/-internals/views';
6-
import { EMBER_DEFAULT_HELPER_MANAGER } from '@ember/canary-features';
76
import { assert, deprecate, warn } from '@ember/debug';
87
import type { DeprecationOptions } from '@ember/debug';
98
import { schedule, _backburner } from '@ember/runloop';
@@ -21,7 +20,7 @@ import toBool from './utils/to-bool';
2120

2221
setGlobalContext({
2322
FEATURES: {
24-
DEFAULT_HELPER_MANAGER: Boolean(EMBER_DEFAULT_HELPER_MANAGER),
23+
DEFAULT_HELPER_MANAGER: true,
2524
},
2625

2726
scheduleRevalidate() {

packages/@ember/-internals/glimmer/tests/integration/helpers/default-helper-manager-test.js

Lines changed: 9 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ import { action } from '@ember/object';
66
moduleFor(
77
'Helpers test: default helper manager',
88
class extends RenderingTestCase {
9-
'@feature(EMBER_DEFAULT_HELPER_MANAGER) plain functions can be used as helpers'() {
9+
'@test plain functions can be used as helpers'() {
1010
function hello() {
1111
return 'hello';
1212
}
@@ -20,9 +20,7 @@ moduleFor(
2020
this.assertText('hello');
2121
}
2222

23-
'@feature(EMBER_DEFAULT_HELPER_MANAGER) positional arguments are passed as function arguments'(
24-
assert
25-
) {
23+
'@test positional arguments are passed as function arguments'(assert) {
2624
function hello(...args) {
2725
assert.deepEqual(args, [1, 2, 3]);
2826
return args.length;
@@ -34,7 +32,7 @@ moduleFor(
3432
this.assertText('3');
3533
}
3634

37-
'@feature(EMBER_DEFAULT_HELPER_MANAGER) tracks changes to positional arguments'(assert) {
35+
'@test tracks changes to positional arguments'(assert) {
3836
let count = 0;
3937

4038
function hello(firstArgument) {
@@ -60,9 +58,7 @@ moduleFor(
6058
this.assertText('456');
6159
}
6260

63-
'@feature(EMBER_DEFAULT_HELPER_MANAGER) named arguments are passed as the last function argument'(
64-
assert
65-
) {
61+
'@test named arguments are passed as the last function argument'(assert) {
6662
function hello(positional, named) {
6763
assert.strictEqual(positional, 'foo');
6864

@@ -75,7 +71,7 @@ moduleFor(
7571
this.assertText('bar');
7672
}
7773

78-
'@feature(EMBER_DEFAULT_HELPER_MANAGER) tracks changes to named arguments'(assert) {
74+
'@test tracks changes to named arguments'(assert) {
7975
let count = 0;
8076

8177
function hello(named) {
@@ -101,7 +97,7 @@ moduleFor(
10197
this.assertText('456');
10298
}
10399

104-
'@feature(EMBER_DEFAULT_HELPER_MANAGER) plain functions passed as component arguments can be used as helpers'() {
100+
'@test plain functions passed as component arguments can be used as helpers'() {
105101
function hello() {
106102
return 'hello';
107103
}
@@ -114,7 +110,7 @@ moduleFor(
114110
this.assertText('hello');
115111
}
116112

117-
'@feature(EMBER_DEFAULT_HELPER_MANAGER) plain functions stored as class properties can be used as helpers'() {
113+
'@test plain functions stored as class properties can be used as helpers'() {
118114
this.registerComponent('foo-bar', {
119115
template: '{{(this.hello)}}',
120116
ComponentClass: class extends Component {
@@ -128,7 +124,7 @@ moduleFor(
128124
this.assertText('hello');
129125
}
130126

131-
'@feature(EMBER_DEFAULT_HELPER_MANAGER) class methods can be used as helpers'() {
127+
'@test class methods can be used as helpers'() {
132128
this.registerComponent('foo-bar', {
133129
template: '{{(this.hello)}}',
134130
ComponentClass: class extends Component {
@@ -142,7 +138,7 @@ moduleFor(
142138
this.assertText('hello');
143139
}
144140

145-
'@feature(EMBER_DEFAULT_HELPER_MANAGER) actions can be used as helpers'() {
141+
'@test actions can be used as helpers'() {
146142
this.registerComponent('foo-bar', {
147143
template: '{{(this.hello)}}',
148144
ComponentClass: class extends Component {

packages/@ember/-internals/glimmer/tests/integration/helpers/invoke-helper-test.js

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@ import { Helper, helper, Component as EmberComponent } from '@ember/-internals/g
44
import { tracked } from '@ember/-internals/metal';
55
import { set } from '@ember/object';
66
import { getOwner } from '@ember/-internals/owner';
7-
import { EMBER_DEFAULT_HELPER_MANAGER } from '@ember/canary-features';
87
import Service, { service } from '@ember/service';
98
import { DEBUG } from '@glimmer/env';
109
import { getValue } from '@glimmer/validator';
@@ -444,17 +443,6 @@ moduleFor(
444443
invokeHelper(undefined, class extends Helper {});
445444
}, /Expected a context object to be passed as the first parameter to invokeHelper, got undefined/);
446445
}
447-
448-
'@test asserts if no manager exists for the helper definition'(assert) {
449-
if (!DEBUG || EMBER_DEFAULT_HELPER_MANAGER) {
450-
assert.expect(0);
451-
return;
452-
}
453-
454-
assert.throws(() => {
455-
invokeHelper({}, class {});
456-
}, /Attempted to load a helper, but there wasn't a helper manager associated with the definition. The definition was:/);
457-
}
458446
}
459447
);
460448

packages/@ember/canary-features/index.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ import { ENV } from '@ember/-internals/environment';
1212
*/
1313

1414
export const DEFAULT_FEATURES = {
15-
EMBER_DEFAULT_HELPER_MANAGER: true,
15+
// FLAG_NAME: true/false
1616
};
1717

1818
/**
@@ -61,4 +61,4 @@ function featureValue(value: null | boolean) {
6161
return value;
6262
}
6363

64-
export const EMBER_DEFAULT_HELPER_MANAGER = featureValue(FEATURES.EMBER_DEFAULT_HELPER_MANAGER);
64+
// export const FLAG_NAME = featureValue(FEATURES.FLAG_NAME);

0 commit comments

Comments
 (0)