@mui/x-codemod 9.0.0-alpha.1 → 9.0.0-alpha.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,123 @@
1
1
  # Changelog
2
2
 
3
+ ## 9.0.0-alpha.2
4
+
5
+ _Mar 5, 2026_
6
+
7
+ We'd like to extend a big thank you to the 12 contributors who made this release possible. Here are some highlights ✨:
8
+
9
+ - ✅ Stabilize Sankey chart
10
+ - 🐞 Bugfixes and internal improvements
11
+
12
+ The following team members contributed to this release:
13
+ @aemartos, @alelthomas, @alexfauquette, @arminmeh, @bernardobelchior, @brijeshb42, @Janpot, @JCQuintas, @mapache-salvaje, @michelengelen, @mj12albert, @sai6855, @siriwatknp
14
+
15
+ ### Data Grid
16
+
17
+ #### `@mui/x-data-grid@9.0.0-alpha.2`
18
+
19
+ - [dataGrid] Fix keyboard nav with single-row checkbox selection (#21149) @mj12albert
20
+ - [DataGrid] Add `checkboxColDef` prop to customize the selection column (#21331) @michelengelen
21
+ - [DataGrid] Format pagination numbers by default (#21117) @siriwatknp
22
+ - [DataGrid] Prevent unnecessary row selection checkbox rerendering (#21570) @arminmeh
23
+ - [DataGrid] Make GridScrollArea overrides resolver dynamic (#21532) @sai6855
24
+
25
+ #### `@mui/x-data-grid-pro@9.0.0-alpha.2` [![pro](https://mui.com/r/x-pro-svg)](https://mui.com/r/x-pro-svg-link 'Pro plan')
26
+
27
+ Same changes as in `@mui/x-data-grid@9.0.0-alpha.2`, plus:
28
+
29
+ - [DataGridPro] Use `getRowId` prop to calculate the tree data row update (#21540) @arminmeh
30
+
31
+ #### `@mui/x-data-grid-premium@9.0.0-alpha.2` [![premium](https://mui.com/r/x-premium-svg)](https://mui.com/r/x-premium-svg-link 'Premium plan')
32
+
33
+ Same changes as in `@mui/x-data-grid-pro@9.0.0-alpha.2`.
34
+
35
+ ### Date and Time Pickers
36
+
37
+ #### `@mui/x-date-pickers@9.0.0-alpha.2`
38
+
39
+ - [pickers] Add `keepOpenDuringFieldFocus` prop (#20782) @michelengelen
40
+
41
+ #### `@mui/x-date-pickers-pro@9.0.0-alpha.2` [![pro](https://mui.com/r/x-pro-svg)](https://mui.com/r/x-pro-svg-link 'Pro plan')
42
+
43
+ Same changes as in `@mui/x-date-pickers@9.0.0-alpha.2`.
44
+
45
+ ### Charts
46
+
47
+ #### `@mui/x-charts@9.0.0-alpha.2`
48
+
49
+ - [charts] Add `ChartsLayerContainer` component (#21264) @bernardobelchior
50
+ - [charts] Add codemod for `ChartsContainer` rename (#21504) @JCQuintas
51
+ - [charts] Add codemod for `ChartsDataProvider` rename (#21552) @JCQuintas
52
+ - [charts] Add codemod for `ChartsZoomSlider` rename (#21597) @JCQuintas
53
+ - [charts] Base the highlight items on the item identifiers (#21161) @alexfauquette
54
+ - [charts] Deprecate `ChartDataProvider` in favour of `ChartsDataProvider` (#21191) @JCQuintas
55
+ - [charts] Deprecate `highlighted` and `faded` classes (#21476) @alexfauquette
56
+ - [charts] Migrate to latest v8 warning (#21518) @JCQuintas
57
+ - [charts] Rename `ChartZoomSlider` to `ChartsZoomSlider` (#21553) @JCQuintas
58
+ - [charts] Rename `WebGl` to `WebGL` (#21524) @JCQuintas
59
+ - [charts] Rename `useSvgRef()` by `useChartsLayerContainerRef()` (#21494) @alexfauquette
60
+ - [charts] Restore focus on last focused item (#21522) @alexfauquette
61
+ - [charts] Warn users when controlled tooltip state does not match the trigger (#21520) @Copilot
62
+ - [charts] Fix controlled tooltip position (#21603) @bernardobelchior
63
+
64
+ #### `@mui/x-charts-pro@9.0.0-alpha.2` [![pro](https://mui.com/r/x-pro-svg)](https://mui.com/r/x-pro-svg-link 'Pro plan')
65
+
66
+ Same changes as in `@mui/x-charts@9.0.0-alpha.2`, plus:
67
+
68
+ - [charts-pro] Center the watermark (#21550) @alexfauquette
69
+ - [charts-pro] Stabilize `SankeyChart` API (#21133) @Copilot
70
+
71
+ #### `@mui/x-charts-premium@9.0.0-alpha.2` [![premium](https://mui.com/r/x-premium-svg)](https://mui.com/r/x-premium-svg-link 'Premium plan')
72
+
73
+ Same changes as in `@mui/x-charts-pro@9.0.0-alpha.2`.
74
+
75
+ ### Tree View
76
+
77
+ #### `@mui/x-tree-view@9.0.0-alpha.2`
78
+
79
+ Internal changes.
80
+
81
+ #### `@mui/x-tree-view-pro@9.0.0-alpha.2` [![pro](https://mui.com/r/x-pro-svg)](https://mui.com/r/x-pro-svg-link 'Pro plan')
82
+
83
+ Same changes as in `@mui/x-tree-view@9.0.0-alpha.2`.
84
+
85
+ ### Codemod
86
+
87
+ #### `@mui/x-codemod@9.0.0-alpha.2`
88
+
89
+ Internal changes.
90
+
91
+ ### Docs
92
+
93
+ - [docs] Add backticks and parentheses to all functions and hooks (DX-173) (#21496) @mapache-salvaje
94
+ - [docs] Remove mentions of `mySvgRef` (#21559) @bernardobelchior
95
+ - [docs] Update Roadmap section in the docs (#20892) @alelthomas
96
+ - [docs] Add tutorial and example app for aggregation with row grouping (DX-162) (#21102) @mapache-salvaje
97
+ - [docs] Fix missing codemod docs (#21604) @JCQuintas
98
+
99
+ ### Core
100
+
101
+ - [code-infra] Add eslint rule to prevent `Math.random` in docs (#21505) @JCQuintas
102
+ - [code-infra] Avoid static props for pageContent (#21038) @Janpot
103
+ - [code-infra] Isolate `date-pickers-pro` in the browser tests (#21383) @Janpot
104
+ - [code-infra] Remove `--coverage` (#21410) @Janpot
105
+ - [code-infra] Remove unneeded `skipIf`s (#21569) @JCQuintas
106
+ - [code-infra] Remove vale as a workspace dependency (#21489) @brijeshb42
107
+ - [code-infra] Remove x-charts-vendor from nextjs processing (#21534) @brijeshb42
108
+ - [code-infra] Set BASE_BRANCH env var in CircleCI config (#21548) @brijeshb42
109
+ - [code-infra] Setup error code extraction (#21469) @brijeshb42
110
+ - [code-infra] Setup flat build for packages (#21029) @brijeshb42
111
+ - [code-infra] Upgrade test_unit to large resource class (#21558) @Janpot
112
+ - [code-infra] Removed getTeamMembers function and usage from release script (#21605) @michelengelen
113
+
114
+ ### Miscellaneous
115
+
116
+ - [x-license] Add Q1-2026 plan version with quantity and appType support (#21574) @aemartos
117
+ - [x-license] Add v3 key format support, centralize test keys, and trim public API (#21485) @aemartos
118
+ - [x-telemetry] telemetry opt-out by default, remove conf dependency (#21470) @aemartos
119
+ - [x-telemetry] test: mock context module directly in sender tests (#21546) @aemartos
120
+
3
121
  ## 9.0.0-alpha.1
4
122
 
5
123
  _Feb 26, 2026_
package/README.md CHANGED
@@ -95,9 +95,13 @@ npx @mui/x-codemod@next v9.0.0/charts/preset-safe <path|folder>
95
95
  The list includes these transformers
96
96
 
97
97
  - [`replace-heatmap-hide-legend-false`](#replace-heatmap-hide-legend-false)
98
- - [`rename-chart-api-import`](#rename-chart-api-import)
99
- - [`rename-id-to-series-id`](#rename-id-to-series-id)
100
98
  - [`replace-show-mark-default`](#replace-show-mark-default)
99
+ - [`rename-id-to-series-id`](#rename-id-to-series-id)
100
+ - [`rename-chart-api-import`](#rename-chart-api-import)
101
+ - [`rename-sankey-chart`](#rename-sankey-chart)
102
+ - [`rename-chart-container`](#rename-chart-container)
103
+ - [`rename-chart-data-provider`](#rename-chart-data-provider)
104
+ - [`rename-chart-zoom-slider`](#rename-chart-zoom-slider)
101
105
 
102
106
  ### `replace-heatmap-hide-legend-false`
103
107
 
@@ -177,6 +181,54 @@ Add `showMark: true` to line series when not defined to keep the same default be
177
181
  + <ChartDataProvider series={[{ type: 'line', data: [/* ... */] showMark: true }]} />
178
182
  ```
179
183
 
184
+ #### `rename-chart-zoom-slider`
185
+
186
+ Renames the `ChartZoomSlider` component and related exports to `ChartsZoomSlider` (with an S) to align with other components.
187
+
188
+ ```diff
189
+ -import { ChartZoomSlider } from '@mui/x-charts-pro';
190
+ +import { ChartsZoomSlider } from '@mui/x-charts-pro';
191
+
192
+ -import { ChartZoomSlider } from '@mui/x-charts-pro/ChartZoomSlider';
193
+ +import { ChartsZoomSlider } from '@mui/x-charts-pro/ChartsZoomSlider';
194
+ ```
195
+
196
+ #### `rename-sankey-chart`
197
+
198
+ Stabilizes the `Unstable_SankeyChart` export by renaming it to `SankeyChart`.
199
+
200
+ ```diff
201
+ -import { Unstable_SankeyChart } from '@mui/x-charts-pro';
202
+ +import { SankeyChart } from '@mui/x-charts-pro';
203
+
204
+ -import { Unstable_SankeyChart } from '@mui/x-charts-pro/SankeyChart';
205
+ +import { SankeyChart } from '@mui/x-charts-pro/SankeyChart';
206
+ ```
207
+
208
+ #### `rename-chart-container`
209
+
210
+ Renames the `ChartContainer` component and related exports to `ChartsContainer` (with an S) to align with other components.
211
+
212
+ ```diff
213
+ -import { ChartContainer } from '@mui/x-charts/ChartContainer';
214
+ +import { ChartsContainer } from '@mui/x-charts/ChartsContainer';
215
+
216
+ -import { ChartContainerPro } from '@mui/x-charts-pro/ChartContainerPro';
217
+ +import { ChartsContainerPro } from '@mui/x-charts-pro/ChartsContainerPro';
218
+ ```
219
+
220
+ #### `rename-chart-data-provider`
221
+
222
+ Renames the `ChartDataProvider` component and related exports to `ChartsDataProvider` (with an S) to align with other components.
223
+
224
+ ```diff
225
+ -import { ChartDataProvider } from '@mui/x-charts/ChartDataProvider';
226
+ +import { ChartsDataProvider } from '@mui/x-charts/ChartsDataProvider';
227
+
228
+ -import { ChartDataProviderPro } from '@mui/x-charts-pro/ChartDataProviderPro';
229
+ +import { ChartsDataProviderPro } from '@mui/x-charts-pro/ChartsDataProviderPro';
230
+ ```
231
+
180
232
  ## v8.0.0
181
233
 
182
234
  ### 🚀 `preset-safe` for v8.0.0
package/codemod.js CHANGED
@@ -20,7 +20,7 @@ async function runTransform(transform, files, flags, codemodFlags) {
20
20
  transformerPath = transformerBuildPath;
21
21
  } catch (buildPathError) {
22
22
  if (buildPathError.code === 'ENOENT') {
23
- throw new Error(`Transform '${transform}' not found. Check out ${_path.default.resolve(__dirname, './README.md for a list of available codemods.')}`);
23
+ throw /* FIXME (minify-errors-in-prod): Unminified error message in production build! */new Error(`Transform '${transform}' not found. Check out ${_path.default.resolve(__dirname, './README.md for a list of available codemods.')}`);
24
24
  }
25
25
  throw buildPathError;
26
26
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mui/x-codemod",
3
- "version": "9.0.0-alpha.1",
3
+ "version": "9.0.0-alpha.2",
4
4
  "author": "MUI Team",
5
5
  "description": "Codemod scripts for MUI X.",
6
6
  "keywords": [
@@ -28,7 +28,7 @@
28
28
  "@babel/traverse": "^7.29.0",
29
29
  "jscodeshift": "17.3.0",
30
30
  "yargs": "^18.0.0",
31
- "@mui/x-internals": "9.0.0-alpha.0"
31
+ "@mui/x-internals": "9.0.0-alpha.2"
32
32
  },
33
33
  "sideEffects": false,
34
34
  "publishConfig": {
@@ -8,11 +8,15 @@ exports.default = transformer;
8
8
  exports.testConfig = void 0;
9
9
  var renameIdToSeriesId = _interopRequireWildcard(require("../rename-id-to-series-id"));
10
10
  var renameChartApiImport = _interopRequireWildcard(require("../rename-chart-api-import"));
11
+ var renameChartContainer = _interopRequireWildcard(require("../rename-chart-container"));
12
+ var renameChartDataProvider = _interopRequireWildcard(require("../rename-chart-data-provider"));
13
+ var renameChartZoomSlider = _interopRequireWildcard(require("../rename-chart-zoom-slider"));
11
14
  var replaceHeatmapHideLegend = _interopRequireWildcard(require("../replace-heatmap-hide-legend-false"));
15
+ var renameSankeyChart = _interopRequireWildcard(require("../rename-sankey-chart"));
12
16
  var replaceShowMarkDefault = _interopRequireWildcard(require("../replace-show-mark-default"));
13
17
  const allModules = [
14
18
  // Add other transforms here as they are created
15
- replaceHeatmapHideLegend, replaceShowMarkDefault, renameIdToSeriesId, renameChartApiImport];
19
+ replaceHeatmapHideLegend, replaceShowMarkDefault, renameIdToSeriesId, renameChartApiImport, renameSankeyChart, renameChartContainer, renameChartDataProvider, renameChartZoomSlider];
16
20
  function transformer(file, api, options) {
17
21
  allModules.forEach(module => {
18
22
  file.source = module.default(file, api, options);
@@ -27,6 +27,13 @@ function transformer(file, api, options) {
27
27
  ChartApi: 'ChartApi'
28
28
  },
29
29
  splitUnmatchedSpecifiers: true
30
+ }, {
31
+ oldEndpoint: 'ChartsContainer',
32
+ newEndpoint: 'context',
33
+ importsMapping: {
34
+ ChartApi: 'ChartApi'
35
+ },
36
+ splitUnmatchedSpecifiers: true
30
37
  }]
31
38
  });
32
39
  return root.toSource(printOptions);
@@ -0,0 +1,78 @@
1
+ "use strict";
2
+
3
+ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
4
+ Object.defineProperty(exports, "__esModule", {
5
+ value: true
6
+ });
7
+ exports.default = transformer;
8
+ exports.testConfig = void 0;
9
+ var _path = _interopRequireDefault(require("path"));
10
+ var _readFile = _interopRequireDefault(require("../../../util/readFile"));
11
+ var _renameImports = require("../../../util/renameImports");
12
+ function transformer(file, api, options) {
13
+ const j = api.jscodeshift;
14
+ const root = j(file.source);
15
+ const printOptions = options.printOptions || {
16
+ quote: 'single',
17
+ trailingComma: true
18
+ };
19
+ (0, _renameImports.renameImports)({
20
+ j,
21
+ root,
22
+ packageNames: ['@mui/x-charts', '@mui/x-charts-pro', '@mui/x-charts-premium'],
23
+ imports: [
24
+ // ChartContainer → ChartsContainer
25
+ {
26
+ oldEndpoint: 'ChartContainer',
27
+ newEndpoint: 'ChartsContainer',
28
+ importsMapping: {
29
+ ChartContainer: 'ChartsContainer',
30
+ ChartContainerProps: 'ChartsContainerProps',
31
+ ChartContainerSlots: 'ChartsContainerSlots',
32
+ ChartContainerSlotProps: 'ChartsContainerSlotProps'
33
+ }
34
+ },
35
+ // ChartContainerPro → ChartsContainerPro
36
+ {
37
+ oldEndpoint: 'ChartContainerPro',
38
+ newEndpoint: 'ChartsContainerPro',
39
+ importsMapping: {
40
+ ChartContainerPro: 'ChartsContainerPro',
41
+ ChartContainerProProps: 'ChartsContainerProProps',
42
+ ChartContainerProSlots: 'ChartsContainerProSlots',
43
+ ChartContainerProSlotProps: 'ChartsContainerProSlotProps'
44
+ }
45
+ },
46
+ // ChartContainerPremium → ChartsContainerPremium
47
+ {
48
+ oldEndpoint: 'ChartContainerPremium',
49
+ newEndpoint: 'ChartsContainerPremium',
50
+ importsMapping: {
51
+ ChartContainerPremium: 'ChartsContainerPremium',
52
+ ChartContainerPremiumProps: 'ChartsContainerPremiumProps',
53
+ ChartContainerPremiumSlots: 'ChartsContainerPremiumSlots',
54
+ ChartContainerPremiumSlotProps: 'ChartsContainerPremiumSlotProps'
55
+ }
56
+ },
57
+ // Hooks from internals
58
+ {
59
+ oldEndpoint: 'internals',
60
+ importsMapping: {
61
+ useChartContainerProps: 'useChartsContainerProps',
62
+ UseChartContainerPropsReturnValue: 'UseChartsContainerPropsReturnValue',
63
+ useChartContainerProProps: 'useChartsContainerProProps',
64
+ UseChartContainerProPropsReturnValue: 'UseChartsContainerProPropsReturnValue'
65
+ }
66
+ }]
67
+ });
68
+ return root.toSource(printOptions);
69
+ }
70
+ const testConfig = () => ({
71
+ name: 'rename-chart-container',
72
+ specFiles: [{
73
+ name: 'imports',
74
+ actual: (0, _readFile.default)(_path.default.join(__dirname, 'actual-imports.spec.tsx')),
75
+ expected: (0, _readFile.default)(_path.default.join(__dirname, 'expected-imports.spec.tsx'))
76
+ }]
77
+ });
78
+ exports.testConfig = testConfig;
@@ -0,0 +1,78 @@
1
+ "use strict";
2
+
3
+ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
4
+ Object.defineProperty(exports, "__esModule", {
5
+ value: true
6
+ });
7
+ exports.default = transformer;
8
+ exports.testConfig = void 0;
9
+ var _path = _interopRequireDefault(require("path"));
10
+ var _readFile = _interopRequireDefault(require("../../../util/readFile"));
11
+ var _renameImports = require("../../../util/renameImports");
12
+ function transformer(file, api, options) {
13
+ const j = api.jscodeshift;
14
+ const root = j(file.source);
15
+ const printOptions = options.printOptions || {
16
+ quote: 'single',
17
+ trailingComma: true
18
+ };
19
+ (0, _renameImports.renameImports)({
20
+ j,
21
+ root,
22
+ packageNames: ['@mui/x-charts', '@mui/x-charts-pro', '@mui/x-charts-premium'],
23
+ imports: [{
24
+ oldEndpoint: 'ChartDataProvider',
25
+ newEndpoint: 'ChartsDataProvider',
26
+ importsMapping: {
27
+ ChartDataProvider: 'ChartsDataProvider',
28
+ ChartDataProviderProps: 'ChartsDataProviderProps',
29
+ ChartDataProviderSlots: 'ChartsDataProviderSlots',
30
+ ChartDataProviderSlotProps: 'ChartsDataProviderSlotProps'
31
+ }
32
+ }]
33
+ });
34
+ (0, _renameImports.renameImports)({
35
+ j,
36
+ root,
37
+ packageNames: ['@mui/x-charts-pro', '@mui/x-charts-premium'],
38
+ imports: [{
39
+ oldEndpoint: 'ChartDataProviderPro',
40
+ newEndpoint: 'ChartsDataProviderPro',
41
+ importsMapping: {
42
+ ChartDataProviderPro: 'ChartsDataProviderPro',
43
+ ChartDataProviderProProps: 'ChartsDataProviderProProps',
44
+ ChartDataProviderProSlots: 'ChartsDataProviderProSlots',
45
+ ChartDataProviderProSlotProps: 'ChartsDataProviderProSlotProps'
46
+ }
47
+ }]
48
+ });
49
+ (0, _renameImports.renameImports)({
50
+ j,
51
+ root,
52
+ packageNames: ['@mui/x-charts-premium'],
53
+ imports: [{
54
+ oldEndpoint: 'ChartDataProviderPremium',
55
+ newEndpoint: 'ChartsDataProviderPremium',
56
+ importsMapping: {
57
+ ChartDataProviderPremium: 'ChartsDataProviderPremium',
58
+ ChartDataProviderPremiumProps: 'ChartsDataProviderPremiumProps',
59
+ ChartDataProviderPremiumSlots: 'ChartsDataProviderPremiumSlots',
60
+ ChartDataProviderPremiumSlotProps: 'ChartsDataProviderPremiumSlotProps'
61
+ }
62
+ }]
63
+ });
64
+ return root.toSource(printOptions);
65
+ }
66
+ const testConfig = () => ({
67
+ name: 'rename-chart-data-provider',
68
+ specFiles: [{
69
+ name: 'nested-imports',
70
+ actual: (0, _readFile.default)(_path.default.join(__dirname, 'actual-nested-imports.spec.tsx')),
71
+ expected: (0, _readFile.default)(_path.default.join(__dirname, 'expected-nested-imports.spec.tsx'))
72
+ }, {
73
+ name: 'root-imports',
74
+ actual: (0, _readFile.default)(_path.default.join(__dirname, 'actual-root-imports.spec.tsx')),
75
+ expected: (0, _readFile.default)(_path.default.join(__dirname, 'expected-root-imports.spec.tsx'))
76
+ }]
77
+ });
78
+ exports.testConfig = testConfig;
@@ -0,0 +1,49 @@
1
+ "use strict";
2
+
3
+ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
4
+ Object.defineProperty(exports, "__esModule", {
5
+ value: true
6
+ });
7
+ exports.default = transformer;
8
+ exports.testConfig = void 0;
9
+ var _path = _interopRequireDefault(require("path"));
10
+ var _readFile = _interopRequireDefault(require("../../../util/readFile"));
11
+ var _renameImports = require("../../../util/renameImports");
12
+ function transformer(file, api, options) {
13
+ const j = api.jscodeshift;
14
+ const root = j(file.source);
15
+ const printOptions = options.printOptions || {
16
+ quote: 'single',
17
+ trailingComma: true
18
+ };
19
+ (0, _renameImports.renameImports)({
20
+ j,
21
+ root,
22
+ packageNames: ['@mui/x-charts-pro', '@mui/x-charts-premium'],
23
+ imports: [
24
+ // ChartZoomSlider → ChartsZoomSlider
25
+ {
26
+ oldEndpoint: 'ChartZoomSlider',
27
+ newEndpoint: 'ChartsZoomSlider',
28
+ importsMapping: {
29
+ ChartZoomSlider: 'ChartsZoomSlider',
30
+ ChartAxisZoomSliderThumbClasses: 'ChartsAxisZoomSliderThumbClasses',
31
+ ChartAxisZoomSliderThumbClassKey: 'ChartsAxisZoomSliderThumbClassKey',
32
+ chartAxisZoomSliderThumbClasses: 'chartsAxisZoomSliderThumbClasses',
33
+ ChartAxisZoomSliderTrackClasses: 'ChartsAxisZoomSliderTrackClasses',
34
+ ChartAxisZoomSliderTrackClassKey: 'ChartsAxisZoomSliderTrackClassKey',
35
+ chartAxisZoomSliderTrackClasses: 'chartsAxisZoomSliderTrackClasses'
36
+ }
37
+ }]
38
+ });
39
+ return root.toSource(printOptions);
40
+ }
41
+ const testConfig = () => ({
42
+ name: 'rename-chart-zoom-slider',
43
+ specFiles: [{
44
+ name: 'imports',
45
+ actual: (0, _readFile.default)(_path.default.join(__dirname, 'actual-imports.spec.tsx')),
46
+ expected: (0, _readFile.default)(_path.default.join(__dirname, 'expected-imports.spec.tsx'))
47
+ }]
48
+ });
49
+ exports.testConfig = testConfig;
@@ -0,0 +1,40 @@
1
+ "use strict";
2
+
3
+ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
4
+ Object.defineProperty(exports, "__esModule", {
5
+ value: true
6
+ });
7
+ exports.default = transformer;
8
+ exports.testConfig = void 0;
9
+ var _path = _interopRequireDefault(require("path"));
10
+ var _readFile = _interopRequireDefault(require("../../../util/readFile"));
11
+ var _renameImports = require("../../../util/renameImports");
12
+ function transformer(file, api, options) {
13
+ const j = api.jscodeshift;
14
+ const root = j(file.source);
15
+ const printOptions = options.printOptions || {
16
+ quote: 'single',
17
+ trailingComma: true
18
+ };
19
+ (0, _renameImports.renameImports)({
20
+ j,
21
+ root,
22
+ packageNames: ['@mui/x-charts-pro', '@mui/x-charts-premium'],
23
+ imports: [{
24
+ oldEndpoint: 'SankeyChart',
25
+ importsMapping: {
26
+ Unstable_SankeyChart: 'SankeyChart'
27
+ }
28
+ }]
29
+ });
30
+ return root.toSource(printOptions);
31
+ }
32
+ const testConfig = () => ({
33
+ name: 'rename-sankey-chart',
34
+ specFiles: [{
35
+ name: 'imports',
36
+ actual: (0, _readFile.default)(_path.default.join(__dirname, 'actual-imports.spec.tsx')),
37
+ expected: (0, _readFile.default)(_path.default.join(__dirname, 'expected-imports.spec.tsx'))
38
+ }]
39
+ });
40
+ exports.testConfig = testConfig;
@@ -13,16 +13,18 @@ const PROVIDER_NAMES = ['ChartDataProvider', 'ChartDataProviderPro', 'ChartDataP
13
13
  // With the new naming to be sure codemod order does not matter
14
14
  'ChartsDataProvider', 'ChartsDataProviderPro', 'ChartsDataProviderPremium',
15
15
  // The component that includes the data provider.
16
- 'ChartsContainer', 'ChartsContainerPro', 'ChartsContainerPremium'];
16
+ 'ChartsContainer', 'ChartsContainerPro', 'ChartsContainerPremium',
17
+ // Old naming to be sure codemod order does not matter
18
+ 'ChartContainer', 'ChartContainerPro', 'ChartContainerPremium'];
17
19
 
18
20
  /**
19
21
  * Codemod for v9.0.0: Updates line series objects to preserve v8 behavior after the `showMark` default changes from true to false.
20
22
  *
21
23
  * If `showMark` is not defined, adds `showMark: true` to preserve v8 behavior.
22
24
  *
23
- * The `showmMark: false` cases are left unchanged to stay idempotent.
25
+ * The `showMark: false` cases are left unchanged to stay idempotent.
24
26
  *
25
- * Ths codemod applies on LineChart components and providers when series type is set to 'line'.
27
+ * This codemod applies on LineChart components and providers when series type is set to 'line'.
26
28
  */
27
29
  function transformer(file, api, options) {
28
30
  const j = api.jscodeshift;