mui / material-ui

Material UI: Comprehensive React component library that implements Google's Material Design. Free forever.
https://mui.com/material-ui/
MIT License
93.2k stars 32.08k forks source link

Significant Bundle Size Increase After Recent MUI Update #42958

Open damisparks opened 1 month ago

damisparks commented 1 month ago

Steps to reproduce

No response

Current behavior

After updating to the latest version of Material-UI, we've observed a substantial increase in our bundle size. This increase was noticed without any changes to our existing codebase. For example, our BreadcrumbsItem and NotificationItem components, which utilise various MUI components, have seen a notable increase in size.

import Link, { type LinkProps } from "@mui/material/Link";
import Stack from "@mui/material/Stack";
import Typography from "@mui/material/Typography";
import type { ElementType, ReactNode } from "react";

export default function BreadcrumbsItem<C extends ElementType>({
  icon,
  label,
  ...linkProps
}: {
  /**
   * Icon to display before the label. The CSS `font-size` of the icon should be
   * `inherit`.
   */
  icon?: ReactNode;

  /** The label text. */
  label: ReactNode;
} & LinkProps<C, { component?: C }>) {
  return (
    <Link variant="body2" underline="hover" color="inherit" {...linkProps}>
      <Stack direction="row" alignItems="center" spacing={1}>
        {icon}
        <Typography variant="inherit" component="span">
          {label}
        </Typography>
      </Stack>
    </Link>
  );
}

Expected behavior

We expect the bundle size increase to be minimal or at least proportional to the new features or improvements introduced in the update.

Context

Our primary goal is to understand the root cause of the significant bundle size increase and explore potential solutions or optimizations to mitigate this impact.

Additional Context

Running our test suite shows the following error without changing our existing codebase.

✖ failing tests:

test at src/components/BreadcrumbsItem.test.ts:9:10
✖ Bundle size. (177.302917ms)
  AssertionError [ERR_ASSERTION]: 31165 B minified and gzipped bundle exceeds the 31050 B limit by 115 B; increase the limit or reduce the bundle size.
      at assertBundleSize (/Users/d.omifare/workspace/aura-ui/src/utils/test/assertBundleSize.ts:49:5)
      at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
      at TestContext.<anonymous> (/Users/d.omifare/workspace/aura-ui/src/components/BreadcrumbsItem.test.ts:10:7)
      at async Test.run (node:internal/test_runner/test:688:9)
      at async Promise.all (index 0)
      at async Suite.run (node:internal/test_runner/test:1029:7)
      at async Test.processPendingSubtests (node:internal/test_runner/test:420:7) {
    generatedMessage: false,
    code: 'ERR_ASSERTION',
    actual: undefined,
    expected: undefined,
    operator: 'fail'
  }

  test at src/components/NotificationItem.test.ts:9:10
✖ Bundle size. (102.726159ms)
  AssertionError [ERR_ASSERTION]: 31190 B minified and gzipped bundle exceeds the 30100 B limit by 1090 B; increase the limit or reduce the bundle size.
      at assertBundleSize (/home/runner/work/aura-ui/aura-ui/src/utils/test/assertBundleSize.ts:49:5)
      at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
      at TestContext.<anonymous> (/home/runner/work/aura-ui/aura-ui/src/components/NotificationItem.test.ts:10:7)
      at async Test.run (node:internal/test_runner/test:765:9)
      at async Promise.all (index 0)
      at async Suite.run (node:internal/test_runner/test:1106:7)
      at async Test.processPendingSubtests (node:internal/test_runner/test:492:7) {
    generatedMessage: false,
    code: 'ERR_ASSERTION',
    actual: undefined,
    expected: undefined,
    operator: 'fail'
  }
...

Your environment

npx @mui/envinfo ``` System: OS: macOS 14.5 Binaries: Node: 20.14.0 - ~/.nvm/versions/node/v20.14.0/bin/node npm: 10.8.1 - ~/.nvm/versions/node/v20.14.0/bin/npm pnpm: 8.12.0 - ~/.nvm/versions/node/v20.14.0/bin/pnpm Browsers: Chrome: 126.0.6478.127 Edge: 126.0.2592.102 Safari: 17.5 npmPackages: @emotion/react: 11.11.4 @emotion/styled: ^11.11.5 => 11.11.5 @mui/base: ^5.0.0-beta.46 => 5.0.0-dev.20240529-082515-213b5e33ab @mui/core-downloads-tracker: 5.16.2 @mui/icons-material: ^5.15.18 => 5.16.2 @mui/material: ^5.15.18 => 5.16.2 @mui/private-theming: 5.16.2 @mui/styled-engine: 5.16.2 @mui/system: 5.16.2 @mui/types: 7.2.15 @mui/utils: ^5.15.14 => 5.16.2 @mui/x-data-grid: 5.17.26 @mui/x-data-grid-pro: ^5.17.26 => 5.17.26 @mui/x-license-pro: ^5.17.12 => 5.17.12 @types/react: ^18.2.79 => 18.3.3 react: ^18.2.0 => 18.3.1 react-dom: ^18.2.0 => 18.3.1 typescript: ^5.2.2 => 5.5.3 ```

