@mui/x-codemod 8.5.2 → 8.6.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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mui/x-codemod",
3
- "version": "8.5.2",
3
+ "version": "8.6.0",
4
4
  "author": "MUI Team",
5
5
  "description": "Codemod scripts for MUI X.",
6
6
  "bin": "./codemod.js",
@@ -27,12 +27,12 @@
27
27
  "@babel/core": "^7.27.4",
28
28
  "@babel/runtime": "^7.27.6",
29
29
  "@babel/traverse": "^7.27.4",
30
- "jscodeshift": "17.1.2",
30
+ "jscodeshift": "17.3.0",
31
31
  "yargs": "^18.0.0",
32
- "@mui/x-internals": "8.5.2"
32
+ "@mui/x-internals": "8.6.0"
33
33
  },
34
34
  "devDependencies": {
35
- "@types/jscodeshift": "^0.12.0",
35
+ "@types/jscodeshift": "^17.3.0",
36
36
  "dayjs": "^1.11.13",
37
37
  "moment-timezone": "^0.6.0",
38
38
  "rimraf": "^6.0.1"
@@ -18,7 +18,7 @@ function transformer(file, api, options) {
18
18
  root.find(j.ImportDeclaration).forEach(path => {
19
19
  if (dataGridSources.has(path.node.source.value)) {
20
20
  path.node.specifiers?.forEach(specifier => {
21
- if (specifier.imported && dataGridComponents.has(specifier.imported.name)) {
21
+ if (specifier.type === 'ImportSpecifier' && dataGridComponents.has(specifier.imported.name)) {
22
22
  const localName = specifier.local?.name;
23
23
  if (localName) {
24
24
  importedDataGrids.add(localName);
@@ -2,7 +2,6 @@
2
2
 
3
3
  var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
4
4
  var _path = _interopRequireDefault(require("path"));
5
- var _chai = require("chai");
6
5
  var _jscodeshift = _interopRequireDefault(require("jscodeshift"));
7
6
  var _ = _interopRequireDefault(require("."));
8
7
  var _readFile = _interopRequireDefault(require("../../../util/readFile"));
@@ -18,7 +17,7 @@ describe('v8.0.0/data-grid', () => {
18
17
  jscodeshift: _jscodeshift.default
19
18
  });
20
19
  const expected = read('./expected.spec.js');
21
- (0, _chai.expect)(actual).to.equal(expected, 'The transformed version should be correct');
20
+ expect(actual).to.equal(expected, 'The transformed version should be correct');
22
21
  });
23
22
  it('should be idempotent', () => {
24
23
  const actual = (0, _.default)({
@@ -27,7 +26,7 @@ describe('v8.0.0/data-grid', () => {
27
26
  jscodeshift: _jscodeshift.default
28
27
  });
29
28
  const expected = read('./expected.spec.js');
30
- (0, _chai.expect)(actual).to.equal(expected, 'The transformed version should be correct');
29
+ expect(actual).to.equal(expected, 'The transformed version should be correct');
31
30
  });
32
31
  });
33
32
  });