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

moltyjs

Package Overview
Dependencies
Maintainers
1
Versions
71
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

moltyjs - npm Package Compare versions

Comparing version 1.0.4 to 1.0.5

7

CHANGELOG.md

@@ -20,2 +20,8 @@ ## [Unreleased]

## [1.0.5] - 2018-07-11
### Fixed
- Bug in custom mongoDB indexes in discriminators schemas #2
## [1.0.4] - 2018-07-11

@@ -529,2 +535,3 @@

[1.0.5]: https://github.com/Yonirt/moltyjs/compare/v1.0.4...v1.0.5
[1.0.4]: https://github.com/Yonirt/moltyjs/compare/v1.0.3...v1.0.4

@@ -531,0 +538,0 @@ [1.0.3]: https://github.com/Yonirt/moltyjs/compare/v1.0.2...v1.0.3

10

lib/clients/mongoClient.js

@@ -162,6 +162,7 @@ 'use strict';

Object.keys(schema).forEach(key => {
if ('unique' in schema[key] && schema[key].unique) {
const index = { key: { [key]: 1 }, unique: true, name: key };
indexes.push(index);
Object.keys(schema).forEach(field => {
if ('unique' in schema[field] && schema[field].unique) {
if (!indexes.some(index => !!index.key[field])) {
indexes.push({ key: { [field]: 1 }, unique: true, name: field });
}
}

@@ -173,3 +174,2 @@ });

}
this._indexes[model._modelName] = indexes;

@@ -176,0 +176,0 @@ }

{
"name": "moltyjs",
"version": "1.0.4",
"version": "1.0.5",
"description": "A tiny ODM for MongoDB with multy tenancy support.",

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

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