DEV: Remove all instances of Ember.computed (#8324)

DEV: Remove all instances of Ember.computed (#8324)

diff --git a/app/assets/javascripts/admin/controllers/admin-dashboard-general.js.es6 b/app/assets/javascripts/admin/controllers/admin-dashboard-general.js.es6
index c91f09350d..ea7dc31dde 100644
--- a/app/assets/javascripts/admin/controllers/admin-dashboard-general.js.es6
+++ b/app/assets/javascripts/admin/controllers/admin-dashboard-general.js.es6
@@ -6,9 +6,10 @@ import { setting } from "discourse/lib/computed";
 import AdminDashboard from "admin/models/admin-dashboard";
 import Report from "admin/models/report";
 import PeriodComputationMixin from "admin/mixins/period-computation";
+import computed from "@ember/object/computed";
 
 function staticReport(reportType) {
-  return Ember.computed("reports.[]", function() {
+  return computed("reports.[]", function() {
     return makeArray(this.reports).find(report => report.type === reportType);
   });
 }
diff --git a/app/assets/javascripts/admin/models/api-key.js.es6 b/app/assets/javascripts/admin/models/api-key.js.es6
index 4b77e23c4a..bc818fb8e2 100644
--- a/app/assets/javascripts/admin/models/api-key.js.es6
+++ b/app/assets/javascripts/admin/models/api-key.js.es6
@@ -2,9 +2,10 @@ import discourseComputed from "discourse-common/utils/decorators";
 import AdminUser from "admin/models/admin-user";
 import RestModel from "discourse/models/rest";
 import { ajax } from "discourse/lib/ajax";
+import computed from "@ember/object/computed";
 
 const ApiKey = RestModel.extend({
-  user: Ember.computed("_user", {
+  user: computed("_user", {
     get() {
       return this._user;
     },
diff --git a/app/assets/javascripts/discourse-loader.js b/app/assets/javascripts/discourse-loader.js
index a8cd03b800..2f7b0b9b28 100644
--- a/app/assets/javascripts/discourse-loader.js
+++ b/app/assets/javascripts/discourse-loader.js
@@ -81,6 +81,7 @@ var define, requirejs;
         isEmpty: Ember.isEmpty
       },
       rsvp: {
+        default: Ember.RSVP,
         Promise: Ember.RSVP.Promise,
         hash: Ember.RSVP.hash,
         all: Ember.RSVP.all
diff --git a/app/assets/javascripts/discourse.js.es6 b/app/assets/javascripts/discourse.js.es6
index 2f45653ed1..c56acf9dc8 100644
--- a/app/assets/javascripts/discourse.js.es6
+++ b/app/assets/javascripts/discourse.js.es6
@@ -4,6 +4,7 @@ import {
   default as discourseComputed,
   observes
 } from "discourse-common/utils/decorators";
+import computed from "@ember/object/computed";
 import FocusEvent from "discourse-common/mixins/focus-event";
 
 const _pluginCallbacks = [];
@@ -188,7 +189,7 @@ const Discourse = Ember.Application.extend(FocusEvent, {
     _pluginCallbacks.push({ version, code });
   },
 
-  assetVersion: Ember.computed({
+  assetVersion: computed({
     get() {
       return this.currentAssetVersion;
     },
diff --git a/app/assets/javascripts/discourse/components/about-page-users.js.es6 b/app/assets/javascripts/discourse/components/about-page-users.js.es6
index 7d4ff773ba..e064c67f29 100644
--- a/app/assets/javascripts/discourse/components/about-page-users.js.es6
+++ b/app/assets/javascripts/discourse/components/about-page-users.js.es6
@@ -3,9 +3,10 @@ import { userPath } from "discourse/lib/url";
 import { formatUsername, escapeExpression } from "discourse/lib/utilities";
 import { normalize } from "discourse/components/user-info";
 import { renderAvatar } from "discourse/helpers/user-avatar";
+import computed from "@ember/object/computed";
 
 export default Component.extend({
-  usersTemplates: Ember.computed("users.[]", function() {
+  usersTemplates: computed("users.[]", function() {
     return (this.users || []).map(user => {
       let name = "";
       if (user.name && normalize(user.username) !== normalize(user.name)) {
diff --git a/app/assets/javascripts/discourse/components/date-time-input.js.es6 b/app/assets/javascripts/discourse/components/date-time-input.js.es6
index c83483bc7d..e6dc3d481b 100644
--- a/app/assets/javascripts/discourse/components/date-time-input.js.es6
+++ b/app/assets/javascripts/discourse/components/date-time-input.js.es6
@@ -1,15 +1,16 @@
 import Component from "@ember/component";
+import computed from "@ember/object/computed";
 
 export default Component.extend({
   classNames: ["d-date-time-input"],
   date: null,
   showTime: true,
 
-  _hours: Ember.computed("date", function() {
+  _hours: computed("date", function() {
     return this.date ? this.date.getHours() : null;
   }),
 
-  _minutes: Ember.computed("date", function() {
+  _minutes: computed("date", function() {
     return this.date ? this.date.getMinutes() : null;
   }),
 
diff --git a/app/assets/javascripts/discourse/controllers/composer.js.es6 b/app/assets/javascripts/discourse/controllers/composer.js.es6
index 818f70c089..51d4b3202e 100644
--- a/app/assets/javascripts/discourse/controllers/composer.js.es6
+++ b/app/assets/javascripts/discourse/controllers/composer.js.es6
@@ -1,5 +1,11 @@
 import { isEmpty } from "@ember/utils";
-import { and, or, alias, reads } from "@ember/object/computed";
+import {
+  default as computed,
+  and,
+  or,
+  alias,
+  reads
+} from "@ember/object/computed";
 import { debounce } from "@ember/runloop";
 import { inject as service } from "@ember/service";
 import { inject } from "@ember/controller";
@@ -158,7 +164,7 @@ export default Controller.extend({
     return "title";
   },
 
-  showToolbar: Ember.computed({
+  showToolbar: computed({
     get() {
       const keyValueStore = getOwner(this).lookup("key-value-store:main");
       const storedVal = keyValueStore.get("toolbar-enabled");
diff --git a/app/assets/javascripts/discourse/controllers/history.js.es6 b/app/assets/javascripts/discourse/controllers/history.js.es6
index 7d68d2ab66..a457060722 100644
--- a/app/assets/javascripts/discourse/controllers/history.js.es6
+++ b/app/assets/javascripts/discourse/controllers/history.js.es6
@@ -1,5 +1,12 @@
 import discourseComputed from "discourse-common/utils/decorators";
-import { alias, gt, not, or, equal } from "@ember/object/computed";
+import {
+  default as computed,
+  alias,
+  gt,
+  not,
+  or,
+  equal
+} from "@ember/object/computed";
 import Controller from "@ember/controller";
 import ModalFunctionality from "discourse/mixins/modal-functionality";
 import { categoryBadgeHTML } from "discourse/helpers/category-link";
@@ -10,7 +17,7 @@ import { iconHTML } from "discourse-common/lib/icon-library";
 import Post from "discourse/models/post";
 
 function customTagArray(fieldName) {
-  return Ember.computed(fieldName, function() {
+  return computed(fieldName, function() {
     var val = this.get(fieldName);
     if (!val) {
       return val;
diff --git a/app/assets/javascripts/discourse/lib/register-topic-footer-button.js.es6 b/app/assets/javascripts/discourse/lib/register-topic-footer-button.js.es6
index 6b7bdf63b0..fa72ebee6e 100644
--- a/app/assets/javascripts/discourse/lib/register-topic-footer-button.js.es6
+++ b/app/assets/javascripts/discourse/lib/register-topic-footer-button.js.es6
@@ -1,4 +1,5 @@
 import error from "@ember/error";
+import computed from "@ember/object/computed";
 
 let _topicFooterButtons = {};
 
@@ -70,7 +71,7 @@ export function getTopicFooterButtons() {
       .filter(x => x)
   );
 
-  return Ember.computed(...dependentKeys, {
+  return computed(...dependentKeys, {
     get() {
       const _isFunction = descriptor =>
         descriptor && typeof descriptor === "function";
diff --git a/app/assets/javascripts/discourse/mixins/buffered-content.js.es6 b/app/assets/javascripts/discourse/mixins/buffered-content.js.es6
index 08723e1486..1e5de0f9ef 100644
--- a/app/assets/javascripts/discourse/mixins/buffered-content.js.es6
+++ b/app/assets/javascripts/discourse/mixins/buffered-content.js.es6
@@ -1,10 +1,11 @@
 import EmberObjectProxy from "@ember/object/proxy";
 import Mixin from "@ember/object/mixin";
+import computed from "@ember/object/computed";
 
 /* global BufferedProxy: true */
 export function bufferedProperty(property) {
   const mixin = {
-    buffered: Ember.computed(property, function() {

[... diff too long, it was truncated ...]

GitHub sha: e51efce3