v8r 6.0.0 → 6.1.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 +7 -0
- package/package.json +10 -10
- package/src/cache.js +4 -0
- package/src/catalogs.js +1 -1
- /package/src/{test-helpers.js → testhelpers.js} +0 -0
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,12 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 📦 [6.1.0](https://www.npmjs.com/package/v8r/v/6.1.0) - 2026-05-17
|
|
4
|
+
|
|
5
|
+
* v8r is now tested on node 26.
|
|
6
|
+
* Improve caching of redirect responses.
|
|
7
|
+
* Call www.schemastore.org instead of json.schemastore.org.
|
|
8
|
+
* Testing and documentation improvements.
|
|
9
|
+
|
|
3
10
|
## 📦 [6.0.0](https://www.npmjs.com/package/v8r/v/6.0.0) - 2026-02-21
|
|
4
11
|
|
|
5
12
|
* **Breaking:** Drop compatibility with node 20
|
package/package.json
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "v8r",
|
|
3
|
-
"version": "6.
|
|
3
|
+
"version": "6.1.0",
|
|
4
4
|
"description": "A command-line JSON, YAML and TOML validator that's on your wavelength",
|
|
5
5
|
"scripts": {
|
|
6
|
-
"test": "V8R_CACHE_NAME=v8r-test
|
|
6
|
+
"test": "V8R_CACHE_NAME=v8r-test node --test --experimental-test-coverage",
|
|
7
7
|
"lint": "eslint \"**/*.{js,cjs,mjs}\"",
|
|
8
|
-
"coverage": "
|
|
8
|
+
"coverage": "./coverage.sh",
|
|
9
9
|
"prettier": "prettier --write \"**/*.{js,cjs,mjs}\"",
|
|
10
10
|
"prettier:check": "prettier --check \"**/*.{js,cjs,mjs}\"",
|
|
11
11
|
"v8r": "src/index.js",
|
|
@@ -17,7 +17,7 @@
|
|
|
17
17
|
},
|
|
18
18
|
"exports": "./src/public.js",
|
|
19
19
|
"files": [
|
|
20
|
-
"src/**/!(*.
|
|
20
|
+
"src/**/!(*.test).js",
|
|
21
21
|
"config-schema.json",
|
|
22
22
|
"CHANGELOG.md"
|
|
23
23
|
],
|
|
@@ -37,8 +37,8 @@
|
|
|
37
37
|
"decamelize": "^6.0.0",
|
|
38
38
|
"flat-cache": "^6.1.4",
|
|
39
39
|
"glob": "^13.0.0",
|
|
40
|
-
"global-agent": "^
|
|
41
|
-
"got": "^
|
|
40
|
+
"global-agent": "^4.1.3",
|
|
41
|
+
"got": "^15.0.5",
|
|
42
42
|
"ignore": "^7.0.0",
|
|
43
43
|
"is-url": "^1.2.4",
|
|
44
44
|
"js-yaml": "^4.0.0",
|
|
@@ -51,14 +51,14 @@
|
|
|
51
51
|
},
|
|
52
52
|
"devDependencies": {
|
|
53
53
|
"@eslint/js": "^10.0.1",
|
|
54
|
-
"
|
|
55
|
-
"esbuild": "^0.
|
|
54
|
+
"cobertura": "^1.0.3",
|
|
55
|
+
"esbuild": "^0.28.0",
|
|
56
56
|
"eslint": "^10.0.1",
|
|
57
57
|
"eslint-config-prettier": "^10.1.2",
|
|
58
58
|
"eslint-plugin-jsdoc": "^62.7.0",
|
|
59
|
-
"eslint-plugin-
|
|
59
|
+
"eslint-plugin-node-core-test": "^0.2.1",
|
|
60
60
|
"eslint-plugin-prettier": "^5.0.0",
|
|
61
|
-
"
|
|
61
|
+
"globals": "^17.3.0",
|
|
62
62
|
"mock-cwd": "^1.0.0",
|
|
63
63
|
"nock": "^14.0.4",
|
|
64
64
|
"prettier": "^3.0.0",
|
package/src/cache.js
CHANGED
|
@@ -66,6 +66,10 @@ class Cache {
|
|
|
66
66
|
const parsedBody = parseSchema(resp.body, url);
|
|
67
67
|
if (this.ttl > 0) {
|
|
68
68
|
this.cache.set(url, { body: parsedBody });
|
|
69
|
+
const finalUrl = resp.url;
|
|
70
|
+
if (finalUrl !== url) {
|
|
71
|
+
this.cache.set(finalUrl, { body: parsedBody });
|
|
72
|
+
}
|
|
69
73
|
if (persist) {
|
|
70
74
|
this.cache.save(true);
|
|
71
75
|
}
|
package/src/catalogs.js
CHANGED
|
@@ -7,7 +7,7 @@ import logger from "./logger.js";
|
|
|
7
7
|
const SCHEMASTORE_CATALOG_URL =
|
|
8
8
|
"https://www.schemastore.org/api/json/catalog.json";
|
|
9
9
|
const SCHEMASTORE_CATALOG_SCHEMA_URL =
|
|
10
|
-
"https://
|
|
10
|
+
"https://www.schemastore.org/schema-catalog.json";
|
|
11
11
|
|
|
12
12
|
function coerceMatch(inMatch) {
|
|
13
13
|
const outMatch = {};
|
|
File without changes
|