Skip to content

RavenJS triggers deprecations from jQuery Migrate #817

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

Closed
romainneutron opened this issue Jan 6, 2017 · 5 comments
Closed

RavenJS triggers deprecations from jQuery Migrate #817

romainneutron opened this issue Jan 6, 2017 · 5 comments

Comments

@romainneutron
Copy link
Contributor

jQuery team provides a tool called jQuery Migrate to ease migration from version to version. It's especially a nice tool when migrating from jQuery 1/2 to jQuery 3.

However, when using jQuery migrate and RavenJS, deprecations are triggered by this code https://github.com/getsentry/raven-js/blob/master/src/raven.js#L927-L934

        var $ = _window.jQuery || _window.$;
        if ($ && $.fn && $.fn.ready) {
            fill($.fn, 'ready', function (orig) {
                return function (fn) {
                    return orig.call(this, self.wrap(fn));
                };
            }, wrappedBuiltIns);
        }
@mattrobenolt
Copy link
Contributor

It's unclear to me how this is a problem for us. We're intending to monkey patch jQuery, but we'd need to support any version of jQuery. Everything here is guarded and should be safe between any of these versions, so I don't see what we would need to do here.

@tacman
Copy link

tacman commented Jan 10, 2017

Possibly related, but honestly I can't tell if this is a raven issue or raven reporting an issue from somewhere else.

JQMIGRATE: Migrate is installed with logging active, version 3.0.0
raven.js:80 JQMIGRATE: jQuery.unique is deprecated, use jQuery.uniqueSorta.(anonymous function) @ raven.js:80
jquery-migrate.js:64console.tracec @ jquery-migrate.js:64

image

@benvinegar
Copy link
Contributor

@tacman – for breadcrumbs Raven.js overrides console.log which causes log statements to appear to come from Raven.js. It definitely does not use jQuery.unique, so I suspect the deprecation notice is being triggered by somewhere in your own code / other library.

@tacman
Copy link

tacman commented Feb 6, 2017 via email

@benvinegar
Copy link
Contributor

@romainneutron – I think we'll just remove this code, it serves less and less purpose today.

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

4 participants