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 0.9.7 to 0.9.8

7

CHANGELOG.md

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

## [0.9.8] - 2018-06-08
### Fixed
- Discriminator schemas did not inherit the timestamp option from the parent
## [0.9.7] - 2018-06-07

@@ -483,2 +489,3 @@

[0.9.8]: https://github.com/Yonirt/moltyjs/compare/v0.9.7...v0.9.8
[0.9.7]: https://github.com/Yonirt/moltyjs/compare/v0.9.6...v0.9.7

@@ -485,0 +492,0 @@ [0.9.6]: https://github.com/Yonirt/moltyjs/compare/v0.9.5...v0.9.6

18

lib/clients/mongoClient.js

@@ -198,11 +198,13 @@ 'use strict';

_applyTimestamps(obj, model, operation) {
if (model._schemaOptions.timestamps && operation === 'insert') {
obj._data['createdAt'] = new Date();
obj._data['updatedAt'] = new Date();
}
if (model._schemaOptions.timestamps) {
if (operation === 'insert') {
obj._data['createdAt'] = new Date();
obj._data['updatedAt'] = new Date();
}
if (model._schemaOptions.timestamps && operation === 'update') {
obj['$currentDate'] = {
updatedAt: true
};
if (operation === 'update') {
obj['$currentDate'] = {
updatedAt: true
};
}
}

@@ -209,0 +211,0 @@

@@ -180,2 +180,6 @@ 'use strict';

if (this._schemaOptions && this._schemaOptions.timestamps) {
schemaAux._options.timestamps = true;
}
schemaAux._schema = Object.assign({}, schemaDiscriminator._schema, this._schemaNormalized);

@@ -182,0 +186,0 @@

{
"name": "moltyjs",
"version": "0.9.7",
"version": "0.9.8",
"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