Skip to content

Commit

Permalink
fix: avoid renaming function on import
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
alexlafroscia committed Feb 10, 2021
1 parent 1779243 commit b577bf2
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions addon-test-support/-private/deprecate.js
Original file line number Diff line number Diff line change
@@ -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: {
Expand Down

0 comments on commit b577bf2

Please sign in to comment.