Skip to content

Commit

Permalink
chore(release): generate latest changelog & bump to v0.17.0
Browse files Browse the repository at this point in the history
  • Loading branch information
lykmapipo committed Apr 24, 2019
1 parent 6e10d77 commit b860716
Show file tree
Hide file tree
Showing 5 changed files with 38 additions and 10 deletions.
10 changes: 10 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,13 @@
#### 0.17.0 (2019-04-24)

##### Chores

* **depedencies:** force latest versions ([d07b1726](https://github.com/lykmapipo/common/commit/d07b17265424884d8611f7fd0bfdd85f2a2f345f))

##### New Features

* allow index on mapErrorToObject ([6e10d777](https://github.com/lykmapipo/common/commit/6e10d777be89014e89cd4329e5d6ed0b99d3f294))

#### 0.16.0 (2019-04-12)

##### Chores
Expand Down
17 changes: 13 additions & 4 deletions es/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -531,7 +531,7 @@ const hasAny = (collection, ...values) => {
* @author lally elias <lallyelias87@mail.com>
* @license MIT
* @since 0.14.0
* @version 0.1.0
* @version 0.2.0
* @static
* @public
* @example
Expand All @@ -546,13 +546,22 @@ const bagify = (errors = {}) => {
// iterate errors ba
forEach(errors, (error = {}, key) => {
// simplify error bag
const { message, name, type, kind, path, value, properties = {} } = error;
const {
message,
name,
type,
kind,
path,
value,
index,
properties = {},
} = error;
const normalized = mergeObjects(
{ message, name, type, kind, path, value },
{ message, name, type, kind, path, value, index },
properties
);
// reset key with normalized error
const props = ['message', 'name', 'type', 'kind', 'path', 'value'];
const props = ['message', 'name', 'type', 'kind', 'path', 'value', 'index'];
bag[key] = pick(normalized, ...props);
});
// return errors bag
Expand Down
17 changes: 13 additions & 4 deletions lib/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -533,7 +533,7 @@ const hasAny = (collection, ...values) => {
* @author lally elias <lallyelias87@mail.com>
* @license MIT
* @since 0.14.0
* @version 0.1.0
* @version 0.2.0
* @static
* @public
* @example
Expand All @@ -548,13 +548,22 @@ const bagify = (errors = {}) => {
// iterate errors ba
lodash.forEach(errors, (error = {}, key) => {
// simplify error bag
const { message, name, type, kind, path, value, properties = {} } = error;
const {
message,
name,
type,
kind,
path,
value,
index,
properties = {},
} = error;
const normalized = mergeObjects(
{ message, name, type, kind, path, value },
{ message, name, type, kind, path, value, index },
properties
);
// reset key with normalized error
const props = ['message', 'name', 'type', 'kind', 'path', 'value'];
const props = ['message', 'name', 'type', 'kind', 'path', 'value', 'index'];
bag[key] = lodash.pick(normalized, ...props);
});
// return errors bag
Expand Down
2 changes: 1 addition & 1 deletion package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@lykmapipo/common",
"version": "0.16.0",
"version": "0.17.0",
"description": "Helper utilities for day to day development",
"main": "lib/index.js",
"module": "es/index.js",
Expand Down

0 comments on commit b860716

Please sign in to comment.