@mui/codemod 7.3.7 → 9.0.0-alpha.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/codemod",
3
- "version": "7.3.7",
3
+ "version": "9.0.0-alpha.0",
4
4
  "author": "MUI Team",
5
5
  "description": "Codemod scripts for Material UI.",
6
6
  "bin": "./codemod.js",
@@ -23,9 +23,9 @@
23
23
  "url": "https://opencollective.com/mui-org"
24
24
  },
25
25
  "dependencies": {
26
- "@babel/core": "^7.28.5",
27
- "@babel/runtime": "^7.28.4",
28
- "@babel/traverse": "^7.28.5",
26
+ "@babel/core": "^7.28.6",
27
+ "@babel/runtime": "^7.28.6",
28
+ "@babel/traverse": "^7.28.6",
29
29
  "jscodeshift": "^17.1.2",
30
30
  "jscodeshift-add-imports": "^1.0.11",
31
31
  "postcss": "^8.5.6",
@@ -7,7 +7,7 @@ Object.defineProperty(exports, "__esModule", {
7
7
  exports.default = transformer;
8
8
  var _jscodeshiftAddImports = _interopRequireDefault(require("jscodeshift-add-imports"));
9
9
  // istanbul ignore next
10
- if (process.env.NODE_ENV === 'test') {
10
+ if (globalThis.MUI_TEST_ENV) {
11
11
  const resolve = require.resolve;
12
12
  require.resolve = source => resolve(source.replace(/^@mui\/material\/modern/, '../../../mui-material/src'));
13
13
  }
@@ -13,7 +13,7 @@ function transformer(fileInfo, api, options) {
13
13
  const importModule = options.importModule || '@mui/material';
14
14
  const targetModule = options.targetModule || '@mui/material';
15
15
  let resolveModule = importModule;
16
- if (process.env.NODE_ENV === 'test') {
16
+ if (globalThis.MUI_TEST_ENV) {
17
17
  resolveModule = resolveModule.replace(/^@mui\/material/, '@mui/material-v5');
18
18
  }
19
19
  const whitelist = (0, _getJSExports.default)(require.resolve(`${resolveModule}/modern`, {