@openaddresses/batch-schema 4.3.0 → 4.4.0

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,10 @@
10
10
 
11
11
  ## Version History
12
12
 
13
+ ### v4.4.0
14
+
15
+ - :rocket: Add ability to take a `URL` as a schemas directory
16
+
13
17
  ### v4.3.0
14
18
 
15
19
  - :arrow_up: Update base deps
package/lib/schema.js CHANGED
@@ -47,8 +47,11 @@ export default class Schemas {
47
47
  if (!router) throw new Error('Router Param Required');
48
48
 
49
49
  if (!opts.schemas) {
50
- this.schemas_path = String(new URL('../schema/', import.meta.url)).replace('file://', '');
50
+ this.schemas_path = new URL('../schema/', import.meta.url).pathname;
51
51
  } else {
52
+ if (dir instanceof URL) dir = dir.pathname;
53
+ else dir = String(dir)
54
+
52
55
  this.schemas_path = opts.schemas;
53
56
  }
54
57
 
package/package.json CHANGED
@@ -3,7 +3,7 @@
3
3
  "type": "module",
4
4
  "root": true,
5
5
  "main": "index.js",
6
- "version": "4.3.0",
6
+ "version": "4.4.0",
7
7
  "description": "Strongly Validated JSON Schema support for address",
8
8
  "repository": "git@github.com:openaddresses/batch-schema",
9
9
  "author": "ingalls <nick@ingalls.ca>",