From b577bf2d0f6dd7648d234553353c2640245b638b Mon Sep 17 00:00:00 2001 From: Alex LaFroscia Date: Wed, 10 Feb 2021 14:04:53 -0500 Subject: [PATCH] fix: avoid renaming function on import MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit For some reason, the Ember Babel plugin isn’t working when we re-name the `deprecate` function while importing; it results in the code being converted into `Ember.emberDeprecate` Rather than `Ember.deprecate` And that function is, understandably, not defined. I thought the issue might be the dated version of `ember-cli-babel` but updating that doesn’t seem to actually solve the problem. --- addon-test-support/-private/deprecate.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/addon-test-support/-private/deprecate.js b/addon-test-support/-private/deprecate.js index 5276eb9b..cb9ecb13 100644 --- a/addon-test-support/-private/deprecate.js +++ b/addon-test-support/-private/deprecate.js @@ -1,11 +1,11 @@ -import { deprecate as emberDeprecate } from '@ember/debug'; +import { deprecate } from '@ember/debug'; const NAMESPACE = 'ember-cli-page-object'; -export default function deprecate(name, message, since, until) { +export default function deprecateWrapper(name, message, since, until) { const [major, minor] = since.split('.'); - emberDeprecate(message, false, { + deprecate(message, false, { id: `${NAMESPACE}.${name}`, for: NAMESPACE, since: {