@modern-js/monorepo-tools 2.58.1 → 2.58.3
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/dist/cjs/commands/build.js +2 -2
- package/dist/cjs/commands/buildWatch.js +2 -2
- package/dist/cjs/commands/clear.js +2 -2
- package/dist/cjs/commands/deploy.js +1 -1
- package/dist/cjs/commands/install.js +2 -2
- package/dist/cjs/dag/operator.js +8 -13
- package/dist/cjs/features/build/index.js +2 -2
- package/dist/cjs/features/deploy/index.js +1 -1
- package/dist/cjs/features/dev/createTask.js +1 -1
- package/dist/cjs/features/dev/index.js +2 -2
- package/dist/cjs/index.js +2 -2
- package/dist/cjs/locale/index.js +1 -1
- package/dist/cjs/projects/checkProjectChange.js +1 -1
- package/dist/cjs/projects/getProjectsByPackagesConfig.js +1 -1
- package/dist/cjs/projects/getProjectsByWorkspaceFile.js +2 -2
- package/dist/esm/commands/build.js +2 -2
- package/dist/esm/commands/buildWatch.js +2 -2
- package/dist/esm/commands/clear.js +2 -2
- package/dist/esm/commands/deploy.js +1 -1
- package/dist/esm/commands/install.js +2 -2
- package/dist/esm/dag/operator.js +8 -13
- package/dist/esm/features/build/index.js +2 -2
- package/dist/esm/features/deploy/index.js +1 -1
- package/dist/esm/features/dev/createTask.js +1 -1
- package/dist/esm/features/dev/index.js +2 -2
- package/dist/esm/index.js +3 -3
- package/dist/esm/locale/index.js +1 -1
- package/dist/esm/projects/checkProjectChange.js +1 -1
- package/dist/esm/projects/clearMemoryFiles.js +1 -1
- package/dist/esm/projects/getProjectsByPackagesConfig.js +1 -1
- package/dist/esm/projects/getProjectsByWorkspaceFile.js +2 -2
- package/dist/types/cli/clear.d.ts +2 -2
- package/dist/types/cli/deploy.d.ts +1 -1
- package/dist/types/commands/deploy.d.ts +1 -1
- package/dist/types/commands/install.d.ts +1 -1
- package/dist/types/dag/create.d.ts +1 -1
- package/dist/types/dag/edgeManager.d.ts +1 -1
- package/dist/types/dag/index.d.ts +1 -1
- package/dist/types/dag/operator.d.ts +1 -1
- package/dist/types/dag/utils.d.ts +1 -1
- package/dist/types/features/build/index.d.ts +1 -1
- package/dist/types/features/clear/index.d.ts +1 -1
- package/dist/types/features/deploy/index.d.ts +2 -2
- package/dist/types/features/dev/cmds.d.ts +1 -1
- package/dist/types/features/dev/createTask.d.ts +4 -4
- package/dist/types/features/dev/index.d.ts +5 -5
- package/dist/types/features/dev/watchProjectsState.d.ts +2 -2
- package/dist/types/features/install/index.d.ts +1 -1
- package/dist/types/index.d.ts +1 -1
- package/dist/types/log/time.d.ts +1 -1
- package/dist/types/projects/checkProjectChange.d.ts +1 -1
- package/dist/types/projects/clearMemoryFiles.d.ts +1 -1
- package/dist/types/type.d.ts +2 -2
- package/dist/types/utils/install.d.ts +1 -1
- package/package.json +9 -9
|
@@ -21,10 +21,10 @@ __export(build_exports, {
|
|
|
21
21
|
build: () => build
|
|
22
22
|
});
|
|
23
23
|
module.exports = __toCommonJS(build_exports);
|
|
24
|
-
var
|
|
24
|
+
var import_dag = require("../dag");
|
|
25
25
|
var import_build = require("../features/build");
|
|
26
|
+
var import_monorepo = require("../parse-config/monorepo");
|
|
26
27
|
var import_getProjects = require("../projects/getProjects");
|
|
27
|
-
var import_dag = require("../dag");
|
|
28
28
|
const build = async (targetProjectName, option, api) => {
|
|
29
29
|
const { appDirectory } = api.useAppContext();
|
|
30
30
|
const { self = true, dept = false, deps = true, onlySelf = false, all = false, contentHash = false, gitHash = false } = option;
|
|
@@ -21,10 +21,10 @@ __export(buildWatch_exports, {
|
|
|
21
21
|
buildWatch: () => buildWatch
|
|
22
22
|
});
|
|
23
23
|
module.exports = __toCommonJS(buildWatch_exports);
|
|
24
|
-
var
|
|
24
|
+
var import_dag = require("../dag");
|
|
25
25
|
var import_dev = require("../features/dev");
|
|
26
|
+
var import_monorepo = require("../parse-config/monorepo");
|
|
26
27
|
var import_getProjects = require("../projects/getProjects");
|
|
27
|
-
var import_dag = require("../dag");
|
|
28
28
|
const buildWatch = async (targetProjectName, option, api) => {
|
|
29
29
|
const { appDirectory } = api.useAppContext();
|
|
30
30
|
const { onlySelf = false, init = false } = option;
|
|
@@ -21,9 +21,9 @@ __export(clear_exports, {
|
|
|
21
21
|
clear: () => clear
|
|
22
22
|
});
|
|
23
23
|
module.exports = __toCommonJS(clear_exports);
|
|
24
|
-
var import_getProjects = require("../projects/getProjects");
|
|
25
|
-
var import_monorepo = require("../parse-config/monorepo");
|
|
26
24
|
var import_clear = require("../features/clear");
|
|
25
|
+
var import_monorepo = require("../parse-config/monorepo");
|
|
26
|
+
var import_getProjects = require("../projects/getProjects");
|
|
27
27
|
const clear = async (projectNames, option, api) => {
|
|
28
28
|
const { removeDirs } = option;
|
|
29
29
|
const { appDirectory } = api.useAppContext();
|
|
@@ -23,9 +23,9 @@ __export(deploy_exports, {
|
|
|
23
23
|
module.exports = __toCommonJS(deploy_exports);
|
|
24
24
|
var import_utils = require("@modern-js/utils");
|
|
25
25
|
var import_dag = require("../dag");
|
|
26
|
+
var import_deploy = require("../features/deploy");
|
|
26
27
|
var import_monorepo = require("../parse-config/monorepo");
|
|
27
28
|
var import_getProjects = require("../projects/getProjects");
|
|
28
|
-
var import_deploy = require("../features/deploy");
|
|
29
29
|
const deploy = async (api, deployProjectNames, option, ignoreMatchs = []) => {
|
|
30
30
|
const { deployPath = "output" } = option;
|
|
31
31
|
const { appDirectory } = api.useAppContext();
|
|
@@ -21,11 +21,11 @@ __export(install_exports, {
|
|
|
21
21
|
install: () => install
|
|
22
22
|
});
|
|
23
23
|
module.exports = __toCommonJS(install_exports);
|
|
24
|
+
var import_dag = require("../dag");
|
|
24
25
|
var import_install = require("../features/install");
|
|
25
26
|
var import_monorepo = require("../parse-config/monorepo");
|
|
26
27
|
var import_getProjects = require("../projects/getProjects");
|
|
27
|
-
|
|
28
|
-
const install = async (projectNames = [], option, api) => {
|
|
28
|
+
const install = async (projectNames, option, api) => {
|
|
29
29
|
const { appDirectory } = api.useAppContext();
|
|
30
30
|
const { auto } = option;
|
|
31
31
|
const projects = await (0, import_getProjects.getProjects)({
|
package/dist/cjs/dag/operator.js
CHANGED
|
@@ -33,8 +33,8 @@ __export(operator_exports, {
|
|
|
33
33
|
module.exports = __toCommonJS(operator_exports);
|
|
34
34
|
var import_p_map = __toESM(require("p-map"));
|
|
35
35
|
var import_error = require("../log/error");
|
|
36
|
-
var import_task = require("./task");
|
|
37
36
|
var import_edgeManager = require("./edgeManager");
|
|
37
|
+
var import_task = require("./task");
|
|
38
38
|
var import_utils = require("./utils");
|
|
39
39
|
class DagOperator {
|
|
40
40
|
checkNodeDataExist(name) {
|
|
@@ -89,19 +89,14 @@ class DagOperator {
|
|
|
89
89
|
if (earlyFinish) {
|
|
90
90
|
break;
|
|
91
91
|
}
|
|
92
|
-
await (0, import_p_map.default)(
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
if (!finishTaskHash[project.name]) {
|
|
97
|
-
finishTaskHash[project.name] = true;
|
|
98
|
-
await task(project, this._getProjectPreviousNode(project.dependent || [], preNodes), () => earlyFinish = true);
|
|
99
|
-
}
|
|
100
|
-
},
|
|
101
|
-
{
|
|
102
|
-
concurrency: projects.length
|
|
92
|
+
await (0, import_p_map.default)(projects, async (project) => {
|
|
93
|
+
if (!finishTaskHash[project.name]) {
|
|
94
|
+
finishTaskHash[project.name] = true;
|
|
95
|
+
await task(project, this._getProjectPreviousNode(project.dependent || [], preNodes), () => earlyFinish = true);
|
|
103
96
|
}
|
|
104
|
-
|
|
97
|
+
}, {
|
|
98
|
+
concurrency: projects.length
|
|
99
|
+
});
|
|
105
100
|
preNodes = [
|
|
106
101
|
...projects
|
|
107
102
|
];
|
|
@@ -34,10 +34,10 @@ __export(build_exports, {
|
|
|
34
34
|
module.exports = __toCommonJS(build_exports);
|
|
35
35
|
var import_os = __toESM(require("os"));
|
|
36
36
|
var import_utils = require("@modern-js/utils");
|
|
37
|
-
var import_checkProjectChange = require("../../projects/checkProjectChange");
|
|
38
37
|
var import_error = require("../../log/error");
|
|
39
38
|
var import_multiTasksLog = require("../../log/multiTasksLog");
|
|
40
|
-
|
|
39
|
+
var import_checkProjectChange = require("../../projects/checkProjectChange");
|
|
40
|
+
const createTask = (config, taskCmds, taskLogger) => {
|
|
41
41
|
const { rootPath, packageManager, disableContentHash = false, enableGitHash = false } = config;
|
|
42
42
|
const task = async (project) => {
|
|
43
43
|
console.info("run ", project.name);
|
|
@@ -32,8 +32,8 @@ __export(deploy_exports, {
|
|
|
32
32
|
});
|
|
33
33
|
module.exports = __toCommonJS(deploy_exports);
|
|
34
34
|
var path = __toESM(require("path"));
|
|
35
|
-
var import_node_core_library = require("@rushstack/node-core-library");
|
|
36
35
|
var import_utils = require("@modern-js/utils");
|
|
36
|
+
var import_node_core_library = require("@rushstack/node-core-library");
|
|
37
37
|
var import_constants = require("../../constants");
|
|
38
38
|
const createCopyMap = (rootPath, targetProject, copyProjects, deployDir) => {
|
|
39
39
|
const map = /* @__PURE__ */ new Map();
|
|
@@ -55,7 +55,7 @@ const getFinalTaskCmds = (taskCmds, project) => {
|
|
|
55
55
|
}
|
|
56
56
|
return finalTaskCmds;
|
|
57
57
|
};
|
|
58
|
-
const createDependenciesTask = (config, taskCmds
|
|
58
|
+
const createDependenciesTask = (config, taskCmds, taskLogger) => {
|
|
59
59
|
const { packageManager } = config;
|
|
60
60
|
const timelogInstance = timeLog.initTimeLog();
|
|
61
61
|
const task = async (project) => {
|
|
@@ -31,12 +31,12 @@ __export(dev_exports, {
|
|
|
31
31
|
runBuildWatchTask: () => runBuildWatchTask
|
|
32
32
|
});
|
|
33
33
|
module.exports = __toCommonJS(dev_exports);
|
|
34
|
-
var import_anymatch = __toESM(require("anymatch"));
|
|
35
34
|
var import_utils = require("@modern-js/utils");
|
|
35
|
+
var import_anymatch = __toESM(require("anymatch"));
|
|
36
36
|
var import_multiTasksLog = require("../../log/multiTasksLog");
|
|
37
|
-
var import_watchProjectsState = require("./watchProjectsState");
|
|
38
37
|
var import_cmds = require("./cmds");
|
|
39
38
|
var import_createTask = require("./createTask");
|
|
39
|
+
var import_watchProjectsState = require("./watchProjectsState");
|
|
40
40
|
const getIgnored = (config) => (watchFilePath) => {
|
|
41
41
|
const nodeModulesPattern = /(?:^|[\\/])node_modules/g;
|
|
42
42
|
if (nodeModulesPattern.test(watchFilePath) || watchFilePath.includes("dist")) {
|
package/dist/cjs/index.js
CHANGED
|
@@ -24,11 +24,11 @@ __export(src_exports, {
|
|
|
24
24
|
});
|
|
25
25
|
module.exports = __toCommonJS(src_exports);
|
|
26
26
|
var import_plugin_changeset = require("@modern-js/plugin-changeset");
|
|
27
|
-
var import_plugin_lint = require("@modern-js/plugin-lint");
|
|
28
27
|
var import_language_detector = require("@modern-js/plugin-i18n/language-detector");
|
|
29
|
-
var
|
|
28
|
+
var import_plugin_lint = require("@modern-js/plugin-lint");
|
|
30
29
|
var import_cli = require("./cli");
|
|
31
30
|
var import_hooks = require("./hooks");
|
|
31
|
+
var import_locale = require("./locale");
|
|
32
32
|
__reExport(src_exports, require("./projects/getProjects"), module.exports);
|
|
33
33
|
const monorepoTools = () => ({
|
|
34
34
|
name: "@modern-js/monorepo-tools",
|
package/dist/cjs/locale/index.js
CHANGED
|
@@ -23,8 +23,8 @@ __export(locale_exports, {
|
|
|
23
23
|
});
|
|
24
24
|
module.exports = __toCommonJS(locale_exports);
|
|
25
25
|
var import_plugin_i18n = require("@modern-js/plugin-i18n");
|
|
26
|
-
var import_zh = require("./zh");
|
|
27
26
|
var import_en = require("./en");
|
|
27
|
+
var import_zh = require("./zh");
|
|
28
28
|
const i18n = new import_plugin_i18n.I18n();
|
|
29
29
|
const localeKeys = i18n.init("en", {
|
|
30
30
|
zh: import_zh.ZH_LOCALE,
|
|
@@ -36,9 +36,9 @@ __export(checkProjectChange_exports, {
|
|
|
36
36
|
});
|
|
37
37
|
module.exports = __toCommonJS(checkProjectChange_exports);
|
|
38
38
|
var path = __toESM(require("path"));
|
|
39
|
+
var import_utils = require("@modern-js/utils");
|
|
39
40
|
var import_node_core_library = require("@rushstack/node-core-library");
|
|
40
41
|
var import_package_deps_hash = require("@rushstack/package-deps-hash");
|
|
41
|
-
var import_utils = require("@modern-js/utils");
|
|
42
42
|
var import_md5 = __toESM(require("md5"));
|
|
43
43
|
const PROJECT_CONTENT_FILE_NAME = "project-content.json";
|
|
44
44
|
const MONOREPO_GIT_FILE_NAME = "monorepo-git.json";
|
|
@@ -33,8 +33,8 @@ __export(getProjectsByPackagesConfig_exports, {
|
|
|
33
33
|
});
|
|
34
34
|
module.exports = __toCommonJS(getProjectsByPackagesConfig_exports);
|
|
35
35
|
var path = __toESM(require("path"));
|
|
36
|
-
var import_node_core_library = require("@rushstack/node-core-library");
|
|
37
36
|
var import_utils = require("@modern-js/utils");
|
|
37
|
+
var import_node_core_library = require("@rushstack/node-core-library");
|
|
38
38
|
var import_p_map = __toESM(require("p-map"));
|
|
39
39
|
var import_error = require("../log/error");
|
|
40
40
|
var import_package = require("../package");
|
|
@@ -33,10 +33,10 @@ __export(getProjectsByWorkspaceFile_exports, {
|
|
|
33
33
|
});
|
|
34
34
|
module.exports = __toCommonJS(getProjectsByWorkspaceFile_exports);
|
|
35
35
|
var path = __toESM(require("path"));
|
|
36
|
-
var import_node_core_library = require("@rushstack/node-core-library");
|
|
37
36
|
var import_utils = require("@modern-js/utils");
|
|
38
|
-
var
|
|
37
|
+
var import_node_core_library = require("@rushstack/node-core-library");
|
|
39
38
|
var import_constants = require("../constants");
|
|
39
|
+
var import_monorepo = require("../parse-config/monorepo");
|
|
40
40
|
var import_getProjectsByPackagesConfig = require("./getProjectsByPackagesConfig");
|
|
41
41
|
const getProjectsByWorkspaceFile = async (rootPath, config, ignoreConfigs) => {
|
|
42
42
|
var _config_workspaceFile;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
+
import { initDAG } from "../dag";
|
|
2
|
+
import { runAllBuildTask, runBuildTask } from "../features/build";
|
|
1
3
|
import { getMonorepoBaseData } from "../parse-config/monorepo";
|
|
2
|
-
import { runBuildTask, runAllBuildTask } from "../features/build";
|
|
3
4
|
import { getProjects } from "../projects/getProjects";
|
|
4
|
-
import { initDAG } from "../dag";
|
|
5
5
|
const build = async (targetProjectName, option, api) => {
|
|
6
6
|
const { appDirectory } = api.useAppContext();
|
|
7
7
|
const { self = true, dept = false, deps = true, onlySelf = false, all = false, contentHash = false, gitHash = false } = option;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { initDAG } from "../dag";
|
|
2
2
|
import { runBuildWatchTask } from "../features/dev";
|
|
3
|
+
import { getMonorepoBaseData } from "../parse-config/monorepo";
|
|
3
4
|
import { getProjects } from "../projects/getProjects";
|
|
4
|
-
import { initDAG } from "../dag";
|
|
5
5
|
const buildWatch = async (targetProjectName, option, api) => {
|
|
6
6
|
const { appDirectory } = api.useAppContext();
|
|
7
7
|
const { onlySelf = false, init = false } = option;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { getProjects } from "../projects/getProjects";
|
|
2
|
-
import { getMonorepoBaseData } from "../parse-config/monorepo";
|
|
3
1
|
import { runClearTask } from "../features/clear";
|
|
2
|
+
import { getMonorepoBaseData } from "../parse-config/monorepo";
|
|
3
|
+
import { getProjects } from "../projects/getProjects";
|
|
4
4
|
const clear = async (projectNames, option, api) => {
|
|
5
5
|
const { removeDirs } = option;
|
|
6
6
|
const { appDirectory } = api.useAppContext();
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { logger } from "@modern-js/utils";
|
|
2
2
|
import { initDAG } from "../dag";
|
|
3
|
+
import { deploy as runDeployTask } from "../features/deploy";
|
|
3
4
|
import { getMonorepoBaseData } from "../parse-config/monorepo";
|
|
4
5
|
import { getProjects } from "../projects/getProjects";
|
|
5
|
-
import { deploy as runDeployTask } from "../features/deploy";
|
|
6
6
|
const deploy = async (api, deployProjectNames, option, ignoreMatchs = []) => {
|
|
7
7
|
const { deployPath = "output" } = option;
|
|
8
8
|
const { appDirectory } = api.useAppContext();
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
+
import { initDAG } from "../dag";
|
|
1
2
|
import { runInstallTask } from "../features/install";
|
|
2
3
|
import { getMonorepoBaseData } from "../parse-config/monorepo";
|
|
3
4
|
import { getProjects } from "../projects/getProjects";
|
|
4
|
-
|
|
5
|
-
const install = async (projectNames = [], option, api) => {
|
|
5
|
+
const install = async (projectNames, option, api) => {
|
|
6
6
|
const { appDirectory } = api.useAppContext();
|
|
7
7
|
const { auto } = option;
|
|
8
8
|
const projects = await getProjects({
|
package/dist/esm/dag/operator.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import pMap from "p-map";
|
|
2
2
|
import { errorLog } from "../log/error";
|
|
3
|
-
import { TaskRunner } from "./task";
|
|
4
3
|
import { EdgeManager } from "./edgeManager";
|
|
4
|
+
import { TaskRunner } from "./task";
|
|
5
5
|
import { recursiveGetDependency, sortProjects } from "./utils";
|
|
6
6
|
class DagOperator {
|
|
7
7
|
checkNodeDataExist(name) {
|
|
@@ -56,19 +56,14 @@ class DagOperator {
|
|
|
56
56
|
if (earlyFinish) {
|
|
57
57
|
break;
|
|
58
58
|
}
|
|
59
|
-
await pMap(
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
if (!finishTaskHash[project.name]) {
|
|
64
|
-
finishTaskHash[project.name] = true;
|
|
65
|
-
await task(project, this._getProjectPreviousNode(project.dependent || [], preNodes), () => earlyFinish = true);
|
|
66
|
-
}
|
|
67
|
-
},
|
|
68
|
-
{
|
|
69
|
-
concurrency: projects.length
|
|
59
|
+
await pMap(projects, async (project) => {
|
|
60
|
+
if (!finishTaskHash[project.name]) {
|
|
61
|
+
finishTaskHash[project.name] = true;
|
|
62
|
+
await task(project, this._getProjectPreviousNode(project.dependent || [], preNodes), () => earlyFinish = true);
|
|
70
63
|
}
|
|
71
|
-
|
|
64
|
+
}, {
|
|
65
|
+
concurrency: projects.length
|
|
66
|
+
});
|
|
72
67
|
preNodes = [
|
|
73
68
|
...projects
|
|
74
69
|
];
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import os from "os";
|
|
2
2
|
import { execa, signale } from "@modern-js/utils";
|
|
3
|
-
import { checkProjectChangeByGit, checkProjectChangeByContent } from "../../projects/checkProjectChange";
|
|
4
3
|
import { errorLog } from "../../log/error";
|
|
5
4
|
import { MultitasksLogger } from "../../log/multiTasksLog";
|
|
6
|
-
|
|
5
|
+
import { checkProjectChangeByContent, checkProjectChangeByGit } from "../../projects/checkProjectChange";
|
|
6
|
+
const createTask = (config, taskCmds, taskLogger) => {
|
|
7
7
|
const { rootPath, packageManager, disableContentHash = false, enableGitHash = false } = config;
|
|
8
8
|
const task = async (project) => {
|
|
9
9
|
console.info("run ", project.name);
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as path from "path";
|
|
2
|
+
import { fs, chalk, execa, getPnpmVersion, logger, yaml } from "@modern-js/utils";
|
|
2
3
|
import { FileSystem, JsonFile } from "@rushstack/node-core-library";
|
|
3
|
-
import { fs, yaml, execa, logger, chalk, getPnpmVersion } from "@modern-js/utils";
|
|
4
4
|
import { WORKSPACE_FILE } from "../../constants";
|
|
5
5
|
const createCopyMap = (rootPath, targetProject, copyProjects, deployDir) => {
|
|
6
6
|
const map = /* @__PURE__ */ new Map();
|
|
@@ -21,7 +21,7 @@ const getFinalTaskCmds = (taskCmds, project) => {
|
|
|
21
21
|
}
|
|
22
22
|
return finalTaskCmds;
|
|
23
23
|
};
|
|
24
|
-
const createDependenciesTask = (config, taskCmds
|
|
24
|
+
const createDependenciesTask = (config, taskCmds, taskLogger) => {
|
|
25
25
|
const { packageManager } = config;
|
|
26
26
|
const timelogInstance = timeLog.initTimeLog();
|
|
27
27
|
const task = async (project) => {
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import anymatch from "anymatch";
|
|
2
1
|
import { chokidar } from "@modern-js/utils";
|
|
2
|
+
import anymatch from "anymatch";
|
|
3
3
|
import { MultitasksLogger } from "../../log/multiTasksLog";
|
|
4
|
-
import { WatchedProjectsState } from "./watchProjectsState";
|
|
5
4
|
import { defaultBuildWatchCmds } from "./cmds";
|
|
6
5
|
import { createDependenciesTask, createDevTask } from "./createTask";
|
|
6
|
+
import { WatchedProjectsState } from "./watchProjectsState";
|
|
7
7
|
const getIgnored = (config) => (watchFilePath) => {
|
|
8
8
|
const nodeModulesPattern = /(?:^|[\\/])node_modules/g;
|
|
9
9
|
if (nodeModulesPattern.test(watchFilePath) || watchFilePath.includes("dist")) {
|
package/dist/esm/index.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { changesetPlugin } from "@modern-js/plugin-changeset";
|
|
2
|
-
import { lintPlugin } from "@modern-js/plugin-lint";
|
|
3
2
|
import { getLocaleLanguage } from "@modern-js/plugin-i18n/language-detector";
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
3
|
+
import { lintPlugin } from "@modern-js/plugin-lint";
|
|
4
|
+
import { clearCli, deployCli, newCli, upgradeCli } from "./cli";
|
|
6
5
|
import { hooks } from "./hooks";
|
|
6
|
+
import { i18n } from "./locale";
|
|
7
7
|
export * from "./projects/getProjects";
|
|
8
8
|
const monorepoTools = () => ({
|
|
9
9
|
name: "@modern-js/monorepo-tools",
|
package/dist/esm/locale/index.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import * as path from "path";
|
|
2
|
+
import { globby } from "@modern-js/utils";
|
|
2
3
|
import { FileSystem, JsonFile, Sort } from "@rushstack/node-core-library";
|
|
3
4
|
import { getGitHashForFiles } from "@rushstack/package-deps-hash";
|
|
4
|
-
import { globby } from "@modern-js/utils";
|
|
5
5
|
import md5 from "md5";
|
|
6
6
|
const PROJECT_CONTENT_FILE_NAME = "project-content.json";
|
|
7
7
|
const MONOREPO_GIT_FILE_NAME = "monorepo-git.json";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as path from "path";
|
|
2
2
|
import { FileSystem } from "@rushstack/node-core-library";
|
|
3
|
-
import {
|
|
3
|
+
import { PROJECT_CONTENT_FILE_NAME, PROJECT_MEMORY_PATH } from "./checkProjectChange";
|
|
4
4
|
const clearProjectsMemoryFile = (projects) => {
|
|
5
5
|
for (const project of projects) {
|
|
6
6
|
const memoryFilePath = path.join(project.extra.path, PROJECT_MEMORY_PATH, PROJECT_CONTENT_FILE_NAME);
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as path from "path";
|
|
2
|
-
import { PackageJsonLookup } from "@rushstack/node-core-library";
|
|
3
2
|
import { globby } from "@modern-js/utils";
|
|
3
|
+
import { PackageJsonLookup } from "@rushstack/node-core-library";
|
|
4
4
|
import pMap from "p-map";
|
|
5
5
|
import { errorLog } from "../log/error";
|
|
6
6
|
import { Package } from "../package";
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import * as path from "path";
|
|
2
|
-
import { FileSystem, JsonFile } from "@rushstack/node-core-library";
|
|
3
2
|
import { fs, yaml } from "@modern-js/utils";
|
|
4
|
-
import {
|
|
3
|
+
import { FileSystem, JsonFile } from "@rushstack/node-core-library";
|
|
5
4
|
import { WORKSPACE_FILE } from "../constants";
|
|
5
|
+
import { getWorkspaceFile } from "../parse-config/monorepo";
|
|
6
6
|
import { getProjectsByPackageConfig, syncGetProjectsByPackageConfig } from "./getProjectsByPackagesConfig";
|
|
7
7
|
const getProjectsByWorkspaceFile = async (rootPath, config, ignoreConfigs) => {
|
|
8
8
|
var _config_workspaceFile;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { Command } from '@modern-js/utils';
|
|
2
1
|
import type { PluginAPI } from '@modern-js/core';
|
|
3
|
-
import {
|
|
2
|
+
import type { Command } from '@modern-js/utils';
|
|
3
|
+
import type { MonorepoTools } from '../type';
|
|
4
4
|
export declare const clearCli: (program: Command, api: PluginAPI<MonorepoTools>) => void;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { Command } from '@modern-js/utils';
|
|
2
1
|
import type { PluginAPI } from '@modern-js/core';
|
|
2
|
+
import type { Command } from '@modern-js/utils';
|
|
3
3
|
import type { MonorepoTools } from '../type';
|
|
4
4
|
export declare const deployCli: (program: Command, api: PluginAPI<MonorepoTools>) => void;
|
|
@@ -2,4 +2,4 @@ import type { PluginAPI } from '@modern-js/core';
|
|
|
2
2
|
export interface IInstallCommandOption {
|
|
3
3
|
auto?: boolean;
|
|
4
4
|
}
|
|
5
|
-
export declare const install: (projectNames: string[]
|
|
5
|
+
export declare const install: (projectNames: string[], option: IInstallCommandOption, api: PluginAPI) => Promise<void>;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { IProjectNode } from '../projects/getProjects';
|
|
1
|
+
import type { IProjectNode } from '../projects/getProjects';
|
|
2
2
|
export type Task = (currentProject: IProjectNode, currentProjectPreviousProjects: IProjectNode[], earlyFinishFun: () => void) => Promise<void>;
|
|
3
3
|
export interface ITraverseConfig {
|
|
4
4
|
withSelf?: boolean;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { DagOperator } from '../../dag/operator';
|
|
2
|
-
import { PackageManagerType } from '../../parse-config';
|
|
1
|
+
import type { DagOperator } from '../../dag/operator';
|
|
2
|
+
import type { PackageManagerType } from '../../parse-config';
|
|
3
3
|
interface IDeployConfig {
|
|
4
4
|
rootPath: string;
|
|
5
5
|
packageManager: PackageManagerType;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { IProjectNode } from '../../projects/getProjects';
|
|
1
|
+
import type { IProjectNode } from '../../projects/getProjects';
|
|
2
2
|
export type BuildWatchCmdsType = [string] | [string, string] | [string, (project: IProjectNode) => string[]];
|
|
3
3
|
export declare const defaultBuildWatchCmds: BuildWatchCmdsType;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import type { IProjectNode } from '../../projects/getProjects';
|
|
2
|
-
import type { MultitasksLogger } from '../../log/multiTasksLog';
|
|
3
|
-
import { BuildWatchCmdsType } from './cmds';
|
|
4
1
|
import type { IBuildWatchConfig } from '.';
|
|
5
|
-
|
|
2
|
+
import type { MultitasksLogger } from '../../log/multiTasksLog';
|
|
3
|
+
import type { IProjectNode } from '../../projects/getProjects';
|
|
4
|
+
import { type BuildWatchCmdsType } from './cmds';
|
|
5
|
+
export declare const createDependenciesTask: (config: IBuildWatchConfig, taskCmds: BuildWatchCmdsType, taskLogger: MultitasksLogger) => (project: IProjectNode) => Promise<void>;
|
|
6
6
|
export declare const createDevTask: (config: IBuildWatchConfig, taskCmds: BuildWatchCmdsType | undefined, taskLogger: MultitasksLogger) => (project: IProjectNode) => Promise<void>;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import anymatch from 'anymatch';
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import { Argu } from '../../utils/types';
|
|
6
|
-
import { BuildWatchCmdsType } from './cmds';
|
|
2
|
+
import type { DagOperator } from '../../dag/operator';
|
|
3
|
+
import type { IProjectNode } from '../../projects/getProjects';
|
|
4
|
+
import type { ICommandConfig } from '../../type';
|
|
5
|
+
import type { Argu } from '../../utils/types';
|
|
6
|
+
import { type BuildWatchCmdsType } from './cmds';
|
|
7
7
|
export interface IBuildWatchConfig extends ICommandConfig {
|
|
8
8
|
onlySelf?: boolean;
|
|
9
9
|
ignoreMaybeChanged?: Argu<typeof anymatch>;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
1
|
+
import type { IBuildWatchConfig } from '.';
|
|
2
|
+
import type { IProjectNode } from '../../projects/getProjects';
|
|
3
3
|
export declare class WatchedProjectsState {
|
|
4
4
|
private readonly _config;
|
|
5
5
|
private readonly _fromNodes;
|
package/dist/types/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { CliPlugin } from '@modern-js/core';
|
|
2
|
-
import { MonorepoTools } from './type';
|
|
2
|
+
import type { MonorepoTools } from './type';
|
|
3
3
|
export * from './projects/getProjects';
|
|
4
4
|
export declare const monorepoTools: () => CliPlugin<MonorepoTools>;
|
|
5
5
|
export default monorepoTools;
|
package/dist/types/log/time.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Signale, SignaleOptions } from '@modern-js/utils';
|
|
1
|
+
import { Signale, type SignaleOptions } from '@modern-js/utils';
|
|
2
2
|
export declare const initTimeLog: (option?: SignaleOptions) => import("@modern-js/utils/compiled/signale").Signale<import("@modern-js/utils/compiled/signale").DefaultMethods>;
|
|
3
3
|
export declare const startTime: (signaleInstance: Signale, prefix?: string) => void;
|
|
4
4
|
export declare const endTime: (signaleInstance: Signale, prefix?: string) => void;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { IProjectNode } from './getProjects';
|
|
1
|
+
import type { IProjectNode } from './getProjects';
|
|
2
2
|
export declare const PROJECT_CONTENT_FILE_NAME = "project-content.json";
|
|
3
3
|
export declare const MONOREPO_GIT_FILE_NAME = "monorepo-git.json";
|
|
4
4
|
export declare const PROJECT_MEMORY_PATH = ".project-memory";
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { IProjectNode } from './getProjects';
|
|
1
|
+
import type { IProjectNode } from './getProjects';
|
|
2
2
|
export declare const clearProjectsMemoryFile: (projects: IProjectNode[]) => void;
|
package/dist/types/type.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { PackageManagerType } from '../parse-config';
|
|
1
|
+
import type { PackageManagerType } from '../parse-config';
|
|
2
2
|
export declare const removeLockFile: (rootPath: string, packageManager: PackageManagerType) => void;
|
|
3
3
|
export declare const installByPackageManager: (packageManager: PackageManagerType, { rootPath, removeLock }: {
|
|
4
4
|
rootPath: string;
|
package/package.json
CHANGED
|
@@ -15,7 +15,7 @@
|
|
|
15
15
|
"modern",
|
|
16
16
|
"modern.js"
|
|
17
17
|
],
|
|
18
|
-
"version": "2.58.
|
|
18
|
+
"version": "2.58.3",
|
|
19
19
|
"jsnext:source": "./src/index.ts",
|
|
20
20
|
"types": "./dist/types/index.d.ts",
|
|
21
21
|
"main": "./dist/cjs/index.js",
|
|
@@ -43,12 +43,12 @@
|
|
|
43
43
|
"anymatch": "^3.1.2",
|
|
44
44
|
"md5": "^2.3.0",
|
|
45
45
|
"p-map": "4.0.0",
|
|
46
|
-
"@modern-js/core": "2.58.
|
|
47
|
-
"@modern-js/plugin": "2.58.
|
|
48
|
-
"@modern-js/plugin-changeset": "2.58.
|
|
49
|
-
"@modern-js/plugin-
|
|
50
|
-
"@modern-js/plugin-
|
|
51
|
-
"@modern-js/utils": "2.58.
|
|
46
|
+
"@modern-js/core": "2.58.3",
|
|
47
|
+
"@modern-js/plugin": "2.58.3",
|
|
48
|
+
"@modern-js/plugin-changeset": "2.58.3",
|
|
49
|
+
"@modern-js/plugin-i18n": "2.58.3",
|
|
50
|
+
"@modern-js/plugin-lint": "2.58.3",
|
|
51
|
+
"@modern-js/utils": "2.58.3"
|
|
52
52
|
},
|
|
53
53
|
"devDependencies": {
|
|
54
54
|
"@types/jest": "^29",
|
|
@@ -56,8 +56,8 @@
|
|
|
56
56
|
"@types/node": "^14",
|
|
57
57
|
"jest": "^29",
|
|
58
58
|
"typescript": "^5",
|
|
59
|
-
"@scripts/build": "2.58.
|
|
60
|
-
"@scripts/jest-config": "2.58.
|
|
59
|
+
"@scripts/build": "2.58.3",
|
|
60
|
+
"@scripts/jest-config": "2.58.3"
|
|
61
61
|
},
|
|
62
62
|
"sideEffects": false,
|
|
63
63
|
"publishConfig": {
|