Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore(deps): update vitest monorepo to v2 (major) #767

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions packages/browser/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -38,13 +38,13 @@
"devDependencies": {
"@silverhand/eslint-config": "^6.0.1",
"@silverhand/ts-config": "^6.0.0",
"@vitest/coverage-v8": "^1.6.0",
"@vitest/coverage-v8": "^2.0.0",
"eslint": "^8.57.0",
"happy-dom": "^15.0.0",
"lint-staged": "^15.0.0",
"prettier": "^3.0.0",
"typescript": "^5.3.3",
"vitest": "^1.6.0"
"vitest": "^2.0.0"
},
"eslintConfig": {
"extends": "@silverhand"
Expand Down
4 changes: 2 additions & 2 deletions packages/capacitor/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -39,13 +39,13 @@
"@capacitor/preferences": "^6.0.0",
"@silverhand/eslint-config": "^6.0.1",
"@silverhand/ts-config": "^6.0.0",
"@vitest/coverage-v8": "^1.6.0",
"@vitest/coverage-v8": "^2.0.0",
"eslint": "^8.57.0",
"happy-dom": "^15.0.0",
"lint-staged": "^15.0.0",
"prettier": "^3.0.0",
"typescript": "^5.3.3",
"vitest": "^1.6.0"
"vitest": "^2.0.0"
},
"eslintConfig": {
"extends": "@silverhand"
Expand Down
4 changes: 2 additions & 2 deletions packages/client/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -42,14 +42,14 @@
"@silverhand/eslint-config": "^6.0.1",
"@silverhand/ts-config": "^6.0.0",
"@types/node": "^20.11.19",
"@vitest/coverage-v8": "^1.6.0",
"@vitest/coverage-v8": "^2.0.0",
"eslint": "^8.57.0",
"happy-dom": "^15.0.0",
"lint-staged": "^15.0.0",
"nock": "14.0.0-beta.15",
"prettier": "^3.0.0",
"typescript": "^5.3.3",
"vitest": "^1.6.0"
"vitest": "^2.0.0"
},
"eslintConfig": {
"extends": "@silverhand"
Expand Down
10 changes: 5 additions & 5 deletions packages/client/src/mock.ts
Original file line number Diff line number Diff line change
Expand Up @@ -96,9 +96,9 @@ export const idToken = 'id_token_value';

export const currentUnixTimeStamp = Date.now() / 1000;

export const mockFetchOidcConfig: (
delay?: number
) => Mock<unknown[], Promise<OidcConfigResponse>> = (delay = 0) =>
export const mockFetchOidcConfig: (delay?: number) => Mock<() => Promise<OidcConfigResponse>> = (
delay = 0
) =>
vi.fn(async () => {
await new Promise((resolve) => {
setTimeout(resolve, delay);
Expand All @@ -112,10 +112,10 @@ export const mockFetchOidcConfig: (
revocationEndpoint,
jwksUri,
issuer,
};
} satisfies OidcConfigResponse;
});

export const fetchOidcConfig: Mock<unknown[], Promise<OidcConfigResponse>> = mockFetchOidcConfig();
export const fetchOidcConfig: Mock<() => Promise<OidcConfigResponse>> = mockFetchOidcConfig();
export const requester = vi.fn();
export const failingRequester = vi.fn().mockRejectedValue(new Error('Failed request'));
export const navigate = vi.fn();
Expand Down
4 changes: 2 additions & 2 deletions packages/express/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@
"@types/express": "^4.17.13",
"@types/express-session": "^1.17.5",
"@types/supertest": "^6.0.0",
"@vitest/coverage-v8": "^1.6.0",
"@vitest/coverage-v8": "^2.0.0",
"cookie-parser": "^1.4.6",
"eslint": "^8.57.0",
"express": "^4.20.0",
Expand All @@ -52,7 +52,7 @@
"prettier": "^3.0.0",
"supertest": "^7.0.0",
"typescript": "^5.3.3",
"vitest": "^1.6.0"
"vitest": "^2.0.0"
},
"peerDependencies": {
"express": ">=4"
Expand Down
4 changes: 2 additions & 2 deletions packages/js/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
"@silverhand/eslint-config": "^6.0.1",
"@silverhand/ts-config": "^6.0.0",
"@types/node": "^20.11.19",
"@vitest/coverage-v8": "^1.6.0",
"@vitest/coverage-v8": "^2.0.0",
"angular-auth-oidc-client": "^18.0.0",
"eslint": "^8.57.0",
"happy-dom": "^15.0.0",
Expand All @@ -46,7 +46,7 @@
"prettier": "^3.0.0",
"rollup": "^4.22.4",
"typescript": "^5.3.3",
"vitest": "^1.6.0"
"vitest": "^2.0.0"
},
"eslintConfig": {
"extends": "@silverhand"
Expand Down
2 changes: 1 addition & 1 deletion packages/next-sample/next-env.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@
/// <reference types="next/image-types/global" />

// NOTE: This file should not be edited
// see https://nextjs.org/docs/basic-features/typescript for more information.
// see https://nextjs.org/docs/pages/building-your-application/configuring/typescript for more information.
2 changes: 1 addition & 1 deletion packages/next-server-actions-sample/next-env.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@
/// <reference types="next/image-types/global" />

// NOTE: This file should not be edited
// see https://nextjs.org/docs/basic-features/typescript for more information.
// see https://nextjs.org/docs/app/building-your-application/configuring/typescript for more information.
4 changes: 2 additions & 2 deletions packages/next/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@
"@silverhand/ts-config": "^6.0.0",
"@silverhand/ts-config-react": "^6.0.0",
"@types/cookie": "^0.6.0",
"@vitest/coverage-v8": "^1.6.0",
"@vitest/coverage-v8": "^2.0.0",
"eslint": "^8.57.0",
"lint-staged": "^15.0.0",
"next": "^14.2.10",
Expand All @@ -74,7 +74,7 @@
"react": "^18.2.0",
"react-dom": "^18.2.0",
"typescript": "^5.3.3",
"vitest": "^1.6.0"
"vitest": "^2.0.0"
},
"peerDependencies": {
"next": ">=12"
Expand Down
4 changes: 2 additions & 2 deletions packages/node/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -52,12 +52,12 @@
"@silverhand/ts-config": "^6.0.0",
"@types/cookie": "^0.6.0",
"@types/node": "^20.11.19",
"@vitest/coverage-v8": "^1.6.0",
"@vitest/coverage-v8": "^2.0.0",
"eslint": "^8.57.0",
"lint-staged": "^15.0.0",
"prettier": "^3.0.0",
"typescript": "^5.3.3",
"vitest": "^1.6.0"
"vitest": "^2.0.0"
},
"eslintConfig": {
"extends": "@silverhand"
Expand Down
4 changes: 2 additions & 2 deletions packages/nuxt/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
"@nuxt/module-builder": "^0.8.0",
"@nuxt/test-utils": "^3.12.1",
"@silverhand/eslint-config": "^6.0.1",
"@vitest/coverage-v8": "^1.6.0",
"@vitest/coverage-v8": "^2.0.0",
"@vue/test-utils": "^2.4.4",
"eslint": "^8.57.0",
"h3": "^1.11.1",
Expand All @@ -42,7 +42,7 @@
"nuxt": "^3.12.4",
"prettier": "^3.0.0",
"typescript": "^5.3.3",
"vitest": "^1.6.0",
"vitest": "^2.0.0",
"vue": "^3.4.19"
},
"eslintConfig": {
Expand Down
4 changes: 2 additions & 2 deletions packages/react/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@
"@silverhand/ts-config-react": "^6.0.0",
"@testing-library/react": "^16.0.0",
"@types/react": "^18.2.56",
"@vitest/coverage-v8": "^1.6.0",
"@vitest/coverage-v8": "^2.0.0",
"eslint": "^8.57.0",
"happy-dom": "^15.0.0",
"lint-staged": "^15.0.0",
Expand All @@ -50,7 +50,7 @@
"react": "^18.0.2",
"stylelint": "^16.0.0",
"typescript": "^5.3.3",
"vitest": "^1.6.0"
"vitest": "^2.0.0"
},
"peerDependencies": {
"react": ">=16.8.0"
Expand Down
4 changes: 2 additions & 2 deletions packages/remix/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -38,12 +38,12 @@
"@silverhand/eslint-config": "^6.0.1",
"@silverhand/ts-config": "^6.0.0",
"@types/node": "^20.11.19",
"@vitest/coverage-v8": "^1.6.0",
"@vitest/coverage-v8": "^2.0.0",
"eslint": "^8.57.0",
"lint-staged": "^15.0.0",
"prettier": "^3.0.0",
"typescript": "^5.3.3",
"vitest": "^1.6.0"
"vitest": "^2.0.0"
},
"peerDependencies": {
"@remix-run/node": ">=1"
Expand Down
4 changes: 2 additions & 2 deletions packages/sveltekit/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -38,12 +38,12 @@
"@swc/core": "^1.6.5",
"@types/cookie": "^0.6.0",
"@types/node": "^20.11.19",
"@vitest/coverage-v8": "^1.6.0",
"@vitest/coverage-v8": "^2.0.0",
"eslint": "^8.57.0",
"lint-staged": "^15.0.0",
"prettier": "^3.0.0",
"typescript": "^5.3.3",
"vitest": "^1.6.0"
"vitest": "^2.0.0"
},
"eslintConfig": {
"extends": "@silverhand"
Expand Down
5 changes: 1 addition & 4 deletions packages/sveltekit/src/__mocks__/@sveltejs/kit.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,4 @@
import { type redirect as originalRedirect } from '@sveltejs/kit';
import { type Mock, vi } from 'vitest';

export const redirect: Mock<
Parameters<typeof originalRedirect>,
ReturnType<typeof originalRedirect>
> = vi.fn();
export const redirect: Mock<typeof originalRedirect> = vi.fn();
4 changes: 2 additions & 2 deletions packages/vue/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -37,15 +37,15 @@
"devDependencies": {
"@silverhand/eslint-config": "^6.0.1",
"@silverhand/ts-config": "^6.0.0",
"@vitest/coverage-v8": "^1.6.0",
"@vitest/coverage-v8": "^2.0.0",
"eslint": "^8.57.0",
"happy-dom": "^15.0.0",
"lint-staged": "^15.0.0",
"postcss": "^8.4.31",
"prettier": "^3.0.0",
"stylelint": "^16.0.0",
"typescript": "^5.3.3",
"vitest": "^1.6.0",
"vitest": "^2.0.0",
"vue": "^3.4.19"
},
"peerDependencies": {
Expand Down
2 changes: 1 addition & 1 deletion packages/vue/src/index.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ const getAccessToken = vi.fn(() => {
throw new Error('not authenticated');
});
const signIn = vi.fn();
const injectMock = vi.fn<string[], unknown>((): unknown => {
const injectMock = vi.fn((key: string): unknown => {
return undefined;
});
vi.mock('vue', async (importOriginal) => {
Expand Down
Loading
Loading