@naturalcycles/db-lib 10.46.0 → 10.46.1
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.
|
@@ -659,14 +659,11 @@ export class CommonDao {
|
|
|
659
659
|
_typeCast(dbm);
|
|
660
660
|
if (!Buffer.isBuffer(dbm.__compressed))
|
|
661
661
|
return; // No compressed data
|
|
662
|
-
|
|
663
|
-
|
|
664
|
-
|
|
665
|
-
|
|
666
|
-
|
|
667
|
-
Object.assign(dbm, properties);
|
|
668
|
-
}
|
|
669
|
-
catch { }
|
|
662
|
+
// todo: stop supporting Inflate when we are sure that we have migrated everything to zstd
|
|
663
|
+
const bufferString = await decompressZstdOrInflateToString(dbm.__compressed);
|
|
664
|
+
const properties = JSON.parse(bufferString);
|
|
665
|
+
dbm.__compressed = undefined;
|
|
666
|
+
Object.assign(dbm, properties);
|
|
670
667
|
}
|
|
671
668
|
anyToDBM(dbm, _opt = {}) {
|
|
672
669
|
if (!dbm)
|
package/package.json
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@naturalcycles/db-lib",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "10.46.
|
|
4
|
+
"version": "10.46.1",
|
|
5
5
|
"dependencies": {
|
|
6
6
|
"@naturalcycles/js-lib": "^15",
|
|
7
7
|
"@naturalcycles/nodejs-lib": "^15"
|
|
8
8
|
},
|
|
9
9
|
"devDependencies": {
|
|
10
|
-
"@typescript/native-preview": "7.0.0-dev.
|
|
10
|
+
"@typescript/native-preview": "7.0.0-dev.20260301.1",
|
|
11
11
|
"@naturalcycles/dev-lib": "18.4.2"
|
|
12
12
|
},
|
|
13
13
|
"files": [
|
|
@@ -856,13 +856,11 @@ export class CommonDao<
|
|
|
856
856
|
_typeCast<Compressed<DBM>>(dbm)
|
|
857
857
|
if (!Buffer.isBuffer(dbm.__compressed)) return // No compressed data
|
|
858
858
|
|
|
859
|
-
|
|
860
|
-
|
|
861
|
-
|
|
862
|
-
|
|
863
|
-
|
|
864
|
-
Object.assign(dbm, properties)
|
|
865
|
-
} catch {}
|
|
859
|
+
// todo: stop supporting Inflate when we are sure that we have migrated everything to zstd
|
|
860
|
+
const bufferString = await decompressZstdOrInflateToString(dbm.__compressed)
|
|
861
|
+
const properties = JSON.parse(bufferString)
|
|
862
|
+
dbm.__compressed = undefined
|
|
863
|
+
Object.assign(dbm, properties)
|
|
866
864
|
}
|
|
867
865
|
|
|
868
866
|
anyToDBM(dbm: undefined, opt?: CommonDaoOptions): null
|