Skip to content
Draft
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
2 changes: 2 additions & 0 deletions .changeset/vitest-five.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
---
---
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@
"@types/react": "catalog:react",
"@types/react-dom": "catalog:react",
"@vitejs/plugin-react": "^4.7.0",
"@vitest/coverage-v8": "4.1.11",
"@vitest/coverage-v8": "5.0.0",
"chalk": "4.1.2",
"citty": "^0.2.2",
"conventional-changelog-conventionalcommits": "^4.6.3",
Expand Down Expand Up @@ -153,7 +153,7 @@
"typescript-eslint": "8.58.0",
"unrun": "0.3.1",
"uuid": "11.1.1",
"vitest": "4.1.11",
"vitest": "5.0.0",
"zx": "catalog:repo"
},
"packageManager": "pnpm@10.34.5+sha512.a4ee05f2f73658255bd6a89859c065a45c28a57daefae2c893a168ee2b73168c37b91e83e57ea67654ad03f03031746430e8bce38e362e042605fb8abc80192e",
Expand Down
4 changes: 2 additions & 2 deletions packages/backend/src/tokens/__tests__/request.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,8 @@ interface CustomMatchers<R = unknown> {
}

declare module 'vitest' {
// eslint-disable-next-line @typescript-eslint/no-empty-object-type
interface Assertion<T = any> extends CustomMatchers<T> {}
// eslint-disable-next-line @typescript-eslint/no-empty-object-type, @typescript-eslint/no-unused-vars
interface Assertion<R, T> extends CustomMatchers<R> {}

@wobsoriano wobsoriano Sep 5, 2026

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

new two-parameter Assertion interface for custom matcher augmentations https://vitest.dev/guide/migration/#assertion-types-expose-return-and-received-types

// eslint-disable-next-line @typescript-eslint/no-empty-object-type
interface AsymmetricMatchersContaining extends CustomMatchers {}
}
Expand Down
2 changes: 1 addition & 1 deletion packages/eslint-plugin/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@
"eslint": "9.31.0",
"tsdown": "catalog:repo",
"typescript": "catalog:repo",
"vitest": "3.2.7"
"vitest": "5.0.0"
},
"peerDependencies": {
"eslint": ">=9"
Expand Down
3 changes: 2 additions & 1 deletion packages/expo-passkeys/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,8 @@
"@clerk/shared": "workspace:^"
},
"devDependencies": {
"expo": "~54.0.36"
"expo": "~54.0.36",
"typescript": "catalog:repo"
},
"peerDependencies": {
"expo": ">=54 <58",
Expand Down
66 changes: 33 additions & 33 deletions packages/headless/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,68 +6,68 @@
"type": "module",
"exports": {
"./accordion": {
"import": "./dist/primitives/accordion/index.js",
"types": "./dist/primitives/accordion/index.d.ts"
"types": "./dist/primitives/accordion/index.d.ts",
"import": "./dist/primitives/accordion/index.js"
},
"./button": {
"import": "./dist/primitives/button/index.js",
"types": "./dist/primitives/button/index.d.ts"
"types": "./dist/primitives/button/index.d.ts",
"import": "./dist/primitives/button/index.js"
},
"./tabs": {
"import": "./dist/primitives/tabs/index.js",
"types": "./dist/primitives/tabs/index.d.ts"
"types": "./dist/primitives/tabs/index.d.ts",
"import": "./dist/primitives/tabs/index.js"
},
"./tooltip": {
"import": "./dist/primitives/tooltip/index.js",
"types": "./dist/primitives/tooltip/index.d.ts"
"types": "./dist/primitives/tooltip/index.d.ts",
"import": "./dist/primitives/tooltip/index.js"
},
"./popover": {
"import": "./dist/primitives/popover/index.js",
"types": "./dist/primitives/popover/index.d.ts"
"types": "./dist/primitives/popover/index.d.ts",
"import": "./dist/primitives/popover/index.js"
},
"./select": {
"import": "./dist/primitives/select/index.js",
"types": "./dist/primitives/select/index.d.ts"
"types": "./dist/primitives/select/index.d.ts",
"import": "./dist/primitives/select/index.js"
},
"./menu": {
"import": "./dist/primitives/menu/index.js",
"types": "./dist/primitives/menu/index.d.ts"
"types": "./dist/primitives/menu/index.d.ts",
"import": "./dist/primitives/menu/index.js"
},
"./autocomplete": {
"import": "./dist/primitives/autocomplete/index.js",
"types": "./dist/primitives/autocomplete/index.d.ts"
"types": "./dist/primitives/autocomplete/index.d.ts",
"import": "./dist/primitives/autocomplete/index.js"
},
"./collapsible": {
"import": "./dist/primitives/collapsible/index.js",
"types": "./dist/primitives/collapsible/index.d.ts"
"types": "./dist/primitives/collapsible/index.d.ts",
"import": "./dist/primitives/collapsible/index.js"
},
"./dialog": {
"import": "./dist/primitives/dialog/index.js",
"types": "./dist/primitives/dialog/index.d.ts"
"types": "./dist/primitives/dialog/index.d.ts",
"import": "./dist/primitives/dialog/index.js"
},
"./drawer": {
"import": "./dist/primitives/drawer/index.js",
"types": "./dist/primitives/drawer/index.d.ts"
"types": "./dist/primitives/drawer/index.d.ts",
"import": "./dist/primitives/drawer/index.js"
},
"./file-upload": {
"import": "./dist/primitives/file-upload/index.js",
"types": "./dist/primitives/file-upload/index.d.ts"
"types": "./dist/primitives/file-upload/index.d.ts",
"import": "./dist/primitives/file-upload/index.js"
},
"./flow": {
"import": "./dist/primitives/flow/index.js",
"types": "./dist/primitives/flow/index.d.ts"
"types": "./dist/primitives/flow/index.d.ts",
"import": "./dist/primitives/flow/index.js"
},
"./otp": {
"import": "./dist/primitives/otp/index.js",
"types": "./dist/primitives/otp/index.d.ts"
"types": "./dist/primitives/otp/index.d.ts",
"import": "./dist/primitives/otp/index.js"
},
"./hooks": {
"import": "./dist/hooks/index.js",
"types": "./dist/hooks/index.d.ts"
"types": "./dist/hooks/index.d.ts",
"import": "./dist/hooks/index.js"
},
"./utils": {
"import": "./dist/utils/index.js",
"types": "./dist/utils/index.d.ts"
"types": "./dist/utils/index.d.ts",
"import": "./dist/utils/index.js"
}
},
"scripts": {
Expand Down Expand Up @@ -96,7 +96,7 @@
"typescript": "catalog:repo",
"vite": "6.4.3",
"vite-plugin-dts": "^4.5.4",
"vitest": "4.1.11",
"vitest": "5.0.0",
"vitest-axe": "^0.1.0"
},
"peerDependencies": {
Expand Down
2 changes: 1 addition & 1 deletion packages/headless/src/test-utils/jest-dom.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import type { TestingLibraryMatchers } from '@testing-library/jest-dom/matchers'
// rather than an ambient module declaration that would shadow vitest's own types.
declare module 'vitest' {
// eslint-disable-next-line @typescript-eslint/no-empty-object-type
interface Assertion<T = any> extends TestingLibraryMatchers<any, T> {}
interface Assertion<R, _T> extends TestingLibraryMatchers<any, R> {}
// eslint-disable-next-line @typescript-eslint/no-empty-object-type
interface AsymmetricMatchersContaining extends TestingLibraryMatchers<any, any> {}
}
2 changes: 1 addition & 1 deletion packages/headless/src/test-utils/vitest-axe.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import type { AxeMatchers } from 'vitest-axe/matchers';

declare module 'vitest' {
// eslint-disable-next-line @typescript-eslint/no-empty-object-type
interface Assertion<_T = unknown> extends AxeMatchers {}
interface Assertion<_R, _T> extends AxeMatchers {}
// eslint-disable-next-line @typescript-eslint/no-empty-object-type
interface AsymmetricMatchersContaining extends AxeMatchers {}
}
24 changes: 7 additions & 17 deletions packages/ui/src/utils/colors/__tests__/legacy.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -128,24 +128,16 @@ describe('Legacy Colors', () => {
};

beforeEach(() => {
// @ts-ignore
global.window = mockWindow;
// @ts-ignore
global.getComputedStyle = mockGetComputedStyle;
// @ts-ignore
global.document = {
vi.stubGlobal('window', mockWindow);
vi.stubGlobal('getComputedStyle', mockGetComputedStyle);
vi.stubGlobal('document', {
Comment on lines +131 to +133

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

global assignments in DOM environments now propagate to the window https://vitest.dev/guide/migration/#dom-environment-global-assignments-now-update-the-underlying-window

this is the documented way to override globals

documentElement: document?.createElement?.('div') || {},
};
});
});

afterEach(() => {
vi.clearAllMocks();
// @ts-ignore
global.window = undefined;
// @ts-ignore
global.getComputedStyle = undefined;
// @ts-ignore
global.document = undefined;
vi.unstubAllGlobals();
});

it('should resolve CSS variables with hex values', () => {
Expand Down Expand Up @@ -202,10 +194,8 @@ describe('Legacy Colors', () => {
});

it('should work in server environment without window', () => {
// @ts-ignore
global.window = undefined;
// @ts-ignore
global.getComputedStyle = undefined;
vi.stubGlobal('window', undefined);
vi.stubGlobal('getComputedStyle', undefined);

expect(() => colors.toHslaColor('var(--brand, red)')).not.toThrow();
const result = colors.toHslaColor('var(--brand, red)');
Expand Down
Loading
Loading