Skip to content

Commit b99fe25

Browse files
committed
Merge branch 'main' into cleanup-7-0-barrel
2 parents a7a366b + 9e7b80b commit b99fe25

8 files changed

Lines changed: 1 addition & 194 deletions

File tree

index.html

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -15,15 +15,6 @@
1515
// Test under octane defaults
1616
EmberENV._DEFAULT_ASYNC_OBSERVERS = true;
1717

18-
// Test for "hooks in EmberENV.EMBER_LOAD_HOOKS['hookName'] get executed"
19-
EmberENV.EMBER_LOAD_HOOKS = EmberENV.EMBER_LOAD_HOOKS || {};
20-
EmberENV.EMBER_LOAD_HOOKS.__before_ember_test_hook__ =
21-
EmberENV.EMBER_LOAD_HOOKS.__before_ember_test_hook__ || [];
22-
EmberENV.__test_hook_count__ = 0;
23-
EmberENV.EMBER_LOAD_HOOKS.__before_ember_test_hook__.push(function (object) {
24-
EmberENV.__test_hook_count__ += object;
25-
});
26-
2718
// Handle testing feature flags
2819
if (QUnit.urlParams.ENABLE_OPTIONAL_FEATURES) {
2920
EmberENV.ENABLE_OPTIONAL_FEATURES = true;

lib/index.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,6 @@ const shim = addonV1Shim(path.join(__dirname, '..'), {
5454
'./dist/dev/packages/@ember/-internals/views/lib/views/states.js',
5555
'./dist/dev/packages/@ember/application/index.js',
5656
'./dist/dev/packages/@ember/application/instance.js',
57-
'./dist/dev/packages/@ember/application/lib/lazy_load.js',
5857
'./dist/dev/packages/@ember/application/namespace.js',
5958
'./dist/dev/packages/@ember/array/-internals.js',
6059
'./dist/dev/packages/@ember/array/index.js',

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

Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -144,10 +144,6 @@ export const ENV = {
144144
*/
145145
_RERENDER_LOOP_LIMIT: 1000,
146146

147-
EMBER_LOAD_HOOKS: {} as {
148-
[hook: string]: Function[];
149-
},
150-
151147
FEATURES: {} as {
152148
[feature: string]: boolean;
153149
},
@@ -179,18 +175,6 @@ if (typeof EmberENV === 'object' && EmberENV !== null) {
179175
}
180176
}
181177

182-
// TODO this does not seem to be used by anything,
183-
// can we remove it? do we need to deprecate it?
184-
let { EMBER_LOAD_HOOKS } = EmberENV;
185-
if (typeof EMBER_LOAD_HOOKS === 'object' && EMBER_LOAD_HOOKS !== null) {
186-
for (let hookName in EMBER_LOAD_HOOKS) {
187-
if (!Object.prototype.hasOwnProperty.call(EMBER_LOAD_HOOKS, hookName)) continue;
188-
let hooks = EMBER_LOAD_HOOKS[hookName];
189-
if (Array.isArray(hooks)) {
190-
ENV.EMBER_LOAD_HOOKS[hookName] = hooks.filter((hook) => typeof hook === 'function');
191-
}
192-
}
193-
}
194178
let { FEATURES } = EmberENV;
195179
if (typeof FEATURES === 'object' && FEATURES !== null) {
196180
for (let feature in FEATURES) {

packages/@ember/application/index.ts

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@ import { assert } from '@ember/debug';
1010
import { DEBUG } from '@glimmer/env';
1111
import { join, once, run, schedule } from '@ember/runloop';
1212
import { libraries } from '@ember/-internals/metal';
13-
import { _loaded, onLoad, runLoadHooks } from './lib/lazy_load';
1413
import { RSVP } from '@ember/-internals/runtime';
1514
import { EventDispatcher } from '@ember/-internals/views';
1615
import Route from '@ember/routing/route';
@@ -711,7 +710,6 @@ class Application extends Engine {
711710

712711
try {
713712
this.runInitializers();
714-
runLoadHooks('application', this);
715713
this.advanceReadiness();
716714
// Continues to `didBecomeReady`
717715
} catch (error) {
@@ -883,10 +881,6 @@ class Application extends Engine {
883881
willDestroy() {
884882
super.willDestroy();
885883

886-
if (_loaded['application'] === this) {
887-
_loaded['application'] = undefined;
888-
}
889-
890884
if (this._applicationInstances.size) {
891885
this._applicationInstances.forEach((i) => i.destroy());
892886
this._applicationInstances.clear();
@@ -1137,4 +1131,4 @@ function commonSetupRegistry(registry: Registry) {
11371131
registry.register('service:router', RouterService);
11381132
}
11391133

1140-
export { Application as default, _loaded, onLoad, runLoadHooks };
1134+
export { Application as default };

packages/@ember/application/lib/lazy_load.ts

Lines changed: 0 additions & 67 deletions
This file was deleted.

packages/@ember/application/tests/application_test.js

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@ import { getDebugFunction, setDebugFunction } from '@ember/debug';
66
import EmberRoute from '@ember/routing/route';
77
import Router from '@ember/routing/router';
88
import NoneLocation from '@ember/routing/none-location';
9-
import { _loaded } from '@ember/application';
109
import Controller from '@ember/controller';
1110
import EmberObject from '@ember/object';
1211
import {
@@ -298,14 +297,6 @@ moduleFor(
298297
);
299298
}
300299

301-
[`@test does not leak itself in onLoad._loaded`](assert) {
302-
assert.equal(_loaded.application, undefined);
303-
runTask(() => this.createApplication());
304-
assert.equal(_loaded.application, this.application);
305-
runTask(() => this.application.destroy());
306-
assert.equal(_loaded.application, undefined);
307-
}
308-
309300
[`@test can build a registry via Application.buildRegistry() --- simulates ember-test-helpers`](
310301
assert
311302
) {

packages/@ember/application/tests/lazy_load_test.js

Lines changed: 0 additions & 83 deletions
This file was deleted.

tests/docs/expected.js

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -352,7 +352,6 @@ module.exports = {
352352
'once',
353353
'one',
354354
'oneWay',
355-
'onLoad',
356355
'onUpdateURL',
357356
'options',
358357
'optionsForType',
@@ -438,7 +437,6 @@ module.exports = {
438437
'runInDebug',
439438
'runInitializers',
440439
'runInstanceInitializers',
441-
'runLoadHooks',
442440
'schedule',
443441
'scheduleOnce',
444442
'send',

0 commit comments

Comments
 (0)