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

mvom

Package Overview
Dependencies
Maintainers
3
Versions
57
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

mvom - npm Package Compare versions

Comparing version 0.8.0 to 0.9.0

21

CHANGELOG.md
# CHANGELOG.md
## 0.9.0
### Breaking changes
###### _2020-05-18_
- Eliminate implicit `required` validation of primitive arrays that was occurring if the primitive's schema definition indicated it was `required`. This effectively made it so that arrays must have a length greater than 0 if the contents of the array were required. This caused the `required` flag to effectively serve double-duty -- preventing `null`/`undefined` contents of arrays and enforcing that arrays contained contents. @shawnmcknight
## 0.8.0
###### _2020_04_21_
###### _2020-04-21_
- Add support to encrypt and decrypt strings and ISO calendar dates. String and ISOCalendarDate type fields can be marked as `encrypted`. The Schema constructor now accepts optional `encrypt` and `decrypt` functions. If a field is marked as `encrypted` these provided functions will be run. @kthompson23

@@ -8,3 +13,3 @@

### Breaking changes
###### _2020_04_03_
###### _2020-04-03_
- Update to fix dependency vulnerabilities @shawnmcknight

@@ -14,3 +19,3 @@ - Expose the `Document` constructor and allow a record to be passed in the constructor without having fetched it from the DB @reedmattos

## 0.6.2
###### _2020_03_24_
###### _2020-03-24_
- Fix a deployment issue introduced in 0.6.0. Make sure that all features needed for the `deploy` feature are deployed as part of a bootstrap step @kthompson23

@@ -22,3 +27,3 @@ - Add temporary workarounds for several issues identified in UniQuery @kthompson23

## 0.6.1
###### _2020_03_13_
###### _2020-03-13_
- Allow for regular expression pattern matching for strings and ids. Strings will accept a property named `match` in the schema definition for any string type. Document ids can be matched by providing an `idMatch` property to the Schema constructor options. @reedmattos

@@ -29,3 +34,3 @@ - Update some vulnerable dependencies @shawnmcknight

### Breaking changes
###### _2020_03_03_
###### _2020-03-03_
- Add new setup and teardown features which will run before and after a subroutine feature to setup and teardown the environment. While configurable, the initial implementation creates and clears a named common block called `S$MVOM`, which includes one variable called `S$MVOM.PROCESS` set to `true`. UniBasic programs can check for this variable to determine if they were initiated by `MVIS`. This may be necessary when code not shipped through MVOM is run like in a database trigger or virtual dictionary. @kthompson23

@@ -42,3 +47,3 @@

## 0.5.2
###### _2020_02_25_
###### _2020-02-25_
- Allow for null schemas passed to the model constructor. When schemas are null, no mapping of the record to a document (and vice versa) will occur. Instead, a property named `_raw` will be added to the document which contains an array of the record contents. When saving, this array will overwrite the entire record. @reedmattos

@@ -148,3 +153,3 @@

### Breaking changes
###### _2018-05-30
###### _2018-05-30_
- Document constructor no longer accepts "record" -- instead it accepts an object of data @shawnmcknight

@@ -155,3 +160,3 @@ - Plain objects can now be used with subdocuments, enabling far easier use of thse structures @shawnmcknight

### Breaking changes
###### _2018-05-07
###### _2018-05-07_
- Use array of arrays for sort criteria to preserve sequencing; can no longer be specified as object @kthompson23

@@ -158,0 +163,0 @@

@@ -10,4 +10,2 @@ "use strict";

var _utils = require("../../../ts/shared/utils");
var _BasePrimitiveArrayType = _interopRequireDefault(require("./BasePrimitiveArrayType"));

@@ -42,3 +40,3 @@

return (0, _lodash.compact)((0, _lodash.flatten)((await Promise.all(this._validators.concat((0, _utils.handleRequiredValidation)(this._required, this._validateRequired)).map(async ({
return (0, _lodash.compact)((0, _lodash.flatten)((await Promise.all(this._validators.map(async ({
validator,

@@ -45,0 +43,0 @@ message

@@ -43,2 +43,9 @@ "use strict";

super();
/**
* A schemaType representing the type of the array's contents
* @member {SimpleType} _valueSchemaType
* @memberof ArrayType
* @instance
* @private
*/

@@ -68,25 +75,3 @@ _defineProperty(this, "get", () => {

_defineProperty(this, "_validateRequired", async value => value.length > 0);
const {
required = false
} = valueSchemaType.definition;
/**
* A schemaType representing the type of the array's contents
* @member {SimpleType} _valueSchemaType
* @memberof ArrayType
* @instance
* @private
*/
this._valueSchemaType = valueSchemaType;
/**
* Required validation value for the array
* @member {Boolean|Function} _required
* @memberof ArrayType
* @instance
* @private
*/
this._required = required;
}

@@ -93,0 +78,0 @@ /* public instance methods */

@@ -10,4 +10,2 @@ "use strict";

var _utils = require("../../../ts/shared/utils");
var _BasePrimitiveArrayType = _interopRequireDefault(require("./BasePrimitiveArrayType"));

@@ -43,3 +41,3 @@

return (0, _lodash.compact)((0, _lodash.flatten)((await Promise.all(this._validators.concat((0, _utils.handleRequiredValidation)(this._required, this._validateRequired)).map(async ({
return (0, _lodash.compact)((0, _lodash.flatten)((await Promise.all(this._validators.map(async ({
validator,

@@ -46,0 +44,0 @@ message

{
"name": "mvom",
"author": "STORIS",
"version": "0.8.0",
"version": "0.9.0",
"description": "Multivalue Object Mapper",

@@ -6,0 +6,0 @@ "main": "./js/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