mirror of
https://github.com/discourse/discourse.git
synced 2024-11-24 05:34:28 +08:00
DEV: Deprecate ember
module imports (#9011)
Removes remaining `ember` module imports.
This commit is contained in:
parent
c607870f08
commit
6ba326a9f4
|
@ -1,4 +1,5 @@
|
|||
import { sort } from "@ember/object/computed";
|
||||
import Evented from "@ember/object/evented";
|
||||
import EmberObjectProxy from "@ember/object/proxy";
|
||||
import Controller from "@ember/controller";
|
||||
import { ajax } from "discourse/lib/ajax";
|
||||
|
@ -6,9 +7,8 @@ import ModalFunctionality from "discourse/mixins/modal-functionality";
|
|||
const BufferedProxy = window.BufferedProxy; // import BufferedProxy from 'ember-buffered-proxy/proxy';
|
||||
import { popupAjaxError } from "discourse/lib/ajax-error";
|
||||
import discourseComputed, { on } from "discourse-common/utils/decorators";
|
||||
import Ember from "ember";
|
||||
|
||||
export default Controller.extend(ModalFunctionality, Ember.Evented, {
|
||||
export default Controller.extend(ModalFunctionality, Evented, {
|
||||
init() {
|
||||
this._super(...arguments);
|
||||
|
||||
|
|
|
@ -1,11 +1,7 @@
|
|||
import Ember from "ember";
|
||||
|
||||
const isArray = Ember.isArray;
|
||||
|
||||
export default function(str, formats) {
|
||||
let cachedFormats = formats;
|
||||
|
||||
if (!isArray(cachedFormats) || arguments.length > 2) {
|
||||
if (!_.isArray(cachedFormats) || arguments.length > 2) {
|
||||
cachedFormats = new Array(arguments.length - 1);
|
||||
|
||||
for (let i = 1, l = arguments.length; i < l; i++) {
|
||||
|
|
|
@ -1,8 +1,6 @@
|
|||
import Ember from "ember";
|
||||
import { computed, get } from "@ember/object";
|
||||
import extractValue from "./extract-value";
|
||||
|
||||
const { computed, get } = Ember;
|
||||
|
||||
export default function handleDescriptor(target, key, desc, params = []) {
|
||||
return {
|
||||
enumerable: desc.enumerable,
|
||||
|
|
|
@ -1,4 +1,14 @@
|
|||
// Allow us to import Ember
|
||||
define('ember', ['exports'], function(__exports__) {
|
||||
define("ember", ["exports"], function(__exports__) {
|
||||
// eslint-disable-next-line no-console
|
||||
console.warn(
|
||||
[
|
||||
"Deprecation notice:",
|
||||
"Use specific `@ember/*` imports instead of `ember`",
|
||||
"(deprecated since Discourse 2.4.0)",
|
||||
"(removal in Discourse 2.5.0)"
|
||||
].join(" ")
|
||||
);
|
||||
|
||||
__exports__.default = Ember;
|
||||
});
|
||||
|
|
Loading…
Reference in New Issue
Block a user