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

Deprecation warnings in browser console #8

Open
bultas opened this issue Nov 13, 2014 · 8 comments
Open

Deprecation warnings in browser console #8

bultas opened this issue Nov 13, 2014 · 8 comments

Comments

@bultas
Copy link

bultas commented Nov 13, 2014

Hi,

Firstly, I would like to thank you for very useful module.

I'm using rewire with webpack bundle, but after upgrade webpack to version 1.4.13 I'm getting some warning messages in console.log

Warning 1:

'window.webkitStorageInfo' is deprecated. Please use 'navigator.webkitTemporaryStorage' or 'navigator.webkitPersistentStorage' instead.

Warning 2:

'webkitIndexedDB' is deprecated. Please use 'indexedDB' instead.

But everything seems that works properly yet. But I write better now than when it's too late.

@jhnns
Copy link
Owner

jhnns commented Nov 13, 2014

Thanks for the notification. But it seems to me that the error messages are not related to rewire-webpack because I don't use these properties. There are actual just a few lines of code of rewire-webpack that run in the browser. The main part is done during webpack compilation.

Both warnings are caused by the same problem: I guess you're using some browser-based database (Probably level.js or indexedup?) which tries to access deprecated properties.

@bultas
Copy link
Author

bultas commented Nov 13, 2014

It's interesting .. because if i dont use rewire in my test file warning disappears..

Maybe can be problem with phantomJS which I'm using to open final test bundle.. (but with warnings only if i use rewire)

hmm .. i will have to explore more deeply..

@bultas
Copy link
Author

bultas commented Nov 13, 2014

The warnings appears at getImportGlobalsSrc function on line 28
https://github.com/jhnns/rewire/blob/master/lib/getImportGlobalsSrc.js#L28

@jhnns
Copy link
Owner

jhnns commented Nov 17, 2014

Ah, that makes sense... the warnings are outputted when such a property is accessed. It's safe to ignore these warnings.

Unfortunately rewire still needs to access these variables because there might be code mocking these properties although they are deprecated now.

@srph
Copy link

srph commented Apr 7, 2015

Is this still an issue? I'll try it out now on 1.7.*. If ever, I'll update the outcome.

@jhnns
Copy link
Owner

jhnns commented Apr 13, 2015

Yep, it will not go away soon. rewire needs to access these properties...

@srph
Copy link

srph commented Apr 13, 2015

Alright 😄! But these are merely warnings and do not affect test results, right?

@jhnns
Copy link
Owner

jhnns commented Apr 13, 2015

Yep, they occur because the browser thinks that your application is accessing these deprecated properties.

@jhnns jhnns changed the title Webpack 1.4.13.. support Deprecation warnings in browser console Jul 1, 2016
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