Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@naturalcycles/db-lib

Package Overview
Dependencies
Maintainers
2
Versions
301
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@naturalcycles/db-lib - npm Package Compare versions

Comparing version 9.9.0 to 9.9.1

20

dist/commondao/common.dao.js

@@ -497,8 +497,11 @@ "use strict";

if (opt.skipDBRead) {
const bmBefore = (0, js_lib_1._deepCopy)(bm);
Object.assign(bm, patch);
if ((0, js_lib_1._deepJsonEquals)(bm, bmBefore)) {
const patched = {
...bm,
...patch,
};
if ((0, js_lib_1._deepJsonEquals)(bm, patched)) {
// Skipping the save operation, as data is the same
return bm;
}
Object.assign(bm, patch);
}

@@ -508,9 +511,12 @@ else {

if (loaded) {
Object.assign(loaded, patch);
if ((0, js_lib_1._deepJsonEquals)(loaded, bm)) {
const loadedWithPatch = {
...loaded,
...patch,
};
// Make `bm` exactly the same as `loadedWithPatch`
(0, js_lib_1._objectAssignExact)(bm, loadedWithPatch);
if ((0, js_lib_1._deepJsonEquals)(loaded, loadedWithPatch)) {
// Skipping the save operation, as data is the same
return bm;
}
// Make `bm` exactly the same as `loaded`
(0, js_lib_1._objectAssignExact)(bm, loaded);
}

@@ -517,0 +523,0 @@ else {

@@ -43,3 +43,3 @@ {

},
"version": "9.9.0",
"version": "9.9.1",
"description": "Lowest Common Denominator API to supported Databases",

@@ -46,0 +46,0 @@ "keywords": [

@@ -672,8 +672,12 @@ import { Transform } from 'node:stream'

if (opt.skipDBRead) {
const bmBefore = _deepCopy(bm)
Object.assign(bm, patch)
if (_deepJsonEquals(bm, bmBefore)) {
const patched: BM = {
...bm,
...patch,
}
if (_deepJsonEquals(bm, patched)) {
// Skipping the save operation, as data is the same
return bm
}
Object.assign(bm, patch)
} else {

@@ -683,11 +687,14 @@ const loaded = await this.getById(bm.id, opt)

if (loaded) {
Object.assign(loaded, patch)
const loadedWithPatch: BM = {
...loaded,
...patch,
}
if (_deepJsonEquals(loaded, bm)) {
// Make `bm` exactly the same as `loadedWithPatch`
_objectAssignExact(bm, loadedWithPatch)
if (_deepJsonEquals(loaded, loadedWithPatch)) {
// Skipping the save operation, as data is the same
return bm
}
// Make `bm` exactly the same as `loaded`
_objectAssignExact(bm, loaded)
} else {

@@ -694,0 +701,0 @@ Object.assign(bm, patch)

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc