Skip to content

Commit

Permalink
deps(website): update headlessui and add jsdom polyfill, bump msw (bu…
Browse files Browse the repository at this point in the history
…t not interceptors) (#2766)

* deps(website): update headlessui and add jsdom polyfill

see:
- tailwindlabs/headlessui#3473
- tailwindlabs/headlessui#3469

* Update msw, pinning transitive dep msw interceptors to 0.33.3 for the time being

see:
- mswjs/msw#2273
  • Loading branch information
corneliusroemer authored Sep 12, 2024
1 parent f4edf0a commit abd50dd
Show file tree
Hide file tree
Showing 3 changed files with 52 additions and 21 deletions.
63 changes: 44 additions & 19 deletions website/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 3 additions & 2 deletions website/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
"@astrojs/mdx": "^3.1.5",
"@astrojs/node": "^8.3.3",
"@emotion/react": "^11.13.3",
"@headlessui/react": "^2.1.4",
"@headlessui/react": "^2.1.7",
"@mui/material": "~5.14.20",
"@svgr/core": "^8.1.0",
"@svgr/plugin-jsx": "^8.1.0",
Expand Down Expand Up @@ -85,7 +85,8 @@
"eslint-plugin-react": "^7.35.2",
"eslint-plugin-react-hooks": "^4.6.2",
"jsdom": "^25.0.0",
"msw": "^2.4.1",
"jsdom-testing-mocks": "^1.13.1",
"msw": "^2.4.5",
"prettier": "3.3.3",
"prettier-plugin-astro": "^0.14.1",
"resize-observer-polyfill": "^1.5.1",
Expand Down
5 changes: 5 additions & 0 deletions website/vitest.setup.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
import '@testing-library/jest-dom';

import { HttpStatusCode } from 'axios';
import { mockAnimationsApi } from 'jsdom-testing-mocks';
import { http } from 'msw';
import { setupServer } from 'msw/node';
import ResizeObserver from 'resize-observer-polyfill';
Expand Down Expand Up @@ -38,6 +39,10 @@ export const testConfig = {
// See https://github.com/tailwindlabs/headlessui/issues/3268
vi.stubGlobal('ResizeObserver', ResizeObserver);

// Mocking necessary since headlessui v2.1.5
// See https://github.com/tailwindlabs/headlessui/issues/3469
mockAnimationsApi();

export const metadataKey = 'originalMetaDataField';
export const editableEntry = 'originalMetaDataValue';
export const defaultReviewData: SequenceEntryToEdit = {
Expand Down

0 comments on commit abd50dd

Please sign in to comment.