Socket
Socket
Sign inDemoInstall

@oridune/epic-odm

Package Overview
Dependencies
Maintainers
2
Versions
81
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@oridune/epic-odm - npm Package Compare versions

Comparing version 1.0.31 to 1.0.32

2

package.json
{
"name": "@oridune/epic-odm",
"version": "1.0.31",
"version": "1.0.32",
"description": "Install 1 ODM and code once with any database driver.",

@@ -5,0 +5,0 @@ "main": "./src/index.js",

@@ -148,2 +148,7 @@ "use strict";

break;
case "Increment":
Results["$inc"] = {
[Key]: Target.Value,
};
break;
case "ReplaceWith":

@@ -397,2 +402,8 @@ Results["$replaceWith"] = {

const ModelOptions = (0, model_1.getModelOptions)(model);
// Resolve Dataset
const Dataset = merge ? TransposeToNative([data])[0] : data;
const Incrementor = typeof Dataset["$inc"] === "object"
? { $inc: Dataset["$inc"] }
: undefined;
delete Dataset["$inc"];
// Create New Document

@@ -402,3 +413,3 @@ const Results = await (await this.getConnectionObject())

.collection(ModelOptions.getResolvedName())
.updateMany({ _id: { $in: targets.map((_) => _._id) } }, { $set: merge ? TransposeToNative([data])[0] : data }, { session: connection });
.updateMany({ _id: { $in: targets.map((_) => _._id) } }, Object.assign({ $set: Dataset }, Incrementor), { session: connection });
return { updatedCount: Results.modifiedCount };

@@ -405,0 +416,0 @@ }

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