Skip to content

Commit

Permalink
Remove deprecated '_router'
Browse files Browse the repository at this point in the history
  • Loading branch information
btecu committed Oct 19, 2018
1 parent fa91986 commit 2d087bf
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 24 deletions.
16 changes: 1 addition & 15 deletions packages/@ember/-internals/routing/lib/system/route.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import {
} from '@ember/-internals/runtime';
import { EMBER_ROUTING_ROUTER_SERVICE } from '@ember/canary-features';
import { assert, deprecate, info, isTesting } from '@ember/debug';
import { ROUTER_EVENTS, ROUTER_ROUTER } from '@ember/deprecated-features';
import { ROUTER_EVENTS } from '@ember/deprecated-features';
import { assign } from '@ember/polyfills';
import { once } from '@ember/runloop';
import { classify } from '@ember/string';
Expand Down Expand Up @@ -2161,20 +2161,6 @@ Route.reopen(ActionHandler, Evented, {
};
}),

router: ROUTER_ROUTER
? computed('_router', function(this: Route) {
deprecate(
'Route#router is an intimate API that has been renamed to Route#_router. However you might want to consider using the router service',
false,
{
id: 'ember-routing.route-router',
until: '3.5.0',
url: 'https://emberjs.com/deprecations/v3.x#toc_ember-routing-route-router',
}
);
return this._router;
})
: undefined,
/**
@private
Expand Down
8 changes: 0 additions & 8 deletions packages/@ember/-internals/routing/tests/system/route_test.js
Original file line number Diff line number Diff line change
Expand Up @@ -575,13 +575,5 @@ moduleFor(
'passes query param only transitions through'
);
}

['@test `router` is a deprecated one-way alias to `_router`'](assert) {
let router = {};
let route = EmberRoute.create({ _router: router });
expectDeprecation(function() {
return assert.equal(route.router, router);
}, 'Route#router is an intimate API that has been renamed to Route#_router. However you might want to consider using the router service');
}
}
);
1 change: 0 additions & 1 deletion packages/@ember/deprecated-features/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ export const SEND_ACTION = !!'3.4.0';
export const EMBER_EXTEND_PROTOTYPES = !!'3.2.0-beta.5';
export const LOGGER = !!'3.2.0-beta.1';
export const POSITIONAL_PARAM_CONFLICT = !!'3.1.0-beta.1';
export const ROUTER_ROUTER = !!'3.2.0-beta.1';
export const ARRAY_AT_EACH = !!'3.1.0-beta.1';
export const TARGET_OBJECT = !!'2.18.0-beta.1';
export const MAP = !!'3.3.0-beta.1';
Expand Down

0 comments on commit 2d087bf

Please sign in to comment.