Bump yup to a version with slightly better typescript type gen

Signed-off-by: Fredrik Adelöw <freben@gmail.com>
This commit is contained in:
Fredrik Adelöw
2021-10-02 16:41:29 +02:00
parent 9697e91074
commit 957e4b3351
10 changed files with 68 additions and 55 deletions
+9
View File
@@ -0,0 +1,9 @@
---
'@backstage/catalog-model': patch
'@backstage/config-loader': patch
'@backstage/plugin-catalog-backend': patch
'@backstage/plugin-cost-insights': patch
'@backstage/plugin-proxy-backend': patch
---
Updated dependencies
+5 -8
View File
@@ -10,12 +10,9 @@ import { SerializedError } from '@backstage/errors';
import * as yup from 'yup';
// @public @deprecated (undocumented)
export const analyzeLocationSchema: yup.ObjectSchema<
{
location: LocationSpec;
},
object
>;
export const analyzeLocationSchema: yup.SchemaOf<{
location: LocationSpec;
}>;
// @public (undocumented)
interface ApiEntityV1alpha1 extends Entity {
@@ -337,7 +334,7 @@ export { LocationEntityV1alpha1 };
export const locationEntityV1alpha1Validator: KindValidator;
// @public @deprecated (undocumented)
export const locationSchema: yup.ObjectSchema<Location_2, object>;
export const locationSchema: yup.SchemaOf<Location_2>;
// @public (undocumented)
export type LocationSpec = {
@@ -347,7 +344,7 @@ export type LocationSpec = {
};
// @public @deprecated (undocumented)
export const locationSpecSchema: yup.ObjectSchema<LocationSpec, object>;
export const locationSpecSchema: yup.SchemaOf<LocationSpec>;
// @public (undocumented)
export function makeValidator(overrides?: Partial<Validators>): Validators;
+2 -2
View File
@@ -33,12 +33,12 @@
"@backstage/config": "^0.1.10",
"@backstage/errors": "^0.1.2",
"@types/json-schema": "^7.0.5",
"@types/yup": "^0.29.8",
"@types/yup": "^0.29.13",
"ajv": "^7.0.3",
"json-schema": "^0.3.0",
"lodash": "^4.17.21",
"uuid": "^8.0.0",
"yup": "^0.29.3"
"yup": "^0.32.9"
},
"devDependencies": {
"@backstage/cli": "^0.7.13",
@@ -21,11 +21,11 @@ import { LocationSpec, Location } from './types';
* @public
* @deprecated Use JSONSchema or validators instead.
*/
export const locationSpecSchema = yup
.object<LocationSpec>({
export const locationSpecSchema: yup.SchemaOf<LocationSpec> = yup
.object({
type: yup.string().required(),
target: yup.string().required(),
presence: yup.string(),
presence: yup.mixed().oneOf(['required', 'optional']),
})
.noUnknown()
.required();
@@ -34,11 +34,12 @@ export const locationSpecSchema = yup
* @public
* @deprecated Use JSONSchema or validators instead.
*/
export const locationSchema = yup
.object<Location>({
export const locationSchema: yup.SchemaOf<Location> = yup
.object({
id: yup.string().required(),
type: yup.string().required(),
target: yup.string().required(),
presence: yup.mixed().oneOf(['required', 'optional']),
})
.noUnknown()
.required();
@@ -47,9 +48,10 @@ export const locationSchema = yup
* @public
* @deprecated Use JSONSchema or validators instead.
*/
export const analyzeLocationSchema = yup
.object<{ location: LocationSpec }>({
location: locationSpecSchema,
})
.noUnknown()
.required();
export const analyzeLocationSchema: yup.SchemaOf<{ location: LocationSpec }> =
yup
.object({
location: locationSpecSchema,
})
.noUnknown()
.required();
+2 -2
View File
@@ -40,14 +40,14 @@
"json-schema-merge-allof": "^0.8.1",
"typescript-json-schema": "^0.50.1",
"yaml": "^1.9.2",
"yup": "^0.29.3"
"yup": "^0.32.9"
},
"devDependencies": {
"@types/jest": "^26.0.7",
"@types/json-schema-merge-allof": "^0.6.0",
"@types/mock-fs": "^4.10.0",
"@types/node": "^14.14.32",
"@types/yup": "^0.29.8",
"@types/yup": "^0.29.13",
"mock-fs": "^5.1.0"
},
"files": [
+2 -2
View File
@@ -58,7 +58,7 @@
"winston": "^3.2.1",
"yaml": "^1.9.2",
"yn": "^4.0.0",
"yup": "^0.29.3"
"yup": "^0.32.9"
},
"devDependencies": {
"@backstage/backend-test-utils": "^0.1.7",
@@ -69,7 +69,7 @@
"@types/lodash": "^4.14.151",
"@types/supertest": "^2.0.8",
"@types/uuid": "^8.0.0",
"@types/yup": "^0.29.8",
"@types/yup": "^0.29.13",
"aws-sdk-mock": "^5.2.1",
"msw": "^0.29.0",
"sqlite3": "^5.0.1",
+1 -1
View File
@@ -42,7 +42,7 @@ export async function requireRequestBody(req: Request): Promise<unknown> {
export async function validateRequestBody<T>(
req: Request,
schema: yup.Schema<T>,
schema: yup.AnySchema<T>,
): Promise<T> {
const body = await requireRequestBody(req);
+2 -2
View File
@@ -52,7 +52,7 @@
"react-use": "^17.2.4",
"recharts": "^1.8.5",
"regression": "^2.0.1",
"yup": "^0.29.3"
"yup": "^0.32.9"
},
"devDependencies": {
"@backstage/cli": "^0.7.14",
@@ -67,7 +67,7 @@
"@types/pluralize": "^0.0.29",
"@types/recharts": "^1.8.14",
"@types/regression": "^2.0.0",
"@types/yup": "^0.29.8",
"@types/yup": "^0.29.13",
"canvas": "^2.6.1",
"cross-fetch": "^3.0.6",
"msw": "^0.29.0"
+2 -2
View File
@@ -40,14 +40,14 @@
"winston": "^3.2.1",
"yaml": "^1.9.2",
"yn": "^4.0.0",
"yup": "^0.29.3"
"yup": "^0.32.9"
},
"devDependencies": {
"@backstage/cli": "^0.7.2",
"@types/http-proxy-middleware": "^0.19.3",
"@types/supertest": "^2.0.8",
"@types/uuid": "^8.0.0",
"@types/yup": "^0.29.8",
"@types/yup": "^0.29.13",
"supertest": "^6.1.3"
},
"files": [
+30 -25
View File
@@ -7042,6 +7042,11 @@
resolved "https://registry.npmjs.org/@types/lodash/-/lodash-4.14.168.tgz#fe24632e79b7ade3f132891afff86caa5e5ce008"
integrity sha512-oVfRvqHV/V6D1yifJbVRU3TMp8OT6o6BG+U9MkwuJ3U8/CsDHvalRpsxBqivn71ztOFZBTfJMvETbqHiaNSj7Q==
"@types/lodash@^4.14.165":
version "4.14.175"
resolved "https://registry.npmjs.org/@types/lodash/-/lodash-4.14.175.tgz#b78dfa959192b01fae0ad90e166478769b215f45"
integrity sha512-XmdEOrKQ8a1Y/yxQFOMbC47G/V2VDO1GvMRnl4O75M4GW/abC5tnfzadQYkqEveqRM1dEJGFFegfPNA2vvx2iw==
"@types/long@^4.0.0", "@types/long@^4.0.1":
version "4.0.1"
resolved "https://registry.npmjs.org/@types/long/-/long-4.0.1.tgz#459c65fa1867dafe6a8f322c4c51695663cc55e9"
@@ -7767,10 +7772,10 @@
resolved "https://registry.npmjs.org/@types/yarnpkg__lockfile/-/yarnpkg__lockfile-1.1.4.tgz#445251eb00bd9c1e751f82c7c6bf4f714edfd464"
integrity sha512-/emrKCfQMQmFCqRqqBJ0JueHBT06jBRM3e8OgnvDUcvuExONujIk2hFA5dNsN9Nt41ljGVDdChvCydATZ+KOZw==
"@types/yup@^0.29.8":
version "0.29.12"
resolved "https://registry.npmjs.org/@types/yup/-/yup-0.29.12.tgz#59c9577bea11d2b3d78717ea7591caacad6dfa1b"
integrity sha512-fA7bXyBzWEAgOwX2SD/5/iaZY/4In0EvJEzFmBWzaGNF4vxr8d5iOFUMFBpL4cMEmlSx2wW9ginJNnoZjE/vOg==
"@types/yup@^0.29.13":
version "0.29.13"
resolved "https://registry.npmjs.org/@types/yup/-/yup-0.29.13.tgz#21b137ba60841307a3c8a1050d3bf4e63ad561e9"
integrity sha512-qRyuv+P/1t1JK1rA+elmK1MmCL1BapEzKKfbEhDBV/LMMse4lmhZ/XbgETI39JveDJRpLjmToOI6uFtMW/WR2g==
"@types/zen-observable@^0.8.0", "@types/zen-observable@^0.8.2":
version "0.8.2"
@@ -14231,11 +14236,6 @@ flush-write-stream@^1.0.0:
inherits "^2.0.3"
readable-stream "^2.3.6"
fn-name@~3.0.0:
version "3.0.0"
resolved "https://registry.npmjs.org/fn-name/-/fn-name-3.0.0.tgz#0596707f635929634d791f452309ab41558e3c5c"
integrity sha512-eNMNr5exLoavuAMhIUVsOKF79SWd/zG104ef6sxBTSw+cZc6BXdQXDvYcGvp0VbxVVSp1XDUNoz7mg1xMtSznA==
fn.name@1.x.x:
version "1.1.0"
resolved "https://registry.npmjs.org/fn.name/-/fn.name-1.1.0.tgz#26cad8017967aea8731bc42961d04a3d5988accc"
@@ -18585,7 +18585,12 @@ locate-path@^6.0.0:
dependencies:
p-locate "^5.0.0"
lodash-es@^4.17.11, lodash-es@^4.2.1:
lodash-es@^4.17.15:
version "4.17.21"
resolved "https://registry.npmjs.org/lodash-es/-/lodash-es-4.17.21.tgz#43e626c46e6591b7750beb2b50117390c609e3ee"
integrity sha512-mKnC+QJ9pWVzv+C4/U3rRsHapFfHvQFoFB92e52xeyGMcX6/OlIl78je1u8vePzYZSkkogMPJ2yjxxsb89cxyw==
lodash-es@^4.2.1:
version "4.17.15"
resolved "https://registry.npmjs.org/lodash-es/-/lodash-es-4.17.15.tgz#21bd96839354412f23d7a10340e5eac6ee455d78"
integrity sha512-rlrc3yU3+JNOpZ9zj5pQtxnx2THmvRykwL4Xlxoa8I9lHBlVbbyPhgyPMioxVZ4NqyxaVVtaJnzsyOidQIhyyQ==
@@ -20000,6 +20005,11 @@ nano-css@^5.1.0, nano-css@^5.3.1:
stacktrace-js "^2.0.2"
stylis "^4.0.6"
nanoclone@^0.2.1:
version "0.2.1"
resolved "https://registry.npmjs.org/nanoclone/-/nanoclone-0.2.1.tgz#dd4090f8f1a110d26bb32c49ed2f5b9235209ed4"
integrity sha512-wynEP02LmIbLpcYw8uBKpcfF6dmg2vcpKqxeH5UcoKEYdExslsdUA4ugFauuaeYdTB76ez6gJW8XAZ6CgkXYxA==
nanoid@^3.1.23:
version "3.1.23"
resolved "https://registry.npmjs.org/nanoid/-/nanoid-3.1.23.tgz#f744086ce7c2bc47ee0a8472574d5c78e4183a81"
@@ -22482,7 +22492,7 @@ prop-types@^15.0.0, prop-types@^15.5.10, prop-types@^15.5.7, prop-types@^15.5.8,
object-assign "^4.1.1"
react-is "^16.8.1"
property-expr@^2.0.2:
property-expr@^2.0.4:
version "2.0.4"
resolved "https://registry.npmjs.org/property-expr/-/property-expr-2.0.4.tgz#37b925478e58965031bb612ec5b3260f8241e910"
integrity sha512-sFPkHQjVKheDNnPvotjQmm3KD3uk1fWKUN7CrpdbwmUx3CrG3QiM8QpTSimvig5vTXmTvjz7+TDvXOI9+4rkcg==
@@ -25975,11 +25985,6 @@ sync-fetch@0.3.0:
buffer "^5.7.0"
node-fetch "^2.6.1"
synchronous-promise@^2.0.13:
version "2.0.13"
resolved "https://registry.npmjs.org/synchronous-promise/-/synchronous-promise-2.0.13.tgz#9d8c165ddee69c5a6542862b405bc50095926702"
integrity sha512-R9N6uDkVsghHePKh1TEqbnLddO2IY25OcsksyFp/qBe7XYd0PVbKEWxhcdMhpLzE1I6skj5l4aEZ3CRxcbArlA==
table@^6.0.9:
version "6.7.1"
resolved "https://registry.npmjs.org/table/-/table-6.7.1.tgz#ee05592b7143831a8c94f3cee6aae4c1ccef33e2"
@@ -28469,17 +28474,17 @@ yocto-queue@^0.1.0:
resolved "https://registry.npmjs.org/yocto-queue/-/yocto-queue-0.1.0.tgz#0294eb3dee05028d31ee1a5fa2c556a6aaf10a1b"
integrity sha512-rVksvsnNCdJ/ohGc6xgPwyN8eheCxsiLM8mxuE/t/mOVqJewPuO1miLpTHQiRgTKCLexL4MeAFVagts7HmNZ2Q==
yup@^0.29.3:
version "0.29.3"
resolved "https://registry.npmjs.org/yup/-/yup-0.29.3.tgz#69a30fd3f1c19f5d9e31b1cf1c2b851ce8045fea"
integrity sha512-RNUGiZ/sQ37CkhzKFoedkeMfJM0vNQyaz+wRZJzxdKE7VfDeVKH8bb4rr7XhRLbHJz5hSjoDNwMEIaKhuMZ8gQ==
yup@^0.32.9:
version "0.32.9"
resolved "https://registry.npmjs.org/yup/-/yup-0.32.9.tgz#9367bec6b1b0e39211ecbca598702e106019d872"
integrity sha512-Ci1qN+i2H0XpY7syDQ0k5zKQ/DoxO0LzPg8PAR/X4Mpj6DqaeCoIYEEjDJwhArh3Fa7GWbQQVDZKeXYlSH4JMg==
dependencies:
"@babel/runtime" "^7.10.5"
fn-name "~3.0.0"
lodash "^4.17.15"
lodash-es "^4.17.11"
property-expr "^2.0.2"
synchronous-promise "^2.0.13"
"@types/lodash" "^4.14.165"
lodash "^4.17.20"
lodash-es "^4.17.15"
nanoclone "^0.2.1"
property-expr "^2.0.4"
toposort "^2.0.2"
z-schema@~3.18.3: