DEV: Don't use the Ember global (#13535)

DEV: Don’t use the Ember global (#13535)

diff --git a/app/assets/javascripts/admin/addon/controllers/admin-dashboard-reports.js b/app/assets/javascripts/admin/addon/controllers/admin-dashboard-reports.js
index ab10591..51437f2 100644
--- a/app/assets/javascripts/admin/addon/controllers/admin-dashboard-reports.js
+++ b/app/assets/javascripts/admin/addon/controllers/admin-dashboard-reports.js
@@ -2,8 +2,7 @@ import Controller from "@ember/controller";
 import { INPUT_DELAY } from "discourse-common/config/environment";
 import discourseComputed from "discourse-common/utils/decorators";
 import discourseDebounce from "discourse-common/lib/debounce";
-
-const { get } = Ember;
+import { get } from "@ember/object";
 
 export default Controller.extend({
   filter: null,
diff --git a/app/assets/javascripts/admin/addon/models/email-template.js b/app/assets/javascripts/admin/addon/models/email-template.js
index 4be7d9f..19936a6 100644
--- a/app/assets/javascripts/admin/addon/models/email-template.js
+++ b/app/assets/javascripts/admin/addon/models/email-template.js
@@ -1,6 +1,6 @@
 import RestModel from "discourse/models/rest";
 import { ajax } from "discourse/lib/ajax";
-const { getProperties } = Ember;
+import { getProperties } from "@ember/object";
 
 export default RestModel.extend({
   revert() {
diff --git a/app/assets/javascripts/discourse-loader.js b/app/assets/javascripts/discourse-loader.js
index dff3d3d..f903dbe 100644
--- a/app/assets/javascripts/discourse-loader.js
+++ b/app/assets/javascripts/discourse-loader.js
@@ -34,6 +34,8 @@ var define, requirejs;
         inject: Ember.inject.controller,
       },
       "@ember/debug": {
+        assert: Ember.assert,
+        runInDebug: Ember.runInDebug,
         warn: Ember.warn,
       },
       "@ember/object": {
diff --git a/app/assets/javascripts/discourse/app/components/badge-selector.js b/app/assets/javascripts/discourse/app/components/badge-selector.js
index b8530f1..2b9505f 100644
--- a/app/assets/javascripts/discourse/app/components/badge-selector.js
+++ b/app/assets/javascripts/discourse/app/components/badge-selector.js
@@ -5,7 +5,7 @@ import discourseComputed, {
 import Component from "@ember/component";
 import I18n from "I18n";
 import { findRawTemplate } from "discourse-common/lib/raw-templates";
-const { makeArray } = Ember;
+import { makeArray } from "discourse-common/lib/helpers";
 
 export default Component.extend({
   @discourseComputed("placeholderKey")
diff --git a/app/assets/javascripts/discourse/app/helpers/route-action.js b/app/assets/javascripts/discourse/app/helpers/route-action.js
index e296669..c55052a 100644
--- a/app/assets/javascripts/discourse/app/helpers/route-action.js
+++ b/app/assets/javascripts/discourse/app/helpers/route-action.js
@@ -1,13 +1,9 @@
-const {
-  A: emberArray,
-  Helper,
-  assert,
-  computed,
-  get,
-  getOwner,
-  run,
-  runInDebug,
-} = Ember;
+import { A } from "@ember/array";
+import Helper from "@ember/component/helper";
+import { computed, get } from "@ember/object";
+import { getOwner } from "@ember/application";
+import { run } from "@ember/runloop";
+import { assert, runInDebug } from "@ember/debug";
 
 function getCurrentRouteInfos(router) {
   let routerLib = router._routerMicrolib || router.router;
@@ -15,12 +11,12 @@ function getCurrentRouteInfos(router) {
 }
 
 function getRoutes(router) {
-  return emberArray(getCurrentRouteInfos(router)).mapBy("_route").reverse();
+  return A(getCurrentRouteInfos(router)).mapBy("_route").reverse();
 }
 
 function getRouteWithAction(router, actionName) {
   let action;
-  let handler = emberArray(getRoutes(router)).find((route) => {
+  let handler = A(getRoutes(router)).find((route) => {
     let actions = route.actions || route._actions;
     action = actions[actionName];
 
diff --git a/app/assets/javascripts/discourse/app/lib/optional-service.js b/app/assets/javascripts/discourse/app/lib/optional-service.js
index 3bb1c33..7fdd000 100644
--- a/app/assets/javascripts/discourse/app/lib/optional-service.js
+++ b/app/assets/javascripts/discourse/app/lib/optional-service.js
@@ -1,8 +1,6 @@
-const {
-  computed,
-  getOwner,
-  String: { dasherize },
-} = Ember;
+import { computed } from "@ember/object";
+import { getOwner } from "@ember/application";
+import { dasherize } from "@ember/string";
 
 export default function (name) {
   return computed(function (defaultName) {
diff --git a/app/assets/javascripts/select-kit/addon/components/multi-select/multi-select-filter.js b/app/assets/javascripts/select-kit/addon/components/multi-select/multi-select-filter.js
index c7dbe54..0599e70 100644
--- a/app/assets/javascripts/select-kit/addon/components/multi-select/multi-select-filter.js
+++ b/app/assets/javascripts/select-kit/addon/components/multi-select/multi-select-filter.js
@@ -1,6 +1,6 @@
 import I18n from "I18n";
 import SelectKitFilterComponent from "select-kit/components/select-kit/select-kit-filter";
-const { isEmpty } = Ember;
+import { isEmpty } from "@ember/utils";
 import discourseComputed from "discourse-common/utils/decorators";
 import layout from "select-kit/templates/components/select-kit/select-kit-filter";
 
diff --git a/plugins/discourse-local-dates/assets/javascripts/lib/date-with-zone-helper.js.es6 b/plugins/discourse-local-dates/assets/javascripts/lib/date-with-zone-helper.js.es6
index 0f4abe2..fa67be6 100644
--- a/plugins/discourse-local-dates/assets/javascripts/lib/date-with-zone-helper.js.es6
+++ b/plugins/discourse-local-dates/assets/javascripts/lib/date-with-zone-helper.js.es6
@@ -1,4 +1,4 @@
-const { getProperties } = Ember;
+import { getProperties } from "@ember/object";
 
 /*
   DateWithZoneHelper provides a limited list of helpers

GitHub sha: aa56e2a75809434f5ee32d032eb7650c84ac3459

This commit appears in #13535 which was approved by eviltrout. It was merged by CvX.