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

ember/jquery should be ^0.6.0 in 3.9.x #8585

Closed
ggayowsky opened this issue Apr 11, 2019 · 3 comments
Closed

ember/jquery should be ^0.6.0 in 3.9.x #8585

ggayowsky opened this issue Apr 11, 2019 · 3 comments

Comments

@ggayowsky
Copy link

Trying to remove deprecation warnings from Ember 3.9.0.

And I am receiving the following deprecation:
Using Ember.$() has been deprecated, use import jQuery from 'jquery'; instead [deprecation id: ember-views.curly-components.jquery-element] See https://emberjs.com/deprecations/v3.x#toc_jquery-apis for more details.

The code throwing the deprecation message is:

import jQuery from 'jquery';

import Component from '@ember/component';
export default Component.extend({
  ...
    _addResizableHandlers() {
        const jqueryElement = jQuery(this.element);
        jqueryElement.resizable({
            handles: 'all',
            stop: bind(this, this._onResizeEnd)
        });
        this._resizableInstance = jqueryElement.resizable('instance');
    },
  ...
});

and the _addResizableHandlers methods is getting transpiled to

_addResizableHandlers() {
      const jqueryElement = Ember.$(this.element);
      jqueryElement.resizable({
        handles: 'all',
        stop: Ember.run.bind(this, this._onResizeEnd)
      });
      this._resizableInstance = jqueryElement.resizable('instance');
    },

In my package.json (from the default blueprint)

"@ember/jquery": "^0.5.2",

I believe that because my yarn.lock was pointing to 0.5.2, was the cause of this transpilation because upgrading to 0.6.0, fixed the deprecation warning (and transpiled properly)

So I believe @ember/jquery should be ^0.6.0 for the default blueprint in 3.9.x

Posting here by suggestion from emberjs/ember.js#17908

@simonihmig
Copy link
Contributor

This was done in #8396, but seems it didn't find its way into the 3.9.0 release?

@ggayowsky
Copy link
Author

That seems to be the case as I can see for the beta release @ember/jquery is correct

@rwjblue
Copy link
Member

rwjblue commented Apr 12, 2019

I think it would be fine to backport the update of @ember/jquery specifically into the release branch here, but its probably best to let the rest of those updates "ride the train" in the beta cycle.

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

No branches or pull requests

3 participants