From 20ebeb5fe1853fc9f5e3c5d01ff87c2f3b82a158 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 2 Nov 2023 14:39:38 +0800 Subject: [PATCH] build(deps-dev): bump typescript from 4.9.5 to 5.2.2 (#199) * build(deps-dev): bump typescript from 4.9.5 to 5.2.2 Bumps [typescript](https://github.com/Microsoft/TypeScript) from 4.9.5 to 5.2.2. - [Release notes](https://github.com/Microsoft/TypeScript/releases) - [Commits](https://github.com/Microsoft/TypeScript/compare/v4.9.5...v5.2.2) --- updated-dependencies: - dependency-name: typescript dependency-type: direct:development update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] * fix: run lint-fix --------- Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Kar Rui Lau --- package-lock.json | 122 ++++++++++-------------- package.json | 4 +- public/mockServiceWorker.js | 2 +- src/hooks/useLocalStorage.ts | 1 - src/server/modules/auth/auth.error.ts | 2 + src/server/modules/post/post.router.ts | 6 -- src/stories/Page/SignInPage.stories.tsx | 2 +- 7 files changed, 54 insertions(+), 85 deletions(-) diff --git a/package-lock.json b/package-lock.json index ebb89303..32541fd6 100644 --- a/package-lock.json +++ b/package-lock.json @@ -76,7 +76,7 @@ "eslint-plugin-react-hooks": "^4.6.0", "eslint-plugin-storybook": "0.6.13", "mockdate": "^3.0.5", - "msw": "^1.2.2", + "msw": "^1.3.1", "msw-storybook-addon": "^1.8.0", "msw-trpc": "^1.3.3", "npm-run-all": "^4.1.5", @@ -85,7 +85,7 @@ "start-server-and-test": "^2.0.0", "storybook": "7.4.2", "tsx": "^3.12.7", - "typescript": "^4.8.3", + "typescript": "^5.2.2", "vite": "^4.1.5", "vitest": "^0.30.1", "vitest-environment-vprisma": "^1.2.0" @@ -5901,16 +5901,16 @@ } }, "node_modules/@mswjs/interceptors": { - "version": "0.17.9", - "resolved": "https://registry.npmjs.org/@mswjs/interceptors/-/interceptors-0.17.9.tgz", - "integrity": "sha512-4LVGt03RobMH/7ZrbHqRxQrS9cc2uh+iNKSj8UWr8M26A2i793ju+csaB5zaqYltqJmA2jUq4VeYfKmVqvsXQg==", + "version": "0.17.10", + "resolved": "https://registry.npmjs.org/@mswjs/interceptors/-/interceptors-0.17.10.tgz", + "integrity": "sha512-N8x7eSLGcmUFNWZRxT1vsHvypzIRgQYdG0rJey/rZCy6zT/30qDt8Joj7FxzGNLSwXbeZqJOMqDurp7ra4hgbw==", "dev": true, "dependencies": { "@open-draft/until": "^1.0.3", "@types/debug": "^4.1.7", "@xmldom/xmldom": "^0.8.3", "debug": "^4.3.3", - "headers-polyfill": "^3.1.0", + "headers-polyfill": "3.2.5", "outvariant": "^1.2.1", "strict-event-emitter": "^0.2.4", "web-encoding": "^1.1.5" @@ -13395,9 +13395,9 @@ } }, "node_modules/@types/debug": { - "version": "4.1.8", - "resolved": "https://registry.npmjs.org/@types/debug/-/debug-4.1.8.tgz", - "integrity": "sha512-/vPO1EPOs306Cvhwv7KfVfYvOJqA/S/AXjaHQiJboCZzcNDb+TIJFN9/2C9DZ//ijSKWioNyUxD792QmDJ+HKQ==", + "version": "4.1.9", + "resolved": "https://registry.npmjs.org/@types/debug/-/debug-4.1.9.tgz", + "integrity": "sha512-8Hz50m2eoS56ldRlepxSBa6PWEVCtzUo/92HgLc2qTMnotJNIm7xP+UZhyWoYsyOdd5dxZ+NZLb24rsKyFs2ow==", "dev": true, "dependencies": { "@types/ms": "*" @@ -14510,9 +14510,9 @@ } }, "node_modules/@xmldom/xmldom": { - "version": "0.8.8", - "resolved": "https://registry.npmjs.org/@xmldom/xmldom/-/xmldom-0.8.8.tgz", - "integrity": "sha512-0LNz4EY8B/8xXY86wMrQ4tz6zEHZv9ehFMJPm8u2gq5lQ71cfRKdaKyxfJAx5aUoyzx0qzgURblTisPGgz3d+Q==", + "version": "0.8.10", + "resolved": "https://registry.npmjs.org/@xmldom/xmldom/-/xmldom-0.8.10.tgz", + "integrity": "sha512-2WALfTl4xo2SkGCYRt6rDTFfk9R1czmBvUQy12gK2KuRKIpWEhcbbzy8EZXtz/jkRqHX8bFEc6FC1HjX4TUWYw==", "dev": true, "engines": { "node": ">=10.0.0" @@ -20405,9 +20405,9 @@ } }, "node_modules/headers-polyfill": { - "version": "3.1.2", - "resolved": "https://registry.npmjs.org/headers-polyfill/-/headers-polyfill-3.1.2.tgz", - "integrity": "sha512-tWCK4biJ6hcLqTviLXVR9DTRfYGQMXEIUj3gwJ2rZ5wO/at3XtkI4g8mCvFdUF9l1KMBNCfmNAdnahm1cgavQA==", + "version": "3.2.5", + "resolved": "https://registry.npmjs.org/headers-polyfill/-/headers-polyfill-3.2.5.tgz", + "integrity": "sha512-tUCGvt191vNSQgttSyJoibR+VO+I6+iCHIUdhzEMJKE+EAL8BwCN7fUOZlY4ofOelNHsK+gEjxB/B+9N3EWtdA==", "dev": true }, "node_modules/hmac-drbg": { @@ -23488,22 +23488,22 @@ "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==" }, "node_modules/msw": { - "version": "1.2.2", - "resolved": "https://registry.npmjs.org/msw/-/msw-1.2.2.tgz", - "integrity": "sha512-GsW3PE/Es/a1tYThXcM8YHOZ1S1MtivcS3He/LQbbTCx3rbWJYCtWD5XXyJ53KlNPT7O1VI9sCW3xMtgFe8XpQ==", + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/msw/-/msw-1.3.1.tgz", + "integrity": "sha512-GhP5lHSTXNlZb9EaKgPRJ01YAnVXwzkvnTzRn4W8fxU2DXuJrRO+Nb6OHdYqB4fCkwSNpIJH9JkON5Y6rHqJMQ==", "dev": true, "hasInstallScript": true, "dependencies": { "@mswjs/cookies": "^0.2.2", - "@mswjs/interceptors": "^0.17.5", + "@mswjs/interceptors": "^0.17.10", "@open-draft/until": "^1.0.3", "@types/cookie": "^0.4.1", "@types/js-levenshtein": "^1.1.1", - "chalk": "4.1.1", + "chalk": "^4.1.1", "chokidar": "^3.4.2", "cookie": "^0.4.2", "graphql": "^15.0.0 || ^16.0.0", - "headers-polyfill": "^3.1.2", + "headers-polyfill": "3.2.5", "inquirer": "^8.2.0", "is-node-process": "^1.2.0", "js-levenshtein": "^1.1.6", @@ -23525,7 +23525,7 @@ "url": "https://opencollective.com/mswjs" }, "peerDependencies": { - "typescript": ">= 4.4.x <= 5.1.x" + "typescript": ">= 4.4.x <= 5.2.x" }, "peerDependenciesMeta": { "typescript": { @@ -23561,22 +23561,6 @@ "integrity": "sha512-XW/Aa8APYr6jSVVA1y/DEIZX0/GMKLEVekNG727R8cs56ahETkRAy/3DR7+fJyh7oUgGwNQaRfXCun0+KbWY7Q==", "dev": true }, - "node_modules/msw/node_modules/chalk": { - "version": "4.1.1", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.1.tgz", - "integrity": "sha512-diHzdDKxcU+bAsUboHLPEDQiw0qEe0qd7SYUn3HgcFlWgbDcfLGswOHYeGrHKzG9z6UYf01d9VFMfZxPM1xZSg==", - "dev": true, - "dependencies": { - "ansi-styles": "^4.1.0", - "supports-color": "^7.1.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/chalk/chalk?sponsor=1" - } - }, "node_modules/msw/node_modules/cookie": { "version": "0.4.2", "resolved": "https://registry.npmjs.org/cookie/-/cookie-0.4.2.tgz", @@ -28302,16 +28286,16 @@ "dev": true }, "node_modules/typescript": { - "version": "4.9.5", - "resolved": "https://registry.npmjs.org/typescript/-/typescript-4.9.5.tgz", - "integrity": "sha512-1FXk9E2Hm+QzZQ7z+McJiHL4NW1F2EzMu9Nq9i3zAaGqibafqYwCVU6WyWAuyQRRzOlxou8xZSyXLEN8oKj24g==", + "version": "5.2.2", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.2.2.tgz", + "integrity": "sha512-mI4WrpHsbCIcwT9cF4FZvr80QUeKvsUsUvKDoR+X/7XHQH98xYD8YHZg7ANtz2GtZt/CBq2QJ0thkGJMHfqc1w==", "dev": true, "bin": { "tsc": "bin/tsc", "tsserver": "bin/tsserver" }, "engines": { - "node": ">=4.2.0" + "node": ">=14.17" } }, "node_modules/uc.micro": { @@ -33843,16 +33827,16 @@ } }, "@mswjs/interceptors": { - "version": "0.17.9", - "resolved": "https://registry.npmjs.org/@mswjs/interceptors/-/interceptors-0.17.9.tgz", - "integrity": "sha512-4LVGt03RobMH/7ZrbHqRxQrS9cc2uh+iNKSj8UWr8M26A2i793ju+csaB5zaqYltqJmA2jUq4VeYfKmVqvsXQg==", + "version": "0.17.10", + "resolved": "https://registry.npmjs.org/@mswjs/interceptors/-/interceptors-0.17.10.tgz", + "integrity": "sha512-N8x7eSLGcmUFNWZRxT1vsHvypzIRgQYdG0rJey/rZCy6zT/30qDt8Joj7FxzGNLSwXbeZqJOMqDurp7ra4hgbw==", "dev": true, "requires": { "@open-draft/until": "^1.0.3", "@types/debug": "^4.1.7", "@xmldom/xmldom": "^0.8.3", "debug": "^4.3.3", - "headers-polyfill": "^3.1.0", + "headers-polyfill": "3.2.5", "outvariant": "^1.2.1", "strict-event-emitter": "^0.2.4", "web-encoding": "^1.1.5" @@ -38987,9 +38971,9 @@ } }, "@types/debug": { - "version": "4.1.8", - "resolved": "https://registry.npmjs.org/@types/debug/-/debug-4.1.8.tgz", - "integrity": "sha512-/vPO1EPOs306Cvhwv7KfVfYvOJqA/S/AXjaHQiJboCZzcNDb+TIJFN9/2C9DZ//ijSKWioNyUxD792QmDJ+HKQ==", + "version": "4.1.9", + "resolved": "https://registry.npmjs.org/@types/debug/-/debug-4.1.9.tgz", + "integrity": "sha512-8Hz50m2eoS56ldRlepxSBa6PWEVCtzUo/92HgLc2qTMnotJNIm7xP+UZhyWoYsyOdd5dxZ+NZLb24rsKyFs2ow==", "dev": true, "requires": { "@types/ms": "*" @@ -39882,9 +39866,9 @@ } }, "@xmldom/xmldom": { - "version": "0.8.8", - "resolved": "https://registry.npmjs.org/@xmldom/xmldom/-/xmldom-0.8.8.tgz", - "integrity": "sha512-0LNz4EY8B/8xXY86wMrQ4tz6zEHZv9ehFMJPm8u2gq5lQ71cfRKdaKyxfJAx5aUoyzx0qzgURblTisPGgz3d+Q==", + "version": "0.8.10", + "resolved": "https://registry.npmjs.org/@xmldom/xmldom/-/xmldom-0.8.10.tgz", + "integrity": "sha512-2WALfTl4xo2SkGCYRt6rDTFfk9R1czmBvUQy12gK2KuRKIpWEhcbbzy8EZXtz/jkRqHX8bFEc6FC1HjX4TUWYw==", "dev": true }, "@xtuc/ieee754": { @@ -44347,9 +44331,9 @@ "dev": true }, "headers-polyfill": { - "version": "3.1.2", - "resolved": "https://registry.npmjs.org/headers-polyfill/-/headers-polyfill-3.1.2.tgz", - "integrity": "sha512-tWCK4biJ6hcLqTviLXVR9DTRfYGQMXEIUj3gwJ2rZ5wO/at3XtkI4g8mCvFdUF9l1KMBNCfmNAdnahm1cgavQA==", + "version": "3.2.5", + "resolved": "https://registry.npmjs.org/headers-polyfill/-/headers-polyfill-3.2.5.tgz", + "integrity": "sha512-tUCGvt191vNSQgttSyJoibR+VO+I6+iCHIUdhzEMJKE+EAL8BwCN7fUOZlY4ofOelNHsK+gEjxB/B+9N3EWtdA==", "dev": true }, "hmac-drbg": { @@ -46670,21 +46654,21 @@ "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==" }, "msw": { - "version": "1.2.2", - "resolved": "https://registry.npmjs.org/msw/-/msw-1.2.2.tgz", - "integrity": "sha512-GsW3PE/Es/a1tYThXcM8YHOZ1S1MtivcS3He/LQbbTCx3rbWJYCtWD5XXyJ53KlNPT7O1VI9sCW3xMtgFe8XpQ==", + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/msw/-/msw-1.3.1.tgz", + "integrity": "sha512-GhP5lHSTXNlZb9EaKgPRJ01YAnVXwzkvnTzRn4W8fxU2DXuJrRO+Nb6OHdYqB4fCkwSNpIJH9JkON5Y6rHqJMQ==", "dev": true, "requires": { "@mswjs/cookies": "^0.2.2", - "@mswjs/interceptors": "^0.17.5", + "@mswjs/interceptors": "^0.17.10", "@open-draft/until": "^1.0.3", "@types/cookie": "^0.4.1", "@types/js-levenshtein": "^1.1.1", - "chalk": "4.1.1", + "chalk": "^4.1.1", "chokidar": "^3.4.2", "cookie": "^0.4.2", "graphql": "^15.0.0 || ^16.0.0", - "headers-polyfill": "^3.1.2", + "headers-polyfill": "3.2.5", "inquirer": "^8.2.0", "is-node-process": "^1.2.0", "js-levenshtein": "^1.1.6", @@ -46702,16 +46686,6 @@ "integrity": "sha512-XW/Aa8APYr6jSVVA1y/DEIZX0/GMKLEVekNG727R8cs56ahETkRAy/3DR7+fJyh7oUgGwNQaRfXCun0+KbWY7Q==", "dev": true }, - "chalk": { - "version": "4.1.1", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.1.tgz", - "integrity": "sha512-diHzdDKxcU+bAsUboHLPEDQiw0qEe0qd7SYUn3HgcFlWgbDcfLGswOHYeGrHKzG9z6UYf01d9VFMfZxPM1xZSg==", - "dev": true, - "requires": { - "ansi-styles": "^4.1.0", - "supports-color": "^7.1.0" - } - }, "cookie": { "version": "0.4.2", "resolved": "https://registry.npmjs.org/cookie/-/cookie-0.4.2.tgz", @@ -50311,9 +50285,9 @@ "dev": true }, "typescript": { - "version": "4.9.5", - "resolved": "https://registry.npmjs.org/typescript/-/typescript-4.9.5.tgz", - "integrity": "sha512-1FXk9E2Hm+QzZQ7z+McJiHL4NW1F2EzMu9Nq9i3zAaGqibafqYwCVU6WyWAuyQRRzOlxou8xZSyXLEN8oKj24g==", + "version": "5.2.2", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.2.2.tgz", + "integrity": "sha512-mI4WrpHsbCIcwT9cF4FZvr80QUeKvsUsUvKDoR+X/7XHQH98xYD8YHZg7ANtz2GtZt/CBq2QJ0thkGJMHfqc1w==", "dev": true }, "uc.micro": { diff --git a/package.json b/package.json index fc3a4bda..f2bf595f 100644 --- a/package.json +++ b/package.json @@ -105,7 +105,7 @@ "eslint-plugin-react-hooks": "^4.6.0", "eslint-plugin-storybook": "0.6.13", "mockdate": "^3.0.5", - "msw": "^1.2.2", + "msw": "^1.3.1", "msw-storybook-addon": "^1.8.0", "msw-trpc": "^1.3.3", "npm-run-all": "^4.1.5", @@ -114,7 +114,7 @@ "start-server-and-test": "^2.0.0", "storybook": "7.4.2", "tsx": "^3.12.7", - "typescript": "^4.8.3", + "typescript": "^5.2.2", "vite": "^4.1.5", "vitest": "^0.30.1", "vitest-environment-vprisma": "^1.2.0" diff --git a/public/mockServiceWorker.js b/public/mockServiceWorker.js index 8ee70b3e..0f24d515 100644 --- a/public/mockServiceWorker.js +++ b/public/mockServiceWorker.js @@ -2,7 +2,7 @@ /* tslint:disable */ /** - * Mock Service Worker (1.2.2). + * Mock Service Worker (1.3.1). * @see https://github.com/mswjs/msw * - Please do NOT modify this file. * - Please do NOT serve this file on production. diff --git a/src/hooks/useLocalStorage.ts b/src/hooks/useLocalStorage.ts index 38065e00..b2fd644f 100644 --- a/src/hooks/useLocalStorage.ts +++ b/src/hooks/useLocalStorage.ts @@ -41,7 +41,6 @@ export const useLocalStorage = ( setStoredValue(newValue) // We dispatch a custom event so every useLocalStorage hook are notified window.dispatchEvent(new Event(LOCAL_STORAGE_EVENT)) - // eslint-disable-next-line no-empty } catch { // TODO (#2640) Pass in some sort of logger here. } diff --git a/src/server/modules/auth/auth.error.ts b/src/server/modules/auth/auth.error.ts index 87b58495..ffbbae9a 100644 --- a/src/server/modules/auth/auth.error.ts +++ b/src/server/modules/auth/auth.error.ts @@ -4,10 +4,12 @@ class AuthError extends Error { constructor(message: string | Error | ErrorCause, cause?: ErrorCause) { if (message instanceof Error) { super(undefined, { + // eslint-disable-next-line @typescript-eslint/no-explicit-any cause: { err: message, ...(message.cause as any), ...cause }, }) } else if (typeof message === 'string') { if (cause instanceof Error) { + // eslint-disable-next-line @typescript-eslint/no-explicit-any cause = { err: cause, ...(cause.cause as any) } } super(message, cause) diff --git a/src/server/modules/post/post.router.ts b/src/server/modules/post/post.router.ts index 497e105d..45546b25 100644 --- a/src/server/modules/post/post.router.ts +++ b/src/server/modules/post/post.router.ts @@ -52,7 +52,6 @@ export const postRouter = router({ if (posts.length > limit) { // Remove the last item and use it as next cursor - // eslint-disable-next-line @typescript-eslint/no-non-null-assertion const nextItem = posts.pop()! nextCursor = nextItem.id } @@ -120,7 +119,6 @@ export const postRouter = router({ if (posts.length > limit) { // Remove the last item and use it as next cursor - // eslint-disable-next-line @typescript-eslint/no-non-null-assertion const nextItem = posts.pop()! nextCursor = nextItem.id } @@ -179,8 +177,6 @@ export const postRouter = router({ let nextCursor: typeof cursor | undefined = undefined if (posts.length > limit) { // Remove the last item and use it as next cursor - - // eslint-disable-next-line @typescript-eslint/no-non-null-assertion const nextItem = posts.pop()! nextCursor = nextItem.id } @@ -284,8 +280,6 @@ export const postRouter = router({ let nextCursor: typeof cursor | null = null if (items.length > limit) { // Remove the last item and use it as next cursor - - // eslint-disable-next-line @typescript-eslint/no-non-null-assertion const nextItem = items.pop()! nextCursor = nextItem.id } diff --git a/src/stories/Page/SignInPage.stories.tsx b/src/stories/Page/SignInPage.stories.tsx index 6a5d9deb..2663479c 100644 --- a/src/stories/Page/SignInPage.stories.tsx +++ b/src/stories/Page/SignInPage.stories.tsx @@ -45,7 +45,7 @@ export const InputValidation: Story = { await step('Attempt log in', async () => { await userEvent.click(await canvas.findByText(/get otp/i)) - expect(await canvas.findByText(/email address/i)).toBeInTheDocument() + await expect(canvas.findByText(/email address/i)).toBeInTheDocument() }) }, }