Skip to content

Commit

Permalink
build(deps-dev): bump typescript from 5.3.3 to 5.6.2 (#1145)
Browse files Browse the repository at this point in the history
* build(deps-dev): bump typescript from 5.3.3 to 5.6.2

Bumps [typescript](https://github.com/microsoft/TypeScript) from 5.3.3 to 5.6.2.
- [Release notes](https://github.com/microsoft/TypeScript/releases)
- [Changelog](https://github.com/microsoft/TypeScript/blob/main/azure-pipelines.release.yml)
- [Commits](microsoft/TypeScript@v5.3.3...v5.6.2)

---
updated-dependencies:
- dependency-name: typescript
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <[email protected]>

* fix: type issues after update

---------

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Konstantinos Kopanidis <[email protected]>
  • Loading branch information
dependabot[bot] and kkopanidis authored Sep 10, 2024
1 parent f2c1d51 commit 5a37d02
Show file tree
Hide file tree
Showing 28 changed files with 41 additions and 29 deletions.
2 changes: 1 addition & 1 deletion libraries/grpc-sdk/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@
"ts-node": "^10.9.2",
"ts-proto": "^1.167.1",
"tslib": "^2.6.3",
"typescript": "~5.3.3"
"typescript": "~5.6.2"
},
"peerDependencies": {
"@grpc/grpc-js": "^1.10.9"
Expand Down
2 changes: 1 addition & 1 deletion libraries/hermes/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,6 @@
"@types/node": "20.11.24",
"@types/object-hash": "^3.0.6",
"rimraf": "^5.0.5",
"typescript": "~5.3.3"
"typescript": "~5.6.2"
}
}
4 changes: 2 additions & 2 deletions libraries/hermes/src/Rest/util.ts
Original file line number Diff line number Diff line change
Expand Up @@ -65,9 +65,9 @@ export function validateParams(params: Params, routeDefinedParams: Params) {
if (routeDefinedParams[key].hasOwnProperty('type')) {
params[key] = validateType(
key,
routeDefinedParams[key].type,
(routeDefinedParams[key] as { type: string }).type,
params[key],
routeDefinedParams[key]?.required || false,
(routeDefinedParams[key] as { required?: boolean })?.required || false,
);
} else {
validateObject(key, params[key], routeDefinedParams[key]);
Expand Down
2 changes: 1 addition & 1 deletion libraries/module-tools/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@
"ts-node": "^10.9.2",
"ts-proto": "^1.167.1",
"tslib": "^2.6.3",
"typescript": "~5.3.3"
"typescript": "~5.6.2"
},
"peerDependencies": {
"@conduitplatform/grpc-sdk": "*",
Expand Down
2 changes: 1 addition & 1 deletion libraries/node-2fa/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,6 @@
"jest": "^29.7.0",
"prettier": "^3.0.3",
"ts-jest": "^29.1.2",
"typescript": "^5.3.3"
"typescript": "^5.6.2"
}
}
2 changes: 1 addition & 1 deletion libraries/testing-tools/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,6 @@
"copyfiles": "^2.4.1",
"rimraf": "^5.0.5",
"ts-proto": "^1.167.1",
"typescript": "~5.3.3"
"typescript": "~5.6.2"
}
}
2 changes: 1 addition & 1 deletion modules/authentication/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,6 @@
"copyfiles": "^2.4.1",
"rimraf": "^5.0.5",
"ts-proto": "^1.167.1",
"typescript": "~5.3.3"
"typescript": "~5.6.2"
}
}
4 changes: 2 additions & 2 deletions modules/authentication/src/handlers/biometric.ts
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ export class BiometricHandlers implements IAuthenticationStrategy {
throw new GrpcError(status.INVALID_ARGUMENT, 'Key not found!');
}
const verifier = crypto.createVerify('sha256WithRSAEncryption');
verifier.update(Buffer.from((key.user as User)._id));
verifier.update(new Uint8Array(Buffer.from((key.user as User)._id)));
const cryptoKey = crypto.createPublicKey({
key: key.publicKey,
format: 'der',
Expand Down Expand Up @@ -177,7 +177,7 @@ export class BiometricHandlers implements IAuthenticationStrategy {
user: user._id,
});
const verifier = crypto.createVerify('sha256WithRSAEncryption');
verifier.update(Buffer.from(existingToken.data.challenge));
verifier.update(new Uint8Array(Buffer.from(existingToken.data.challenge)));
const cryptoKey = crypto.createPublicKey({
key: existingToken.data.publicKey,
format: 'der',
Expand Down
2 changes: 1 addition & 1 deletion modules/authorization/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,6 @@
"copyfiles": "^2.4.1",
"rimraf": "^5.0.5",
"ts-proto": "^1.167.1",
"typescript": "~5.3.3"
"typescript": "~5.6.2"
}
}
2 changes: 1 addition & 1 deletion modules/chat/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,6 @@
"copyfiles": "^2.4.1",
"rimraf": "^5.0.5",
"ts-proto": "^1.167.1",
"typescript": "~5.3.3"
"typescript": "~5.6.2"
}
}
2 changes: 1 addition & 1 deletion modules/database/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,6 @@
"copyfiles": "^2.4.1",
"rimraf": "^5.0.5",
"ts-proto": "^1.167.1",
"typescript": "~5.3.3"
"typescript": "~5.6.2"
}
}
7 changes: 7 additions & 0 deletions modules/database/src/adapters/mongoose-adapter/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ async function _createWithPopulations(

if (!fields.hasOwnProperty(key)) continue;
if (!isObject(fields[key])) continue;
// @ts-expect-error
if (fields[key] === 'JSON' || fields[key].type === 'JSON') continue;

if (isArray(document[key])) {
Expand All @@ -50,22 +51,28 @@ async function _createWithPopulations(
continue;
}
let field = fields[key];
// @ts-expect-error
if (!isArray(field) && field.type && isArray(field.type)) {
// @ts-expect-error
field = field.type;
}
// @ts-expect-error
if (field[0].hasOwnProperty('model')) {
// @ts-expect-error
const { model } = adapter.getSchemaModel(field[0].model);
if (validate) {
await model.model.validate(val);
} else {
document[key][i] = await _createOrUpdate(val, model);
}
} else {
// @ts-expect-error
await _createWithPopulations(field[0], val, adapter, validate);
}
}
} else if (isObject(document[key])) {
if (fields[key].hasOwnProperty('model')) {
// @ts-expect-error
const { model } = adapter.getSchemaModel(fields[key].model);
if (validate) {
await model.model.validate(document[key]);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,9 @@ export function extractRelations(ogSchema: ConduitModel, schema: any) {
}
}
} else if (isObject(schema[key])) {
// @ts-expect-error
if (schema[key].hasOwnProperty('type') && schema[key].type === 'Relation') {
// @ts-expect-error
extracted[key] = { ...schema[key] };
delete schema[key];
delete ogSchema[key];
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -121,6 +121,7 @@ export function extractFieldProperties(
res.unique = objectField.unique ?? false;
res.allowNull = false;
} else if (objectField.hasOwnProperty('required') && objectField.required) {
// @ts-expect-error
res.allowNull = !objectField.required ?? true;
}

Expand Down
2 changes: 1 addition & 1 deletion modules/email/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,6 @@
"rimraf": "^5.0.5",
"smtp-server": "^3.11.0",
"ts-proto": "^1.167.1",
"typescript": "~5.3.3"
"typescript": "~5.6.2"
}
}
2 changes: 1 addition & 1 deletion modules/forms/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,6 @@
"@types/node": "20.11.24",
"copyfiles": "^2.4.1",
"rimraf": "^5.0.5",
"typescript": "~5.3.3"
"typescript": "~5.6.2"
}
}
2 changes: 1 addition & 1 deletion modules/functions/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,6 @@
"copyfiles": "^2.4.1",
"rimraf": "^5.0.5",
"ts-proto": "^1.167.1",
"typescript": "~5.3.3"
"typescript": "~5.6.2"
}
}
2 changes: 1 addition & 1 deletion modules/push-notifications/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,6 @@
"copyfiles": "^2.4.1",
"ts-proto": "^1.167.1",
"rimraf": "^5.0.5",
"typescript": "~5.3.3"
"typescript": "~5.6.2"
}
}
2 changes: 1 addition & 1 deletion modules/router/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,6 @@
"express": "~4.19.2",
"rimraf": "^5.0.5",
"ts-proto": "^1.167.1",
"typescript": "~5.3.3"
"typescript": "~5.6.2"
}
}
2 changes: 1 addition & 1 deletion modules/sms/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,6 @@
"copyfiles": "^2.4.1",
"rimraf": "^5.0.5",
"ts-proto": "^1.167.1",
"typescript": "~5.3.3"
"typescript": "~5.6.2"
}
}
2 changes: 1 addition & 1 deletion modules/storage/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,6 @@
"copyfiles": "^2.4.1",
"rimraf": "^5.0.5",
"ts-proto": "^1.167.1",
"typescript": "~5.3.3"
"typescript": "~5.6.2"
}
}
2 changes: 1 addition & 1 deletion modules/storage/src/providers/aws/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ export class AWSS3Storage implements IStorageProvider {

const data = await streamToBuffer(stream.Body as Readable);
if (downloadPath) {
fs.writeFileSync(downloadPath, data);
fs.writeFileSync(downloadPath, new Uint8Array(data));
}
return data;
}
Expand Down
2 changes: 1 addition & 1 deletion modules/storage/src/providers/azure/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ export class AzureStorage implements IStorageProvider {
.download(0);
const data: Buffer = await streamToBuffer(promise.readableStreamBody);
if (downloadPath) {
fs.writeFileSync(downloadPath, data);
fs.writeFileSync(downloadPath, new Uint8Array(data));
}
return data;
}
Expand Down
2 changes: 2 additions & 0 deletions modules/storage/src/utils/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@ export async function streamToBuffer(readableStream: any): Promise<Buffer> {
chunks.push(data instanceof Buffer ? data : Buffer.from(data));
});
readableStream.on('end', () => {
// shouldn't really provide an error
// @ts-expect-error
resolve(Buffer.concat(chunks));
});
readableStream.on('error', reject);
Expand Down
2 changes: 1 addition & 1 deletion packages/admin/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,6 @@
"rimraf": "^5.0.5",
"ts-jest": "^29.1.2",
"ts-proto": "^1.167.1",
"typescript": "~5.3.3"
"typescript": "~5.6.2"
}
}
2 changes: 1 addition & 1 deletion packages/commons/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,6 @@
"express": "~4.19.2",
"rimraf": "^5.0.5",
"ts-proto": "^1.167.1",
"typescript": "~5.3.3"
"typescript": "~5.6.2"
}
}
2 changes: 1 addition & 1 deletion packages/core/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,6 @@
"ts-jest": "^29.1.2",
"ts-node": "^10.9.2",
"ts-proto": "^1.167.1",
"typescript": "~5.3.3"
"typescript": "~5.6.2"
}
}
8 changes: 4 additions & 4 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -15454,10 +15454,10 @@ typedarray@^0.0.6:
resolved "https://registry.yarnpkg.com/typedarray/-/typedarray-0.0.6.tgz#867ac74e3864187b1d3d47d996a78ec5c8830777"
integrity sha512-/aCDEGatGvZ2BIk+HmLf4ifCJFwvKFNb9/JeZPMulfgFracn9QFcAf5GO8B/mweUjSoblS5In0cWhqpfs/5PQA==

"typescript@>=3 < 6", "typescript@^4.6.4 || ^5.0.0", typescript@^5.3.3, typescript@~5.3.3:
version "5.3.3"
resolved "https://registry.yarnpkg.com/typescript/-/typescript-5.3.3.tgz#b3ce6ba258e72e6305ba66f5c9b452aaee3ffe37"
integrity sha512-pXWcraxM0uxAS+tN0AG/BF2TyqmHO014Z070UsJ+pFvYuRSq8KH8DmWpnbXe0pEPDHXZV3FcAbJkijJ5oNEnWw==
"typescript@>=3 < 6", "typescript@^4.6.4 || ^5.0.0", typescript@^5.6.2, typescript@~5.6.2:
version "5.6.2"
resolved "https://registry.yarnpkg.com/typescript/-/typescript-5.6.2.tgz#d1de67b6bef77c41823f822df8f0b3bcff60a5a0"
integrity sha512-NW8ByodCSNCwZeghjN3o+JX5OFH0Ojg6sadjEKY4huZ52TqbJTJnDo5+Tw98lSy63NZvi4n+ez5m2u5d4PkZyw==

uglify-js@^3.1.4:
version "3.17.4"
Expand Down

0 comments on commit 5a37d02

Please sign in to comment.