@objectstack/driver-memory 4.0.3 → 4.0.4

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.
@@ -1,5 +1,5 @@
1
1
 
2
- > @objectstack/driver-memory@4.0.3 build /home/runner/work/framework/framework/packages/plugins/driver-memory
2
+ > @objectstack/driver-memory@4.0.4 build /home/runner/work/framework/framework/packages/plugins/driver-memory
3
3
  > tsup --config ../../../tsup.config.ts
4
4
 
5
5
  CLI Building entry: src/index.ts
@@ -10,13 +10,13 @@
10
10
  CLI Cleaning output folder
11
11
  ESM Build start
12
12
  CJS Build start
13
- ESM dist/index.mjs 54.10 KB
14
- ESM dist/index.mjs.map 107.78 KB
15
- ESM ⚡️ Build success in 140ms
16
- CJS dist/index.js 55.83 KB
17
- CJS dist/index.js.map 107.83 KB
18
- CJS ⚡️ Build success in 148ms
13
+ ESM dist/index.mjs 54.34 KB
14
+ ESM dist/index.mjs.map 108.11 KB
15
+ ESM ⚡️ Build success in 148ms
16
+ CJS dist/index.js 56.06 KB
17
+ CJS dist/index.js.map 108.16 KB
18
+ CJS ⚡️ Build success in 176ms
19
19
  DTS Build start
20
- DTS ⚡️ Build success in 14532ms
21
- DTS dist/index.d.mts 15.60 KB
22
- DTS dist/index.d.ts 15.60 KB
20
+ DTS ⚡️ Build success in 17423ms
21
+ DTS dist/index.d.mts 15.75 KB
22
+ DTS dist/index.d.ts 15.75 KB
package/CHANGELOG.md CHANGED
@@ -1,5 +1,13 @@
1
1
  # @objectstack/driver-memory
2
2
 
3
+ ## 4.0.4
4
+
5
+ ### Patch Changes
6
+
7
+ - Updated dependencies [326b66b]
8
+ - @objectstack/spec@4.0.4
9
+ - @objectstack/core@4.0.4
10
+
3
11
  ## 4.0.3
4
12
 
5
13
  ### Patch Changes
package/dist/index.d.mts CHANGED
@@ -236,6 +236,8 @@ declare class InMemoryDriver implements IDataDriver {
236
236
  flush(): Promise<void>;
237
237
  /**
238
238
  * Detect whether the current runtime is a browser environment.
239
+ * Checks for window, document AND a functional localStorage to avoid
240
+ * false positives in Node.js runtimes that partially polyfill globals.
239
241
  */
240
242
  private isBrowserEnvironment;
241
243
  /**
package/dist/index.d.ts CHANGED
@@ -236,6 +236,8 @@ declare class InMemoryDriver implements IDataDriver {
236
236
  flush(): Promise<void>;
237
237
  /**
238
238
  * Detect whether the current runtime is a browser environment.
239
+ * Checks for window, document AND a functional localStorage to avoid
240
+ * false positives in Node.js runtimes that partially polyfill globals.
239
241
  */
240
242
  private isBrowserEnvironment;
241
243
  /**
package/dist/index.js CHANGED
@@ -1049,9 +1049,12 @@ var _InMemoryDriver = class _InMemoryDriver {
1049
1049
  }
1050
1050
  /**
1051
1051
  * Detect whether the current runtime is a browser environment.
1052
+ * Checks for window, document AND a functional localStorage to avoid
1053
+ * false positives in Node.js runtimes that partially polyfill globals.
1052
1054
  */
1053
1055
  isBrowserEnvironment() {
1054
- return typeof globalThis.localStorage !== "undefined";
1056
+ const g = globalThis;
1057
+ return typeof g.window !== "undefined" && typeof g.document !== "undefined" && typeof g.localStorage?.setItem === "function";
1055
1058
  }
1056
1059
  /**
1057
1060
  * Detect whether the current runtime is a serverless/edge environment.