Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@welldone-software/why-did-you-render

Package Overview
Dependencies
Maintainers
2
Versions
111
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@welldone-software/why-did-you-render - npm Package Compare versions

Comparing version 6.1.0 to 6.1.1

44

dist/whyDidYouRender.js
/**
* @welldone-software/why-did-you-render 6.1.0
* @welldone-software/why-did-you-render 6.1.1
* MIT Licensed
* Generated by Vitali Zaidman <vzaidman@gmail.com> (https://github.com/vzaidman)
* Generated at 2021-03-06
* Generated at 2021-03-13
*/

@@ -186,3 +186,3 @@

try {
Date.prototype.toString.call(Reflect.construct(Date, [], function () {}));
Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {}));
return true;

@@ -401,10 +401,10 @@ } catch (e) {

var hasSymbol = typeof Symbol === 'function' && Symbol["for"];
var REACT_MEMO_TYPE = hasSymbol ? Symbol["for"]('react.memo') : 0xead3;
var REACT_FORWARD_REF_TYPE = hasSymbol ? Symbol["for"]('react.forward_ref') : 0xead0;
var hasSymbol$1 = typeof Symbol === 'function' && Symbol["for"];
var REACT_MEMO_TYPE = hasSymbol$1 ? Symbol["for"]('react.memo') : 0xead3;
var REACT_FORWARD_REF_TYPE = hasSymbol$1 ? Symbol["for"]('react.forward_ref') : 0xead0;
var hasElementType = typeof Element !== 'undefined'; // copied from https://github.com/facebook/react/packages/shared/ReactSymbols.js
var hasSymbol$1 = typeof Symbol === 'function' && Symbol["for"];
var REACT_ELEMENT_TYPE = hasSymbol$1 ? Symbol["for"]('react.element') : 0xeac7;
var hasSymbol = typeof Symbol === 'function' && Symbol["for"];
var REACT_ELEMENT_TYPE = hasSymbol ? Symbol["for"]('react.element') : 0xeac7;

@@ -426,2 +426,6 @@ var isReactElement = function isReactElement(object) {

function isGetter(obj, prop) {
return !!Object.getOwnPropertyDescriptor(obj, prop)['get'];
}
var dependenciesMap = new WeakMap();

@@ -545,14 +549,26 @@

if (_typeof(a) === 'object' && _typeof(b) === 'object' && Object.getPrototypeOf(a) === Object.getPrototypeOf(b)) {
var allKeys = Object.getOwnPropertyNames(a);
var aKeys = Object.getOwnPropertyNames(a);
var bKeys = Object.getOwnPropertyNames(b);
var allKeys = lodash.uniq([].concat(_toConsumableArray(aKeys), _toConsumableArray(bKeys)));
var clonedA = lodash.isPlainObject(a) ? _objectSpread2({}, a) : a;
var clonedB = lodash.isPlainObject(b) ? _objectSpread2({}, b) : b;
if (allKeys.length !== Object.getOwnPropertyNames(b).length) {
if (allKeys.length !== aKeys.length || allKeys.length !== bKeys.length) {
return trackDiff(clonedA, clonedB, diffsAccumulator, pathString, diffTypes.different);
} // Do not compare the stack as it might differ even though the errors are identical.
}
var relevantKeys = allKeys.filter(function (key) {
// do not compare the stack as it differ even though the errors are identical.
if (key === 'stack' && lodash.isError(a)) {
return false;
} // getters checking is causing too much problems because of how it's used in js.
// not only getters can throw errors, they also cause side effects in many cases.
var relevantKeys = lodash.isError(a) ? allKeys.filter(function (k) {
return k !== 'stack';
}) : allKeys;
if (isGetter(a, key)) {
return false;
}
return true;
});
var keysLength = relevantKeys.length;

@@ -559,0 +575,0 @@

{
"name": "@welldone-software/why-did-you-render",
"version": "6.1.0",
"version": "6.1.1",
"description": "Monkey patches React to notify you about avoidable re-renders.",

@@ -40,3 +40,3 @@ "types": "types.d.ts",

"test:ci": "yarn test --coverage && coveralls < coverage/lcov.info",
"lint": "eslint . --ext=js --cache --cache-location .cache/eslint-cache",
"lint": "eslint . --ext=js --max-warnings 0 --cache --cache-location .cache/eslint-cache",
"clear": "rimraf .cache dist demo/dist",

@@ -52,9 +52,5 @@ "watch": "concurrently --names \"Serve,Test\" \"npm:start\" \"npm:test:watch\"",

"cypress:ci": "start-server-and-test start http://localhost:3003 _cypress:run:ci",
"cypress:ci:classic": "start-server-and-test start:classic http://localhost:3003 _cypress:run:ci:classic"
"cypress:ci:classic": "start-server-and-test start:classic http://localhost:3003 _cypress:run:ci:classic",
"prepare": "husky install"
},
"husky": {
"hooks": {
"pre-commit": "npm run lint"
}
},
"dependencies": {

@@ -67,35 +63,35 @@ "lodash": "^4"

"devDependencies": {
"@babel/cli": "^7.12.10",
"@babel/core": "^7.12.10",
"@babel/eslint-parser": "^7.12.1",
"@babel/plugin-proposal-class-properties": "^7.12.1",
"@babel/preset-env": "^7.12.11",
"@babel/preset-react": "^7.12.10",
"@rollup/plugin-babel": "^5.2.2",
"@rollup/plugin-commonjs": "^17.0.0",
"@rollup/plugin-replace": "^2.3.4",
"@testing-library/jest-dom": "^5.11.6",
"@testing-library/react": "^11.2.2",
"@types/react-redux": "^7.1.14",
"@welldone-software/jest-console-handler": "^0.1.1",
"acorn-walk": "^8.0.0",
"astring": "^1.4.3",
"@babel/cli": "^7.13.10",
"@babel/core": "^7.13.10",
"@babel/eslint-parser": "^7.13.10",
"@babel/plugin-proposal-class-properties": "^7.13.0",
"@babel/preset-env": "^7.13.10",
"@babel/preset-react": "^7.12.13",
"@rollup/plugin-babel": "^5.3.0",
"@rollup/plugin-commonjs": "^17.1.0",
"@rollup/plugin-replace": "^2.4.1",
"@testing-library/jest-dom": "^5.11.9",
"@testing-library/react": "^11.2.5",
"@types/react-redux": "^7.1.16",
"@welldone-software/jest-console-handler": "^1.0.0",
"acorn-walk": "^8.0.2",
"astring": "^1.7.0",
"babel-core": "^7.0.0-bridge.0",
"babel-jest": "^26.6.3",
"concurrently": "^5.3.0",
"concurrently": "^6.0.0",
"coveralls": "^3.1.0",
"create-react-class": "^15.7.0",
"cross-env": "^7.0.3",
"cypress": "^6.2.0",
"eslint": "^7.16.0",
"cypress": "^6.6.0",
"eslint": "^7.22.0",
"eslint-plugin-cypress": "^2.11.2",
"eslint-plugin-jest": "^24.1.3",
"eslint-plugin-react": "^7.21.5",
"eslint-plugin-jest": "^24.2.1",
"eslint-plugin-react": "^7.22.0",
"express": "^4.17.1",
"express-history-api-fallback": "^2.2.1",
"husky": "^4.3.6",
"husky": "^5.1.3",
"jest": "^26.6.3",
"jest-cli": "^26.6.3",
"magic-string": "^0.25.7",
"nollup": "^0.14.4",
"nollup": "^0.15.3",
"react": "^17.0.1",

@@ -112,11 +108,11 @@ "react-16": "npm:react@^16.14.0",

"rimraf": "^3.0.2",
"rollup": "^2.35.1",
"rollup": "^2.41.2",
"rollup-plugin-alias": "^2.2.0",
"rollup-plugin-commonjs-alternate": "^0.7.2",
"rollup-plugin-license": "^2.2.0",
"rollup-plugin-commonjs-alternate": "^0.8.0",
"rollup-plugin-license": "^2.3.0",
"rollup-plugin-node-resolve": "^5.2.0",
"start-server-and-test": "^1.11.6",
"start-server-and-test": "^1.12.0",
"styled-components": "^5.2.1",
"typescript": "^4.1.3"
"typescript": "^4.2.3"
}
}

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc