@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.
- package/.turbo/turbo-build.log +10 -10
- package/CHANGELOG.md +8 -0
- package/dist/index.d.mts +2 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.js +4 -1
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +4 -1
- package/dist/index.mjs.map +1 -1
- package/package.json +3 -3
- package/src/memory-driver.ts +6 -1
- package/vitest.config.ts +22 -0
package/.turbo/turbo-build.log
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
|
|
2
|
-
> @objectstack/driver-memory@4.0.
|
|
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
|
[34mCLI[39m Building entry: src/index.ts
|
|
@@ -10,13 +10,13 @@
|
|
|
10
10
|
[34mCLI[39m Cleaning output folder
|
|
11
11
|
[34mESM[39m Build start
|
|
12
12
|
[34mCJS[39m Build start
|
|
13
|
-
[32mESM[39m [1mdist/index.mjs [22m[32m54.
|
|
14
|
-
[32mESM[39m [1mdist/index.mjs.map [22m[
|
|
15
|
-
[32mESM[39m ⚡️ Build success in
|
|
16
|
-
[32mCJS[39m [1mdist/index.js [22m[
|
|
17
|
-
[32mCJS[39m [1mdist/index.js.map [22m[
|
|
18
|
-
[32mCJS[39m ⚡️ Build success in
|
|
13
|
+
[32mESM[39m [1mdist/index.mjs [22m[32m54.34 KB[39m
|
|
14
|
+
[32mESM[39m [1mdist/index.mjs.map [22m[32m108.11 KB[39m
|
|
15
|
+
[32mESM[39m ⚡️ Build success in 148ms
|
|
16
|
+
[32mCJS[39m [1mdist/index.js [22m[32m56.06 KB[39m
|
|
17
|
+
[32mCJS[39m [1mdist/index.js.map [22m[32m108.16 KB[39m
|
|
18
|
+
[32mCJS[39m ⚡️ Build success in 176ms
|
|
19
19
|
[34mDTS[39m Build start
|
|
20
|
-
[32mDTS[39m ⚡️ Build success in
|
|
21
|
-
[32mDTS[39m [1mdist/index.d.mts [22m[32m15.
|
|
22
|
-
[32mDTS[39m [1mdist/index.d.ts [22m[32m15.
|
|
20
|
+
[32mDTS[39m ⚡️ Build success in 17423ms
|
|
21
|
+
[32mDTS[39m [1mdist/index.d.mts [22m[32m15.75 KB[39m
|
|
22
|
+
[32mDTS[39m [1mdist/index.d.ts [22m[32m15.75 KB[39m
|
package/CHANGELOG.md
CHANGED
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
|
-
|
|
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.
|