diff --git a/package.json b/package.json index f8ff48042..671572864 100644 --- a/package.json +++ b/package.json @@ -23,7 +23,7 @@ "loader-runner": "^4.2.0", "mime-types": "^2.1.27", "neo-async": "^2.6.2", - "schema-utils": "^3.0.0", + "schema-utils": "^3.1.0", "tapable": "^2.1.1", "terser-webpack-plugin": "^5.1.3", "watchpack": "^2.2.0", diff --git a/test/Validation.test.js b/test/Validation.test.js index 490ed620d..3fa08d605 100644 --- a/test/Validation.test.js +++ b/test/Validation.test.js @@ -47,7 +47,7 @@ describe("Validation", () => { msg => expect(msg).toMatchInlineSnapshot(` "Invalid configuration object. Webpack has been initialized using a configuration object that does not match the API schema. - - configuration.entry should be an non-empty string. + - configuration.entry should be a non-empty string. -> The string is resolved to a module which is loaded upon startup." `) ); @@ -62,7 +62,7 @@ describe("Validation", () => { msg => expect(msg).toMatchInlineSnapshot(` "Invalid configuration object. Webpack has been initialized using a configuration object that does not match the API schema. - - configuration.entry['bundle'] should be an non-empty array. + - configuration.entry['bundle'] should be a non-empty array. -> All modules are loaded upon startup. The last one is exported." `) ); diff --git a/types.d.ts b/types.d.ts index b47a1b7d4..43333a546 100644 --- a/types.d.ts +++ b/types.d.ts @@ -80,7 +80,8 @@ import { WithStatement, YieldExpression } from "estree"; -import { ValidationError, validate as validateFunction } from "schema-utils"; +import { validate as validateFunction } from "schema-utils"; +import { default as ValidationError } from "schema-utils/declarations/ValidationError"; import { ValidationErrorConfiguration } from "schema-utils/declarations/validate"; import { AsArray, diff --git a/yarn.lock b/yarn.lock index 6d6b3a697..24fc0ab1f 100644 --- a/yarn.lock +++ b/yarn.lock @@ -948,10 +948,10 @@ jest-diff "^26.0.0" pretty-format "^26.0.0" -"@types/json-schema@*", "@types/json-schema@^7.0.3", "@types/json-schema@^7.0.4", "@types/json-schema@^7.0.5", "@types/json-schema@^7.0.6": - version "7.0.6" - resolved "https://registry.yarnpkg.com/@types/json-schema/-/json-schema-7.0.6.tgz#f4c7ec43e81b319a9815115031709f26987891f0" - integrity sha512-3c+yGKvVP5Y9TYBEibGNR+kLtijnj7mYrXRg+WpFb2X9xm04g/DXYkfg4hmzJQosc9snFNUPkbYIhu+KAm6jJw== +"@types/json-schema@*", "@types/json-schema@^7.0.3", "@types/json-schema@^7.0.4", "@types/json-schema@^7.0.5", "@types/json-schema@^7.0.7": + version "7.0.7" + resolved "https://registry.yarnpkg.com/@types/json-schema/-/json-schema-7.0.7.tgz#98a993516c859eb0d5c4c8f098317a9ea68db9ad" + integrity sha512-cxWFQVseBm6O9Gbw1IWb8r6OS4OhSt3hPZLkFApLjM8TEXROBuQGLAH2i2gZpcXdLBIrpXuTDhH7Vbm1iXmNGA== "@types/minimist@^1.2.0": version "1.2.0" @@ -5329,12 +5329,12 @@ schema-utils@^2.6.5: ajv "^6.12.4" ajv-keywords "^3.5.2" -schema-utils@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/schema-utils/-/schema-utils-3.0.0.tgz#67502f6aa2b66a2d4032b4279a2944978a0913ef" - integrity sha512-6D82/xSzO094ajanoOSbe4YvXWMfn2A//8Y1+MUqFAJul5Bs+yn36xbK9OtNDcRVSBJ9jjeoXftM6CfztsjOAA== +schema-utils@^3.0.0, schema-utils@^3.1.0: + version "3.1.0" + resolved "https://registry.yarnpkg.com/schema-utils/-/schema-utils-3.1.0.tgz#95986eb604f66daadeed56e379bfe7a7f963cdb9" + integrity sha512-tTEaeYkyIhEZ9uWgAjDerWov3T9MgX8dhhy2r0IGeeX4W8ngtGl1++dUve/RUqzuaASSh7shwCDJjEzthxki8w== dependencies: - "@types/json-schema" "^7.0.6" + "@types/json-schema" "^7.0.7" ajv "^6.12.5" ajv-keywords "^3.5.2"