From 311d889595a467116b62d22c23dcce94f1ab5ea1 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 6 Oct 2021 20:59:32 +0000 Subject: [PATCH 1/2] Bump typescript from 4.3.5 to 4.4.3 Bumps [typescript](https://github.com/Microsoft/TypeScript) from 4.3.5 to 4.4.3. - [Release notes](https://github.com/Microsoft/TypeScript/releases) - [Commits](https://github.com/Microsoft/TypeScript/compare/v4.3.5...v4.4.3) --- updated-dependencies: - dependency-name: typescript dependency-type: direct:development update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- package-lock.json | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/package-lock.json b/package-lock.json index 8ce46eb0a..68fa2a72b 100644 --- a/package-lock.json +++ b/package-lock.json @@ -9552,9 +9552,9 @@ "dev": true }, "node_modules/typescript": { - "version": "4.3.5", - "resolved": "https://registry.npmjs.org/typescript/-/typescript-4.3.5.tgz", - "integrity": "sha512-DqQgihaQ9cUrskJo9kIyW/+g0Vxsk8cDtZ52a3NGh0YNTfpUSArXSohyUGnvbPazEPLu398C0UxmKSOrPumUzA==", + "version": "4.4.3", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-4.4.3.tgz", + "integrity": "sha512-4xfscpisVgqqDfPaJo5vkd+Qd/ItkoagnHpufr+i2QCHBsNYp+G7UAoyFl8aPtx879u38wPV65rZ8qbGZijalA==", "dev": true, "bin": { "tsc": "bin/tsc", @@ -17800,9 +17800,9 @@ "dev": true }, "typescript": { - "version": "4.3.5", - "resolved": "https://registry.npmjs.org/typescript/-/typescript-4.3.5.tgz", - "integrity": "sha512-DqQgihaQ9cUrskJo9kIyW/+g0Vxsk8cDtZ52a3NGh0YNTfpUSArXSohyUGnvbPazEPLu398C0UxmKSOrPumUzA==", + "version": "4.4.3", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-4.4.3.tgz", + "integrity": "sha512-4xfscpisVgqqDfPaJo5vkd+Qd/ItkoagnHpufr+i2QCHBsNYp+G7UAoyFl8aPtx879u38wPV65rZ8qbGZijalA==", "dev": true }, "typeson": { From da6a5734e1e9d96774be2b4afec90a74a6e524c4 Mon Sep 17 00:00:00 2001 From: Dylan Staley <88163+dstaley@users.noreply.github.com> Date: Mon, 11 Oct 2021 11:46:29 -0700 Subject: [PATCH 2/2] annotate caught errors as any --- src/adapters/IDB.ts | 16 ++++++++-------- src/collection.ts | 2 +- test/test_utils.ts | 2 +- 3 files changed, 10 insertions(+), 10 deletions(-) diff --git a/src/adapters/IDB.ts b/src/adapters/IDB.ts index 0d6a2eace..84c0a5698 100644 --- a/src/adapters/IDB.ts +++ b/src/adapters/IDB.ts @@ -455,7 +455,7 @@ export default class IDB< }, { mode: "readwrite" } ); - } catch (e) { + } catch (e: any) { this._handleError("clear", e); } } @@ -564,7 +564,7 @@ export default class IDB< (record = (e.target as IDBRequest).result as B); }); return record!; - } catch (e) { + } catch (e: any) { this._handleError("get", e); } } @@ -597,7 +597,7 @@ export default class IDB< // The resulting list of records is sorted. // XXX: with some efforts, this could be fully implemented using IDB API. return params.order ? sortObjects(params.order, results) : results; - } catch (e) { + } catch (e: any) { this._handleError("list", e); } @@ -626,7 +626,7 @@ export default class IDB< { mode: "readwrite" } ); return value; - } catch (e) { + } catch (e: any) { this._handleError("saveLastModified", e); } @@ -649,7 +649,7 @@ export default class IDB< }); return entry ? entry.value : null; - } catch (e) { + } catch (e: any) { this._handleError("getLastModified", e); } @@ -705,7 +705,7 @@ export default class IDB< await this.saveLastModified(lastModified); } return records; - } catch (e) { + } catch (e: any) { this._handleError("importBulk", e); } @@ -720,7 +720,7 @@ export default class IDB< { mode: "readwrite" } ); return metadata; - } catch (e) { + } catch (e: any) { this._handleError("saveMetadata", e); } } @@ -733,7 +733,7 @@ export default class IDB< (entry = (e.target as IDBRequest<{ metadata: any }>).result); }); return entry ? (entry as { metadata: any }).metadata : null; - } catch (e) { + } catch (e: any) { this._handleError("getMetadata", e); } } diff --git a/src/collection.ts b/src/collection.ts index db4ba3008..8a79b8737 100644 --- a/src/collection.ts +++ b/src/collection.ts @@ -951,7 +951,7 @@ export default class Collection< syncResultObject.reset("conflicts").add("resolved", resolved); } } - } catch (err) { + } catch (err: any) { const data: KintoError = { type: "incoming", message: err.message, diff --git a/test/test_utils.ts b/test/test_utils.ts index 5d164fdf0..2924e0101 100644 --- a/test/test_utils.ts +++ b/test/test_utils.ts @@ -41,7 +41,7 @@ export async function expectAsyncError( try { await fn(); - } catch (err) { + } catch (err: any) { error = err; }