Search keywords: bundle size

siriwatknp commented 1 month ago

@damisparks May I ask which version did you use before?

brijeshb42 commented 1 month ago

Can you share your overall bundle size increase ? From your logs, I see that new size increased by 115 B and 1090 B. Also, can you share the before and after package versions that led to this increase ?

damisparks commented 1 month ago

@damisparks May I ask which version did you use before?

FYI. These bundle size increases are frequent. What we've had to do on our side is to increase the bundle limit when it makes sense. @siriwatknp the previous version was v5.16.0 released on July 5.

damisparks commented 1 month ago

Can you share your overall bundle size increase ? From your logs, I see that new size increased by 115 B and 1090 B. Also, can you share the before and after package versions that led to this increase ?

@brijeshb42 Below is the information you asked for. As I said here

We had v5.16.0 before reporting the issue. From v5.16.1, we had those bundles increase.

Below are the logs

✖ failing tests:

test at src/components/BreadcrumbsItem.test.ts:9:10
✖ Bundle size. (177.302917ms)
  AssertionError [ERR_ASSERTION]: 31165 B minified and gzipped bundle exceeds the 31050 B limit by 115 B; increase the limit or reduce the bundle size.
      at assertBundleSize (/Users/d.omifare/workspace/aura-ui/src/utils/test/assertBundleSize.ts:49:5)
      at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
      at TestContext.<anonymous> (/Users/d.omifare/workspace/aura-ui/src/components/BreadcrumbsItem.test.ts:10:7)
      at async Test.run (node:internal/test_runner/test:688:9)
      at async Promise.all (index 0)
      at async Suite.run (node:internal/test_runner/test:1029:7)
      at async Test.processPendingSubtests (node:internal/test_runner/test:420:7) {
    generatedMessage: false,
    code: 'ERR_ASSERTION',
    actual: undefined,
    expected: undefined,
    operator: 'fail'
  }

test at src/components/DGColumnContextMenuButton.test.ts:9:10
✖ Bundle size. (273.908625ms)
  AssertionError [ERR_ASSERTION]: 91421 B minified and gzipped bundle exceeds the 91400 B limit by 21 B; increase the limit or reduce the bundle size.
      at assertBundleSize (/Users/d.omifare/workspace/aura-ui/src/utils/test/assertBundleSize.ts:49:5)
      at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
      at TestContext.<anonymous> (/Users/d.omifare/workspace/aura-ui/src/components/DGColumnContextMenuButton.test.ts:10:7)
      at async Test.run (node:internal/test_runner/test:688:9)
      at async Promise.all (index 0)
      at async Suite.run (node:internal/test_runner/test:1029:7)
      at async Test.processPendingSubtests (node:internal/test_runner/test:420:7) {
    generatedMessage: false,
    code: 'ERR_ASSERTION',
    actual: undefined,
    expected: undefined,
    operator: 'fail'
  }

test at src/components/DGColumnFavorite.test.ts:9:10
✖ Bundle size. (225.347208ms)
  AssertionError [ERR_ASSERTION]: 34064 B minified and gzipped bundle exceeds the 31800 B limit by 2264 B; increase the limit or reduce the bundle size.
      at assertBundleSize (/Users/d.omifare/workspace/aura-ui/src/utils/test/assertBundleSize.ts:49:5)
      at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
      at TestContext.<anonymous> (/Users/d.omifare/workspace/aura-ui/src/components/DGColumnFavorite.test.ts:10:7)
      at async Test.run (node:internal/test_runner/test:688:9)
      at async Promise.all (index 0)
      at async Suite.run (node:internal/test_runner/test:1029:7)
      at async Test.processPendingSubtests (node:internal/test_runner/test:420:7) {
    generatedMessage: false,
    code: 'ERR_ASSERTION',
    actual: undefined,
    expected: undefined,
    operator: 'fail'
  }

test at src/components/DGCustomRow.test.ts:6:8
✖ Bundle size. (316.91775ms)
  AssertionError [ERR_ASSERTION]: 127717 B minified and gzipped bundle exceeds the 127700 B limit by 17 B; increase the limit or reduce the bundle size.
      at assertBundleSize (/Users/d.omifare/workspace/aura-ui/src/utils/test/assertBundleSize.ts:49:5)
      at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
      at TestContext.<anonymous> (/Users/d.omifare/workspace/aura-ui/src/components/DGCustomRow.test.ts:7:5)
      at async Test.run (node:internal/test_runner/test:688:9)
      at async Promise.all (index 0)
      at async Suite.run (node:internal/test_runner/test:1029:7)
      at async Test.processPendingSubtests (node:internal/test_runner/test:420:7) {
    generatedMessage: false,
    code: 'ERR_ASSERTION',
    actual: undefined,
    expected: undefined,
    operator: 'fail'
  }

