// this script diffs the react attribute whitelist with the one react html parser maintains
// to determine if it is out of date
// the build:lib task must have been run before this can work

var currentProperties = require('../lib/dom/attributes/ReactAttributes')["default"];
var reactProperties = require('react-dom/lib/HTMLDOMPropertyConfig').Properties;
var changes = {};
var currentKeys = Object.keys(currentProperties).map(function (key) {
  return currentProperties[key];
});
var reactKeys = Object.keys(reactProperties);

// attributes that have been added to react
reactKeys.forEach(function (key) {
  if (currentKeys.indexOf(key) === -1) {
    changes[key] = 'add';
  }
});

// attributes that have been removed from react
currentKeys.forEach(function (key) {
  if (reactKeys.indexOf(key) === -1) {
    changes[key] = 'remove';
  }
});
console.log(changes); // eslint-disable-line no-console