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
4 changes: 2 additions & 2 deletions docs/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
"@emotion/react": "^11.14.0",
"@emotion/server": "^11.11.0",
"@emotion/styled": "^11.14.0",
"@mui/docs": "7.0.2",
"@mui/docs": "7.1.0",
"@mui/icons-material": "^7.0.2",
"@mui/joy": "^5.0.0-beta.52",
"@mui/lab": "^7.0.0-beta.11",
Expand Down Expand Up @@ -101,7 +101,7 @@
"@babel/plugin-transform-react-constant-elements": "^7.27.1",
"@babel/preset-typescript": "^7.27.1",
"@mui/internal-docs-utils": "^2.0.1",
"@mui/internal-scripts": "^2.0.7",
"@mui/internal-scripts": "^2.0.8",
"@types/chance": "^1.1.6",
"@types/d3-scale": "^4.0.9",
"@types/d3-scale-chromatic": "^3.1.0",
Expand Down
6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -86,9 +86,9 @@
"@emotion/styled": "^11.14.0",
"@mui/icons-material": "^7.0.2",
"@mui/internal-babel-plugin-display-name": "github:mui/mui-public#master&path:./packages/babel-plugin-display-name",
"@mui/internal-babel-plugin-resolve-imports": "^2.0.1",
"@mui/internal-markdown": "^2.0.4",
"@mui/internal-test-utils": "^2.0.7",
"@mui/internal-babel-plugin-resolve-imports": "^2.0.2",
"@mui/internal-markdown": "^2.0.5",
"@mui/internal-test-utils": "^2.0.8",
"@mui/material": "^7.0.2",
"@mui/monorepo": "github:mui/material-ui#adb0a76b09080d02f899789266336b297850d86b",
"@mui/utils": "^7.0.2",
Expand Down
2 changes: 1 addition & 1 deletion packages/x-charts/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@
}
},
"devDependencies": {
"@mui/internal-test-utils": "^2.0.7",
"@mui/internal-test-utils": "^2.0.8",
"@mui/material": "^7.0.2",
"@mui/system": "^7.0.2",
"@types/prop-types": "^15.7.14",
Expand Down
12 changes: 6 additions & 6 deletions packages/x-charts/src/internals/animation/useAnimate.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ describe('useAnimate', () => {
const { rerender } = render(<TestComponent width={2000} />);

await waitNextFrame();
expect(callCount()).to.be.equal(2);
expect(callCount()).to.be.equal(reactMajor > 18 ? 3 : 2);
Copy link
Member

Choose a reason for hiding this comment

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

@LukasTy do you know the reasoning behind this?

Why did this change suddenly became needed after updating our internal packages? 🤔

Copy link
Member

Choose a reason for hiding this comment

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

To be honest, I haven't thoroughly investigated the root cause. 🙈
Maybe it's because of mui/material-ui#45812? 🤔
cc @bernardobelchior


const lastIncreasingCall = lastCallWidth();
// Should be animating from 1000 to 2000
Expand Down Expand Up @@ -150,7 +150,7 @@ describe('useAnimate', () => {
const { rerender } = render(<TestComponent width={2000} />);

await waitNextFrame();
expect(callCount()).to.be.equal(2);
expect(callCount()).to.be.equal(reactMajor > 18 ? 3 : 2);

// Should be animating from 1000 to 2000
expect(lastCallWidth()).to.be.greaterThan(1000);
Expand All @@ -159,7 +159,7 @@ describe('useAnimate', () => {
rerender(<TestComponent width={0} skipAnimation />);

await waitNextFrame();
expect(callCount()).to.be.equal(4);
expect(callCount()).to.be.equal(reactMajor > 18 ? 5 : 4);

// Should jump to 0 immediately after first call
expect(lastCallWidth()).to.equal(0);
Expand Down Expand Up @@ -214,21 +214,21 @@ describe('useAnimate', () => {
const { rerender } = render(<TestComponent width={1000} skip={false} />);

await waitNextFrame();
expect(callCount()).to.be.equal(2);
expect(callCount()).to.be.equal(reactMajor > 18 ? 3 : 2);
expect(lastCallWidth()).to.be.greaterThan(0);
expect(lastCallWidth()).to.be.lessThan(1000);

rerender(<TestComponent width={2000} skip />);

// Transition finishes immediately
await waitNextFrame();
expect(callCount()).to.be.equal(4);
expect(callCount()).to.be.equal(reactMajor > 18 ? 5 : 4);
expect(lastCallWidth()).to.equal(2000);

rerender(<TestComponent width={1000} skip={false} />);

await waitNextFrame();
expect(callCount()).to.be.equal(6);
expect(callCount()).to.be.equal(reactMajor > 18 ? 7 : 6);
expect(lastCallWidth()).to.be.lessThan(2000);
expect(lastCallWidth()).to.be.greaterThan(1000);
});
Expand Down
2 changes: 1 addition & 1 deletion packages/x-data-grid-premium/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@
}
},
"devDependencies": {
"@mui/internal-test-utils": "^2.0.7",
"@mui/internal-test-utils": "^2.0.8",
"@mui/material": "^7.0.2",
"@mui/system": "^7.0.2",
"@types/prop-types": "^15.7.14",
Expand Down
2 changes: 1 addition & 1 deletion packages/x-data-grid-pro/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@
}
},
"devDependencies": {
"@mui/internal-test-utils": "^2.0.7",
"@mui/internal-test-utils": "^2.0.8",
"@mui/material": "^7.0.2",
"@mui/system": "^7.0.2",
"@types/prop-types": "^15.7.14",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { expect } from 'chai';
import { spy } from 'sinon';
import { RefObject } from '@mui/x-internals/types';
import { getCell, getColumnValues, getRows, includeRowSelection } from 'test/utils/helperFn';
import { createRenderer, screen, act, reactMajor, fireEvent } from '@mui/internal-test-utils';
import { createRenderer, screen, act, fireEvent } from '@mui/internal-test-utils';
import {
GridApi,
useGridApiRef,
Expand Down Expand Up @@ -812,7 +812,7 @@ describe('<DataGridPro /> - Row selection', () => {
/>,
);

expect(onRowSelectionModelChange.callCount).to.equal(reactMajor < 19 ? 2 : 1); // Dev mode calls twice on React 18
expect(onRowSelectionModelChange.callCount).to.equal(2);
expect(onRowSelectionModelChange.lastCall.args[0]).to.deep.equal(
includeRowSelection([2, 3, 4, 5, 6, 7, 1]),
);
Expand Down
6 changes: 2 additions & 4 deletions packages/x-data-grid-pro/src/tests/rows.DataGridPro.test.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import * as React from 'react';
import { createRenderer, act, fireEvent, waitFor, reactMajor } from '@mui/internal-test-utils';
import { createRenderer, act, fireEvent, waitFor } from '@mui/internal-test-utils';
import { spy } from 'sinon';
import { expect } from 'chai';
import { vi } from 'vitest';
Expand Down Expand Up @@ -399,9 +399,7 @@ describe('<DataGridPro /> - Rows', () => {
await vi.advanceTimersByTimeAsync(10);
});
expect(getColumnValues(0)).to.deep.equal(['Nike', 'Adidas', 'Puma']);
// React 18 seems to render twice
const timerCount = reactMajor < 19 ? 2 : 1;
expect(vi.getTimerCount()).to.equal(timerCount);
expect(vi.getTimerCount()).to.equal(2);

await act(async () => {
await vi.advanceTimersByTimeAsync(100);
Expand Down
2 changes: 1 addition & 1 deletion packages/x-data-grid/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@
}
},
"devDependencies": {
"@mui/internal-test-utils": "^2.0.7",
"@mui/internal-test-utils": "^2.0.8",
"@mui/material": "^7.0.2",
"@mui/system": "^7.0.2",
"@mui/types": "^7.4.1",
Expand Down
2 changes: 1 addition & 1 deletion packages/x-data-grid/src/hooks/utils/useGridEvent.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ describe('useGridEvent', () => {
// unable to unsubscribe the last listener using the cleanup function.
// Since React 19, StrictMode works differently
// https://react.dev/blog/2024/04/25/react-19-upgrade-guide#strict-mode-improvements
const expectedCallCount = reactMajor >= 19 ? 1 : 3;
const expectedCallCount = reactMajor >= 19 ? 2 : 3;
expect(apiRef.current.subscribeEvent.callCount).to.equal(expectedCallCount);

unmount();
Expand Down
2 changes: 1 addition & 1 deletion packages/x-date-pickers-pro/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@
}
},
"devDependencies": {
"@mui/internal-test-utils": "^2.0.7",
"@mui/internal-test-utils": "^2.0.8",
"@mui/material": "^7.0.2",
"@mui/system": "^7.0.2",
"@types/luxon": "^3.6.2",
Expand Down
2 changes: 1 addition & 1 deletion packages/x-date-pickers/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@
}
},
"devDependencies": {
"@mui/internal-test-utils": "^2.0.7",
"@mui/internal-test-utils": "^2.0.8",
"@mui/material": "^7.0.2",
"@mui/system": "^7.0.2",
"@types/luxon": "^3.6.2",
Expand Down
2 changes: 1 addition & 1 deletion packages/x-internals/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@
"react": "^17.0.0 || ^18.0.0 || ^19.0.0"
},
"devDependencies": {
"@mui/internal-test-utils": "^2.0.7",
"@mui/internal-test-utils": "^2.0.8",
"react": "^19.0.0",
"react-dom": "^19.0.0",
"rimraf": "^6.0.1"
Expand Down
2 changes: 1 addition & 1 deletion packages/x-license/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@
"react": "^17.0.0 || ^18.0.0 || ^19.0.0"
},
"devDependencies": {
"@mui/internal-test-utils": "^2.0.7",
"@mui/internal-test-utils": "^2.0.8",
"react": "^19.0.0",
"react-dom": "^19.0.0",
"rimraf": "^6.0.1"
Expand Down
2 changes: 1 addition & 1 deletion packages/x-scheduler/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@
"luxon": "^3.0.2"
},
"devDependencies": {
"@mui/internal-test-utils": "^2.0.4",
"@mui/internal-test-utils": "^2.0.8",
"@types/luxon": "^3.6.2",
"@types/prop-types": "^15.7.14",
"luxon": "^3.6.1",
Expand Down
2 changes: 1 addition & 1 deletion packages/x-telemetry/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@
"node-machine-id": "^1.1.12"
},
"devDependencies": {
"@mui/internal-test-utils": "^2.0.7",
"@mui/internal-test-utils": "^2.0.8",
"@types/device-uuid": "^1.0.3",
"rimraf": "^6.0.1"
},
Expand Down
2 changes: 1 addition & 1 deletion packages/x-tree-view-pro/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@
}
},
"devDependencies": {
"@mui/internal-test-utils": "^2.0.7",
"@mui/internal-test-utils": "^2.0.8",
"@mui/material": "^7.0.2",
"@mui/system": "^7.0.2",
"@types/prop-types": "^15.7.14",
Expand Down
2 changes: 1 addition & 1 deletion packages/x-tree-view/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@
}
},
"devDependencies": {
"@mui/internal-test-utils": "^2.0.7",
"@mui/internal-test-utils": "^2.0.8",
"@mui/material": "^7.0.2",
"@mui/system": "^7.0.2",
"@types/prop-types": "^15.7.14",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,7 @@ describeTreeView<
).toErrorDev([
'Encountered two children with the same key, `1`',
'MUI X: The Tree View component requires all items to have a unique `id` property.',
reactMajor < 19 &&
'MUI X: The Tree View component requires all items to have a unique `id` property.',
'Alternatively, you can use the `getItemId` prop to specify a custom id for each item',
reactMajor < 19 && `The above error occurred in the <ForwardRef(TreeItem2)> component`,
reactMajor < 19 && `The above error occurred in the <ForwardRef(TreeItem2)> component`,
]);
Expand Down
Loading