mirror of
https://github.com/Unleash/unleash.git
synced 2024-12-22 19:07:54 +01:00
fix: upgrade @types/node to v16.18.3 (#2365)
This pr upgrade @types/node to v16.18.3. This also detected some inconsitent retrun types that I decided to fix.
This commit is contained in:
parent
5dd319e414
commit
1312579bf6
@ -152,7 +152,7 @@
|
||||
"@types/make-fetch-happen": "10.0.0",
|
||||
"@types/memoizee": "0.4.8",
|
||||
"@types/mime": "3.0.1",
|
||||
"@types/node": "16.6.1",
|
||||
"@types/node": "16.18.3",
|
||||
"@types/nodemailer": "6.4.6",
|
||||
"@types/owasp-password-strength-test": "1.3.0",
|
||||
"@types/semver": "7.3.13",
|
||||
|
@ -24,6 +24,7 @@ const returns415: (t: jest.Mock) => Response = (t) => ({
|
||||
const expectNoCall: (t: jest.Mock) => Response = (t) => ({
|
||||
// @ts-ignore
|
||||
status: () => ({
|
||||
// @ts-ignore
|
||||
end: () => expect(t).toHaveBeenCalledTimes(0),
|
||||
}),
|
||||
});
|
||||
|
@ -69,9 +69,9 @@ export default class ClientMetricsController extends Controller {
|
||||
|
||||
try {
|
||||
await this.metricsV2.registerClientMetrics(data, clientIp);
|
||||
return res.status(202).end();
|
||||
res.status(202).end();
|
||||
} catch (e) {
|
||||
return res.status(400).end();
|
||||
res.status(400).end();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -67,6 +67,6 @@ export default class RegisterController extends Controller {
|
||||
const { body: data, ip: clientIp, user } = req;
|
||||
data.environment = RegisterController.resolveEnvironment(user, data);
|
||||
await this.clientInstanceService.registerClient(data, clientIp);
|
||||
return res.status(202).end();
|
||||
res.status(202).end();
|
||||
}
|
||||
}
|
||||
|
@ -89,9 +89,9 @@ export class PublicInviteController extends Controller {
|
||||
const { token } = req.params;
|
||||
const valid = await this.publicSignupTokenService.validate(token);
|
||||
if (valid) {
|
||||
return res.status(200).end();
|
||||
res.status(200).end();
|
||||
} else {
|
||||
return res.status(400).end();
|
||||
res.status(400).end();
|
||||
}
|
||||
}
|
||||
|
||||
@ -102,7 +102,8 @@ export class PublicInviteController extends Controller {
|
||||
const { token } = req.params;
|
||||
const valid = await this.publicSignupTokenService.validate(token);
|
||||
if (!valid) {
|
||||
return res.status(400).end();
|
||||
res.status(400).end();
|
||||
return;
|
||||
}
|
||||
const user = await this.publicSignupTokenService.addTokenUser(
|
||||
token,
|
||||
|
@ -1546,11 +1546,16 @@
|
||||
"@types/node" "*"
|
||||
form-data "^3.0.0"
|
||||
|
||||
"@types/node@*", "@types/node@16.6.1":
|
||||
"@types/node@*":
|
||||
version "16.6.1"
|
||||
resolved "https://registry.npmjs.org/@types/node/-/node-16.6.1.tgz"
|
||||
integrity sha512-Sr7BhXEAer9xyGuCN3Ek9eg9xPviCF2gfu9kTfuU2HkTVAMYSDeX40fvpmo72n5nansg3nsBjuQBrsS28r+NUw==
|
||||
|
||||
"@types/node@16.18.3":
|
||||
version "16.18.3"
|
||||
resolved "https://registry.yarnpkg.com/@types/node/-/node-16.18.3.tgz#d7f7ba828ad9e540270f01ce00d391c54e6e0abc"
|
||||
integrity sha512-jh6m0QUhIRcZpNv7Z/rpN+ZWXOicUUQbSoWks7Htkbb9IjFQj4kzcX/xFCkjstCj5flMsN8FiSvt+q+Tcs4Llg==
|
||||
|
||||
"@types/nodemailer@6.4.6":
|
||||
version "6.4.6"
|
||||
resolved "https://registry.yarnpkg.com/@types/nodemailer/-/nodemailer-6.4.6.tgz#ce21b4b474a08f672f182e15982b7945dde1f288"
|
||||
|
Loading…
Reference in New Issue
Block a user