jurassix / react-validation-mixin

Simple validation mixin (HoC) for React.
MIT License
283 stars 38 forks source link

Warning messages: window.webkitStorageInfo and webkitIndexedDB are deprecated #24

Closed almoraleslopez closed 9 years ago

almoraleslopez commented 9 years ago

Hello.

I have 2 warnings in the console (client side).

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

I use webpack and gulp-webpack. Updated both of them to last stable versions.

Following the warning I have this file index.js


var hasAutomationEqualityBug = (function () {
    /* global window */
    if (typeof window === 'undefined') { return false; }
    for (var k in window) {
        if (blacklistedKeys.indexOf(k) === -1 && has.call(window, k) && window[k] !== null && typeof window[k] === 'object') {
// Here fires the warning
            try {
                equalsConstructorPrototype(window[k]);
            } catch (e) {
                return true;
            }
        }
    }
    return false;
}());
/***************** ** WEBPACK FOOTER ** ./~/react-validation-mixin/~/object.assign/~/object-keys/index.js ** module id = 495 ** module chunks = 0 **/
jurassix commented 9 years ago

From the errors this seems like an error with the dependency object.assign; and then a transitive dependency on object-keys. There are no open issues or reported issues for these libraries that reference these errors or webpack. However, this library is using an old version of object.assign so I'll bump that and see if it helps you. I'm using browserify and am not seeing these issues.

jurassix commented 9 years ago

Updated all deps and bumped lib a minor version: 4.2.0 Not sure it will fix this issue but it may help.

almoraleslopez commented 9 years ago

Thanks @jurassix - Update applied but warnings still appearing

jurassix commented 9 years ago

Which version of Joi are you using? Have you read through #17 to see if this is a webpack/Joi issue?

almoraleslopez commented 9 years ago

Latest stable version.

I got those errors and found a workaround for that issue in webpack config file.

    // Added this workaround for missing module using Joi with React: See https://github.com/hapijs/joi/issues/528 and https://github.com/ReFiManager/ReFiManager/commit/36ee0576e27552a88d6622aaa00d9a41567bdce7
    node: {
        dns: "empty",
        net: "empty"
    }

Anyway, I've gone with a manual validation workaround for my requirement. But your module looks great and will try it.

jurassix commented 9 years ago

Ok closing this issue as a webpack/joi issue. Please reopen if more investigation is needed.

shangsunset commented 9 years ago

Hi,

im using browserify and i also get the warning messages. any thoughts?

i have joi 6.5 installed. thanks.