test at src/components/DrawerActions.test.ts:6:8
✖ Bundle size. (182.189ms)
  AssertionError [ERR_ASSERTION]: 26002 B minified and gzipped bundle exceeds the 26000 B limit by 2 B; increase the limit or reduce the bundle size.
      at assertBundleSize (/Users/d.omifare/workspace/aura-ui/src/utils/test/assertBundleSize.ts:49:5)
      at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
      at TestContext.<anonymous> (/Users/d.omifare/workspace/aura-ui/src/components/DrawerActions.test.ts:7:5)
      at async Test.run (node:internal/test_runner/test:688:9)
      at async Promise.all (index 0)
      at async Suite.run (node:internal/test_runner/test:1029:7)
      at async Test.processPendingSubtests (node:internal/test_runner/test:420:7) {
    generatedMessage: false,
    code: 'ERR_ASSERTION',
    actual: undefined,
    expected: undefined,
    operator: 'fail'
  }

test at src/components/DrawerCloser.test.ts:6:8
✖ Bundle size. (201.864166ms)
  AssertionError [ERR_ASSERTION]: 33822 B minified and gzipped bundle exceeds the 31600 B limit by 2222 B; increase the limit or reduce the bundle size.
      at assertBundleSize (/Users/d.omifare/workspace/aura-ui/src/utils/test/assertBundleSize.ts:49:5)
      at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
      at TestContext.<anonymous> (/Users/d.omifare/workspace/aura-ui/src/components/DrawerCloser.test.ts:7:5)
      at async Test.run (node:internal/test_runner/test:688:9)
      at async Promise.all (index 0)
      at async Suite.run (node:internal/test_runner/test:1029:7)
      at async Test.processPendingSubtests (node:internal/test_runner/test:420:7) {
    generatedMessage: false,
    code: 'ERR_ASSERTION',
    actual: undefined,
    expected: undefined,
    operator: 'fail'
  }

test at src/components/DrawerHeader.test.ts:6:8
✖ Bundle size. (185.010041ms)
  AssertionError [ERR_ASSERTION]: 25654 B minified and gzipped bundle exceeds the 25650 B limit by 4 B; increase the limit or reduce the bundle size.
      at assertBundleSize (/Users/d.omifare/workspace/aura-ui/src/utils/test/assertBundleSize.ts:49:5)
      at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
      at TestContext.<anonymous> (/Users/d.omifare/workspace/aura-ui/src/components/DrawerHeader.test.ts:7:5)
      at async Test.run (node:internal/test_runner/test:688:9)
      at async Promise.all (index 0)
      at async Suite.run (node:internal/test_runner/test:1029:7)
      at async Test.processPendingSubtests (node:internal/test_runner/test:420:7) {
    generatedMessage: false,
    code: 'ERR_ASSERTION',
    actual: undefined,
    expected: undefined,
    operator: 'fail'
  }

test at src/components/LazyInput.test.ts:6:8
✖ Bundle size. (175.758291ms)
  AssertionError [ERR_ASSERTION]: 103163 B minified and gzipped bundle exceeds the 102900 B limit by 263 B; increase the limit or reduce the bundle size.
      at assertBundleSize (/Users/d.omifare/workspace/aura-ui/src/utils/test/assertBundleSize.ts:49:5)
      at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
      at TestContext.<anonymous> (/Users/d.omifare/workspace/aura-ui/src/components/LazyInput.test.ts:7:5)
      at async Test.run (node:internal/test_runner/test:688:9)
      at async Promise.all (index 0)
      at async Suite.run (node:internal/test_runner/test:1029:7)
      at async Test.processPendingSubtests (node:internal/test_runner/test:420:7) {
    generatedMessage: false,
    code: 'ERR_ASSERTION',
    actual: undefined,
    expected: undefined,
    operator: 'fail'
  }

test at src/components/NotificationCenterWrapper.test.ts:9:10
✖ Bundle size. (124.620708ms)
  AssertionError [ERR_ASSERTION]: 27765 B minified and gzipped bundle exceeds the 27700 B limit by 65 B; increase the limit or reduce the bundle size.
      at assertBundleSize (/Users/d.omifare/workspace/aura-ui/src/utils/test/assertBundleSize.ts:49:5)
      at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
      at TestContext.<anonymous> (/Users/d.omifare/workspace/aura-ui/src/components/NotificationCenterWrapper.test.ts:10:7)
      at async Test.run (node:internal/test_runner/test:688:9)
      at async Promise.all (index 0)
      at async Suite.run (node:internal/test_runner/test:1029:7)
      at async Test.processPendingSubtests (node:internal/test_runner/test:420:7) {
    generatedMessage: false,
    code: 'ERR_ASSERTION',
    actual: undefined,
    expected: undefined,
    operator: 'fail'
  }

