@comet/upgrade 1.79.0 → 1.81.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/index.js
CHANGED
|
@@ -39,6 +39,7 @@ function microserviceExists(microservice) {
|
|
|
39
39
|
return fs_1.default.existsSync(`${microservice}/package.json`);
|
|
40
40
|
}
|
|
41
41
|
const isLocalDevelopment = process.argv[0].endsWith("node");
|
|
42
|
+
const skipLint = process.argv.includes("--skip-lint");
|
|
42
43
|
async function main() {
|
|
43
44
|
const targetVersionArg = process.argv[2];
|
|
44
45
|
if (targetVersionArg === undefined) {
|
|
@@ -56,11 +57,10 @@ async function main() {
|
|
|
56
57
|
await runUpgradeScript({
|
|
57
58
|
name: targetVersionArg,
|
|
58
59
|
stage: "before-install",
|
|
59
|
-
// Need default.default because of ESM interoperability with CommonJS.
|
|
60
|
-
// See https://www.typescriptlang.org/docs/handbook/modules/reference.html#node16-nodenext.
|
|
61
60
|
script: module.default.default,
|
|
62
61
|
});
|
|
63
|
-
|
|
62
|
+
if (!skipLint)
|
|
63
|
+
await runEslintFix();
|
|
64
64
|
}
|
|
65
65
|
else {
|
|
66
66
|
console.error(`Can't find upgrade script '${targetVersionArg}'`);
|
|
@@ -80,7 +80,8 @@ async function executeSubfolder(targetVersionArg) {
|
|
|
80
80
|
console.info("\n⚙️ Executing scripts\n");
|
|
81
81
|
await runUpgradeScripts(upgradeScripts);
|
|
82
82
|
console.info("\n✅️ Scripts finished\n");
|
|
83
|
-
|
|
83
|
+
if (!skipLint)
|
|
84
|
+
await runEslintFix();
|
|
84
85
|
}
|
|
85
86
|
async function executeAll(targetVersionArg) {
|
|
86
87
|
if (!targetVersionArg.includes(".")) {
|
|
@@ -112,7 +113,8 @@ async function executeAll(targetVersionArg) {
|
|
|
112
113
|
const afterInstallScripts = upgradeScripts.filter((script) => script.stage === "after-install");
|
|
113
114
|
await runUpgradeScripts(afterInstallScripts);
|
|
114
115
|
console.info("\n☑️ After install scripts finished\n");
|
|
115
|
-
|
|
116
|
+
if (!skipLint)
|
|
117
|
+
await runEslintFix();
|
|
116
118
|
}
|
|
117
119
|
function getCurrentVersion() {
|
|
118
120
|
if (!microserviceExists("admin")) {
|
|
@@ -14,8 +14,8 @@ const ts_morph_1 = require("ts-morph");
|
|
|
14
14
|
* assuming, with the drawback, that columns variable is already available in the current scope.
|
|
15
15
|
*/
|
|
16
16
|
async function updateMuiXVersion() {
|
|
17
|
-
const project = new ts_morph_1.Project({ tsConfigFilePath: "
|
|
18
|
-
const files = glob_1.glob.sync(["src/**/*.ts", "src/**/*.tsx"]);
|
|
17
|
+
const project = new ts_morph_1.Project({ tsConfigFilePath: "admin/tsconfig.json" });
|
|
18
|
+
const files = glob_1.glob.sync(["admin/src/**/*.ts", "admin/src/**/*.tsx"]);
|
|
19
19
|
for (const filePath of files) {
|
|
20
20
|
const sourceFile = project.getSourceFile(filePath);
|
|
21
21
|
if (!sourceFile) {
|