Skip to content

Conversation

LukasTy
Copy link
Member

@LukasTy LukasTy commented Jul 7, 2025

Follow-up on #18716 (comment).

@LukasTy LukasTy self-assigned this Jul 7, 2025
@LukasTy LukasTy added type: enhancement It’s an improvement, but we can’t make up our mind whether it's a bug fix or a new feature. scope: code-infra Changes related to the core-infra product. labels Jul 7, 2025
@mui-bot
Copy link

mui-bot commented Jul 7, 2025

Deploy preview: https://deploy-preview-18720--material-ui-x.netlify.app/

Bundle size report

Total Size Change: ▼-4.77KB(-0.04%) - Total Gzip Change: ▼-1.91KB(-0.05%)
Files: 122 total (0 added, 0 removed, 24 changed)

Show details for 100 more bundles (22 more not shown)

@mui/x-data-grid-premiumparsed: ▼-410B(-0.07%) gzip: ▼-115B(-0.07%)
@mui/x-data-grid-premium/DataGridPremiumparsed: ▼-404B(-0.08%) gzip: ▼-187B(-0.12%)
@mui/x-data-grid-proparsed: ▼-400B(-0.09%) gzip: ▼-100B(-0.08%)
@mui/x-data-grid-pro/DataGridProparsed: ▼-393B(-0.09%) gzip: ▼-148B(-0.12%)
@mui/x-charts-proparsed: ▼-246B(-0.06%) gzip: ▼-99B(-0.09%)
@mui/x-charts-pro/FunnelChartparsed: ▼-246B(-0.10%) gzip: ▼-86B(-0.11%)
@mui/x-data-gridparsed: ▼-236B(-0.06%) gzip: ▼-95B(-0.09%)
@mui/x-data-grid/DataGridparsed: ▼-236B(-0.06%) gzip: ▼-92B(-0.09%)
@mui/x-chartsparsed: ▼-138B(-0.05%) gzip: ▼-63B(-0.07%)
@mui/x-charts-pro/Heatmapparsed: ▼-138B(-0.06%) gzip: ▼-52B(-0.07%)
@mui/x-charts-pro/PieChartProparsed: ▼-138B(-0.06%) gzip: ▼-51B(-0.07%)
@mui/x-charts-pro/RadarChartProparsed: ▼-138B(-0.07%) gzip: ▼-41B(-0.07%)
@mui/x-charts-pro/ScatterChartProparsed: ▼-138B(-0.05%) gzip: ▼-69B(-0.08%)
@mui/x-charts/SparkLineChartparsed: ▼-138B(-0.07%) gzip: ▼-56B(-0.09%)
@mui/x-charts-pro/BarChartProparsed: ▼-137B(-0.05%) gzip: ▼-61B(-0.07%)
@mui/x-charts-pro/LineChartProparsed: ▼-137B(-0.05%) gzip: ▼-59B(-0.07%)
@mui/x-charts/ChartsLabelparsed: ▼-137B(-3.20%) gzip: ▼-46B(-2.46%)
@mui/x-charts/ChartsLegendparsed: ▼-137B(-0.19%) gzip: ▼-46B(-0.18%)
@mui/x-charts/ChartsTooltipparsed: ▼-137B(-0.18%) gzip: ▼-56B(-0.21%)
@mui/x-charts/LineChartparsed: ▼-137B(-0.06%) gzip: ▼-167B(-0.24%)
@mui/x-charts/PieChartparsed: ▼-137B(-0.07%) gzip: ▼-49B(-0.08%)
@mui/x-charts/RadarChartparsed: ▼-137B(-0.07%) gzip: ▼-49B(-0.08%)
@mui/x-charts/ScatterChartparsed: ▼-137B(-0.07%) gzip: ▼-60B(-0.10%)
@mui/x-charts/BarChartparsed: ▼-135B(-0.06%) gzip: ▼-65B(-0.10%)
@mui/x-charts-pro/ChartContainerProparsed: 0B(0.00%) gzip: 0B(0.00%)
@mui/x-charts-pro/ChartDataProviderProparsed: 0B(0.00%) gzip: 0B(0.00%)
@mui/x-charts-pro/ChartsToolbarProparsed: 0B(0.00%) gzip: 0B(0.00%)
@mui/x-charts-pro/ChartZoomSliderparsed: 0B(0.00%) gzip: 0B(0.00%)
@mui/x-charts/ChartContainerparsed: 0B(0.00%) gzip: 0B(0.00%)
@mui/x-charts/ChartDataProviderparsed: 0B(0.00%) gzip: 0B(0.00%)
@mui/x-charts/ChartsAxisparsed: 0B(0.00%) gzip: 0B(0.00%)
@mui/x-charts/ChartsAxisHighlightparsed: 0B(0.00%) gzip: 0B(0.00%)
@mui/x-charts/ChartsClipPathparsed: 0B(0.00%) gzip: 0B(0.00%)
@mui/x-charts/ChartsGridparsed: 0B(0.00%) gzip: 0B(0.00%)
@mui/x-charts/ChartsLocalizationProviderparsed: 0B(0.00%) gzip: 0B(0.00%)
@mui/x-charts/ChartsOverlayparsed: 0B(0.00%) gzip: 0B(0.00%)
@mui/x-charts/ChartsReferenceLineparsed: 0B(0.00%) gzip: 0B(0.00%)
@mui/x-charts/ChartsSurfaceparsed: 0B(0.00%) gzip: 0B(0.00%)
@mui/x-charts/ChartsTextparsed: 0B(0.00%) gzip: 0B(0.00%)
@mui/x-charts/ChartsXAxisparsed: 0B(0.00%) gzip: 0B(0.00%)
@mui/x-charts/ChartsYAxisparsed: 0B(0.00%) gzip: 0B(0.00%)
@mui/x-charts/Gaugeparsed: 0B(0.00%) gzip: 0B(0.00%)
@mui/x-charts/Toolbarparsed: 0B(0.00%) gzip: 0B(0.00%)
@mui/x-date-pickersparsed: 0B(0.00%) gzip: 0B(0.00%)
@mui/x-date-pickers-proparsed: 0B(0.00%) gzip: 0B(0.00%)
@mui/x-date-pickers-pro/AdapterDateFnsparsed: 0B(0.00%) gzip: 0B(0.00%)
@mui/x-date-pickers-pro/AdapterDateFnsJalaliparsed: 0B(0.00%) gzip: 0B(0.00%)
@mui/x-date-pickers-pro/AdapterDayjsparsed: 0B(0.00%) gzip: 0B(0.00%)
@mui/x-date-pickers-pro/AdapterLuxonparsed: 0B(0.00%) gzip: 0B(0.00%)
@mui/x-date-pickers-pro/AdapterMomentparsed: 0B(0.00%) gzip: 0B(0.00%)
@mui/x-date-pickers-pro/AdapterMomentHijriparsed: 0B(0.00%) gzip: 0B(0.00%)
@mui/x-date-pickers-pro/AdapterMomentJalaaliparsed: 0B(0.00%) gzip: 0B(0.00%)
@mui/x-date-pickers-pro/DateRangeCalendarparsed: 0B(0.00%) gzip: 0B(0.00%)
@mui/x-date-pickers-pro/DateRangePickerparsed: 0B(0.00%) gzip: 0B(0.00%)
@mui/x-date-pickers-pro/DateRangePickerDayparsed: 0B(0.00%) gzip: 0B(0.00%)
@mui/x-date-pickers-pro/DateRangePickerDay2parsed: 0B(0.00%) gzip: 0B(0.00%)
@mui/x-date-pickers-pro/DateTimeRangePickerparsed: 0B(0.00%) gzip: 0B(0.00%)
@mui/x-date-pickers-pro/DesktopDateRangePickerparsed: 0B(0.00%) gzip: 0B(0.00%)
@mui/x-date-pickers-pro/DesktopDateTimeRangePickerparsed: 0B(0.00%) gzip: 0B(0.00%)
@mui/x-date-pickers-pro/DesktopTimeRangePickerparsed: 0B(0.00%) gzip: 0B(0.00%)
@mui/x-date-pickers-pro/LocalizationProviderparsed: 0B(0.00%) gzip: 0B(0.00%)
@mui/x-date-pickers-pro/MobileDateRangePickerparsed: 0B(0.00%) gzip: 0B(0.00%)
@mui/x-date-pickers-pro/MobileDateTimeRangePickerparsed: 0B(0.00%) gzip: 0B(0.00%)
@mui/x-date-pickers-pro/MobileTimeRangePickerparsed: 0B(0.00%) gzip: 0B(0.00%)
@mui/x-date-pickers-pro/MultiInputDateRangeFieldparsed: 0B(0.00%) gzip: 0B(0.00%)
@mui/x-date-pickers-pro/MultiInputDateTimeRangeFieldparsed: 0B(0.00%) gzip: 0B(0.00%)
@mui/x-date-pickers-pro/MultiInputTimeRangeFieldparsed: 0B(0.00%) gzip: 0B(0.00%)
@mui/x-date-pickers-pro/PickersRangeCalendarHeaderparsed: 0B(0.00%) gzip: 0B(0.00%)
@mui/x-date-pickers-pro/SingleInputDateRangeFieldparsed: 0B(0.00%) gzip: 0B(0.00%)
@mui/x-date-pickers-pro/SingleInputDateTimeRangeFieldparsed: 0B(0.00%) gzip: 0B(0.00%)
@mui/x-date-pickers-pro/SingleInputTimeRangeFieldparsed: 0B(0.00%) gzip: 0B(0.00%)
@mui/x-date-pickers-pro/StaticDateRangePickerparsed: 0B(0.00%) gzip: 0B(0.00%)
@mui/x-date-pickers-pro/TimeRangePickerparsed: 0B(0.00%) gzip: 0B(0.00%)
@mui/x-date-pickers/AdapterDateFnsparsed: 0B(0.00%) gzip: 0B(0.00%)
@mui/x-date-pickers/AdapterDateFnsBaseparsed: 0B(0.00%) gzip: 0B(0.00%)
@mui/x-date-pickers/AdapterDateFnsJalaliparsed: 0B(0.00%) gzip: 0B(0.00%)
@mui/x-date-pickers/AdapterDayjsparsed: 0B(0.00%) gzip: 0B(0.00%)
@mui/x-date-pickers/AdapterLuxonparsed: 0B(0.00%) gzip: 0B(0.00%)
@mui/x-date-pickers/AdapterMomentparsed: 0B(0.00%) gzip: 0B(0.00%)
@mui/x-date-pickers/AdapterMomentHijriparsed: 0B(0.00%) gzip: 0B(0.00%)
@mui/x-date-pickers/AdapterMomentJalaaliparsed: 0B(0.00%) gzip: 0B(0.00%)
@mui/x-date-pickers/DateCalendarparsed: 0B(0.00%) gzip: 0B(0.00%)
@mui/x-date-pickers/DateFieldparsed: 0B(0.00%) gzip: 0B(0.00%)
@mui/x-date-pickers/DatePickerparsed: 0B(0.00%) gzip: 0B(0.00%)
@mui/x-date-pickers/DateTimeFieldparsed: 0B(0.00%) gzip: 0B(0.00%)
@mui/x-date-pickers/DateTimePickerparsed: 0B(0.00%) gzip: 0B(0.00%)
@mui/x-date-pickers/DayCalendarSkeletonparsed: 0B(0.00%) gzip: 0B(0.00%)
@mui/x-date-pickers/DesktopDatePickerparsed: 0B(0.00%) gzip: 0B(0.00%)
@mui/x-date-pickers/DesktopDateTimePickerparsed: 0B(0.00%) gzip: 0B(0.00%)
@mui/x-date-pickers/DesktopTimePickerparsed: 0B(0.00%) gzip: 0B(0.00%)
@mui/x-date-pickers/DigitalClockparsed: 0B(0.00%) gzip: 0B(0.00%)
@mui/x-date-pickers/LocalizationProviderparsed: 0B(0.00%) gzip: 0B(0.00%)
@mui/x-date-pickers/MobileDatePickerparsed: 0B(0.00%) gzip: 0B(0.00%)
@mui/x-date-pickers/MobileDateTimePickerparsed: 0B(0.00%) gzip: 0B(0.00%)
@mui/x-date-pickers/MobileTimePickerparsed: 0B(0.00%) gzip: 0B(0.00%)
@mui/x-date-pickers/MonthCalendarparsed: 0B(0.00%) gzip: 0B(0.00%)
@mui/x-date-pickers/MultiSectionDigitalClockparsed: 0B(0.00%) gzip: 0B(0.00%)
@mui/x-date-pickers/PickerDay2parsed: 0B(0.00%) gzip: 0B(0.00%)
@mui/x-date-pickers/PickersActionBarparsed: 0B(0.00%) gzip: 0B(0.00%)
@mui/x-date-pickers/PickersCalendarHeaderparsed: 0B(0.00%) gzip: 0B(0.00%)

