@openaddresses/batch-schema 2.3.1 → 2.3.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -10,6 +10,19 @@
10
10
 
11
11
  ## Version History
12
12
 
13
+ ### v2.3.4
14
+
15
+ - :arrow_up: Update base deps
16
+
17
+ ### v2.3.3
18
+
19
+ - :rocket: Name exports explicitly instead of returning object for ES module compat.
20
+
21
+ ### v2.3.2
22
+
23
+ - :bug: Fix a status code error handling bug which would crash express
24
+ - :arrow_Up: Update Base Deps
25
+
13
26
  ### v2.3.1
14
27
 
15
28
  - :arrow_up: Update Base Deps
package/README.md CHANGED
@@ -5,7 +5,13 @@
5
5
  ## Installation
6
6
 
7
7
  ```sh
8
- npm add @openaddresses/batch-schema
8
+ yarn add @openaddresses/batch-schema
9
+ ```
10
+
11
+ or
12
+
13
+ ```sh
14
+ npm i @openaddresses/batch-schema
9
15
  ```
10
16
 
11
17
  ## Example Usage
package/index.js CHANGED
@@ -1,6 +1,4 @@
1
1
  'use strict';
2
2
 
3
- module.exports = {
4
- Schema: require('./lib/schema'),
5
- Err: require('./lib/error')
6
- };
3
+ module.exports.Schema = require('./lib/schema');
4
+ module.exports.Err = require('./lib/error')
package/lib/error.js CHANGED
@@ -25,7 +25,7 @@ class PublicError {
25
25
 
26
26
  // Duplicate Express supported Error extensions
27
27
  } else if (err instanceof Error && (err.status || err.statusCode)) {
28
- res.status(err.status).json({
28
+ res.status(err.status || err.statusCode).json({
29
29
  status: err.status || err.statusCode,
30
30
  message: err.message || 'Generic Error',
31
31
  messages: messages
package/package.json CHANGED
@@ -1,9 +1,9 @@
1
1
  {
2
2
  "name": "@openaddresses/batch-schema",
3
3
  "root": true,
4
- "version": "2.3.1",
4
+ "version": "2.3.4",
5
5
  "description": "Strongly Validated JSON Schema support for address",
6
- "repository": "git@github.com:openaddresses/batch",
6
+ "repository": "git@github.com:openaddresses/batch-schema",
7
7
  "author": "ingalls <nick@ingalls.ca>",
8
8
  "license": "MIT",
9
9
  "private": false,