@koolbase/js 12.2.0 → 12.3.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.
@@ -137,10 +137,14 @@ function makeResolver() {
137
137
  if (await probe(s))
138
138
  return { tier: 'localstorage', store: s };
139
139
  }
140
+ // Outside a browser (Node, a server rendering pages) memory is the
141
+ // expected store, not a symptom, so there is nothing to warn about.
142
+ const inBrowser = typeof window !== 'undefined' && typeof document !== 'undefined';
140
143
  // eslint-disable-next-line no-console
141
- console.warn('[Koolbase] No persistent storage available in this browser ' +
142
- '(private browsing, blocked site data, or an exhausted quota). ' +
143
- 'The session and the offline queue will not survive a reload.');
144
+ if (inBrowser)
145
+ console.warn('[Koolbase] No persistent storage available in this browser ' +
146
+ '(private browsing, blocked site data, or an exhausted quota). ' +
147
+ 'The session and the offline queue will not survive a reload.');
144
148
  return { tier: 'memory', store: memoryStorage() };
145
149
  })());
146
150
  return resolving.then((r) => { resolved = r; return r; });
@@ -134,10 +134,14 @@ function makeResolver() {
134
134
  if (await probe(s))
135
135
  return { tier: 'localstorage', store: s };
136
136
  }
137
+ // Outside a browser (Node, a server rendering pages) memory is the
138
+ // expected store, not a symptom, so there is nothing to warn about.
139
+ const inBrowser = typeof window !== 'undefined' && typeof document !== 'undefined';
137
140
  // eslint-disable-next-line no-console
138
- console.warn('[Koolbase] No persistent storage available in this browser ' +
139
- '(private browsing, blocked site data, or an exhausted quota). ' +
140
- 'The session and the offline queue will not survive a reload.');
141
+ if (inBrowser)
142
+ console.warn('[Koolbase] No persistent storage available in this browser ' +
143
+ '(private browsing, blocked site data, or an exhausted quota). ' +
144
+ 'The session and the offline queue will not survive a reload.');
141
145
  return { tier: 'memory', store: memoryStorage() };
142
146
  })());
143
147
  return resolving.then((r) => { resolved = r; return r; });
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@koolbase/js",
3
- "version": "12.2.0",
4
- "description": "Koolbase SDK for the browser \u2014 auth, database, storage, realtime, functions, flags and offline sync in one package.",
3
+ "version": "12.3.0",
4
+ "description": "Koolbase SDK for the browser — auth, database, storage, realtime, functions, flags and offline sync in one package.",
5
5
  "main": "./dist/cjs/index.js",
6
6
  "types": "./dist/esm/index.d.ts",
7
7
  "files": [
@@ -25,7 +25,7 @@
25
25
  "url": "https://github.com/koolbase/koolbase-react-native"
26
26
  },
27
27
  "dependencies": {
28
- "@koolbase/core": "12.2.0"
28
+ "@koolbase/core": "12.3.0"
29
29
  },
30
30
  "publishConfig": {
31
31
  "access": "public"