Skip to content

Commit 2a5c956

Browse files
committed
feat: upgrade to ajv v8
1 parent f46c990 commit 2a5c956

File tree

7 files changed

+20
-18
lines changed

7 files changed

+20
-18
lines changed

app-config-cli/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@
4343
"@app-config/node": "^3.0.0-alpha.2",
4444
"@app-config/schema": "^3.0.0-alpha.2",
4545
"@app-config/utils": "^3.0.0-alpha.2",
46-
"ajv": "7",
46+
"ajv": "8",
4747
"clipboardy": "2",
4848
"common-tags": "1",
4949
"execa": "5",

app-config-main/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@
4343
"@app-config/node": "^3.0.0-alpha.2",
4444
"@app-config/schema": "^3.0.0-alpha.2",
4545
"@app-config/utils": "^3.0.0-alpha.2",
46-
"ajv": "7"
46+
"ajv": "8"
4747
},
4848
"devDependencies": {},
4949
"prettier": "@lcdev/prettier",

app-config-schema/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,8 +35,8 @@
3535
"@app-config/node": "^3.0.0-alpha.2",
3636
"@app-config/utils": "^3.0.0-alpha.2",
3737
"@types/json-schema": "7",
38-
"ajv": "7",
39-
"ajv-formats": "1",
38+
"ajv": "8",
39+
"ajv-formats": "2",
4040
"json-schema-ref-parser": "9"
4141
},
4242
"devDependencies": {

app-config-schema/src/__snapshots__/index.test.ts.snap

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,9 @@
33
exports[`Code Generation validates using the generated code 1`] = `
44
Array [
55
Object {
6-
"dataPath": "",
6+
"instancePath": "",
77
"keyword": "required",
8-
"message": "should have required property 'foo'",
8+
"message": "must have required property 'foo'",
99
"params": Object {
1010
"missingProperty": "foo",
1111
},

app-config-schema/src/index.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -120,11 +120,11 @@ export async function loadSchema({
120120
message: 'should not be present in non-secret files (and not encrypted)',
121121
},
122122
validate(value: boolean, _data, _parentSchema, ctx): boolean {
123-
const { dataPath } = ctx ?? {};
123+
const { instancePath } = ctx ?? {};
124124

125-
if (!dataPath || !value) return true;
125+
if (!instancePath || !value) return true;
126126

127-
const [, ...key] = dataPath.split('/');
127+
const [, ...key] = instancePath.split('/');
128128

129129
// check that any properties marked as secret were from secrets file
130130
const found = currentlyParsing?.property(key);

app-config-webpack/src/index.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,7 @@ describe('frontend-webpack-project example', () => {
131131
done();
132132
});
133133
}),
134-
).rejects.toMatch('config/externalApiUrl should match format "uri"');
134+
).rejects.toMatch('config/externalApiUrl must match format "uri"');
135135
});
136136

137137
it('uses custom loading options to read a specific environment variable', async () => {

yarn.lock

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -3867,10 +3867,12 @@ ajv-errors@^1.0.0:
38673867
resolved "https://registry.yarnpkg.com/ajv-errors/-/ajv-errors-1.0.1.tgz#f35986aceb91afadec4102fbd85014950cefa64d"
38683868
integrity sha512-DCRfO/4nQ+89p/RK43i8Ezd41EqdGIU4ld7nGF8OQ14oc/we5rEntLCUa7+jrn3nn83BosfwZA0wb4pon2o8iQ==
38693869

3870-
ajv-formats@1:
3871-
version "1.6.0"
3872-
resolved "https://registry.yarnpkg.com/ajv-formats/-/ajv-formats-1.6.0.tgz#605304a6b4c10613904b55ab2cda0669d233d127"
3873-
integrity sha512-iio2lsjYkuTq49avg+/coyM5D3qdjyW1dkiy+I79XG3DAQFAOcGltC6eXsw6dX10OtH2S9Kyez7OkFtY0bJBBA==
3870+
ajv-formats@2:
3871+
version "2.0.2"
3872+
resolved "https://registry.yarnpkg.com/ajv-formats/-/ajv-formats-2.0.2.tgz#69875cb99d76c74be46e9c7a4444bc232354eba0"
3873+
integrity sha512-Brah4Uo5/U8v76c6euTwtjVFFaVishwnJrQBYpev1JRh4vjA1F4HY3UzQez41YUCszUCXKagG8v6eVRBHV1gkw==
3874+
dependencies:
3875+
ajv "^8.0.0"
38743876

38753877
ajv-keywords@^3.1.0, ajv-keywords@^3.4.1, ajv-keywords@^3.5.2:
38763878
version "3.5.2"
@@ -3887,10 +3889,10 @@ [email protected]:
38873889
json-schema-traverse "^0.4.1"
38883890
uri-js "^4.2.2"
38893891

3890-
ajv@7:
3891-
version "7.2.4"
3892-
resolved "https://registry.yarnpkg.com/ajv/-/ajv-7.2.4.tgz#8e239d4d56cf884bccca8cca362f508446dc160f"
3893-
integrity sha512-nBeQgg/ZZA3u3SYxyaDvpvDtgZ/EZPF547ARgZBrG9Bhu1vKDwAIjtIf+sDtJUKa2zOcEbmRLBRSyMraS/Oy1A==
3892+
ajv@8, ajv@^8.0.0:
3893+
version "8.0.5"
3894+
resolved "https://registry.yarnpkg.com/ajv/-/ajv-8.0.5.tgz#f07d6fdeffcdbb80485570ce3f1bc845fcc812b9"
3895+
integrity sha512-RkiLa/AeJx7+9OvniQ/qeWu0w74A8DiPPBclQ6ji3ZQkv5KamO+QGpqmi7O4JIw3rHGUXZ6CoP9tsAkn3gyazg==
38943896
dependencies:
38953897
fast-deep-equal "^3.1.1"
38963898
json-schema-traverse "^1.0.0"

0 commit comments

Comments
 (0)