@mui/x-codemod 8.0.0-beta.2 → 8.0.0

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/README.md CHANGED
@@ -13,7 +13,7 @@ This repository contains a collection of codemod scripts based for use with
13
13
  <!-- #default-branch-switch -->
14
14
 
15
15
  ```bash
16
- npx @mui/x-codemod@next <codemod> <paths...>
16
+ npx @mui/x-codemod@latest <codemod> <paths...>
17
17
 
18
18
  Applies a `@mui/x-codemod` to the specified paths
19
19
 
@@ -29,8 +29,8 @@ Options:
29
29
  --jscodeshift Pass options directly to jscodeshift [array]
30
30
 
31
31
  Examples:
32
- npx @mui/x-codemod@next v8.0.0/preset-safe src
33
- npx @mui/x-codemod@next v6.0.0/component-rename-prop src --
32
+ npx @mui/x-codemod@latest v8.0.0/preset-safe src
33
+ npx @mui/x-codemod@latest v6.0.0/component-rename-prop src --
34
34
  --component=DataGrid --from=prop --to=newProp
35
35
  ```
36
36
 
@@ -63,13 +63,13 @@ npx @mui/x-codemod@next <transform> <path> --jscodeshift="--printOptions='{\"quo
63
63
 
64
64
  A combination of all important transformers for migrating v7 to v8.
65
65
  ⚠️ This codemod should be run only once.
66
- It runs codemods for all MUI X packages (Data Grid, Date and Time Pickers, Tree View, and Charts).
66
+ It runs codemods for all MUI X packages (Data Grid, Date and Time Pickers, Tree View, and Charts).
67
67
  To run codemods for a specific package, refer to the respective section.
68
68
 
69
69
  <!-- #default-branch-switch -->
70
70
 
71
71
  ```bash
72
- npx @mui/x-codemod@next v8.0.0/preset-safe <path|folder>
72
+ npx @mui/x-codemod@latest v8.0.0/preset-safe <path|folder>
73
73
  ```
74
74
 
75
75
  The corresponding sub-sections are listed below
@@ -88,7 +88,7 @@ The `preset-safe` codemods for Tree View.
88
88
  <!-- #default-branch-switch -->
89
89
 
90
90
  ```bash
91
- npx @mui/x-codemod@next v8.0.0/tree-view/preset-safe <path|folder>
91
+ npx @mui/x-codemod@latest v8.0.0/tree-view/preset-safe <path|folder>
92
92
  ```
93
93
 
94
94
  The list includes these transformers
@@ -137,7 +137,7 @@ The `preset-safe` codemods for Charts.
137
137
  <!-- #default-branch-switch -->
138
138
 
139
139
  ```bash
140
- npx @mui/x-codemod@next v8.0.0/charts/preset-safe <path|folder>
140
+ npx @mui/x-codemod@latest v8.0.0/charts/preset-safe <path|folder>
141
141
  ```
142
142
 
143
143
  The list includes these transformers
@@ -318,7 +318,7 @@ The `preset-safe` codemods for Data Grid.
318
318
  <!-- #default-branch-switch -->
319
319
 
320
320
  ```bash
321
- npx @mui/x-codemod@next v8.0.0/data-grid/preset-safe <path|folder>
321
+ npx @mui/x-codemod@latest v8.0.0/data-grid/preset-safe <path|folder>
322
322
  ```
323
323
 
324
324
  The list includes these transformers
@@ -346,7 +346,7 @@ Remove feature flags for stabilized `experimentalFeatures`.
346
346
  <!-- #default-branch-switch -->
347
347
 
348
348
  ```bash
349
- npx @mui/x-codemod@next v8.0.0/data-grid/remove-stabilized-experimentalFeatures <path>
349
+ npx @mui/x-codemod@latest v8.0.0/data-grid/remove-stabilized-experimentalFeatures <path>
350
350
  ```
351
351
 
352
352
  #### `remove-props`
@@ -370,7 +370,7 @@ The list includes these props:
370
370
  <!-- #default-branch-switch -->
371
371
 
372
372
  ```bash
373
- npx @mui/x-codemod@next v8.0.0/data-grid/remove-props <path>
373
+ npx @mui/x-codemod@latest v8.0.0/data-grid/remove-props <path>
374
374
  ```
375
375
 
376
376
  #### `rename-props`
@@ -385,6 +385,8 @@ The list includes these props:
385
385
  - `unstable_lazyLoading` to `lazyLoading`
386
386
  - `unstable_lazyLoadingRequestThrottleMs` to `lazyLoadingRequestThrottleMs`
387
387
  - `unstable_onDataSourceError` to `onDataSourceError`
388
+ - `unstable_listView` to `listView`
389
+ - `unstable_listColumn` to `listViewColumn`
388
390
 
389
391
  ```diff
390
392
  <DataGrid
@@ -394,19 +396,23 @@ The list includes these props:
394
396
  - unstable_lazyLoading
395
397
  - unstable_lazyLoadingRequestThrottleMs={100}
396
398
  - unstable_onDataSourceError={() => {}}
399
+ - unstable_listView
400
+ - unstable_listColumn={{}}
397
401
  + rowSpanning
398
402
  + dataSource={dataSource}
399
403
  + dataSourceCache={dataSourceCache}
400
404
  + lazyLoading
401
405
  + lazyLoadingRequestThrottleMs={100}
402
406
  + onDataSourceError={() => {}}
407
+ + listView
408
+ + listViewColumn={{}}
403
409
  />
404
410
  ```
