Skip to content
Merged
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
97 changes: 45 additions & 52 deletions package-lock.json

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

2 changes: 1 addition & 1 deletion packages/block-editor/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@
"remove-accents": "^0.5.0"
},
"devDependencies": {
"@ariakit/test": "^0.4.13",
"@ariakit/test": "^0.7.2",
"@testing-library/dom": "^10.4.1",
"@testing-library/react": "^16.3.2",
"@testing-library/user-event": "^14.6.1",
Expand Down
1 change: 1 addition & 0 deletions packages/components/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@
- `Button`: Expand the Storybook e2e `VariantStates` matrix with compact, small, and with-icon rows ([#80793](https://github.com/WordPress/gutenberg/pull/80793)).
- Update `date-fns` to 4.4.0 ([#80763](https://github.com/WordPress/gutenberg/pull/80763)).
- Update `memize` to 2.1.1 ([#80764](https://github.com/WordPress/gutenberg/pull/80764)).
- Update `@ariakit/react` to 0.4.35 and `@ariakit/test` to 0.7.2 ([#80765](https://github.com/WordPress/gutenberg/pull/80765)).
- `TextControl`, `ComboboxControl`, `FormTokenField`, `ContentEditableControl`: Replace `--wp-components-color-accent` with `--wp-admin-theme-color` for focus ring color ([#80595](https://github.com/WordPress/gutenberg/pull/80595)).
- `ConfirmDialog`: Migrate styles from Emotion to an SCSS Module ([#80394](https://github.com/WordPress/gutenberg/pull/80394)).
- `ExternalLink`: Use the shared `outset-ring__focus` mixin for the focus ring ([#80573](https://github.com/WordPress/gutenberg/pull/80573)).
Expand Down
4 changes: 2 additions & 2 deletions packages/components/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@
"src/**/*.scss"
],
"dependencies": {
"@ariakit/react": "^0.4.32",
"@ariakit/react": "^0.4.35",
"@date-fns/utc": "^2.1.1",
"@emotion/cache": "^11.14.0",
"@emotion/css": "^11.13.5",
Expand Down Expand Up @@ -102,7 +102,7 @@
"uuid": "^14.0.0"
},
"devDependencies": {
"@ariakit/test": "^0.4.13",
"@ariakit/test": "^0.7.2",
"@storybook/addon-docs": "^10.4.3",
"@storybook/react-vite": "^10.4.3",
"@testing-library/dom": "^10.4.1",
Expand Down
1 change: 1 addition & 0 deletions packages/dataviews/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@

- Update `date-fns` to 4.4.0 ([#80763](https://github.com/WordPress/gutenberg/pull/80763)).
- Update Jest type definitions to v30 ([#80767](https://github.com/WordPress/gutenberg/pull/80767)).
- Update `@ariakit/react` to 0.4.35 ([#80765](https://github.com/WordPress/gutenberg/pull/80765)).
- DataViews: Model `useSelectionProps` with orthogonal semantic props (`selectionMode`, `shouldSelectOnClick`, and a caller-supplied `isItemSelectable`) instead of a picker-specific flag, and route the `list` layout's selection through the shared hook. `selectionMode` distinguishes multi-selection from the two single-selection semantics (`'single-required'` keeps an item selected on re-click, `'single-clearable'` allows clearing it), so the `list` layout keeps its always-selected behavior while single-select pickers stay clearable. No behavior change. [#80677](https://github.com/WordPress/gutenberg/pull/80677)
- DataForms: Track the `richtext` control's selection with a single React-tree focus boundary (`useFocusOutside`) instead of document-level focus bookkeeping, and drop the field-owned `Popover.Slot` so format popovers use the default Popover container. No behavior change. [#80324](https://github.com/WordPress/gutenberg/pull/80324)
- Update `exports` to use subpath patterns instead of deprecated trailing `/` folder mappings ([#80270](https://github.com/WordPress/gutenberg/pull/80270)).
Expand Down
2 changes: 1 addition & 1 deletion packages/dataviews/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@
"types": "build-types",
"sideEffects": false,
"dependencies": {
"@ariakit/react": "^0.4.32",
"@ariakit/react": "^0.4.35",
"@wordpress/a11y": "file:../a11y",
"@wordpress/base-styles": "file:../base-styles",
"@wordpress/components": "file:../components",
Expand Down
8 changes: 8 additions & 0 deletions test/unit/config/global-mocks.js
Original file line number Diff line number Diff line change
Expand Up @@ -129,6 +129,14 @@ if ( typeof window !== 'undefined' ) {
global.HTMLElement.prototype.getAnimations = () => [];
}

// jsdom lacks CSS.supports (needed by Ariakit's modal scroll locking).
if ( ! global.CSS ) {
global.CSS = {};
}
if ( ! global.CSS.supports ) {
global.CSS.supports = jest.fn( () => false );
}

/**
* The following mock is for block integration tests that might render
* components leveraging DOMRect. For example, the Cover block which now renders
Expand Down
9 changes: 8 additions & 1 deletion test/unit/jest.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,13 @@ process.env.TZ = 'UTC';
module.exports = {
rootDir: '../../',
moduleNameMapper: {
// Jest resolves dependencies from CommonJS and cannot select import-only
// package exports. Map Ariakit's ESM test helpers explicitly.
'^@ariakit/test$': '<rootDir>/node_modules/@ariakit/test/dist/index.js',
'^@ariakit/test/react$':
'<rootDir>/node_modules/@ariakit/test/dist/react.js',
'^@ariakit/utils$':
'<rootDir>/node_modules/@ariakit/utils/dist/index.js',
Comment on lines +41 to +45

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

This hard-coding of node_modules will break in isolated mode because it doesn't exist as a dependency in the <rootDir>.

Also, we need some more improvements to this mapping list. Ideally, specific mappings should be set before the generic ones to ensure that they get resolved correctly.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I will create a PR to improve it after #80837 lands.

// Mock @wordpress/vips/worker before the general pattern so it doesn't try to load the real file.
// The worker-code.ts file is auto-generated during full builds and is gitignored.
'@wordpress/vips/worker':
Expand Down Expand Up @@ -80,7 +87,7 @@ module.exports = {
'^.+\\.m?[jt]sx?$': '<rootDir>/test/unit/scripts/babel-transformer.js',
},
transformIgnorePatterns: [
'/node_modules/(?!(docker-compose|yaml|preact|@preact|parsel-js|comctx|uuid|marked)/)',
'/node_modules/(?!(docker-compose|yaml|preact|@preact|parsel-js|comctx|uuid|marked|@ariakit/(test|utils))/)',
'\\.pnp\\.[^\\/]+$',
],
snapshotSerializers: [
Expand Down
Loading