Huge News!Announcing our $40M Series B led by Abstract Ventures.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.2.1 to 1.2.2

8

CHANGELOG.md

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

## [1.2.2] - 2019-03-10
### Removed
- Schema fields and discriminator keys now allow start wit '\_'
## [1.2.1] - 2019-02-13

@@ -588,2 +594,4 @@

[1.2.2]: https://github.com/Yonirt/moltyjs/compare/v1.2.1...v1.2.2
[1.2.1]: https://github.com/Yonirt/moltyjs/compare/v1.2.0...v1.2.1
[1.2.0]: https://github.com/Yonirt/moltyjs/compare/v1.1.0...v1.2.0

@@ -590,0 +598,0 @@ [1.1.0]: https://github.com/Yonirt/moltyjs/compare/v1.0.10...v1.1.0

21

lib/schema.js

@@ -87,5 +87,8 @@ 'use strict';

/*
// Elastic search does not admit fields starting with '_'
if (key[0] === '_') {
throw new Error('Schema fields can not start with "_": ' + key);
}
*/

@@ -112,5 +115,17 @@ // Objects nested

Object.keys(options[key]).forEach(inheritOptionsKey => {
if (!this._isValidInheritOption(inheritOptionsKey, options[key])) throw new Error('Unsupported schema inherit option: ' + inheritOptionsKey);
if (inheritOptionsKey === 'discriminatorKey' && options[key].discriminatorKey[0] === '_') throw new Error('Discriminator key can not start with "_": ' + options[key].discriminatorKey);
if (!this._isValidInheritOption(inheritOptionsKey, options[key])) {
throw new Error('Unsupported schema inherit option: ' + inheritOptionsKey);
}
/*
// Elastic search does not admit fields starting with '_'
if (
inheritOptionsKey === 'discriminatorKey' &&
options[key].discriminatorKey[0] === '_'
) {
throw new Error(
'Discriminator key can not start with "_": ' +
options[key].discriminatorKey,
);
}
*/
});

@@ -117,0 +132,0 @@ }

2

package.json
{
"name": "moltyjs",
"version": "1.2.1",
"version": "1.2.2",
"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