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

xpress-mongo

Package Overview
Dependencies
Maintainers
1
Versions
149
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

xpress-mongo - npm Package Compare versions

Comparing version 2.11.0 to 2.12.0

8

package.json
{
"name": "xpress-mongo",
"version": "2.11.0",
"version": "2.12.0",
"description": "Light Weight ODM for mongoDb NodeJs",

@@ -36,3 +36,3 @@ "main": "index.js",

"joi": "^17.6.0",
"mongodb": "4.8.1",
"mongodb": "4.9.0",
"object-collection": "^3.0.1",

@@ -43,3 +43,3 @@ "uuid": "^8.3.2"

"@types/chance": "^1.1.3",
"@types/node": "^18.6.2",
"@types/node": "^18.7.13",
"@types/uuid": "^8.3.4",

@@ -51,3 +51,3 @@ "chance": "^1.1.8",

"ts-node-dev": "^2.0.0",
"typescript": "^4.7.4"
"typescript": "^4.8.2"
},

@@ -54,0 +54,0 @@ "engines": {

import XMongoModel from "./XMongoModel";
import { Collection, Db, MongoClient } from "mongodb";
import XMongoTypedModel from "./XMongoTypedModel";
import { StringToAnyObject } from "./types/index";
declare class XMongoClient {

@@ -47,3 +48,3 @@ client: MongoClient;

*/
typedModel<DT>(collection: string): XMongoTypedModel<DT>;
typedModel<DT extends StringToAnyObject>(collection: string): XMongoTypedModel<DT>;
/**

@@ -50,0 +51,0 @@ * Link a model to a "collection"

@@ -293,3 +293,3 @@ import ObjectCollection from "object-collection";

* Check if a document exists.
* Projects only Id and returns boolean.
* Projects only ID and returns boolean.
*/

@@ -296,0 +296,0 @@ static exists(query: StringToAnyObject): Promise<boolean>;

@@ -339,3 +339,3 @@ "use strict";

/**
* If default value is undefined and schema is required set field to undefined.
* If default value is undefined and schema is required to be set field to undefined.
* else set field to value.

@@ -560,2 +560,4 @@ *

this.$setOriginal(this.data);
// set using custom id to false
this.meta.usingCustomId = false;
// resolve

@@ -592,3 +594,3 @@ resolve(res);

const $unset = {};
// Change keys to Array if its a string
// Change keys to Array if it's a string
if (typeof keys === "string")

@@ -810,3 +812,3 @@ keys = [keys];

* Check if a document exists.
* Projects only Id and returns boolean.
* Projects only ID and returns boolean.
*/

@@ -951,3 +953,3 @@ static async exists(query) {

* options as any is used here because mongodb did not make its new
* WithoutProjection type exportable so we can't make reference to it.
* WithoutProjection type exportable, so we can't make reference to it.
*/

@@ -970,3 +972,3 @@ return this.native().find(query, options);

* options as any is used here because mongodb did not make its new
* WithoutProjection type exportable so we can't make reference to it.
* WithoutProjection type exportable, so we can't make reference to it.
*/

@@ -973,0 +975,0 @@ return this.native().findOne(query, options, (error, data) => {

import XMongoModel from "./XMongoModel";
import { StringToAnyObject } from "./types/index";
import { UpdateOptions, UpdateResult } from "mongodb";
declare class XMongoTypedModel<DT = Record<string, any>> extends XMongoModel {
declare class XMongoTypedModel<DT extends StringToAnyObject = StringToAnyObject> extends XMongoModel {
data: DT;

@@ -6,0 +6,0 @@ set: (key: string | keyof DT | StringToAnyObject | Record<keyof DT | string, any>, value?: any) => this;

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