Skip to content

Commit ba31276

Browse files
authored
Merge pull request #20345 from emberjs/remove-flags-for-released-features
Remove flags for released features
2 parents 7736b91 + 30e0d76 commit ba31276

File tree

8 files changed

+149
-175
lines changed

8 files changed

+149
-175
lines changed

FEATURES.md

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -5,12 +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).
12-
13-
* `EMBER_UNIQUE_ID_HELPER`
14-
15-
Provides a `{{unique-id}} helper as specified in
16-
[RFC-659](https://github.com/emberjs/rfcs/blob/master/text/0659-unique-id-helper.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/lib/resolver.ts

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@ import { privatize as P } from '@ember/-internals/container';
22
import { ENV } from '@ember/-internals/environment';
33
import type { InternalFactory, InternalOwner, RegisterOptions } from '@ember/-internals/owner';
44
import { isFactory } from '@ember/-internals/owner';
5-
import { EMBER_UNIQUE_ID_HELPER } from '@ember/canary-features';
65
import { assert } from '@ember/debug';
76
import { _instrumentStart } from '@ember/instrumentation';
87
import { DEBUG } from '@glimmer/env';
@@ -132,6 +131,7 @@ const BUILTIN_HELPERS: Record<string, object> = {
132131
fn,
133132
get,
134133
hash,
134+
'unique-id': uniqueId,
135135
};
136136

137137
if (DEBUG) {
@@ -148,10 +148,6 @@ if (DEBUG) {
148148
BUILTIN_HELPERS['-disallow-dynamic-resolution'] = disallowDynamicResolution;
149149
}
150150

151-
if (EMBER_UNIQUE_ID_HELPER) {
152-
BUILTIN_HELPERS['unique-id'] = uniqueId;
153-
}
154-
155151
const BUILTIN_KEYWORD_MODIFIERS: Record<string, ModifierDefinitionState> = {
156152
action: actionModifier,
157153
};

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

0 commit comments

Comments
 (0)