test at src/components/PopperWithArrow.test.ts:9:10
✖ Bundle size. (257.392875ms)
  AssertionError [ERR_ASSERTION]: 84001 B minified and gzipped bundle exceeds the 84000 B limit by 1 B; increase the limit or reduce the bundle size.
      at assertBundleSize (/Users/d.omifare/workspace/aura-ui/src/utils/test/assertBundleSize.ts:49:5)
      at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
      at TestContext.<anonymous> (/Users/d.omifare/workspace/aura-ui/src/components/PopperWithArrow.test.ts:10:7)
      at async Test.run (node:internal/test_runner/test:688:9)
      at async Promise.all (index 0)
      at async Suite.run (node:internal/test_runner/test:1029:7)
      at async Test.processPendingSubtests (node:internal/test_runner/test:420:7) {
    generatedMessage: false,
    code: 'ERR_ASSERTION',
    actual: undefined,
    expected: undefined,
    operator: 'fail'
  }

test at src/components/SectionTitle.test.ts:6:8
✖ Bundle size. (267.750667ms)
  AssertionError [ERR_ASSERTION]: 103316 B minified and gzipped bundle exceeds the 103300 B limit by 16 B; increase the limit or reduce the bundle size.
      at assertBundleSize (/Users/d.omifare/workspace/aura-ui/src/utils/test/assertBundleSize.ts:49:5)
      at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
      at TestContext.<anonymous> (/Users/d.omifare/workspace/aura-ui/src/components/SectionTitle.test.ts:7:5)
      at async Test.run (node:internal/test_runner/test:688:9)
      at async Promise.all (index 0)
      at async Suite.run (node:internal/test_runner/test:1029:7)
      at async Test.processPendingSubtests (node:internal/test_runner/test:420:7) {
    generatedMessage: false,
    code: 'ERR_ASSERTION',
    actual: undefined,
    expected: undefined,
    operator: 'fail'
  }

test at src/components/SelectSpace.test.ts:6:8
✖ Bundle size. (135.308375ms)
  AssertionError [ERR_ASSERTION]: 102511 B minified and gzipped bundle exceeds the 102500 B limit by 11 B; increase the limit or reduce the bundle size.
      at assertBundleSize (/Users/d.omifare/workspace/aura-ui/src/utils/test/assertBundleSize.ts:49:5)
      at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
      at TestContext.<anonymous> (/Users/d.omifare/workspace/aura-ui/src/components/SelectSpace.test.ts:7:5)
      at async Test.run (node:internal/test_runner/test:688:9)
      at async Promise.all (index 0)
      at async Suite.run (node:internal/test_runner/test:1029:7)
      at async Test.processPendingSubtests (node:internal/test_runner/test:420:7) {
    generatedMessage: false,
    code: 'ERR_ASSERTION',
    actual: undefined,
    expected: undefined,
    operator: 'fail'
  }

test at src/components/TabPanel.test.ts:6:8
✖ Bundle size. (131.598667ms)
  AssertionError [ERR_ASSERTION]: 25731 B minified and gzipped bundle exceeds the 25700 B limit by 31 B; increase the limit or reduce the bundle size.
      at assertBundleSize (/Users/d.omifare/workspace/aura-ui/src/utils/test/assertBundleSize.ts:49:5)
      at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
      at TestContext.<anonymous> (/Users/d.omifare/workspace/aura-ui/src/components/TabPanel.test.ts:7:5)
      at async Test.run (node:internal/test_runner/test:688:9)
      at async Promise.all (index 0)
      at async Suite.run (node:internal/test_runner/test:1029:7)
      at async Test.processPendingSubtests (node:internal/test_runner/test:420:7) {
    generatedMessage: false,
    code: 'ERR_ASSERTION',
    actual: undefined,
    expected: undefined,
    operator: 'fail'
  }
damisparks commented 1 month ago

@brijeshb42

v5.16.3 introduced another bundle increase.

ℹ tests 50
ℹ suites 45
ℹ pass 45
ℹ fail 5
ℹ cancelled 0
ℹ skipped 0
ℹ todo 0
ℹ duration_ms 10998.237272

✖ failing tests:

test at src/components/DGColumnChips.test.ts:6:8
✖ Bundle size. (439.122037ms)
  AssertionError [ERR_ASSERTION]: 93202 B minified and gzipped bundle exceeds the 93200 B limit by 2 B; increase the limit or reduce the bundle size.
      at assertBundleSize (/home/runner/work/aura-ui/aura-ui/src/utils/test/assertBundleSize.ts:49:5)
      at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
      at TestContext.<anonymous> (/home/runner/work/aura-ui/aura-ui/src/components/DGColumnChips.test.ts:7:5)
      at async Test.run (node:internal/test_runner/test:765:9)
      at async Promise.all (index 0)
      at async Suite.run (node:internal/test_runner/test:1106:7)
      at async Test.processPendingSubtests (node:internal/test_runner/test:492:7) {
    generatedMessage: false,
    code: 'ERR_ASSERTION',
    actual: undefined,
    expected: undefined,
    operator: 'fail'
  }

