Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[CLEANUP] remove manually annoted legacy code #1520

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 0 additions & 3 deletions addon/src/-internal/build-registry.ts
Original file line number Diff line number Diff line change
Expand Up @@ -100,9 +100,6 @@ export default function buildRegistry(resolver: Resolver) {

// @ts-ignore: this is private API.
const fallbackRegistry = Application.buildRegistry(namespace);
// TODO: only do this on Ember < 3.13
// @ts-ignore: this is private API.
fallbackRegistry.register('component-lookup:main', Ember.ComponentLookup);
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This hasn't done anything for a long time now, and in any case this would be re-registering the same thing that was already there.


// @ts-ignore: this is private API.
const registry = new Ember.Registry({
Expand Down
14 changes: 3 additions & 11 deletions test-app/tests/integration/settled-test.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import Ember from 'ember';
import { later, run } from '@ember/runloop';
import Component from '@ember/component';
import { registerWaiter, unregisterWaiter } from '@ember/test';
import {
settled,
setupContext,
Expand Down Expand Up @@ -95,14 +95,7 @@ const TestComponent5 = Component.extend({

init() {
this._super.apply(this, arguments);
// In Ember < 2.8 `registerWaiter` expected to be bound to
// `Ember.Test` 😭
//
// Once we have dropped support for < 2.8 we should swap this to
// use:
//
// import { registerWaiter } from '@ember/test';
Ember.Test.registerWaiter(this, this.isReady);
registerWaiter(this, this.isReady);
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There are other places in the codebase that already uses this pattern

later(() => {
this.setProperties({
internalValue: 'async value',
Expand All @@ -113,8 +106,7 @@ const TestComponent5 = Component.extend({

willDestroy() {
this._super.apply(this, arguments);
// must be called with `Ember.Test` as context for Ember < 2.8
Ember.Test.unregisterWaiter(this, this.isReady);
unregisterWaiter(this, this.isReady);
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There are other places in the codebase that already uses this pattern

},
});

Expand Down