@comet/upgrade 1.54.0 → 1.55.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/lib/v8/mui-codemods.js +10 -0
- package/lib/v8/update-mui-dependencies.js +20 -0
- package/package.json +1 -1
- package/lib/v8/mui-upgrade.js +0 -22
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const execute_command_util_1 = require("../util/execute-command.util");
|
|
4
|
+
async function executeMuiCodemods() {
|
|
5
|
+
await (0, execute_command_util_1.executeCommand)("npx", ["@mui/codemod@latest", "v6.0.0/list-item-button-prop", "admin/src"]);
|
|
6
|
+
await (0, execute_command_util_1.executeCommand)("npx", ["@mui/codemod@latest", "v6.0.0/styled", "admin/src"]);
|
|
7
|
+
await (0, execute_command_util_1.executeCommand)("npx", ["@mui/codemod@latest", "v6.0.0/sx-prop", "admin/src"]);
|
|
8
|
+
await (0, execute_command_util_1.executeCommand)("npx", ["@mui/codemod@latest", "v6.0.0/theme-v6", "admin/src/theme.ts"]);
|
|
9
|
+
}
|
|
10
|
+
exports.default = executeMuiCodemods;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.stage = void 0;
|
|
4
|
+
const fs_1 = require("fs");
|
|
5
|
+
const package_json_util_1 = require("../util/package-json.util");
|
|
6
|
+
exports.stage = "before-install";
|
|
7
|
+
const adminPackageJsonPath = "admin/package.json";
|
|
8
|
+
async function updateMuiDependencies() {
|
|
9
|
+
if (!(0, fs_1.existsSync)(adminPackageJsonPath)) {
|
|
10
|
+
return;
|
|
11
|
+
}
|
|
12
|
+
const packageJson = new package_json_util_1.PackageJson(adminPackageJsonPath);
|
|
13
|
+
packageJson.addDependency("@mui/material", "^6.0.0");
|
|
14
|
+
packageJson.addDependency("@mui/system", "^6.0.0");
|
|
15
|
+
packageJson.addDependency("@mui/utils", "^6.0.0");
|
|
16
|
+
packageJson.addDependency("@mui/icons-material", "^6.0.0");
|
|
17
|
+
packageJson.addDependency("@mui/lab", "^6.0.0-beta.10");
|
|
18
|
+
packageJson.save();
|
|
19
|
+
}
|
|
20
|
+
exports.default = updateMuiDependencies;
|
package/package.json
CHANGED
package/lib/v8/mui-upgrade.js
DELETED
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
const fs_1 = require("fs");
|
|
4
|
-
const execute_command_util_1 = require("../util/execute-command.util");
|
|
5
|
-
const update_dependency_version_util_1 = require("../util/update-dependency-version.util");
|
|
6
|
-
const adminPackageJsonPath = "admin/package.json";
|
|
7
|
-
async function updateMuiVersion() {
|
|
8
|
-
if (!(0, fs_1.existsSync)(adminPackageJsonPath)) {
|
|
9
|
-
return;
|
|
10
|
-
}
|
|
11
|
-
await (0, update_dependency_version_util_1.updateDependencyVersion)(adminPackageJsonPath, "@mui/material", "^6.0.0");
|
|
12
|
-
await (0, update_dependency_version_util_1.updateDependencyVersion)(adminPackageJsonPath, "@mui/system", "^6.0.0");
|
|
13
|
-
await (0, update_dependency_version_util_1.updateDependencyVersion)(adminPackageJsonPath, "@mui/utils", "^6.0.0");
|
|
14
|
-
await (0, update_dependency_version_util_1.updateDependencyVersion)(adminPackageJsonPath, "@mui/icons-material", "^6.0.0");
|
|
15
|
-
await (0, update_dependency_version_util_1.updateDependencyVersion)(adminPackageJsonPath, "@mui/lab", "^6.0.0-beta.10");
|
|
16
|
-
await (0, execute_command_util_1.executeCommand)("npm", ["install", "--prefix", "admin", "--no-audit", "--loglevel", "error"]);
|
|
17
|
-
await (0, execute_command_util_1.executeCommand)("npx", ["@mui/codemod@latest", "v6.0.0/list-item-button-prop", "admin/src"]);
|
|
18
|
-
await (0, execute_command_util_1.executeCommand)("npx", ["@mui/codemod@latest", "v6.0.0/styled", "admin/src"]);
|
|
19
|
-
await (0, execute_command_util_1.executeCommand)("npx", ["@mui/codemod@latest", "v6.0.0/sx-prop", "admin/src"]);
|
|
20
|
-
await (0, execute_command_util_1.executeCommand)("npx", ["@mui/codemod@latest", "v6.0.0/theme-v6", "admin/src/theme.ts"]);
|
|
21
|
-
}
|
|
22
|
-
exports.default = updateMuiVersion;
|