@leancodepl/hook-pipe-client 7.8.2 → 8.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/index.cjs.js +1 -7
  2. package/package.json +8 -2
package/index.cjs.js CHANGED
@@ -1,15 +1,9 @@
1
1
  'use strict';
2
2
 
3
- Object.defineProperty(exports, '__esModule', { value: true });
4
-
5
3
  var react = require('react');
6
4
  var deepEqual = require('deep-equal');
7
5
  var rxjs = require('rxjs');
8
6
 
9
- function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
10
-
11
- var deepEqual__default = /*#__PURE__*/_interopDefaultLegacy(deepEqual);
12
-
13
7
  function mkPipeClient({ pipe }) {
14
8
  return {
15
9
  createTopic (topicType) {
@@ -18,7 +12,7 @@ function mkPipeClient({ pipe }) {
18
12
  const onDataRef = react.useRef(onData);
19
13
  onDataRef.current = onData;
20
14
  const memoizedTopic = react.useRef();
21
- if (memoizedTopic.current === undefined || !deepEqual__default["default"](memoizedTopic.current, topic)) {
15
+ if (memoizedTopic.current === undefined || !deepEqual(memoizedTopic.current, topic)) {
22
16
  memoizedTopic.current = topic;
23
17
  }
24
18
  react.useEffect(()=>{
package/package.json CHANGED
@@ -1,22 +1,28 @@
1
1
  {
2
2
  "name": "@leancodepl/hook-pipe-client",
3
- "version": "7.8.2",
3
+ "version": "8.0.0",
4
4
  "license": "Apache-2.0",
5
5
  "dependencies": {
6
6
  "@leancodepl/pipe": "^1.0.0",
7
7
  "deep-equal": "^2.0.0"
8
8
  },
9
+ "devDependencies": {
10
+ "react": "18.3.1"
11
+ },
9
12
  "peerDependencies": {
13
+ "react": "*",
10
14
  "rxjs": ">=7.0.0"
11
15
  },
12
16
  "exports": {
13
17
  "./package.json": "./package.json",
14
18
  ".": {
15
19
  "module": "./index.esm.js",
20
+ "types": "./index.esm.d.ts",
16
21
  "import": "./index.cjs.mjs",
17
22
  "default": "./index.cjs.js"
18
23
  }
19
24
  },
20
25
  "module": "./index.esm.js",
21
- "main": "./index.cjs.js"
26
+ "main": "./index.cjs.js",
27
+ "types": "./index.esm.d.ts"
22
28
  }