test at src/components/DGCustomRow.test.ts:6:8
✖ Bundle size. (528.224854ms)
  AssertionError [ERR_ASSERTION]: 128027 B minified and gzipped bundle exceeds the 127800 B limit by 227 B; increase the limit or reduce the bundle size.
      at assertBundleSize (/home/runner/work/aura-ui/aura-ui/src/utils/test/assertBundleSize.ts:49:5)
      at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
      at TestContext.<anonymous> (/home/runner/work/aura-ui/aura-ui/src/components/DGCustomRow.test.ts:7:5)
      at async Test.run (node:internal/test_runner/test:765:9)
      at async Promise.all (index 0)
      at async Suite.run (node:internal/test_runner/test:1106:7)
      at async Test.processPendingSubtests (node:internal/test_runner/test:492:7) {
    generatedMessage: false,
    code: 'ERR_ASSERTION',
    actual: undefined,
    expected: undefined,
    operator: 'fail'
  }

test at src/components/NotificationItem.test.ts:9:10
✖ Bundle size. (102.726159ms)
  AssertionError [ERR_ASSERTION]: 31190 B minified and gzipped bundle exceeds the 30100 B limit by 1090 B; increase the limit or reduce the bundle size.
      at assertBundleSize (/home/runner/work/aura-ui/aura-ui/src/utils/test/assertBundleSize.ts:49:5)
      at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
      at TestContext.<anonymous> (/home/runner/work/aura-ui/aura-ui/src/components/NotificationItem.test.ts:10:7)
      at async Test.run (node:internal/test_runner/test:765:9)
      at async Promise.all (index 0)
      at async Suite.run (node:internal/test_runner/test:1106:7)
      at async Test.processPendingSubtests (node:internal/test_runner/test:492:7) {
    generatedMessage: false,
    code: 'ERR_ASSERTION',
    actual: undefined,
    expected: undefined,
    operator: 'fail'
  }

test at src/components/TextFieldCollapsible.test.ts:9:10
✖ Bundle size. (187.2982ms)
  AssertionError [ERR_ASSERTION]: 112782 B minified and gzipped bundle exceeds the 112450 B limit by 332 B; increase the limit or reduce the bundle size.
      at assertBundleSize (/home/runner/work/aura-ui/aura-ui/src/utils/test/assertBundleSize.ts:49:5)
      at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
      at TestContext.<anonymous> (/home/runner/work/aura-ui/aura-ui/src/components/TextFieldCollapsible.test.ts:10:7)
      at async Test.run (node:internal/test_runner/test:765:9)
      at async Promise.all (index 0)
      at async Suite.run (node:internal/test_runner/test:1106:7)
      at async Test.processPendingSubtests (node:internal/test_runner/test:492:7) {
    generatedMessage: false,
    code: 'ERR_ASSERTION',
    actual: undefined,
    expected: undefined,
    operator: 'fail'
  }

test at src/components/private/DGContextMenu.test.ts:6:8
✖ Bundle size. (155.102629ms)
  AssertionError [ERR_ASSERTION]: 89607 B minified and gzipped bundle exceeds the 89550 B limit by 57 B; increase the limit or reduce the bundle size.
      at assertBundleSize (/home/runner/work/aura-ui/aura-ui/src/utils/test/assertBundleSize.ts:49:5)
      at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
      at TestContext.<anonymous> (/home/runner/work/aura-ui/aura-ui/src/components/private/DGContextMenu.test.ts:7:5)
      at async Test.run (node:internal/test_runner/test:765:9)
      at async Promise.all (index 0)
      at async Suite.run (node:internal/test_runner/test:1106:7)
      at async Test.processPendingSubtests (node:internal/test_runner/test:492:7) {
    generatedMessage: false,
    code: 'ERR_ASSERTION',
    actual: undefined,
    expected: undefined,
    operator: 'fail'
  }
damisparks commented 1 month ago

Latest release.

I had these logs from today.

✖ failing tests:
test at src/components/BreadcrumbsItem.test.ts:9:10
✖ Bundle size. (94.755584ms)
  AssertionError [ERR_ASSERTION]: 31210 B minified and gzipped bundle exceeds the 31200 B limit by 10 B; increase the limit or reduce the bundle size.
      at assertBundleSize (/home/runner/work/aura-ui/aura-ui/src/utils/test/assertBundleSize.ts:49:5)
      at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
      at TestContext.<anonymous> (/home/runner/work/aura-ui/aura-ui/src/components/BreadcrumbsItem.test.ts:10:7)
      at async Test.run (node:internal/test_runner/test:765:9)
      at async Promise.all (index 0)
      at async Suite.run (node:internal/test_runner/test:1106:7)
      at async Test.processPendingSubtests (node:internal/test_runner/test:492:7) {
    generatedMessage: false,
    code: 'ERR_ASSERTION',
    actual: undefined,
    expected: undefined,
    operator: 'fail'
  }
