@reactuses/core 6.0.0 → 6.0.2

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.
package/dist/index.cjs CHANGED
@@ -48,8 +48,8 @@ function off(obj, ...args) {
48
48
  obj.removeEventListener(...args);
49
49
  }
50
50
  }
51
- const defaultWindow = isBrowser ? window : undefined;
52
- const defaultDocument = isBrowser ? document : undefined;
51
+ const defaultWindow = typeof window !== 'undefined' ? window : undefined;
52
+ const defaultDocument = typeof document !== 'undefined' ? document : undefined;
53
53
 
54
54
  const defaultOptions$1 = {};
55
55
  function defaultOnError(e) {
@@ -3916,7 +3916,6 @@ const useFetchEventSource = (url, options = {})=>{
3916
3916
  });
3917
3917
  }
3918
3918
  yield fetchEventSource.fetchEventSource(url.toString(), _extends({}, finalOptions, {
3919
- openWhenHidden: false,
3920
3919
  onopen (response) {
3921
3920
  return _async_to_generator(function*() {
3922
3921
  if (response.ok) {
package/dist/index.mjs CHANGED
@@ -40,8 +40,8 @@ function off(obj, ...args) {
40
40
  obj.removeEventListener(...args);
41
41
  }
42
42
  }
43
- const defaultWindow = isBrowser ? window : undefined;
44
- const defaultDocument = isBrowser ? document : undefined;
43
+ const defaultWindow = typeof window !== 'undefined' ? window : undefined;
44
+ const defaultDocument = typeof document !== 'undefined' ? document : undefined;
45
45
 
46
46
  const defaultOptions$1 = {};
47
47
  function defaultOnError(e) {
@@ -3908,7 +3908,6 @@ const useFetchEventSource = (url, options = {})=>{
3908
3908
  });
3909
3909
  }
3910
3910
  yield fetchEventSource(url.toString(), _extends({}, finalOptions, {
3911
- openWhenHidden: false,
3912
3911
  onopen (response) {
3913
3912
  return _async_to_generator(function*() {
3914
3913
  if (response.ok) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@reactuses/core",
3
- "version": "6.0.0",
3
+ "version": "6.0.2",
4
4
  "license": "Unlicense",
5
5
  "homepage": "https://www.reactuse.com/",
6
6
  "repository": {
@@ -75,6 +75,7 @@
75
75
  },
76
76
  "dependencies": {
77
77
  "@microsoft/fetch-event-source": "^2.0.1",
78
+ "@testing-library/dom": "^10.4.0",
78
79
  "js-cookie": "^3.0.5",
79
80
  "lodash-es": "^4.17.21",
80
81
  "screenfull": "^5.0.0",
@@ -83,7 +84,7 @@
83
84
  "devDependencies": {
84
85
  "@jsdevtools/version-bump-prompt": "^6.1.0",
85
86
  "@reactuses/ts-document": "workspace:*",
86
- "@testing-library/react": "^13.4.0",
87
+ "@testing-library/react": "^16.1.0",
87
88
  "@types/jest": "^27.5.2",
88
89
  "@types/js-cookie": "^3.0.3",
89
90
  "@types/lodash": "^4.14.184",