Skip to content

Commit dac663c

Browse files
authored
Merge pull request #135 from ethdebug/upgrade-hyperjump
Upgrade @hyperjump/json-schema
2 parents 40b6d70 + cedaf22 commit dac663c

File tree

3 files changed

+37
-36
lines changed

3 files changed

+37
-36
lines changed

packages/tests/package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,8 @@
1111
},
1212
"devDependencies": {
1313
"@ethdebug/format": "^0.1.0-0",
14-
"@hyperjump/json-schema": "1.6.7",
14+
"@hyperjump/browser": "^1.2.0",
15+
"@hyperjump/json-schema": "^1.11.0",
1516
"cli-highlight": "^2.1.11",
1617
"indent-string": "^5.0.0",
1718
"typescript": "^5.3.3",

packages/tests/src/loadSchemas.ts

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ import {
44
validate,
55
setMetaSchemaOutputFormat,
66
} from "@hyperjump/json-schema/draft-2020-12";
7+
import { BASIC } from "@hyperjump/json-schema/experimental";
78
import { bundle } from "@hyperjump/json-schema/bundle";
89
import YAML from "yaml";
910
import indentString from "indent-string";
@@ -17,7 +18,7 @@ import {
1718
import schemas from "./schemas.js";
1819

1920
const main = () => {
20-
setMetaSchemaOutputFormat("BASIC");
21+
setMetaSchemaOutputFormat(BASIC);
2122

2223
for (const schema of Object.values(schemas)) {
2324
addSchema(schema as any);
@@ -40,15 +41,18 @@ const main = () => {
4041
? schema.title
4142
: schemaReference;
4243

43-
const output = await validate(schemaReference, received, "DETAILED");
44+
const output = await validate(schemaReference, received, BASIC);
4445

4546
const pass = output.valid;
4647

4748
return {
4849
pass,
49-
message: () => `expected ${
50-
JSON.stringify(received)
51-
} ${
50+
message: () => `expected input:\n${
51+
indentString(
52+
highlight(YAML.stringify(received), { language: "yaml" }),
53+
2
54+
)
55+
}\n${
5256
pass
5357
? "not to be"
5458
: "to be"

yarn.lock

Lines changed: 26 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -2731,11 +2731,6 @@
27312731
resolved "https://registry.yarnpkg.com/@esbuild/win32-x64/-/win32-x64-0.24.2.tgz#34aa0b52d0fbb1a654b596acfa595f0c7b77a77b"
27322732
integrity sha512-7VTgWzgMGvup6aSqDPLiW5zHaxYJGTO4OokMjIlrCtf+VpEL+cXKtCvg723iguPYI5oaUNdS+/V7OU2gvXVWEg==
27332733

2734-
"@fastify/busboy@^2.0.0":
2735-
version "2.1.0"
2736-
resolved "https://registry.npmjs.org/@fastify/busboy/-/busboy-2.1.0.tgz"
2737-
integrity sha512-+KpH+QxZU7O4675t3mnkQKcZZg56u+K/Ct2K+N2AZYNVK8kyeo/bI18tI8aPm3tvNNRyTWfj6s5tnGNlcbQRsA==
2738-
27392734
"@fortawesome/fontawesome-common-types@6.5.1":
27402735
version "6.5.1"
27412736
resolved "https://registry.npmjs.org/@fortawesome/fontawesome-common-types/-/fontawesome-common-types-6.5.1.tgz"
@@ -2786,25 +2781,33 @@
27862781
resolved "https://registry.npmjs.org/@hutson/parse-repository-url/-/parse-repository-url-3.0.2.tgz"
27872782
integrity sha512-H9XAx3hc0BQHY6l+IFSWHDySypcXsvsuLhgYLUGywmJ5pswRVQJUHpOsobnLYp2ZUaUlKiKDrgWWhosOwAEM8Q==
27882783

2789-
"@hyperjump/json-pointer@^1.0.0":
2790-
version "1.0.1"
2791-
resolved "https://registry.npmjs.org/@hyperjump/json-pointer/-/json-pointer-1.0.1.tgz"
2792-
integrity sha512-vV2pSc7JCwbKEMzh8kr/ICZdO+UZbA3aZ7N8t7leDi9cduWKa9yoP5LS04LnsbErlPbUNHvWBFlbTaR/o/uf7A==
2784+
"@hyperjump/browser@^1.2.0":
2785+
version "1.2.0"
2786+
resolved "https://registry.yarnpkg.com/@hyperjump/browser/-/browser-1.2.0.tgz#658eff73b6f177531c1a442f385157d620bba5fc"
2787+
integrity sha512-xv7u4Ddbhnd9a4yi8V0bNYQrimL0SuBW2T+l4eSEKedxhIBVqxuZ6Vulm6+rPtcvg79LyhWxH4fB/J056qaSMQ==
27932788
dependencies:
2789+
"@hyperjump/json-pointer" "^1.1.0"
2790+
"@hyperjump/uri" "^1.2.0"
2791+
content-type "^1.0.5"
27942792
just-curry-it "^5.3.0"
2793+
type-is "^1.6.18"
2794+
2795+
"@hyperjump/json-pointer@^1.1.0":
2796+
version "1.1.0"
2797+
resolved "https://registry.yarnpkg.com/@hyperjump/json-pointer/-/json-pointer-1.1.0.tgz#57342cb50a87b4e5d561738cc1d1c9e088780dee"
2798+
integrity sha512-tFCKxMKDKK3VEdtUA3EBOS9GmSOS4mbrTjh9v3RnK10BphDMOb6+bxTh++/ae1AyfHyWb6R54O/iaoAtPMZPCg==
27952799

2796-
"@hyperjump/json-schema@1.6.7":
2797-
version "1.6.7"
2798-
resolved "https://registry.npmjs.org/@hyperjump/json-schema/-/json-schema-1.6.7.tgz"
2799-
integrity sha512-6ufO5Iov85FBXQ1a//7sQDwzZRoyEMR1MD7Te6k00DvApvj1/x3k/S1RcPmmPCCuj7BDxHVixu4qBTM6sBsmBA==
2800+
"@hyperjump/json-schema@^1.11.0":
2801+
version "1.11.0"
2802+
resolved "https://registry.yarnpkg.com/@hyperjump/json-schema/-/json-schema-1.11.0.tgz#db02e2ebf48c3e6ac029a6515265af77be0a1689"
2803+
integrity sha512-gX1YNObOybUW6tgJjvb1lomNbI/VnY+EBPokmEGy9Lk8cgi+gE0vXhX1XDgIpUUA4UXfgHEn5I1mga5vHgOttg==
28002804
dependencies:
2801-
"@hyperjump/json-pointer" "^1.0.0"
2805+
"@hyperjump/json-pointer" "^1.1.0"
28022806
"@hyperjump/pact" "^1.2.0"
28032807
"@hyperjump/uri" "^1.2.0"
28042808
content-type "^1.0.4"
2805-
fastest-stable-stringify "^2.0.2"
2809+
json-stringify-deterministic "^1.0.12"
28062810
just-curry-it "^5.3.0"
2807-
undici "^5.19.1"
28082811
uuid "^9.0.0"
28092812

28102813
"@hyperjump/pact@^1.2.0":
@@ -5799,7 +5802,7 @@ content-disposition@0.5.4:
57995802
dependencies:
58005803
safe-buffer "5.2.1"
58015804

5802-
content-type@^1.0.4, content-type@~1.0.4:
5805+
content-type@^1.0.4, content-type@^1.0.5, content-type@~1.0.4:
58035806
version "1.0.5"
58045807
resolved "https://registry.npmjs.org/content-type/-/content-type-1.0.5.tgz"
58055808
integrity sha512-nTjqfcBFEipKdXCv4YDQWCfmcLZKm81ldF0pAopTvyrFGVbcR6P/VAAd5G7N+0tTr8QqiU0tFadD6FK4NtJwOA==
@@ -6989,11 +6992,6 @@ fast-url-parser@1.1.3:
69896992
dependencies:
69906993
punycode "^1.3.2"
69916994

6992-
fastest-stable-stringify@^2.0.2:
6993-
version "2.0.2"
6994-
resolved "https://registry.npmjs.org/fastest-stable-stringify/-/fastest-stable-stringify-2.0.2.tgz"
6995-
integrity sha512-bijHueCGd0LqqNK9b5oCMHc0MluJAx0cwqASgbWMvkO01lCYgIhacVRLcaDz3QnyYIRNJRDwMb41VuT6pHJ91Q==
6996-
69976995
fastq@^1.6.0:
69986996
version "1.16.0"
69996997
resolved "https://registry.npmjs.org/fastq/-/fastq-1.16.0.tgz"
@@ -8662,6 +8660,11 @@ json-schema@^0.4.0:
86628660
resolved "https://registry.npmjs.org/json-schema/-/json-schema-0.4.0.tgz"
86638661
integrity sha512-es94M3nTIfsEPisRafak+HDLfHXnKBhV3vU5eqPcS3flIWqcxJWgXHXiey3YrpaNsanY5ei1VoYEbOzijuq9BA==
86648662

8663+
json-stringify-deterministic@^1.0.12:
8664+
version "1.0.12"
8665+
resolved "https://registry.yarnpkg.com/json-stringify-deterministic/-/json-stringify-deterministic-1.0.12.tgz#aaa3f907466ed01e3afd77b898d0a2b3b132820a"
8666+
integrity sha512-q3PN0lbUdv0pmurkBNdJH3pfFvOTL/Zp0lquqpvcjfKzt6Y0j49EPHAmVHCAS4Ceq/Y+PejWTzyiVpoY71+D6g==
8667+
86658668
json-stringify-safe@^5.0.1:
86668669
version "5.0.1"
86678670
resolved "https://registry.npmjs.org/json-stringify-safe/-/json-stringify-safe-5.0.1.tgz"
@@ -13329,7 +13332,7 @@ type-fest@^2.13.0, type-fest@^2.5.0:
1332913332
resolved "https://registry.npmjs.org/type-fest/-/type-fest-2.19.0.tgz"
1333013333
integrity sha512-RAH822pAdBgcNMAfWnCBU3CFZcfZ/i1eZjwFU/dsLKumyuuP3niueg2UAukXYF0E2AAoc82ZSSf9J0WQBinzHA==
1333113334

13332-
type-is@~1.6.18:
13335+
type-is@^1.6.18, type-is@~1.6.18:
1333313336
version "1.6.18"
1333413337
resolved "https://registry.npmjs.org/type-is/-/type-is-1.6.18.tgz"
1333513338
integrity sha512-TkRKr9sUTxEH8MdfuCSP7VizJyzRNMjj2J2do2Jr3Kym598JVdEksuzPQCnlFPW4ky9Q+iA+ma9BGm06XQBy8g==
@@ -13374,13 +13377,6 @@ undici-types@~5.26.4:
1337413377
resolved "https://registry.npmjs.org/undici-types/-/undici-types-5.26.5.tgz"
1337513378
integrity sha512-JlCMO+ehdEIKqlFxk6IfVoAUVmgz7cU7zD/h9XZ0qzeosSHmUJVOzSQvvYSYWXkFXC+IfLKSIffhv0sVZup6pA==
1337613379

13377-
undici@^5.19.1:
13378-
version "5.28.2"
13379-
resolved "https://registry.npmjs.org/undici/-/undici-5.28.2.tgz"
13380-
integrity sha512-wh1pHJHnUeQV5Xa8/kyQhO7WFa8M34l026L5P/+2TYiakvGy5Rdc8jWZVyG7ieht/0WgJLEd3kcU5gKx+6GC8w==
13381-
dependencies:
13382-
"@fastify/busboy" "^2.0.0"
13383-
1338413380
unicode-canonical-property-names-ecmascript@^2.0.0:
1338513381
version "2.0.0"
1338613382
resolved "https://registry.npmjs.org/unicode-canonical-property-names-ecmascript/-/unicode-canonical-property-names-ecmascript-2.0.0.tgz"

0 commit comments

Comments
 (0)