v8r 0.14.0 → 2.0.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
@@ -1,5 +1,17 @@
1
1
  # Changelog
2
2
 
3
+ ## 📦 [2.0.0](https://www.npmjs.com/package/v8r/v/2.0.0) - 2023-05-02
4
+
5
+ * Drop compatibility with node 14
6
+ * Upgrade glob and minimatch to latest versions
7
+ * Tested on node 20
8
+
9
+ ## 📦 [1.0.0](https://www.npmjs.com/package/v8r/v/1.0.0) - 2023-03-12
10
+
11
+ Version 1.0.0 contains no new features and no bug fixes.
12
+ The one change in this release is that the project now publishes a
13
+ [SemVer compatibility statement](https://github.com/chris48s/v8r/blob/main/README.md#versioning).
14
+
3
15
  ## 📦 [0.14.0](https://www.npmjs.com/package/v8r/v/0.14.0) - 2023-01-28
4
16
 
5
17
  * Throw an error if multiple versions of a schema are found in the catalog,
package/README.md CHANGED
@@ -179,6 +179,20 @@ The config file format is specified more formally in a JSON Schema:
179
179
  * v8r always exits with code `99` when:
180
180
  * The input glob pattern matched one or more files, one or more input files were validated against a schema and the input file was **invalid**
181
181
 
182
+ ## Versioning
183
+
184
+ v8r follows [semantic versioning](https://semver.org/). For this project, the "API" is defined as:
185
+
186
+ - CLI flags and options
187
+ - CLI exit codes
188
+ - The configuration file format
189
+ - The native JSON output format
190
+
191
+ A "breaking change" also includes:
192
+
193
+ - Dropping compatibility with a major Node JS version
194
+ - Dropping support for a JSON Schema draft
195
+
182
196
  ## FAQ
183
197
 
184
198
  ### ❓ How does `v8r` decide what schema to validate against if I don't supply one?
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "v8r",
3
- "version": "0.14.0",
3
+ "version": "2.0.0",
4
4
  "description": "A command-line JSON and YAML validator that's on your wavelength",
5
5
  "scripts": {
6
6
  "test": "V8R_CACHE_NAME=v8r-test c8 --reporter=text mocha \"src/**/*.spec.js\"",
@@ -35,12 +35,12 @@
35
35
  "cosmiconfig": "^8.0.0",
36
36
  "decamelize": "^6.0.0",
37
37
  "flat-cache": "^3.0.4",
38
- "glob": "^8.0.1",
38
+ "glob": "^10.1.0",
39
39
  "got": "^12.0.1",
40
40
  "is-url": "^1.2.4",
41
41
  "js-yaml": "^4.0.0",
42
42
  "json5": "^2.2.0",
43
- "minimatch": "^6.1.6",
43
+ "minimatch": "^9.0.0",
44
44
  "yargs": "^17.0.1"
45
45
  },
46
46
  "devDependencies": {
@@ -57,7 +57,7 @@
57
57
  "prettier": "^2.1.2"
58
58
  },
59
59
  "engines": {
60
- "node": ">=14.13.1"
60
+ "node": ">=16"
61
61
  },
62
62
  "type": "module",
63
63
  "keywords": [
package/src/catalogs.js CHANGED
@@ -1,4 +1,4 @@
1
- import minimatch from "minimatch";
1
+ import { minimatch } from "minimatch";
2
2
  import path from "path";
3
3
  import { validate } from "./ajv.js";
4
4
  import { getFromUrlOrFile } from "./io.js";
package/src/glob.js CHANGED
@@ -1,17 +1,9 @@
1
- import glob from "glob";
1
+ import { glob } from "glob";
2
2
  import logger from "./logger.js";
3
3
 
4
- const globPromise = function (pattern, options) {
5
- return new Promise((resolve, reject) => {
6
- glob(pattern, options, (err, files) =>
7
- err === null ? resolve(files) : reject(err)
8
- );
9
- });
10
- };
11
-
12
4
  async function getFiles(pattern) {
13
5
  try {
14
- return await globPromise(pattern, { dot: true });
6
+ return await glob(pattern, { dot: true, dotRelative: true });
15
7
  } catch (e) {
16
8
  logger.error(e.message);
17
9
  return [];