Skip to content

Commit ce91bbb

Browse files
chore: update schema-utils to 4.4.0
It accepts a `file://` prefix where an option takes an absolute path, the half of this change that lives in the validator. The pre-compiled schema still rejects one until `tooling` ships the same regexp (webpack/tooling#49 is merged and waits on a tag), so the `file-url-condition` case stays gated until that bump. Its messages name the type of an object's properties now, which moves the validation snapshots, e.g. `object { apply, … }` reads `object { apply: function, … }`. `yarn upgrade` also normalized the indentation of two `scripts` entries.
1 parent ad5466b commit ce91bbb

4 files changed

Lines changed: 32 additions & 15 deletions

File tree

‎package.json‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@
4141
"lint:types-hot": "tsc -p tsconfig.hot.json",
4242
"lint:types-module-test": "tsc -p tsconfig.module.test.json",
4343
"lint:comments": "node tooling/check-comment-length.js",
44-
"lint:spellcheck": "cspell --cache --no-must-find-files --quiet \"**/*.*\"",
44+
"lint:spellcheck": "cspell --cache --no-must-find-files --quiet \"**/*.*\"",
4545
"validate:changeset": "node .changeset/changeset-validate.mjs",
4646
"validate:types": "tsc -p tsconfig.validation.json",
4747
"fmt": "yarn fmt:base --log-level warn --write",
@@ -55,7 +55,7 @@
5555
"benchmark": "node --max-old-space-size=6144 --experimental-vm-modules --trace-deprecation --hash-seed=1 --random-seed=1 --no-opt --predictable --predictable-gc-schedule --interpreted-frames-native-stack --allow-natives-syntax --expose-gc --no-concurrent-sweeping ./test/BenchmarkTestCases.benchmark.mjs",
5656
"benchmark:css-tools": "node tooling/compare-css-tools.js",
5757
"benchmark:html-tools": "node tooling/compare-html-tools.js",
58-
"measure:color-agreement": "node tooling/measure-color-agreement.js",
58+
"measure:color-agreement": "node tooling/measure-color-agreement.js",
5959
"pretest": "yarn lint",
6060
"test": "yarn test:base",
6161
"test:base": "node --expose-gc --max-old-space-size=4096 --experimental-vm-modules --trace-deprecation node_modules/jest-cli/bin/jest --workerIdleMemoryLimit=512MB --logHeapUsage",
@@ -119,7 +119,7 @@
119119
"graceful-fs": "^4.2.11",
120120
"mime-db": "^1.54.0",
121121
"minimizer-webpack-plugin": "^5.7.0",
122-
"schema-utils": "^4.3.3",
122+
"schema-utils": "^4.4.0",
123123
"tapable": "^2.3.0",
124124
"watchpack": "^2.5.2",
125125
"webpack-sources": "^3.5.1"

‎test/Validation.test.js‎

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -379,14 +379,14 @@ describe("Validation", () => {
379379
expect(msg).toMatchInlineSnapshot(`
380380
"Invalid configuration object. Webpack has been initialized using a configuration object that does not match the API schema.
381381
- configuration.plugins[0] should be one of these:
382-
false | 0 | \\"\\" | null | undefined | object { apply, … } | function
382+
false | 0 | \\"\\" | null | undefined | object { apply: function, … } | function
383383
-> Plugin of type object or instanceof Function.
384384
Details:
385385
* configuration.plugins[0] should be one of these:
386386
false | 0 | \\"\\" | null | undefined
387387
-> These values will be ignored by webpack and created to be used with '&&' or '||' to improve readability of configurations.
388388
* configuration.plugins[0] should be an object:
389-
object { apply, … }
389+
object { apply: function, … }
390390
-> Plugin instance.
391391
* configuration.plugins[0] should be an instance of function.
392392
-> Function acting as plugin."
@@ -403,14 +403,14 @@ describe("Validation", () => {
403403
expect(msg).toMatchInlineSnapshot(`
404404
"Invalid configuration object. Webpack has been initialized using a configuration object that does not match the API schema.
405405
- configuration.plugins[0] should be one of these:
406-
false | 0 | \\"\\" | null | undefined | object { apply, … } | function
406+
false | 0 | \\"\\" | null | undefined | object { apply: function, … } | function
407407
-> Plugin of type object or instanceof Function.
408408
Details:
409409
* configuration.plugins[0] should be one of these:
410410
false | 0 | \\"\\" | null | undefined
411411
-> These values will be ignored by webpack and created to be used with '&&' or '||' to improve readability of configurations.
412412
* configuration.plugins[0] should be an object:
413-
object { apply, … }
413+
object { apply: function, … }
414414
-> Plugin instance.
415415
* configuration.plugins[0] should be an instance of function.
416416
-> Function acting as plugin."
@@ -427,14 +427,14 @@ describe("Validation", () => {
427427
expect(msg).toMatchInlineSnapshot(`
428428
"Invalid configuration object. Webpack has been initialized using a configuration object that does not match the API schema.
429429
- configuration.plugins[0] should be one of these:
430-
false | 0 | \\"\\" | null | undefined | object { apply, … } | function
430+
false | 0 | \\"\\" | null | undefined | object { apply: function, … } | function
431431
-> Plugin of type object or instanceof Function.
432432
Details:
433433
* configuration.plugins[0] should be one of these:
434434
false | 0 | \\"\\" | null | undefined
435435
-> These values will be ignored by webpack and created to be used with '&&' or '||' to improve readability of configurations.
436436
* configuration.plugins[0] should be an object:
437-
object { apply, … }
437+
object { apply: function, … }
438438
-> Plugin instance.
439439
* configuration.plugins[0] should be an instance of function.
440440
-> Function acting as plugin."
@@ -451,14 +451,14 @@ describe("Validation", () => {
451451
expect(msg).toMatchInlineSnapshot(`
452452
"Invalid configuration object. Webpack has been initialized using a configuration object that does not match the API schema.
453453
- configuration.plugins[0] should be one of these:
454-
false | 0 | \\"\\" | null | undefined | object { apply, … } | function
454+
false | 0 | \\"\\" | null | undefined | object { apply: function, … } | function
455455
-> Plugin of type object or instanceof Function.
456456
Details:
457457
* configuration.plugins[0] should be one of these:
458458
false | 0 | \\"\\" | null | undefined
459459
-> These values will be ignored by webpack and created to be used with '&&' or '||' to improve readability of configurations.
460460
* configuration.plugins[0] should be an object:
461-
object { apply, … }
461+
object { apply: function, … }
462462
-> Plugin instance.
463463
* configuration.plugins[0] should be an instance of function.
464464
-> Function acting as plugin."
@@ -609,7 +609,7 @@ describe("Validation", () => {
609609
expect(msg).toMatchInlineSnapshot(`
610610
"Invalid configuration object. Webpack has been initialized using a configuration object that does not match the API schema.
611611
- configuration.watchOptions should be an object:
612-
object { aggregateTimeout?, followSymlinks?, ignored?, poll?, stdin? }
612+
object { aggregateTimeout?: number, followSymlinks?: boolean, ignored?, poll?, stdin?: boolean }
613613
-> Options for the watcher."
614614
`)
615615
);
@@ -673,7 +673,7 @@ describe("Validation", () => {
673673
* configuration.resolve.tsconfig should be a boolean.
674674
* configuration.resolve.tsconfig should be a string.
675675
* configuration.resolve.tsconfig should be an object:
676-
object { configFile?, references? }"
676+
object { configFile?: string, references? }"
677677
`)
678678
);
679679

‎test/configCases/errors/asset-options-validation/__snapshots__/errors.snap‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ exports[`errors 1`] = `
44
Array [
55
"Module not found: ValidationError: Invalid generator object. Asset Modules Plugin has been initialized using a generator object that does not match the API schema.
66
- generator has an unknown property 'filename'. These properties are valid:
7-
object { binary?, dataUrl? }
7+
object { binary?: boolean, dataUrl? }
88
-> Generator options for asset/inline modules.",
99
]
1010
`;

‎yarn.lock‎

Lines changed: 18 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3000,6 +3000,13 @@ ajv-formats@^2.1.1:
30003000
dependencies:
30013001
ajv "^8.0.0"
30023002

3003+
ajv-formats@^3.0.1:
3004+
version "3.0.1"
3005+
resolved "https://registry.yarnpkg.com/ajv-formats/-/ajv-formats-3.0.1.tgz#3d5dc762bca17679c3c2ea7e90ad6b7532309578"
3006+
integrity sha512-8iUql50EUR+uUcdRQ3HDqa6EVyo3docL8g5WJ3FNcWmu62IbkGUue/pEyLBW8VGKKucTPgqeks4fIU1DA4yowQ==
3007+
dependencies:
3008+
ajv "^8.0.0"
3009+
30033010
ajv-keywords@^3.5.2:
30043011
version "3.5.2"
30053012
resolved "https://registry.yarnpkg.com/ajv-keywords/-/ajv-keywords-3.5.2.tgz#31f29da5ab6e00d1c2d329acf7b5929614d5014d"
@@ -3022,7 +3029,7 @@ ajv@^6.12.5, ajv@^6.14.0:
30223029
json-schema-traverse "^0.4.1"
30233030
uri-js "^4.2.2"
30243031

3025-
ajv@^8.0.0, ajv@^8.1.0, ajv@^8.9.0:
3032+
ajv@^8.0.0, ajv@^8.1.0, ajv@^8.20.0, ajv@^8.9.0:
30263033
version "8.20.0"
30273034
resolved "https://registry.yarnpkg.com/ajv/-/ajv-8.20.0.tgz#304b3636add88ba7d936760dd50ece006dea95f9"
30283035
integrity sha512-Thbli+OlOj+iMPYFBVBfJ3OmCAnaSyNn4M1vz9T6Gka5Jt9ba/HIR56joy65tY6kx/FCF5VXNB819Y7/GUrBGA==
@@ -8992,6 +8999,16 @@ schema-utils@^4.0.0, schema-utils@^4.3.3:
89928999
ajv-formats "^2.1.1"
89939000
ajv-keywords "^5.1.0"
89949001

9002+
schema-utils@^4.4.0:
9003+
version "4.4.0"
9004+
resolved "https://registry.yarnpkg.com/schema-utils/-/schema-utils-4.4.0.tgz#fbc4f90ab5047f01a9c8b07347e74f2cdb567067"
9005+
integrity sha512-ZzWFVzFgyRHi/T2Ecxm37lL6J9+hZO0P9L7LCuLxAbC6XWxkvxcaQBCXhQxMGn/Tdt9nD7zIBk0ELwhMQ3UEDg==
9006+
dependencies:
9007+
"@types/json-schema" "^7.0.15"
9008+
ajv "^8.20.0"
9009+
ajv-formats "^3.0.1"
9010+
ajv-keywords "^5.1.0"
9011+
89959012
script-loader@^0.7.2:
89969013
version "0.7.2"
89979014
resolved "https://registry.yarnpkg.com/script-loader/-/script-loader-0.7.2.tgz#2016db6f86f25f5cf56da38915d83378bb166ba7"

0 commit comments

Comments
 (0)