test at src/components/ChipGroup.test.ts:6:8
✖ Bundle size. (159.153111ms)
  AssertionError [ERR_ASSERTION]: 91382 B minified and gzipped bundle exceeds the 91350 B limit by 32 B; increase the limit or reduce the bundle size.
      at assertBundleSize (/home/runner/work/aura-ui/aura-ui/src/utils/test/assertBundleSize.ts:49:5)
      at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
      at TestContext.<anonymous> (/home/runner/work/aura-ui/aura-ui/src/components/ChipGroup.test.ts:7:5)
      at async Test.run (node:internal/test_runner/test:765:9)
      at async Promise.all (index 0)
      at async Suite.run (node:internal/test_runner/test:1106:7)
      at async Test.processPendingSubtests (node:internal/test_runner/test:492:7) {
    generatedMessage: false,
    code: 'ERR_ASSERTION',
    actual: undefined,
    expected: undefined,
    operator: 'fail'
  }
test at src/components/DGColumnFavorite.test.ts:9:10
✖ Bundle size. (162.716357ms)
  AssertionError [ERR_ASSERTION]: 34128 B minified and gzipped bundle exceeds the 34100 B limit by 28 B; increase the limit or reduce the bundle size.
      at assertBundleSize (/home/runner/work/aura-ui/aura-ui/src/utils/test/assertBundleSize.ts:49:5)
      at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
      at TestContext.<anonymous> (/home/runner/work/aura-ui/aura-ui/src/components/DGColumnFavorite.test.ts:10:7)
      at async Test.run (node:internal/test_runner/test:765:9)
      at async Promise.all (index 0)
      at async Suite.run (node:internal/test_runner/test:1106:7)
      at async Test.processPendingSubtests (node:internal/test_runner/test:492:7) {
    generatedMessage: false,
    code: 'ERR_ASSERTION',
    actual: undefined,
    expected: undefined,
    operator: 'fail'
  }
test at src/components/DrawerActions.test.ts:6:8
✖ Bundle size. (94.885457ms)
  AssertionError [ERR_ASSERTION]: 26057 B minified and gzipped bundle exceeds the 26050 B limit by 7 B; increase the limit or reduce the bundle size.
      at assertBundleSize (/home/runner/work/aura-ui/aura-ui/src/utils/test/assertBundleSize.ts:49:5)
      at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
      at TestContext.<anonymous> (/home/runner/work/aura-ui/aura-ui/src/components/DrawerActions.test.ts:7:5)
      at async Test.run (node:internal/test_runner/test:765:9)
      at async Promise.all (index 0)
      at async Suite.run (node:internal/test_runner/test:1106:7)
      at async Test.processPendingSubtests (node:internal/test_runner/test:492:7) {
    generatedMessage: false,
    code: 'ERR_ASSERTION',
    actual: undefined,
    expected: undefined,
    operator: 'fail'
  }
test at src/components/DrawerContainer.test.ts:9:10
✖ Bundle size. (94.605854ms)
  AssertionError [ERR_ASSERTION]: 23237 B minified and gzipped bundle exceeds the 23200 B limit by 37 B; increase the limit or reduce the bundle size.
      at assertBundleSize (/home/runner/work/aura-ui/aura-ui/src/utils/test/assertBundleSize.ts:49:5)
      at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
      at TestContext.<anonymous> (/home/runner/work/aura-ui/aura-ui/src/components/DrawerContainer.test.ts:10:7)
      at async Test.run (node:internal/test_runner/test:765:9)
      at async Promise.all (index 0)
      at async Suite.run (node:internal/test_runner/test:1106:7)
      at async Test.processPendingSubtests (node:internal/test_runner/test:492:7) {
    generatedMessage: false,
    code: 'ERR_ASSERTION',
    actual: undefined,
    expected: undefined,
    operator: 'fail'
  }
test at src/components/DrawerContent.test.ts:6:8
✖ Bundle size. (97.590108ms)
  AssertionError [ERR_ASSERTION]: 23214 B minified and gzipped bundle exceeds the 23200 B limit by 14 B; increase the limit or reduce the bundle size.
      at assertBundleSize (/home/runner/work/aura-ui/aura-ui/src/utils/test/assertBundleSize.ts:49:5)
      at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
      at TestContext.<anonymous> (/home/runner/work/aura-ui/aura-ui/src/components/DrawerContent.test.ts:7:5)
      at async Test.run (node:internal/test_runner/test:765:9)
      at async Promise.all (index 0)
      at async Suite.run (node:internal/test_runner/test:1106:7)
      at async Test.processPendingSubtests (node:internal/test_runner/test:492:7) {
    generatedMessage: false,
    code: 'ERR_ASSERTION',
    actual: undefined,
    expected: undefined,
    operator: 'fail'
  }
