Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Revert ember modules API for debug helpers #49

Closed
wants to merge 1 commit into from

Conversation

simonihmig
Copy link
Collaborator

This reverts the latest changes here, because of this weird issue: emberjs/ember-cli-babel#184

After updating to latest release in ember-bootstrap, I was getting this syntax error in IE11 because of the failed transpilation: https://travis-ci.org/kaliber5/ember-bootstrap/jobs/289844974#L621

@simonihmig
Copy link
Collaborator Author

For the record, this was the transpiled output before my changes:

define('ember-popper/-debug/helpers', ['exports'], function (exports) {
  'use strict';

  Object.defineProperty(exports, "__esModule", {
    value: true
  });
  exports.debug = debug;
  exports.debugOnError = debugOnError;
  exports.assert = assert;
  exports.warn = warn;
  exports.deprecate = deprecate;
  exports.stripInProduction = stripInProduction;
  var emberDeprecate = Ember.deprecate;
  var Logger = Ember.Logger;
  function debug() {
    Logger.debug.apply(Logger, arguments);
  }

  function debugOnError(msg, conditional) {
    if (!conditional) {
      console.error(msg); // eslint-disable-line no-console
      debugger; // eslint-disable-line no-debugger
    }
  }

  function assert(msg, conditional) {
    if (!conditional) {
      throw new Error(msg);
    }
  }

  function warn() {
    (true && Ember.emberWarn(...arguments));
  }

  function deprecate() {
    emberDeprecate.apply(undefined, arguments);
  }

  function stripInProduction(cb) {
    cb();
  }
});

@pzuraq
Copy link
Collaborator

pzuraq commented Oct 19, 2017

We likely need to remove those custom debug helpers altogether, they’ve been replaced by the ember ones

@pzuraq
Copy link
Collaborator

pzuraq commented Oct 19, 2017

Yeah, so @simonihmig everywhere that we use those debug functions should be directly replaced with the appropriate import from @ember/debug, they are all automatically stripped now. The babel transform included with this addon should be removed as well.

I'd definitely prefer rolling forward rather than reverting the change, I'll be able to address it soon but I've got other things on my plate at the moment. Think you can take it on?

@simonihmig
Copy link
Collaborator Author

Think you can take it on?

I will give this a try now!

@simonihmig
Copy link
Collaborator Author

Closing in favor of #50

@simonihmig simonihmig closed this Oct 20, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants