chore(deps): bump @hyperjump/json-schema from 1.6.7 to 1.9.3 (#8363)

* chore(deps): bump @hyperjump/json-schema from 1.6.7 to 1.9.3

  Bumps [@hyperjump/json-schema](https://github.com/hyperjump-io/json-schema) from 1.6.7 to 1.9.3.
  - [Commits](https://github.com/hyperjump-io/json-schema/compare/v1.6.7...v1.9.3)

  ---
  updated-dependencies:
  - dependency-name: "@hyperjump/json-schema"
    dependency-type: direct:development
    update-type: version-update:semver-minor
  ...

  Signed-off-by: dependabot[bot] <support@github.com>

* chore(deps): Add dev dependency on @hyperjump/browser

  @hyperjump/json-schema (v1.7.0 and later) depends upon
  @hyperjump/browser, but fails to declare it as a dependency,
  only listing it as a peer dependency, so said package must be
  installed separately.

* fix(tests): Use BASIC output as DETAILED is no longer supported

  See issue hyperjump-io/json-chema#68 for additional info.

* feat(tests): Add more informational output in case of test failure

  Since the BASIC output of the schema verifier is (slightly) less
  helpful than the old DETAILED output, add an additional output
  containing the first invalid path, e.g.:

      #/9.3.0/0/exports/textToDom/newModule

  in the results object returned by validate, since this is the
  most useful part of that info.

  Also use console.error and console.info instead of console.log
  where appropriate.

* chore(tests): Format

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Christopher Allen <cpcallen+git@google.com>
This commit is contained in:
dependabot[bot]
2024-07-19 11:22:07 +01:00
committed by GitHub
parent 1e3d3fde1c
commit 8cad97a214
3 changed files with 61 additions and 58 deletions

101
package-lock.json generated
View File

@@ -16,6 +16,7 @@
"@blockly/block-test": "^6.0.4",
"@blockly/dev-tools": "^8.0.4",
"@blockly/theme-modern": "^6.0.3",
"@hyperjump/browser": "^1.1.4",
"@hyperjump/json-schema": "^1.5.0",
"@microsoft/api-documenter": "^7.22.4",
"@microsoft/api-extractor": "^7.29.5",
@@ -324,15 +325,6 @@
"node": "^12.22.0 || ^14.17.0 || >=16.0.0"
}
},
"node_modules/@fastify/busboy": {
"version": "2.0.0",
"resolved": "https://registry.npmjs.org/@fastify/busboy/-/busboy-2.0.0.tgz",
"integrity": "sha512-JUFJad5lv7jxj926GPgymrWQxxjPYuJNiNjNMzqT+HiuP6Vl3dk5xzG+8sTX96np0ZAluvaMzPsjhHZ5rNuNQQ==",
"dev": true,
"engines": {
"node": ">=14"
}
},
"node_modules/@gulp-sourcemaps/identity-map": {
"version": "2.0.1",
"resolved": "https://registry.npmjs.org/@gulp-sourcemaps/identity-map/-/identity-map-2.0.1.tgz",
@@ -463,33 +455,17 @@
"integrity": "sha512-6EwiSjwWYP7pTckG6I5eyFANjPhmPjUX9JRLUSfNPC7FX7zK9gyZAfUEaECL6ALTpGX5AjnBq3C9XmVWPitNpw==",
"dev": true
},
"node_modules/@hyperjump/json-pointer": {
"version": "1.0.1",
"resolved": "https://registry.npmjs.org/@hyperjump/json-pointer/-/json-pointer-1.0.1.tgz",
"integrity": "sha512-vV2pSc7JCwbKEMzh8kr/ICZdO+UZbA3aZ7N8t7leDi9cduWKa9yoP5LS04LnsbErlPbUNHvWBFlbTaR/o/uf7A==",
"node_modules/@hyperjump/browser": {
"version": "1.1.4",
"resolved": "https://registry.npmjs.org/@hyperjump/browser/-/browser-1.1.4.tgz",
"integrity": "sha512-85rfa3B79MssMOxNChvXJhfgvIXqA2FEzwrxKe9iMpCKZVQIxQe54w210VeFM0D33pVOeNskg7TyptSjenY2+w==",
"dev": true,
"license": "MIT",
"dependencies": {
"just-curry-it": "^5.3.0"
},
"funding": {
"type": "github",
"url": "https://github.com/sponsors/jdesrosiers"
}
},
"node_modules/@hyperjump/json-schema": {
"version": "1.6.7",
"resolved": "https://registry.npmjs.org/@hyperjump/json-schema/-/json-schema-1.6.7.tgz",
"integrity": "sha512-6ufO5Iov85FBXQ1a//7sQDwzZRoyEMR1MD7Te6k00DvApvj1/x3k/S1RcPmmPCCuj7BDxHVixu4qBTM6sBsmBA==",
"dev": true,
"dependencies": {
"@hyperjump/json-pointer": "^1.0.0",
"@hyperjump/pact": "^1.2.0",
"@hyperjump/json-pointer": "^1.1.0",
"@hyperjump/uri": "^1.2.0",
"content-type": "^1.0.4",
"fastest-stable-stringify": "^2.0.2",
"just-curry-it": "^5.3.0",
"undici": "^5.19.1",
"uuid": "^9.0.0"
"content-type": "^1.0.5",
"just-curry-it": "^5.3.0"
},
"engines": {
"node": ">=18.0.0"
@@ -499,6 +475,38 @@
"url": "https://github.com/sponsors/jdesrosiers"
}
},
"node_modules/@hyperjump/json-pointer": {
"version": "1.1.0",
"resolved": "https://registry.npmjs.org/@hyperjump/json-pointer/-/json-pointer-1.1.0.tgz",
"integrity": "sha512-tFCKxMKDKK3VEdtUA3EBOS9GmSOS4mbrTjh9v3RnK10BphDMOb6+bxTh++/ae1AyfHyWb6R54O/iaoAtPMZPCg==",
"dev": true,
"funding": {
"type": "github",
"url": "https://github.com/sponsors/jdesrosiers"
}
},
"node_modules/@hyperjump/json-schema": {
"version": "1.9.3",
"resolved": "https://registry.npmjs.org/@hyperjump/json-schema/-/json-schema-1.9.3.tgz",
"integrity": "sha512-NZyQ+PSQKUVIO0PInwqk2EOOObJD/ZqR9awzZeOddwtJyLZaxim9/xizZ6gGxGZi5ZGIdIB1mkBTM9fBu85E4A==",
"dev": true,
"dependencies": {
"@hyperjump/json-pointer": "^1.1.0",
"@hyperjump/pact": "^1.2.0",
"@hyperjump/uri": "^1.2.0",
"content-type": "^1.0.4",
"json-stringify-deterministic": "^1.0.12",
"just-curry-it": "^5.3.0",
"uuid": "^9.0.0"
},
"funding": {
"type": "github",
"url": "https://github.com/sponsors/jdesrosiers"
},
"peerDependencies": {
"@hyperjump/browser": "^1.1.0"
}
},
"node_modules/@hyperjump/pact": {
"version": "1.2.0",
"resolved": "https://registry.npmjs.org/@hyperjump/pact/-/pact-1.2.0.tgz",
@@ -4827,12 +4835,6 @@
"integrity": "sha512-DCXu6Ifhqcks7TZKY3Hxp3y6qphY5SJZmrWMDrKcERSOXWQdMhU9Ig/PYrzyw/ul9jOIyh0N4M0tbC5hodg8dw==",
"dev": true
},
"node_modules/fastest-stable-stringify": {
"version": "2.0.2",
"resolved": "https://registry.npmjs.org/fastest-stable-stringify/-/fastest-stable-stringify-2.0.2.tgz",
"integrity": "sha512-bijHueCGd0LqqNK9b5oCMHc0MluJAx0cwqASgbWMvkO01lCYgIhacVRLcaDz3QnyYIRNJRDwMb41VuT6pHJ91Q==",
"dev": true
},
"node_modules/fastq": {
"version": "1.13.0",
"resolved": "https://registry.npmjs.org/fastq/-/fastq-1.13.0.tgz",
@@ -7573,6 +7575,15 @@
"integrity": "sha1-nbe1lJatPzz+8wp1FC0tkwrXJlE=",
"dev": true
},
"node_modules/json-stringify-deterministic": {
"version": "1.0.12",
"resolved": "https://registry.npmjs.org/json-stringify-deterministic/-/json-stringify-deterministic-1.0.12.tgz",
"integrity": "sha512-q3PN0lbUdv0pmurkBNdJH3pfFvOTL/Zp0lquqpvcjfKzt6Y0j49EPHAmVHCAS4Ceq/Y+PejWTzyiVpoY71+D6g==",
"dev": true,
"engines": {
"node": ">= 4"
}
},
"node_modules/json5": {
"version": "2.2.3",
"resolved": "https://registry.npmjs.org/json5/-/json5-2.2.3.tgz",
@@ -11470,18 +11481,6 @@
"integrity": "sha1-5qdUzI8V5YmHqpy9J69m/W9OWvk=",
"dev": true
},
"node_modules/undici": {
"version": "5.28.3",
"resolved": "https://registry.npmjs.org/undici/-/undici-5.28.3.tgz",
"integrity": "sha512-3ItfzbrhDlINjaP0duwnNsKpDQk3acHI3gVJ1z4fmwMK31k5G9OVIAMLSIaP6w4FaGkaAkN6zaQO9LUvZ1t7VA==",
"dev": true,
"dependencies": {
"@fastify/busboy": "^2.0.0"
},
"engines": {
"node": ">=14.0"
}
},
"node_modules/union": {
"version": "0.5.0",
"resolved": "https://registry.npmjs.org/union/-/union-0.5.0.tgz",

View File

@@ -103,6 +103,7 @@
"@blockly/block-test": "^6.0.4",
"@blockly/dev-tools": "^8.0.4",
"@blockly/theme-modern": "^6.0.3",
"@hyperjump/browser": "^1.1.4",
"@hyperjump/json-schema": "^1.5.0",
"@microsoft/api-documenter": "^7.22.4",
"@microsoft/api-extractor": "^7.29.5",

View File

@@ -15,7 +15,7 @@ import JSON5 from 'json5';
import {readFile} from 'fs/promises';
import {posixPath} from '../../scripts/helpers.js';
import {validate} from '@hyperjump/json-schema/draft-2020-12';
import {DETAILED} from '@hyperjump/json-schema/experimental';
import {BASIC} from '@hyperjump/json-schema/experimental';
/** @type {URL} Renaming schema filename. */
const SCHEMA_URL = new URL('renamings.schema.json', import.meta.url);
@@ -29,12 +29,15 @@ const RENAMINGS_URL = new URL(
const renamingsJson5 = await readFile(RENAMINGS_URL);
const renamings = JSON5.parse(renamingsJson5);
const output = await validate(SCHEMA_URL, renamings, DETAILED);
const output = await validate(SCHEMA_URL, renamings, BASIC);
if (!output.valid) {
console.log('Renamings file is invalid.');
console.log('Maybe this validator output will help you find the problem:');
console.log(JSON5.stringify(output, undefined, ' '));
console.error(`Renamings file is invalid. First error occurs at:
${output.errors[0].instanceLocation}`);
console.info(
`Here is the full validator output, in case that helps:\n`,
output,
);
process.exit(1);
}
@@ -45,7 +48,7 @@ Object.entries(renamings).forEach(([version, modules]) => {
const seen = new Set();
for (const {oldName} of modules) {
if (seen.has(oldName)) {
console.log(
console.error(
`Duplicate entry for module ${oldName} ` + `in version ${version}.`,
);
ok = false;
@@ -54,7 +57,7 @@ Object.entries(renamings).forEach(([version, modules]) => {
}
});
if (!ok) {
console.log('Renamings file is invalid.');
console.error('Renamings file is invalid.');
process.exit(1);
}
// Default is a successful exit 0.