Skip to content

Commit d27733e

Browse files
committed
bump avj version number
1 parent 08f4c3c commit d27733e

3 files changed

Lines changed: 24 additions & 6 deletions

File tree

distributor-node/package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,8 @@
1717
"@oclif/config": "^1",
1818
"@oclif/plugin-help": "^3",
1919
"@types/url-join": "^4.0.1",
20-
"ajv": "^7",
20+
"ajv": "^8.0.0",
21+
"ajv-formats": "^2.1.1",
2122
"axios": "^0.21.1",
2223
"blake3-wasm": "^2.1.5",
2324
"cors": "^2.8.5",

distributor-node/src/services/validation/ValidationService.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ export class ValidationError extends Error {
77

88
public constructor(message: string, errors: Ajv['errors']) {
99
const errorMessages: string[] = []
10-
errors?.forEach((e) => errorMessages.push(`${e.dataPath}: ${e.message} (${JSON.stringify(e.params)})`))
10+
errors?.forEach((e) => errorMessages.push(`${e.instancePath}: ${e.message} (${JSON.stringify(e.params)})`))
1111
super(`${message}\n\n${errorMessages.join('\n')}`)
1212
this.errors = errors
1313
this.errorMessages = errorMessages
@@ -31,6 +31,6 @@ export class ValidationService {
3131

3232
errorsByProperty<T>(schemaKey: SchemaKey, path: string, input: T): Ajv['errors'] {
3333
this.ajv.validate(schemaKey, input)
34-
return this.ajv.errors?.filter((e) => e.dataPath === `/${path}` || e.dataPath.startsWith(`/${path}/`))
34+
return this.ajv.errors?.filter((e) => e.instancePath === `/${path}` || e.instancePath.startsWith(`/${path}/`))
3535
}
3636
}

yarn.lock

Lines changed: 20 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4540,6 +4540,13 @@ agentkeepalive@^4.2.1:
45404540
depd "^1.1.2"
45414541
humanize-ms "^1.2.1"
45424542

4543+
ajv-formats@^2.1.1:
4544+
version "2.1.1"
4545+
resolved "https://registry.yarnpkg.com/ajv-formats/-/ajv-formats-2.1.1.tgz#6e669400659eb74973bbf2e33327180a0996b520"
4546+
integrity sha512-Wx0Kx52hxE7C18hkMEggYlEifqWZtYaRgouJor+WMdPnQyEK13vgEWyVNup7SoeeoLMsr4kf5h6dOW11I15MUA==
4547+
dependencies:
4548+
ajv "^8.0.0"
4549+
45434550
ajv@^5.5.2:
45444551
version "5.5.2"
45454552
resolved "https://registry.yarnpkg.com/ajv/-/ajv-5.5.2.tgz#73b5eeca3fab653e3d3f9422b341ad42205dc965"
@@ -4570,6 +4577,16 @@ ajv@^7:
45704577
require-from-string "^2.0.2"
45714578
uri-js "^4.2.2"
45724579

4580+
ajv@^8.0.0:
4581+
version "8.12.0"
4582+
resolved "https://registry.yarnpkg.com/ajv/-/ajv-8.12.0.tgz#d1a0527323e22f53562c567c00991577dfbe19d1"
4583+
integrity sha512-sRu1kpcO9yLtYxBKvqfTeh9KzZEwO3STyX1HT+4CaDzC6HpTGYhIhPIzj9XuKU7KYDwnaeh5hcOwjy1QuJzBPA==
4584+
dependencies:
4585+
fast-deep-equal "^3.1.1"
4586+
json-schema-traverse "^1.0.0"
4587+
require-from-string "^2.0.2"
4588+
uri-js "^4.2.2"
4589+
45734590
ajv@^8.0.1:
45744591
version "8.11.0"
45754592
resolved "https://registry.yarnpkg.com/ajv/-/ajv-8.11.0.tgz#977e91dd96ca669f54a11e23e378e33b884a565f"
@@ -17345,9 +17362,9 @@ rx-lite@*, rx-lite@^4.0.8:
1734517362
integrity sha1-Cx4Rr4vESDbwSmQH6S2kJGe3lEQ=
1734617363

1734717364
rxjs@7.5.5, rxjs@^6.3.3, rxjs@^6.4.0, rxjs@^6.6.0, rxjs@^6.6.3, rxjs@^7.2.0, rxjs@^7.4.0, rxjs@^7.5.5:
17348-
version "7.8.0"
17349-
resolved "https://registry.yarnpkg.com/rxjs/-/rxjs-7.8.0.tgz#90a938862a82888ff4c7359811a595e14e1e09a4"
17350-
integrity sha512-F2+gxDshqmIub1KdvZkaEfGDwLNpPvk9Fs6LD/MyQxNgMds/WH9OdDDXOmxUZpME+iSK3rQCctkL0DYyytUqMg==
17365+
version "7.8.1"
17366+
resolved "https://registry.yarnpkg.com/rxjs/-/rxjs-7.8.1.tgz#6f6f3d99ea8044291efd92e7c7fcf562c4057543"
17367+
integrity sha512-AA3TVj+0A2iuIoQkWEK/tqFjBq2j+6PO6Y0zJcvzLAFhEFIO3HL0vls9hWLncZbAAbK0mar7oZ4V079I/qPMxg==
1735117368
dependencies:
1735217369
tslib "^2.1.0"
1735317370

0 commit comments

Comments
 (0)