405
411
 
406
412
  <!-- #default-branch-switch -->
407
413
 
408
414
  ```bash
409
- npx @mui/x-codemod@next v8.0.0/data-grid/rename-props <path>
415
+ npx @mui/x-codemod@latest v8.0.0/data-grid/rename-props <path>
410
416
  ```
411
417
 
412
418
  #### `rename-imports`
@@ -424,7 +430,7 @@ This codemod renames the imports of the Data Grid components. The list includes
424
430
  <!-- #default-branch-switch -->
425
431
 
426
432
  ```bash
427
- npx @mui/x-codemod@next v8.0.0/data-grid/rename-imports <path>
433
+ npx @mui/x-codemod@latest v8.0.0/data-grid/rename-imports <path>
428
434
  ```
429
435
 
430
436
  #### `reform-row-selection-model`
@@ -447,7 +453,7 @@ Reforms the controlled `rowSelectionModel` prop value to the new one.
447
453
  <!-- #default-branch-switch -->
448
454
 
449
455
  ```bash
450
- npx @mui/x-codemod@next v8.0.0/data-grid/reform-row-selection-model <path>
456
+ npx @mui/x-codemod@latest v8.0.0/data-grid/reform-row-selection-model <path>
451
457
  ```
452
458
 
453
459
  #### `rename-package`
@@ -462,7 +468,7 @@ Reorganizes the imports moved from `@mui/x-data-grid-pro` and `@mui/x-data-grid-
462
468
  <!-- #default-branch-switch -->
463
469
 
464
470
  ```bash
465
- npx @mui/x-codemod@next v8.0.0/data-grid/rename-package <path>
471
+ npx @mui/x-codemod@latest v8.0.0/data-grid/rename-package <path>
466
472
  ```
467
473
 
468
474
  #### `add-showToolbar-prop`
@@ -481,7 +487,7 @@ Adds the `showToolbar` prop to the Data Grid components that are using `slots.to
481
487
  <!-- #default-branch-switch -->
482
488
 
483
489
  ```bash
484
- npx @mui/x-codemod@next v8.0.0/data-grid/add-showToolbar-prop <path>
490
+ npx @mui/x-codemod@latest v8.0.0/data-grid/add-showToolbar-prop <path>
485
491
  ```
486
492
 
487
493
  ### Pickers codemods
@@ -493,7 +499,7 @@ The `preset-safe` codemods for Pickers.
493
499
  <!-- #default-branch-switch -->
494
500
 
495
501
  ```bash
496
- npx @mui/x-codemod@next v8.0.0/pickers/preset-safe <path|folder>
502
+ npx @mui/x-codemod@latest v8.0.0/pickers/preset-safe <path|folder>
497
503
  ```
498
504
 
499
505
  The list includes these transformers
@@ -528,7 +534,7 @@ The list includes these transformers
528
534
  <!-- #default-branch-switch -->
529
535
 
530
536
  ```bash
531
- npx @mui/x-codemod@next v8.0.0/pickers/rename-adapter-date-fns-imports <path>
537
+ npx @mui/x-codemod@latest v8.0.0/pickers/rename-adapter-date-fns-imports <path>
532
538
  ```
533
539
 
534
540
  #### `rename-type-imports`
@@ -562,7 +568,7 @@ Renames:
562
568
  <!-- #default-branch-switch -->
563
569
 
564
570
  ```bash
565
- npx @mui/x-codemod@next v8.0.0/pickers/rename-type-imports <path>
571
+ npx @mui/x-codemod@latest v8.0.0/pickers/rename-type-imports <path>
566
572
  ```
567
573
 
568
574
  ## v7.0.0
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mui/x-codemod",
3
- "version": "8.0.0-beta.2",
3
+ "version": "8.0.0",
4
4
  "bin": "./codemod.js",
5
5
  "private": false,
6
6
  "author": "MUI Team",
@@ -26,16 +26,16 @@
26
26
  },
27
27
  "dependencies": {
28
28
  "@babel/core": "^7.26.10",
29
- "@babel/runtime": "^7.26.10",
30
- "@babel/traverse": "^7.26.10",
29
+ "@babel/runtime": "^7.27.0",
30
+ "@babel/traverse": "^7.27.0",
31
31
  "jscodeshift": "17.1.2",
32
32
  "yargs": "^17.7.2",
33
- "@mui/x-internals": "8.0.0-beta.2"
33
+ "@mui/x-internals": "8.0.0"
34
34
  },
35
35
  "devDependencies": {
36
36
  "@types/jscodeshift": "^0.12.0",
37
37
  "dayjs": "^1.11.13",
38
- "moment-timezone": "^0.5.47",
38
+ "moment-timezone": "^0.5.48",
39
39
  "rimraf": "^6.0.1"
40
40
  },
41
41
  "sideEffects": false,
@@ -13,7 +13,9 @@ const props = {
13
13
  unstable_dataSourceCache: 'dataSourceCache',
14
14
  unstable_lazyLoading: 'lazyLoading',
15
15
  unstable_lazyLoadingRequestThrottleMs: 'lazyLoadingRequestThrottleMs',
16
- unstable_onDataSourceError: 'onDataSourceError'
16
+ unstable_onDataSourceError: 'onDataSourceError',
17
+ unstable_listView: 'listView',
18
+ unstable_listColumn: 'listViewColumn'
17
19
  };
18
20
  function transformer(file, api, options) {
19
21
  const j = api.jscodeshift;