Socket
Socket
Sign inDemoInstall

@superdispatch/hooks

Package Overview
Dependencies
Maintainers
2
Versions
34
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@superdispatch/hooks - npm Package Compare versions

Comparing version 0.5.5 to 0.5.6

3

dist-node/index.js

@@ -41,5 +41,2 @@ 'use strict';

console.error('[useDeepEqualDeps] size of the "deps" argument has changed between renders. ' + 'The order and size of this array must remain constant.');
} else if (initialDeps.length === 0) {
// eslint-disable-next-line no-console
console.error('[useDeepEqualDeps] "deps" argument should not be empty.');
}

@@ -46,0 +43,0 @@ } // eslint-disable-next-line @typescript-eslint/no-unsafe-return

@@ -13,5 +13,2 @@ import { useRef } from 'react';

console.error('[useDeepEqualDeps] size of the "deps" argument has changed between renders. ' + 'The order and size of this array must remain constant.');
} else if (initialDeps.length === 0) {
// eslint-disable-next-line no-console
console.error('[useDeepEqualDeps] "deps" argument should not be empty.');
}

@@ -18,0 +15,0 @@ } // eslint-disable-next-line @typescript-eslint/no-unsafe-return

9

dist-src/deep-equal-deps/useDeepEqualDeps.spec.js

@@ -42,13 +42,12 @@ import { renderHook } from '@testing-library/react-hooks';

initialProps: {
deps: []
deps: [1, 2, 3]
}
});
expect(consoleError).toHaveBeenCalledTimes(1);
expect(consoleError).toHaveBeenLastCalledWith('[useDeepEqualDeps] "deps" argument should not be empty.');
expect(consoleError).toHaveBeenCalledTimes(0);
rerender({
deps: [1]
deps: [1, 2, 3, 4]
});
expect(consoleError).toHaveBeenCalledTimes(2);
expect(consoleError).toHaveBeenCalledTimes(1);
expect(consoleError).toHaveBeenLastCalledWith('[useDeepEqualDeps] size of the "deps" argument has changed between renders. The order and size of this array must remain constant.');
consoleError.mockReset();
});

@@ -37,5 +37,2 @@ import { useRef, useLayoutEffect, useMemo, useEffect, useCallback } from 'react';

console.error('[useDeepEqualDeps] size of the "deps" argument has changed between renders. ' + 'The order and size of this array must remain constant.');
} else if (initialDeps.length === 0) {
// eslint-disable-next-line no-console
console.error('[useDeepEqualDeps] "deps" argument should not be empty.');
}

@@ -42,0 +39,0 @@ } // eslint-disable-next-line @typescript-eslint/no-unsafe-return

{
"name": "@superdispatch/hooks",
"version": "0.5.5",
"version": "0.5.6",
"license": "MIT",

@@ -5,0 +5,0 @@ "files": [

Sorry, the diff of this file is not supported yet

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