Details of bundle changes

Generated by 🚫 dangerJS against 03d59e9

@LukasTy LukasTy marked this pull request as ready for review July 7, 2025 13:03
@LukasTy LukasTy requested a review from a team July 7, 2025 13:03
Comment on lines +109 to +115
const prettierConfigPath = await prettier.resolveConfigFile();
if (!prettierConfigPath) {
throw new Error(
`Could not resolve prettier config file.
Please provide a valid prettier config path or ensure that a prettier config file exists in the project root.`,
);
}
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
const prettierConfigPath = await prettier.resolveConfigFile();
if (!prettierConfigPath) {
throw new Error(
`Could not resolve prettier config file.
Please provide a valid prettier config path or ensure that a prettier config file exists in the project root.`,
);
}
const prettierConfigPath = await resolvePrettierConfigPath()

Copy link
Member Author

Choose a reason for hiding this comment

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

Tried it: 03d59e9
I wanted to limit the scope of changes.
For that to work we need to unify file extensions or move to tsx for execution, but it seems that the latest "trend" is towards going for mjs, so I didn't want to do it. 🤔

Copy link
Member

Choose a reason for hiding this comment

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

Make sense 👍

@LukasTy LukasTy changed the title [code-infra] Reactor prettier config resolving [code-infra] Refactor prettier config resolving Jul 7, 2025
@LukasTy LukasTy merged commit 37a677b into mui:master Jul 7, 2025
22 checks passed
@LukasTy LukasTy deleted the refactor-prettier-file-resolving branch July 7, 2025 15:11
let resolvedPrettierConfigPath = prettierConfigPath;
if (!resolvedPrettierConfigPath) {
// If no prettier config path is provided, use the default one
resolvedPrettierConfigPath = await resolvePrettierConfigPath();
Copy link
Member

Choose a reason for hiding this comment

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

shouldn't we pass filename as an argument here? the goal is to obtain the config that applies to the file we're writing to. I wonder why we'd need the prettierConfigPath parameter at all.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
scope: code-infra Changes related to the core-infra product. type: enhancement It’s an improvement, but we can’t make up our mind whether it's a bug fix or a new feature.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants