@modern-js/monorepo-tools 2.39.2 → 2.41.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.
|
@@ -98,13 +98,13 @@ const syncGetProjectsByPackagesMatch = (rootPath, match, ignore) => {
|
|
|
98
98
|
};
|
|
99
99
|
const checkFindProjectsMode = (config) => {
|
|
100
100
|
if (config.packagesMatchs && Array.isArray(config.packagesMatchs)) {
|
|
101
|
-
return
|
|
101
|
+
return 0;
|
|
102
102
|
}
|
|
103
103
|
if (config.packagesMatchs && typeof config.packagesMatchs === "object" && (config.packagesMatchs.workspaceFile || config.packagesMatchs.enableAutoFinder)) {
|
|
104
|
-
return
|
|
104
|
+
return 0;
|
|
105
105
|
}
|
|
106
106
|
if (config.projectsConfig && Array.isArray(config.projectsConfig)) {
|
|
107
|
-
return
|
|
107
|
+
return 1;
|
|
108
108
|
}
|
|
109
109
|
if (config.projectsConfig && config.packagesMatchs) {
|
|
110
110
|
(0, import_error.errorLog)("There can not be both `packagesMatchs` and `projectsConfig`");
|
|
@@ -115,9 +115,9 @@ const getProjects = async (config, currentDir = process.cwd()) => {
|
|
|
115
115
|
const { rootPath } = (0, import_monorepo.getMonorepoBaseData)(currentDir);
|
|
116
116
|
const mode = checkFindProjectsMode(config);
|
|
117
117
|
let projects = [];
|
|
118
|
-
if (mode ===
|
|
118
|
+
if (mode === 0) {
|
|
119
119
|
projects = await getProjectsByPackagesMatch(rootPath, config.packagesMatchs, config.packagesIgnoreMatchs || []);
|
|
120
|
-
} else if (mode ===
|
|
120
|
+
} else if (mode === 1) {
|
|
121
121
|
projects = getProjectsByProjectsConfig(rootPath, config.projectsConfig);
|
|
122
122
|
}
|
|
123
123
|
return projects;
|
|
@@ -126,9 +126,9 @@ const syncGetProjects = (config, currentDir = process.cwd()) => {
|
|
|
126
126
|
const { rootPath } = (0, import_monorepo.getMonorepoBaseData)(currentDir);
|
|
127
127
|
const mode = checkFindProjectsMode(config);
|
|
128
128
|
let projects = [];
|
|
129
|
-
if (mode ===
|
|
129
|
+
if (mode === 0) {
|
|
130
130
|
projects = syncGetProjectsByPackagesMatch(rootPath, config.packagesMatchs, config.packagesIgnoreMatchs || []);
|
|
131
|
-
} else if (mode ===
|
|
131
|
+
} else if (mode === 1) {
|
|
132
132
|
projects = getProjectsByProjectsConfig(rootPath, config.projectsConfig);
|
|
133
133
|
}
|
|
134
134
|
return projects;
|
|
@@ -74,13 +74,13 @@ const syncGetProjectsByPackagesMatch = (rootPath, match, ignore) => {
|
|
|
74
74
|
};
|
|
75
75
|
const checkFindProjectsMode = (config) => {
|
|
76
76
|
if (config.packagesMatchs && Array.isArray(config.packagesMatchs)) {
|
|
77
|
-
return
|
|
77
|
+
return 0;
|
|
78
78
|
}
|
|
79
79
|
if (config.packagesMatchs && typeof config.packagesMatchs === "object" && (config.packagesMatchs.workspaceFile || config.packagesMatchs.enableAutoFinder)) {
|
|
80
|
-
return
|
|
80
|
+
return 0;
|
|
81
81
|
}
|
|
82
82
|
if (config.projectsConfig && Array.isArray(config.projectsConfig)) {
|
|
83
|
-
return
|
|
83
|
+
return 1;
|
|
84
84
|
}
|
|
85
85
|
if (config.projectsConfig && config.packagesMatchs) {
|
|
86
86
|
errorLog("There can not be both `packagesMatchs` and `projectsConfig`");
|
|
@@ -91,9 +91,9 @@ const getProjects = async (config, currentDir = process.cwd()) => {
|
|
|
91
91
|
const { rootPath } = getMonorepoBaseData(currentDir);
|
|
92
92
|
const mode = checkFindProjectsMode(config);
|
|
93
93
|
let projects = [];
|
|
94
|
-
if (mode ===
|
|
94
|
+
if (mode === 0) {
|
|
95
95
|
projects = await getProjectsByPackagesMatch(rootPath, config.packagesMatchs, config.packagesIgnoreMatchs || []);
|
|
96
|
-
} else if (mode ===
|
|
96
|
+
} else if (mode === 1) {
|
|
97
97
|
projects = getProjectsByProjectsConfig(rootPath, config.projectsConfig);
|
|
98
98
|
}
|
|
99
99
|
return projects;
|
|
@@ -102,9 +102,9 @@ const syncGetProjects = (config, currentDir = process.cwd()) => {
|
|
|
102
102
|
const { rootPath } = getMonorepoBaseData(currentDir);
|
|
103
103
|
const mode = checkFindProjectsMode(config);
|
|
104
104
|
let projects = [];
|
|
105
|
-
if (mode ===
|
|
105
|
+
if (mode === 0) {
|
|
106
106
|
projects = syncGetProjectsByPackagesMatch(rootPath, config.packagesMatchs, config.packagesIgnoreMatchs || []);
|
|
107
|
-
} else if (mode ===
|
|
107
|
+
} else if (mode === 1) {
|
|
108
108
|
projects = getProjectsByProjectsConfig(rootPath, config.projectsConfig);
|
|
109
109
|
}
|
|
110
110
|
return projects;
|
package/package.json
CHANGED
|
@@ -15,7 +15,7 @@
|
|
|
15
15
|
"modern",
|
|
16
16
|
"modern.js"
|
|
17
17
|
],
|
|
18
|
-
"version": "2.
|
|
18
|
+
"version": "2.41.0",
|
|
19
19
|
"jsnext:source": "./src/index.ts",
|
|
20
20
|
"types": "./dist/types/index.d.ts",
|
|
21
21
|
"main": "./dist/cjs/index.js",
|
|
@@ -41,16 +41,16 @@
|
|
|
41
41
|
"@rushstack/package-deps-hash": "^3.0.54",
|
|
42
42
|
"anymatch": "^3.1.2",
|
|
43
43
|
"md5": "^2.3.0",
|
|
44
|
-
"p-map": "
|
|
45
|
-
"@swc/helpers": "0.5.
|
|
46
|
-
"@modern-js/core": "2.
|
|
47
|
-
"@modern-js/new-action": "2.
|
|
48
|
-
"@modern-js/plugin
|
|
49
|
-
"@modern-js/
|
|
50
|
-
"@modern-js/
|
|
51
|
-
"@modern-js/plugin-
|
|
52
|
-
"@modern-js/plugin-
|
|
53
|
-
"@modern-js/utils": "2.
|
|
44
|
+
"p-map": "4.0.0",
|
|
45
|
+
"@swc/helpers": "0.5.3",
|
|
46
|
+
"@modern-js/core": "2.41.0",
|
|
47
|
+
"@modern-js/new-action": "2.41.0",
|
|
48
|
+
"@modern-js/plugin": "2.41.0",
|
|
49
|
+
"@modern-js/upgrade": "2.41.0",
|
|
50
|
+
"@modern-js/plugin-changeset": "2.41.0",
|
|
51
|
+
"@modern-js/plugin-lint": "2.41.0",
|
|
52
|
+
"@modern-js/plugin-i18n": "2.41.0",
|
|
53
|
+
"@modern-js/utils": "2.41.0"
|
|
54
54
|
},
|
|
55
55
|
"devDependencies": {
|
|
56
56
|
"@types/jest": "^29",
|
|
@@ -58,8 +58,8 @@
|
|
|
58
58
|
"@types/node": "^14",
|
|
59
59
|
"jest": "^29",
|
|
60
60
|
"typescript": "^5",
|
|
61
|
-
"@scripts/build": "2.
|
|
62
|
-
"@scripts/jest-config": "2.
|
|
61
|
+
"@scripts/build": "2.41.0",
|
|
62
|
+
"@scripts/jest-config": "2.41.0"
|
|
63
63
|
},
|
|
64
64
|
"sideEffects": false,
|
|
65
65
|
"publishConfig": {
|