New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@iobroker/db-base

Package Overview
Dependencies
Maintainers
6
Versions
429
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@iobroker/db-base - npm Package Compare versions

Comparing version 4.0.0-alpha.53-20220127-399b0768 to 4.0.0-alpha.54-20220128-6762bedd

17

lib/inMemFileDB.js

@@ -119,2 +119,17 @@ /**

ret = await this.loadDatasetFile(datasetName);
// loading worked, make sure that "bak" File is not broken
try {
await fs.readJSON(`${datasetName}.bak`);
} catch (e) {
this.log.info(
`${this.namespace} Rewrite bak file, because error on verify ${datasetName}.bak: ${e.message}`
);
try {
const jsonString = JSON.stringify(ret);
await fs.writeFile(`${datasetName}.bak`, jsonString);
} catch (e) {
this.log.error(`${this.namespace} Cannot save ${datasetName}.bak: ${e.message}`);
}
}
} catch (err) {

@@ -124,3 +139,3 @@ this.log.error(`${this.namespace} Cannot load ${datasetName}: ${err.message}. We try last Backup!`);

try {
ret = await this.loadDatasetFile(datasetName + '.bak');
ret = await this.loadDatasetFile(`${datasetName}.bak`);

@@ -127,0 +142,0 @@ // it worked, lets overwrite old file and store the broken one for pot. forensic check

6

package.json
{
"name": "@iobroker/db-base",
"version": "4.0.0-alpha.53-20220127-399b0768",
"version": "4.0.0-alpha.54-20220128-6762bedd",
"engines": {

@@ -8,3 +8,3 @@ "node": ">=12.0.0"

"dependencies": {
"@iobroker/js-controller-common": "4.0.0-alpha.53-20220127-399b0768",
"@iobroker/js-controller-common": "4.0.0-alpha.54-20220128-6762bedd",
"deep-clone": "^3.0.3",

@@ -39,3 +39,3 @@ "fs-extra": "^10.0.0",

],
"gitHead": "2bb52808377c47630ce5a08d37f25565a64bc2ac"
"gitHead": "df746a8ff737e7e91c49ebdfbe7d88a3486ea4d9"
}
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