objection-unique
Advanced tools
# Changelog | ||
## [v1.0.0](https://github.com/seegno/objection-unique/tree/v1.0.0) (2018-03-01) | ||
[Full Changelog](https://github.com/seegno/objection-unique/compare/v0.2.1...v1.0.0) | ||
**Merged pull requests:** | ||
- Add objection to peer dependencies [\#11](https://github.com/seegno/objection-unique/pull/11) ([nunorafaelrocha](https://github.com/nunorafaelrocha)) | ||
- Remove node 4 support [\#10](https://github.com/seegno/objection-unique/pull/10) ([nunorafaelrocha](https://github.com/nunorafaelrocha)) | ||
- Update for compatibility with Objection 1.0.0 [\#8](https://github.com/seegno/objection-unique/pull/8) ([trey-baker](https://github.com/trey-baker)) | ||
## [v0.2.1](https://github.com/seegno/objection-unique/tree/v0.2.1) (2017-09-28) | ||
@@ -4,0 +13,0 @@ [Full Changelog](https://github.com/seegno/objection-unique/compare/v0.2.0...v0.2.1) |
@@ -66,3 +66,6 @@ 'use strict'; | ||
if (!isEmpty(errors)) { | ||
throw Model.createValidationError(errors); | ||
throw Model.createValidationError({ | ||
data: errors, | ||
type: 'ModelValidation' | ||
}); | ||
} | ||
@@ -69,0 +72,0 @@ }); |
{ | ||
"name": "objection-unique", | ||
"version": "0.2.1", | ||
"version": "1.0.0", | ||
"description": "objection-unique", | ||
@@ -57,8 +57,11 @@ "keywords": [ | ||
"lint-staged": "^3.4.1", | ||
"objection": "^0.8.5", | ||
"objection": "^1.0.0", | ||
"pre-commit": "^1.2.2", | ||
"sqlite3": "^3.1.8" | ||
}, | ||
"peerDependencies": { | ||
"objection": ">=1.0.0" | ||
}, | ||
"engines": { | ||
"node": ">=4.2.0" | ||
"node": ">=6" | ||
}, | ||
@@ -65,0 +68,0 @@ "jest": { |
@@ -114,6 +114,6 @@ # Unique validation for Objection.js | ||
```js | ||
const unique = require('objection-unique')( | ||
const unique = require('objection-unique')({ | ||
fields: ['email', 'username'], | ||
identifiers: ['id'] | ||
); | ||
}); | ||
``` | ||
@@ -120,0 +120,0 @@ |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
Found 1 instance in 1 package
285170
96.55%2301
29.71%322
0.94%1
-50%0
-100%3
50%