test at src/components/DrawerHeader.test.ts:6:8
✖ Bundle size. (98.550398ms)
  AssertionError [ERR_ASSERTION]: 25706 B minified and gzipped bundle exceeds the 25680 B limit by 26 B; increase the limit or reduce the bundle size.
      at assertBundleSize (/home/runner/work/aura-ui/aura-ui/src/utils/test/assertBundleSize.ts:49:5)
      at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
      at TestContext.<anonymous> (/home/runner/work/aura-ui/aura-ui/src/components/DrawerHeader.test.ts:7:5)
      at async Test.run (node:internal/test_runner/test:765:9)
      at async Promise.all (index 0)
      at async Suite.run (node:internal/test_runner/test:1106:7)
      at async Test.processPendingSubtests (node:internal/test_runner/test:492:7) {
    generatedMessage: false,
    code: 'ERR_ASSERTION',
    actual: undefined,
    expected: undefined,
    operator: 'fail'
  }
test at src/components/NotificationItem.test.ts:9:10
✖ Bundle size. (102.839927ms)
  AssertionError [ERR_ASSERTION]: 31237 B minified and gzipped bundle exceeds the 31200 B limit by 37 B; increase the limit or reduce the bundle size.
      at assertBundleSize (/home/runner/work/aura-ui/aura-ui/src/utils/test/assertBundleSize.ts:49:5)
      at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
      at TestContext.<anonymous> (/home/runner/work/aura-ui/aura-ui/src/components/NotificationItem.test.ts:10:7)
      at async Test.run (node:internal/test_runner/test:765:9)
      at async Promise.all (index 0)
      at async Suite.run (node:internal/test_runner/test:1106:7)
      at async Test.processPendingSubtests (node:internal/test_runner/test:492:7) {
    generatedMessage: false,
    code: 'ERR_ASSERTION',
    actual: undefined,
    expected: undefined,
    operator: 'fail'
  }
test at src/components/TextFieldCollapsible.test.ts:9:10
✖ Bundle size. (186.098046ms)
  AssertionError [ERR_ASSERTION]: 112823 B minified and gzipped bundle exceeds the 112800 B limit by 23 B; increase the limit or reduce the bundle size.
      at assertBundleSize (/home/runner/work/aura-ui/aura-ui/src/utils/test/assertBundleSize.ts:49:5)
      at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
      at TestContext.<anonymous> (/home/runner/work/aura-ui/aura-ui/src/components/TextFieldCollapsible.test.ts:10:7)
      at async Test.run (node:internal/test_runner/test:765:9)
      at async Promise.all (index 0)
      at async Suite.run (node:internal/test_runner/test:1106:7)
      at async Test.processPendingSubtests (node:internal/test_runner/test:492:7) {
    generatedMessage: false,
    code: 'ERR_ASSERTION',
    actual: undefined,
    expected: undefined,
    operator: 'fail'
  }
test at src/components/ZeroState.test.ts:6:8
✖ Bundle size. (99.830277ms)
  AssertionError [ERR_ASSERTION]: 26445 B minified and gzipped bundle exceeds the 26400 B limit by 45 B; increase the limit or reduce the bundle size.
      at assertBundleSize (/home/runner/work/aura-ui/aura-ui/src/utils/test/assertBundleSize.ts:49:5)
      at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
      at TestContext.<anonymous> (/home/runner/work/aura-ui/aura-ui/src/components/ZeroState.test.ts:7:5)
      at async Test.run (node:internal/test_runner/test:765:9)
      at async Promise.all (index 0)
      at async Suite.run (node:internal/test_runner/test:1106:7)
      at async Test.processPendingSubtests (node:internal/test_runner/test:492:7) {
    generatedMessage: false,
    code: 'ERR_ASSERTION',
    actual: undefined,
    expected: undefined,
    operator: 'fail'
  }
test at src/components/private/DGContextMenu.test.ts:6:8
✖ Bundle size. (154.744044ms)
  AssertionError [ERR_ASSERTION]: 89658 B minified and gzipped bundle exceeds the 89650 B limit by 8 B; increase the limit or reduce the bundle size.
      at assertBundleSize (/home/runner/work/aura-ui/aura-ui/src/utils/test/assertBundleSize.ts:49:5)
      at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
      at TestContext.<anonymous> (/home/runner/work/aura-ui/aura-ui/src/components/private/DGContextMenu.test.ts:7:5)
      at async Test.run (node:internal/test_runner/test:765:9)
      at async Promise.all (index 0)
      at async Suite.run (node:internal/test_runner/test:1106:7)
      at async Test.processPendingSubtests (node:internal/test_runner/test:492:7) {
    generatedMessage: false,
    code: 'ERR_ASSERTION',
    actual: undefined,
    expected: undefined,
    operator: 'fail'
  }
siriwatknp commented 1 month ago

I only thing I can suspect is the React version update to 18.3.1.

damisparks commented 1 month ago

@siriwatknp I did some digging. Below are the logs.

React 18.2.0 (Exact) with the latest MUI version

ℹ tests 50
ℹ suites 45
ℹ pass 47
ℹ fail 3
ℹ cancelled 0
ℹ skipped 0
ℹ todo 0
ℹ duration_ms 1687.253833

✖ failing tests:

test at src/components/ChipGroup.test.ts:6:8
✖ Bundle size. (266.340167ms)
  AssertionError [ERR_ASSERTION]: 91405 B minified and gzipped bundle exceeds the 91400 B limit by 5 B; increase the limit or reduce the bundle size.
      at assertBundleSize (/Users/d.omifare/workspace/aura-ui/src/utils/test/assertBundleSize.ts:49:5)
      at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
      at TestContext.<anonymous> (/Users/d.omifare/workspace/aura-ui/src/components/ChipGroup.test.ts:7:5)
      at async Test.run (node:internal/test_runner/test:688:9)
      at async Promise.all (index 0)
      at async Suite.run (node:internal/test_runner/test:1029:7)
      at async Test.processPendingSubtests (node:internal/test_runner/test:420:7) {
    generatedMessage: false,
    code: 'ERR_ASSERTION',
    actual: undefined,
    expected: undefined,
    operator: 'fail'
  }

test at src/components/DGColumnChips.test.ts:6:8
✖ Bundle size. (432.384959ms)
  AssertionError [ERR_ASSERTION]: 93273 B minified and gzipped bundle exceeds the 93250 B limit by 23 B; increase the limit or reduce the bundle size.
      at assertBundleSize (/Users/d.omifare/workspace/aura-ui/src/utils/test/assertBundleSize.ts:49:5)
      at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
      at TestContext.<anonymous> (/Users/d.omifare/workspace/aura-ui/src/components/DGColumnChips.test.ts:7:5)
      at async Test.run (node:internal/test_runner/test:688:9)
      at async Promise.all (index 0)
      at async Suite.run (node:internal/test_runner/test:1029:7)
      at async Test.processPendingSubtests (node:internal/test_runner/test:420:7) {
    generatedMessage: false,
    code: 'ERR_ASSERTION',
    actual: undefined,
    expected: undefined,
    operator: 'fail'
  }

test at src/components/TextFieldCollapsible.test.ts:9:10
✖ Bundle size. (319.566084ms)
  AssertionError [ERR_ASSERTION]: 112920 B minified and gzipped bundle exceeds the 112850 B limit by 70 B; increase the limit or reduce the bundle size.
      at assertBundleSize (/Users/d.omifare/workspace/aura-ui/src/utils/test/assertBundleSize.ts:49:5)
      at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
      at TestContext.<anonymous> (/Users/d.omifare/workspace/aura-ui/src/components/TextFieldCollapsible.test.ts:10:7)
      at async Test.run (node:internal/test_runner/test:688:9)
      at async Promise.all (index 0)
      at async Suite.run (node:internal/test_runner/test:1029:7)
      at async Test.processPendingSubtests (node:internal/test_runner/test:420:7) {
    generatedMessage: false,
    code: 'ERR_ASSERTION',
    actual: undefined,
    expected: undefined,
    operator: 'fail'
  }

React ^18.2.0 with the latest MUI version

ℹ tests 50
ℹ suites 45
ℹ pass 49
ℹ fail 1
ℹ cancelled 0
ℹ skipped 0
ℹ todo 0
ℹ duration_ms 1611.104459

✖ failing tests:

test at src/components/TextFieldCollapsible.test.ts:9:10
✖ Bundle size. (235.317542ms)
  AssertionError [ERR_ASSERTION]: 112856 B minified and gzipped bundle exceeds the 112850 B limit by 6 B; increase the limit or reduce the bundle size.
      at assertBundleSize (/Users/d.omifare/workspace/aura-ui/src/utils/test/assertBundleSize.ts:49:5)
      at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
      at TestContext.<anonymous> (/Users/d.omifare/workspace/aura-ui/src/components/TextFieldCollapsible.test.ts:10:7)
      at async Test.run (node:internal/test_runner/test:688:9)
      at async Promise.all (index 0)
      at async Suite.run (node:internal/test_runner/test:1029:7)
      at async Test.processPendingSubtests (node:internal/test_runner/test:420:7) {
    generatedMessage: false,
    code: 'ERR_ASSERTION',
    actual: undefined,
    expected: undefined,
    operator: 'fail'
  }

I am tracking things to see if the issue is related to upstream updates from@emotion/styled