@modern-js/monorepo-tools 2.19.0 → 2.20.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/CHANGELOG.md +32 -0
- package/dist/cjs/cli/index.js +7 -19
- package/dist/cjs/commands/index.js +6 -18
- package/dist/cjs/dag/edgeManager.js +2 -14
- package/dist/cjs/dag/operator.js +7 -23
- package/dist/cjs/dag/task.js +9 -25
- package/dist/cjs/features/build/index.js +2 -6
- package/dist/cjs/features/clear/index.js +2 -41
- package/dist/cjs/features/deploy/index.js +2 -41
- package/dist/cjs/features/dev/createTask.js +2 -41
- package/dist/cjs/features/dev/index.js +2 -6
- package/dist/cjs/features/dev/watchProjectsState.js +7 -58
- package/dist/cjs/features/install/index.js +2 -41
- package/dist/cjs/index.js +5 -7
- package/dist/cjs/log/multiTasksLog.js +5 -17
- package/dist/cjs/package/index.js +4 -16
- package/dist/cjs/parse-config/index.js +2 -41
- package/dist/cjs/parse-config/monorepo.js +2 -41
- package/dist/cjs/projects/checkProjectChange.js +4 -47
- package/dist/cjs/projects/clearMemoryFiles.js +2 -41
- package/dist/cjs/projects/getProjectsByPackagesConfig.js +4 -47
- package/dist/cjs/projects/getProjectsByWorkspaceFile.js +2 -41
- package/dist/cjs/utils/install.js +2 -41
- package/dist/esm/dag/edgeManager.js +1 -13
- package/dist/esm/dag/operator.js +1 -13
- package/dist/esm/dag/task.js +1 -13
- package/dist/esm/features/dev/watchProjectsState.js +1 -13
- package/dist/esm/index.js +1 -0
- package/dist/esm/log/multiTasksLog.js +1 -13
- package/dist/esm/package/index.js +1 -13
- package/dist/types/index.d.ts +1 -0
- package/package.json +12 -12
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,37 @@
|
|
|
1
1
|
# @modern-js/monorepo-tools
|
|
2
2
|
|
|
3
|
+
## 2.20.0
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- 6b9d90a: chore: remove @babel/runtime. add @swc/helper and enable `externalHelper` config.
|
|
8
|
+
chore: 移除 @babel/runtime 依赖. 增加 @swc/helpers 依赖并且开启 `externalHelpers` 配置
|
|
9
|
+
- Updated dependencies [3c4e0a5]
|
|
10
|
+
- Updated dependencies [6b9d90a]
|
|
11
|
+
- Updated dependencies [4b03d17]
|
|
12
|
+
- Updated dependencies [6289d31]
|
|
13
|
+
- @modern-js/utils@2.20.0
|
|
14
|
+
- @modern-js/plugin-changeset@2.20.0
|
|
15
|
+
- @modern-js/new-action@2.20.0
|
|
16
|
+
- @modern-js/plugin-i18n@2.20.0
|
|
17
|
+
- @modern-js/plugin-lint@2.20.0
|
|
18
|
+
- @modern-js/upgrade@2.20.0
|
|
19
|
+
- @modern-js/plugin@2.20.0
|
|
20
|
+
- @modern-js/core@2.20.0
|
|
21
|
+
|
|
22
|
+
## 2.19.1
|
|
23
|
+
|
|
24
|
+
### Patch Changes
|
|
25
|
+
|
|
26
|
+
- @modern-js/core@2.19.1
|
|
27
|
+
- @modern-js/plugin-changeset@2.19.1
|
|
28
|
+
- @modern-js/plugin-i18n@2.19.1
|
|
29
|
+
- @modern-js/plugin-lint@2.19.1
|
|
30
|
+
- @modern-js/new-action@2.19.1
|
|
31
|
+
- @modern-js/plugin@2.19.1
|
|
32
|
+
- @modern-js/upgrade@2.19.1
|
|
33
|
+
- @modern-js/utils@2.19.1
|
|
34
|
+
|
|
3
35
|
## 2.19.0
|
|
4
36
|
|
|
5
37
|
### Patch Changes
|
package/dist/cjs/cli/index.js
CHANGED
|
@@ -2,22 +2,10 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", {
|
|
3
3
|
value: true
|
|
4
4
|
});
|
|
5
|
-
_export_star
|
|
6
|
-
_export_star(require("./
|
|
7
|
-
_export_star(require("./
|
|
8
|
-
_export_star(require("./
|
|
9
|
-
_export_star(require("./
|
|
10
|
-
_export_star(require("./
|
|
11
|
-
|
|
12
|
-
Object.keys(from).forEach(function(k) {
|
|
13
|
-
if (k !== "default" && !Object.prototype.hasOwnProperty.call(to, k)) {
|
|
14
|
-
Object.defineProperty(to, k, {
|
|
15
|
-
enumerable: true,
|
|
16
|
-
get: function() {
|
|
17
|
-
return from[k];
|
|
18
|
-
}
|
|
19
|
-
});
|
|
20
|
-
}
|
|
21
|
-
});
|
|
22
|
-
return from;
|
|
23
|
-
}
|
|
5
|
+
const _export_star = require("@swc/helpers/_/_export_star");
|
|
6
|
+
_export_star._(require("./new"), exports);
|
|
7
|
+
_export_star._(require("./deploy"), exports);
|
|
8
|
+
_export_star._(require("./build"), exports);
|
|
9
|
+
_export_star._(require("./buildWatch"), exports);
|
|
10
|
+
_export_star._(require("./clear"), exports);
|
|
11
|
+
_export_star._(require("./install"), exports);
|
|
@@ -2,21 +2,9 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", {
|
|
3
3
|
value: true
|
|
4
4
|
});
|
|
5
|
-
_export_star
|
|
6
|
-
_export_star(require("./
|
|
7
|
-
_export_star(require("./
|
|
8
|
-
_export_star(require("./
|
|
9
|
-
_export_star(require("./
|
|
10
|
-
|
|
11
|
-
Object.keys(from).forEach(function(k) {
|
|
12
|
-
if (k !== "default" && !Object.prototype.hasOwnProperty.call(to, k)) {
|
|
13
|
-
Object.defineProperty(to, k, {
|
|
14
|
-
enumerable: true,
|
|
15
|
-
get: function() {
|
|
16
|
-
return from[k];
|
|
17
|
-
}
|
|
18
|
-
});
|
|
19
|
-
}
|
|
20
|
-
});
|
|
21
|
-
return from;
|
|
22
|
-
}
|
|
5
|
+
const _export_star = require("@swc/helpers/_/_export_star");
|
|
6
|
+
_export_star._(require("./deploy"), exports);
|
|
7
|
+
_export_star._(require("./build"), exports);
|
|
8
|
+
_export_star._(require("./buildWatch"), exports);
|
|
9
|
+
_export_star._(require("./clear"), exports);
|
|
10
|
+
_export_star._(require("./install"), exports);
|
|
@@ -6,19 +6,7 @@ Object.defineProperty(exports, "EdgeManager", {
|
|
|
6
6
|
enumerable: true,
|
|
7
7
|
get: () => EdgeManager
|
|
8
8
|
});
|
|
9
|
-
|
|
10
|
-
if (key in obj) {
|
|
11
|
-
Object.defineProperty(obj, key, {
|
|
12
|
-
value,
|
|
13
|
-
enumerable: true,
|
|
14
|
-
configurable: true,
|
|
15
|
-
writable: true
|
|
16
|
-
});
|
|
17
|
-
} else {
|
|
18
|
-
obj[key] = value;
|
|
19
|
-
}
|
|
20
|
-
return obj;
|
|
21
|
-
}
|
|
9
|
+
const _define_property = require("@swc/helpers/_/_define_property");
|
|
22
10
|
class EdgeManager {
|
|
23
11
|
reduceOneEdge(project) {
|
|
24
12
|
if (!(project.name in this._dependencyEdgeHash)) {
|
|
@@ -42,7 +30,7 @@ class EdgeManager {
|
|
|
42
30
|
this._dependencyEdgeHash[project.name] = project.dependencyEdge;
|
|
43
31
|
}
|
|
44
32
|
constructor() {
|
|
45
|
-
_define_property(this, "_dependencyEdgeHash", void 0);
|
|
33
|
+
_define_property._(this, "_dependencyEdgeHash", void 0);
|
|
46
34
|
this._dependencyEdgeHash = {};
|
|
47
35
|
}
|
|
48
36
|
}
|
package/dist/cjs/dag/operator.js
CHANGED
|
@@ -6,29 +6,13 @@ Object.defineProperty(exports, "DagOperator", {
|
|
|
6
6
|
enumerable: true,
|
|
7
7
|
get: () => DagOperator
|
|
8
8
|
});
|
|
9
|
-
const
|
|
9
|
+
const _define_property = require("@swc/helpers/_/_define_property");
|
|
10
|
+
const _interop_require_default = require("@swc/helpers/_/_interop_require_default");
|
|
11
|
+
const _pmap = /* @__PURE__ */ _interop_require_default._(require("p-map"));
|
|
10
12
|
const _error = require("../log/error");
|
|
11
13
|
const _task = require("./task");
|
|
12
14
|
const _edgeManager = require("./edgeManager");
|
|
13
15
|
const _utils = require("./utils");
|
|
14
|
-
function _define_property(obj, key, value) {
|
|
15
|
-
if (key in obj) {
|
|
16
|
-
Object.defineProperty(obj, key, {
|
|
17
|
-
value,
|
|
18
|
-
enumerable: true,
|
|
19
|
-
configurable: true,
|
|
20
|
-
writable: true
|
|
21
|
-
});
|
|
22
|
-
} else {
|
|
23
|
-
obj[key] = value;
|
|
24
|
-
}
|
|
25
|
-
return obj;
|
|
26
|
-
}
|
|
27
|
-
function _interop_require_default(obj) {
|
|
28
|
-
return obj && obj.__esModule ? obj : {
|
|
29
|
-
default: obj
|
|
30
|
-
};
|
|
31
|
-
}
|
|
32
16
|
class DagOperator {
|
|
33
17
|
checkNodeDataExist(name) {
|
|
34
18
|
return this._projectsMap.has(name);
|
|
@@ -238,10 +222,10 @@ class DagOperator {
|
|
|
238
222
|
return searchProjects.filter((p) => preNodes.map((preP) => preP.name).includes(p.name));
|
|
239
223
|
}
|
|
240
224
|
constructor(projects, projectsMap) {
|
|
241
|
-
_define_property(this, "_projects", void 0);
|
|
242
|
-
_define_property(this, "_projectsMap", void 0);
|
|
243
|
-
_define_property(this, "_sortedProjects", void 0);
|
|
244
|
-
_define_property(this, "_createTask", (project, task) => async (stopTask = () => void 0) => {
|
|
225
|
+
_define_property._(this, "_projects", void 0);
|
|
226
|
+
_define_property._(this, "_projectsMap", void 0);
|
|
227
|
+
_define_property._(this, "_sortedProjects", void 0);
|
|
228
|
+
_define_property._(this, "_createTask", (project, task) => async (stopTask = () => void 0) => {
|
|
245
229
|
await task(project, project.dependency || [], () => stopTask());
|
|
246
230
|
return project.name;
|
|
247
231
|
});
|
package/dist/cjs/dag/task.js
CHANGED
|
@@ -6,26 +6,10 @@ Object.defineProperty(exports, "TaskRunner", {
|
|
|
6
6
|
enumerable: true,
|
|
7
7
|
get: () => TaskRunner
|
|
8
8
|
});
|
|
9
|
+
const _define_property = require("@swc/helpers/_/_define_property");
|
|
10
|
+
const _interop_require_default = require("@swc/helpers/_/_interop_require_default");
|
|
9
11
|
const _events = require("events");
|
|
10
|
-
const _pmap = /* @__PURE__ */ _interop_require_default(require("p-map"));
|
|
11
|
-
function _define_property(obj, key, value) {
|
|
12
|
-
if (key in obj) {
|
|
13
|
-
Object.defineProperty(obj, key, {
|
|
14
|
-
value,
|
|
15
|
-
enumerable: true,
|
|
16
|
-
configurable: true,
|
|
17
|
-
writable: true
|
|
18
|
-
});
|
|
19
|
-
} else {
|
|
20
|
-
obj[key] = value;
|
|
21
|
-
}
|
|
22
|
-
return obj;
|
|
23
|
-
}
|
|
24
|
-
function _interop_require_default(obj) {
|
|
25
|
-
return obj && obj.__esModule ? obj : {
|
|
26
|
-
default: obj
|
|
27
|
-
};
|
|
28
|
-
}
|
|
12
|
+
const _pmap = /* @__PURE__ */ _interop_require_default._(require("p-map"));
|
|
29
13
|
class TaskRunner extends _events.EventEmitter {
|
|
30
14
|
async run() {
|
|
31
15
|
const tasks = this._tasks.splice(0, this._concurrency);
|
|
@@ -63,15 +47,15 @@ class TaskRunner extends _events.EventEmitter {
|
|
|
63
47
|
}
|
|
64
48
|
constructor(tasks, { concurrency }) {
|
|
65
49
|
super();
|
|
66
|
-
_define_property(this, "_tasks", void 0);
|
|
67
|
-
_define_property(this, "_concurrency", void 0);
|
|
68
|
-
_define_property(this, "_usableConcurrency", void 0);
|
|
69
|
-
_define_property(this, "_stopFlag", void 0);
|
|
50
|
+
_define_property._(this, "_tasks", void 0);
|
|
51
|
+
_define_property._(this, "_concurrency", void 0);
|
|
52
|
+
_define_property._(this, "_usableConcurrency", void 0);
|
|
53
|
+
_define_property._(this, "_stopFlag", void 0);
|
|
70
54
|
this._tasks = tasks;
|
|
71
55
|
this._concurrency = concurrency || TaskRunner.DefaultConcurrency;
|
|
72
56
|
this._usableConcurrency = this._concurrency;
|
|
73
57
|
this._stopFlag = false;
|
|
74
58
|
}
|
|
75
59
|
}
|
|
76
|
-
_define_property(TaskRunner, "DefaultConcurrency", 10);
|
|
77
|
-
_define_property(TaskRunner, "TASK_FINISH", "task-finish");
|
|
60
|
+
_define_property._(TaskRunner, "DefaultConcurrency", 10);
|
|
61
|
+
_define_property._(TaskRunner, "TASK_FINISH", "task-finish");
|
|
@@ -13,16 +13,12 @@ _export(exports, {
|
|
|
13
13
|
runBuildTask: () => runBuildTask,
|
|
14
14
|
runAllBuildTask: () => runAllBuildTask
|
|
15
15
|
});
|
|
16
|
-
const
|
|
16
|
+
const _interop_require_default = require("@swc/helpers/_/_interop_require_default");
|
|
17
|
+
const _os = /* @__PURE__ */ _interop_require_default._(require("os"));
|
|
17
18
|
const _utils = require("@modern-js/utils");
|
|
18
19
|
const _checkProjectChange = require("../../projects/checkProjectChange");
|
|
19
20
|
const _error = require("../../log/error");
|
|
20
21
|
const _multiTasksLog = require("../../log/multiTasksLog");
|
|
21
|
-
function _interop_require_default(obj) {
|
|
22
|
-
return obj && obj.__esModule ? obj : {
|
|
23
|
-
default: obj
|
|
24
|
-
};
|
|
25
|
-
}
|
|
26
22
|
const createTask = (config, taskCmds = defaultBuildCmds, taskLogger) => {
|
|
27
23
|
const { rootPath, packageManager, disableContentHash = false, enableGitHash = false } = config;
|
|
28
24
|
const task = async (project) => {
|
|
@@ -13,49 +13,10 @@ _export(exports, {
|
|
|
13
13
|
defaultRemoveDirs: () => defaultRemoveDirs,
|
|
14
14
|
runClearTask: () => runClearTask
|
|
15
15
|
});
|
|
16
|
-
const
|
|
16
|
+
const _interop_require_wildcard = require("@swc/helpers/_/_interop_require_wildcard");
|
|
17
|
+
const _path = /* @__PURE__ */ _interop_require_wildcard._(require("path"));
|
|
17
18
|
const _utils = require("@modern-js/utils");
|
|
18
19
|
const _nodecorelibrary = require("@rushstack/node-core-library");
|
|
19
|
-
function _getRequireWildcardCache(nodeInterop) {
|
|
20
|
-
if (typeof WeakMap !== "function")
|
|
21
|
-
return null;
|
|
22
|
-
var cacheBabelInterop = /* @__PURE__ */ new WeakMap();
|
|
23
|
-
var cacheNodeInterop = /* @__PURE__ */ new WeakMap();
|
|
24
|
-
return (_getRequireWildcardCache = function(nodeInterop2) {
|
|
25
|
-
return nodeInterop2 ? cacheNodeInterop : cacheBabelInterop;
|
|
26
|
-
})(nodeInterop);
|
|
27
|
-
}
|
|
28
|
-
function _interop_require_wildcard(obj, nodeInterop) {
|
|
29
|
-
if (!nodeInterop && obj && obj.__esModule) {
|
|
30
|
-
return obj;
|
|
31
|
-
}
|
|
32
|
-
if (obj === null || typeof obj !== "object" && typeof obj !== "function") {
|
|
33
|
-
return {
|
|
34
|
-
default: obj
|
|
35
|
-
};
|
|
36
|
-
}
|
|
37
|
-
var cache = _getRequireWildcardCache(nodeInterop);
|
|
38
|
-
if (cache && cache.has(obj)) {
|
|
39
|
-
return cache.get(obj);
|
|
40
|
-
}
|
|
41
|
-
var newObj = {};
|
|
42
|
-
var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor;
|
|
43
|
-
for (var key in obj) {
|
|
44
|
-
if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) {
|
|
45
|
-
var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null;
|
|
46
|
-
if (desc && (desc.get || desc.set)) {
|
|
47
|
-
Object.defineProperty(newObj, key, desc);
|
|
48
|
-
} else {
|
|
49
|
-
newObj[key] = obj[key];
|
|
50
|
-
}
|
|
51
|
-
}
|
|
52
|
-
}
|
|
53
|
-
newObj.default = obj;
|
|
54
|
-
if (cache) {
|
|
55
|
-
cache.set(obj, newObj);
|
|
56
|
-
}
|
|
57
|
-
return newObj;
|
|
58
|
-
}
|
|
59
20
|
const defaultRemoveDirs = [
|
|
60
21
|
"node_modules"
|
|
61
22
|
];
|
|
@@ -6,50 +6,11 @@ Object.defineProperty(exports, "deploy", {
|
|
|
6
6
|
enumerable: true,
|
|
7
7
|
get: () => deploy
|
|
8
8
|
});
|
|
9
|
-
const
|
|
9
|
+
const _interop_require_wildcard = require("@swc/helpers/_/_interop_require_wildcard");
|
|
10
|
+
const _path = /* @__PURE__ */ _interop_require_wildcard._(require("path"));
|
|
10
11
|
const _nodecorelibrary = require("@rushstack/node-core-library");
|
|
11
12
|
const _utils = require("@modern-js/utils");
|
|
12
13
|
const _constants = require("../../constants");
|
|
13
|
-
function _getRequireWildcardCache(nodeInterop) {
|
|
14
|
-
if (typeof WeakMap !== "function")
|
|
15
|
-
return null;
|
|
16
|
-
var cacheBabelInterop = /* @__PURE__ */ new WeakMap();
|
|
17
|
-
var cacheNodeInterop = /* @__PURE__ */ new WeakMap();
|
|
18
|
-
return (_getRequireWildcardCache = function(nodeInterop2) {
|
|
19
|
-
return nodeInterop2 ? cacheNodeInterop : cacheBabelInterop;
|
|
20
|
-
})(nodeInterop);
|
|
21
|
-
}
|
|
22
|
-
function _interop_require_wildcard(obj, nodeInterop) {
|
|
23
|
-
if (!nodeInterop && obj && obj.__esModule) {
|
|
24
|
-
return obj;
|
|
25
|
-
}
|
|
26
|
-
if (obj === null || typeof obj !== "object" && typeof obj !== "function") {
|
|
27
|
-
return {
|
|
28
|
-
default: obj
|
|
29
|
-
};
|
|
30
|
-
}
|
|
31
|
-
var cache = _getRequireWildcardCache(nodeInterop);
|
|
32
|
-
if (cache && cache.has(obj)) {
|
|
33
|
-
return cache.get(obj);
|
|
34
|
-
}
|
|
35
|
-
var newObj = {};
|
|
36
|
-
var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor;
|
|
37
|
-
for (var key in obj) {
|
|
38
|
-
if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) {
|
|
39
|
-
var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null;
|
|
40
|
-
if (desc && (desc.get || desc.set)) {
|
|
41
|
-
Object.defineProperty(newObj, key, desc);
|
|
42
|
-
} else {
|
|
43
|
-
newObj[key] = obj[key];
|
|
44
|
-
}
|
|
45
|
-
}
|
|
46
|
-
}
|
|
47
|
-
newObj.default = obj;
|
|
48
|
-
if (cache) {
|
|
49
|
-
cache.set(obj, newObj);
|
|
50
|
-
}
|
|
51
|
-
return newObj;
|
|
52
|
-
}
|
|
53
14
|
const createCopyMap = (rootPath, targetProject, copyProjects, deployDir) => {
|
|
54
15
|
const map = /* @__PURE__ */ new Map();
|
|
55
16
|
for (const project of copyProjects) {
|
|
@@ -13,50 +13,11 @@ _export(exports, {
|
|
|
13
13
|
createDependenciesTask: () => createDependenciesTask,
|
|
14
14
|
createDevTask: () => createDevTask
|
|
15
15
|
});
|
|
16
|
+
const _interop_require_wildcard = require("@swc/helpers/_/_interop_require_wildcard");
|
|
16
17
|
const _utils = require("@modern-js/utils");
|
|
17
18
|
const _error = require("../../log/error");
|
|
18
|
-
const _time = /* @__PURE__ */ _interop_require_wildcard(require("../../log/time"));
|
|
19
|
+
const _time = /* @__PURE__ */ _interop_require_wildcard._(require("../../log/time"));
|
|
19
20
|
const _cmds = require("./cmds");
|
|
20
|
-
function _getRequireWildcardCache(nodeInterop) {
|
|
21
|
-
if (typeof WeakMap !== "function")
|
|
22
|
-
return null;
|
|
23
|
-
var cacheBabelInterop = /* @__PURE__ */ new WeakMap();
|
|
24
|
-
var cacheNodeInterop = /* @__PURE__ */ new WeakMap();
|
|
25
|
-
return (_getRequireWildcardCache = function(nodeInterop2) {
|
|
26
|
-
return nodeInterop2 ? cacheNodeInterop : cacheBabelInterop;
|
|
27
|
-
})(nodeInterop);
|
|
28
|
-
}
|
|
29
|
-
function _interop_require_wildcard(obj, nodeInterop) {
|
|
30
|
-
if (!nodeInterop && obj && obj.__esModule) {
|
|
31
|
-
return obj;
|
|
32
|
-
}
|
|
33
|
-
if (obj === null || typeof obj !== "object" && typeof obj !== "function") {
|
|
34
|
-
return {
|
|
35
|
-
default: obj
|
|
36
|
-
};
|
|
37
|
-
}
|
|
38
|
-
var cache = _getRequireWildcardCache(nodeInterop);
|
|
39
|
-
if (cache && cache.has(obj)) {
|
|
40
|
-
return cache.get(obj);
|
|
41
|
-
}
|
|
42
|
-
var newObj = {};
|
|
43
|
-
var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor;
|
|
44
|
-
for (var key in obj) {
|
|
45
|
-
if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) {
|
|
46
|
-
var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null;
|
|
47
|
-
if (desc && (desc.get || desc.set)) {
|
|
48
|
-
Object.defineProperty(newObj, key, desc);
|
|
49
|
-
} else {
|
|
50
|
-
newObj[key] = obj[key];
|
|
51
|
-
}
|
|
52
|
-
}
|
|
53
|
-
}
|
|
54
|
-
newObj.default = obj;
|
|
55
|
-
if (cache) {
|
|
56
|
-
cache.set(obj, newObj);
|
|
57
|
-
}
|
|
58
|
-
return newObj;
|
|
59
|
-
}
|
|
60
21
|
const getFinalTaskCmds = (taskCmds, project) => {
|
|
61
22
|
let finalTaskCmds = [];
|
|
62
23
|
if (taskCmds.length === 1) {
|
|
@@ -6,17 +6,13 @@ Object.defineProperty(exports, "runBuildWatchTask", {
|
|
|
6
6
|
enumerable: true,
|
|
7
7
|
get: () => runBuildWatchTask
|
|
8
8
|
});
|
|
9
|
-
const
|
|
9
|
+
const _interop_require_default = require("@swc/helpers/_/_interop_require_default");
|
|
10
|
+
const _anymatch = /* @__PURE__ */ _interop_require_default._(require("anymatch"));
|
|
10
11
|
const _utils = require("@modern-js/utils");
|
|
11
12
|
const _multiTasksLog = require("../../log/multiTasksLog");
|
|
12
13
|
const _watchProjectsState = require("./watchProjectsState");
|
|
13
14
|
const _cmds = require("./cmds");
|
|
14
15
|
const _createTask = require("./createTask");
|
|
15
|
-
function _interop_require_default(obj) {
|
|
16
|
-
return obj && obj.__esModule ? obj : {
|
|
17
|
-
default: obj
|
|
18
|
-
};
|
|
19
|
-
}
|
|
20
16
|
const getIgnored = (config) => (watchFilePath) => {
|
|
21
17
|
const nodeModulesPattern = /(?:^|[\\/])node_modules/g;
|
|
22
18
|
if (nodeModulesPattern.test(watchFilePath) || watchFilePath.includes("dist")) {
|
|
@@ -6,61 +6,10 @@ Object.defineProperty(exports, "WatchedProjectsState", {
|
|
|
6
6
|
enumerable: true,
|
|
7
7
|
get: () => WatchedProjectsState
|
|
8
8
|
});
|
|
9
|
-
const
|
|
9
|
+
const _define_property = require("@swc/helpers/_/_define_property");
|
|
10
|
+
const _interop_require_wildcard = require("@swc/helpers/_/_interop_require_wildcard");
|
|
11
|
+
const _path = /* @__PURE__ */ _interop_require_wildcard._(require("path"));
|
|
10
12
|
const _utils = require("@modern-js/utils");
|
|
11
|
-
function _define_property(obj, key, value) {
|
|
12
|
-
if (key in obj) {
|
|
13
|
-
Object.defineProperty(obj, key, {
|
|
14
|
-
value,
|
|
15
|
-
enumerable: true,
|
|
16
|
-
configurable: true,
|
|
17
|
-
writable: true
|
|
18
|
-
});
|
|
19
|
-
} else {
|
|
20
|
-
obj[key] = value;
|
|
21
|
-
}
|
|
22
|
-
return obj;
|
|
23
|
-
}
|
|
24
|
-
function _getRequireWildcardCache(nodeInterop) {
|
|
25
|
-
if (typeof WeakMap !== "function")
|
|
26
|
-
return null;
|
|
27
|
-
var cacheBabelInterop = /* @__PURE__ */ new WeakMap();
|
|
28
|
-
var cacheNodeInterop = /* @__PURE__ */ new WeakMap();
|
|
29
|
-
return (_getRequireWildcardCache = function(nodeInterop2) {
|
|
30
|
-
return nodeInterop2 ? cacheNodeInterop : cacheBabelInterop;
|
|
31
|
-
})(nodeInterop);
|
|
32
|
-
}
|
|
33
|
-
function _interop_require_wildcard(obj, nodeInterop) {
|
|
34
|
-
if (!nodeInterop && obj && obj.__esModule) {
|
|
35
|
-
return obj;
|
|
36
|
-
}
|
|
37
|
-
if (obj === null || typeof obj !== "object" && typeof obj !== "function") {
|
|
38
|
-
return {
|
|
39
|
-
default: obj
|
|
40
|
-
};
|
|
41
|
-
}
|
|
42
|
-
var cache = _getRequireWildcardCache(nodeInterop);
|
|
43
|
-
if (cache && cache.has(obj)) {
|
|
44
|
-
return cache.get(obj);
|
|
45
|
-
}
|
|
46
|
-
var newObj = {};
|
|
47
|
-
var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor;
|
|
48
|
-
for (var key in obj) {
|
|
49
|
-
if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) {
|
|
50
|
-
var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null;
|
|
51
|
-
if (desc && (desc.get || desc.set)) {
|
|
52
|
-
Object.defineProperty(newObj, key, desc);
|
|
53
|
-
} else {
|
|
54
|
-
newObj[key] = obj[key];
|
|
55
|
-
}
|
|
56
|
-
}
|
|
57
|
-
}
|
|
58
|
-
newObj.default = obj;
|
|
59
|
-
if (cache) {
|
|
60
|
-
cache.set(obj, newObj);
|
|
61
|
-
}
|
|
62
|
-
return newObj;
|
|
63
|
-
}
|
|
64
13
|
class WatchedProjectsState {
|
|
65
14
|
_initState() {
|
|
66
15
|
const globOption = {
|
|
@@ -105,10 +54,10 @@ class WatchedProjectsState {
|
|
|
105
54
|
return Object.keys(this._watchProjects).map((projectPath) => this._watchProjects[projectPath].name);
|
|
106
55
|
}
|
|
107
56
|
constructor(fromNodes, config) {
|
|
108
|
-
_define_property(this, "_config", void 0);
|
|
109
|
-
_define_property(this, "_fromNodes", void 0);
|
|
110
|
-
_define_property(this, "_watchProjects", void 0);
|
|
111
|
-
_define_property(this, "_projectsFileMap", void 0);
|
|
57
|
+
_define_property._(this, "_config", void 0);
|
|
58
|
+
_define_property._(this, "_fromNodes", void 0);
|
|
59
|
+
_define_property._(this, "_watchProjects", void 0);
|
|
60
|
+
_define_property._(this, "_projectsFileMap", void 0);
|
|
112
61
|
this._fromNodes = fromNodes;
|
|
113
62
|
this._config = config;
|
|
114
63
|
this._projectsFileMap = /* @__PURE__ */ new Map();
|
|
@@ -6,51 +6,12 @@ Object.defineProperty(exports, "runInstallTask", {
|
|
|
6
6
|
enumerable: true,
|
|
7
7
|
get: () => runInstallTask
|
|
8
8
|
});
|
|
9
|
-
const
|
|
9
|
+
const _interop_require_wildcard = require("@swc/helpers/_/_interop_require_wildcard");
|
|
10
|
+
const _path = /* @__PURE__ */ _interop_require_wildcard._(require("path"));
|
|
10
11
|
const _utils = require("@modern-js/utils");
|
|
11
12
|
const _nodecorelibrary = require("@rushstack/node-core-library");
|
|
12
13
|
const _constants = require("../../constants");
|
|
13
14
|
const _install = require("../../utils/install");
|
|
14
|
-
function _getRequireWildcardCache(nodeInterop) {
|
|
15
|
-
if (typeof WeakMap !== "function")
|
|
16
|
-
return null;
|
|
17
|
-
var cacheBabelInterop = /* @__PURE__ */ new WeakMap();
|
|
18
|
-
var cacheNodeInterop = /* @__PURE__ */ new WeakMap();
|
|
19
|
-
return (_getRequireWildcardCache = function(nodeInterop2) {
|
|
20
|
-
return nodeInterop2 ? cacheNodeInterop : cacheBabelInterop;
|
|
21
|
-
})(nodeInterop);
|
|
22
|
-
}
|
|
23
|
-
function _interop_require_wildcard(obj, nodeInterop) {
|
|
24
|
-
if (!nodeInterop && obj && obj.__esModule) {
|
|
25
|
-
return obj;
|
|
26
|
-
}
|
|
27
|
-
if (obj === null || typeof obj !== "object" && typeof obj !== "function") {
|
|
28
|
-
return {
|
|
29
|
-
default: obj
|
|
30
|
-
};
|
|
31
|
-
}
|
|
32
|
-
var cache = _getRequireWildcardCache(nodeInterop);
|
|
33
|
-
if (cache && cache.has(obj)) {
|
|
34
|
-
return cache.get(obj);
|
|
35
|
-
}
|
|
36
|
-
var newObj = {};
|
|
37
|
-
var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor;
|
|
38
|
-
for (var key in obj) {
|
|
39
|
-
if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) {
|
|
40
|
-
var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null;
|
|
41
|
-
if (desc && (desc.get || desc.set)) {
|
|
42
|
-
Object.defineProperty(newObj, key, desc);
|
|
43
|
-
} else {
|
|
44
|
-
newObj[key] = obj[key];
|
|
45
|
-
}
|
|
46
|
-
}
|
|
47
|
-
}
|
|
48
|
-
newObj.default = obj;
|
|
49
|
-
if (cache) {
|
|
50
|
-
cache.set(obj, newObj);
|
|
51
|
-
}
|
|
52
|
-
return newObj;
|
|
53
|
-
}
|
|
54
15
|
const replaceWorkspaces = ({ rootPath, projectsInWorkspaces }) => {
|
|
55
16
|
const pnpmWsFilePath = _path.join(rootPath, _constants.WORKSPACE_FILE.PNPM);
|
|
56
17
|
if (_utils.fs.existsSync(pnpmWsFilePath)) {
|
package/dist/cjs/index.js
CHANGED
|
@@ -6,18 +6,16 @@ Object.defineProperty(exports, "default", {
|
|
|
6
6
|
enumerable: true,
|
|
7
7
|
get: () => _default
|
|
8
8
|
});
|
|
9
|
-
const
|
|
10
|
-
const
|
|
9
|
+
const _export_star = require("@swc/helpers/_/_export_star");
|
|
10
|
+
const _interop_require_default = require("@swc/helpers/_/_interop_require_default");
|
|
11
|
+
const _pluginchangeset = /* @__PURE__ */ _interop_require_default._(require("@modern-js/plugin-changeset"));
|
|
12
|
+
const _pluginlint = /* @__PURE__ */ _interop_require_default._(require("@modern-js/plugin-lint"));
|
|
11
13
|
const _utils = require("@modern-js/utils");
|
|
12
14
|
const _languagedetector = require("@modern-js/plugin-i18n/language-detector");
|
|
13
15
|
const _locale = require("./locale");
|
|
14
16
|
const _cli = require("./cli");
|
|
15
17
|
const _hooks = require("./hooks");
|
|
16
|
-
|
|
17
|
-
return obj && obj.__esModule ? obj : {
|
|
18
|
-
default: obj
|
|
19
|
-
};
|
|
20
|
-
}
|
|
18
|
+
_export_star._(require("./projects/getProjects"), exports);
|
|
21
19
|
const upgradeModel = _utils.Import.lazy("@modern-js/upgrade", require);
|
|
22
20
|
const _default = () => ({
|
|
23
21
|
name: "@modern-js/monorepo-tools",
|
|
@@ -6,21 +6,9 @@ Object.defineProperty(exports, "MultitasksLogger", {
|
|
|
6
6
|
enumerable: true,
|
|
7
7
|
get: () => MultitasksLogger
|
|
8
8
|
});
|
|
9
|
+
const _define_property = require("@swc/helpers/_/_define_property");
|
|
9
10
|
const _utils = require("@modern-js/utils");
|
|
10
11
|
const _utils1 = require("./utils");
|
|
11
|
-
function _define_property(obj, key, value) {
|
|
12
|
-
if (key in obj) {
|
|
13
|
-
Object.defineProperty(obj, key, {
|
|
14
|
-
value,
|
|
15
|
-
enumerable: true,
|
|
16
|
-
configurable: true,
|
|
17
|
-
writable: true
|
|
18
|
-
});
|
|
19
|
-
} else {
|
|
20
|
-
obj[key] = value;
|
|
21
|
-
}
|
|
22
|
-
return obj;
|
|
23
|
-
}
|
|
24
12
|
const createLogger = (name, config) => {
|
|
25
13
|
const options = {
|
|
26
14
|
scope: config.label ? config.label + name : name,
|
|
@@ -76,10 +64,10 @@ class MultitasksLogger {
|
|
|
76
64
|
finishListen() {
|
|
77
65
|
}
|
|
78
66
|
constructor() {
|
|
79
|
-
_define_property(this, "_taskNameList", void 0);
|
|
80
|
-
_define_property(this, "_taskStdoutListenerMap", void 0);
|
|
81
|
-
_define_property(this, "_taskStderrListenerMap", void 0);
|
|
82
|
-
_define_property(this, "_taskLogConfigMap", void 0);
|
|
67
|
+
_define_property._(this, "_taskNameList", void 0);
|
|
68
|
+
_define_property._(this, "_taskStdoutListenerMap", void 0);
|
|
69
|
+
_define_property._(this, "_taskStderrListenerMap", void 0);
|
|
70
|
+
_define_property._(this, "_taskLogConfigMap", void 0);
|
|
83
71
|
this._taskNameList = [];
|
|
84
72
|
this._taskStdoutListenerMap = /* @__PURE__ */ new Map();
|
|
85
73
|
this._taskStderrListenerMap = /* @__PURE__ */ new Map();
|
|
@@ -6,19 +6,7 @@ Object.defineProperty(exports, "Package", {
|
|
|
6
6
|
enumerable: true,
|
|
7
7
|
get: () => Package
|
|
8
8
|
});
|
|
9
|
-
|
|
10
|
-
if (key in obj) {
|
|
11
|
-
Object.defineProperty(obj, key, {
|
|
12
|
-
value,
|
|
13
|
-
enumerable: true,
|
|
14
|
-
configurable: true,
|
|
15
|
-
writable: true
|
|
16
|
-
});
|
|
17
|
-
} else {
|
|
18
|
-
obj[key] = value;
|
|
19
|
-
}
|
|
20
|
-
return obj;
|
|
21
|
-
}
|
|
9
|
+
const _define_property = require("@swc/helpers/_/_define_property");
|
|
22
10
|
class Package {
|
|
23
11
|
get name() {
|
|
24
12
|
return this.json.name;
|
|
@@ -30,9 +18,9 @@ class Package {
|
|
|
30
18
|
return this.json[key];
|
|
31
19
|
}
|
|
32
20
|
constructor(packageJson, packageConfigPath, rootPath) {
|
|
33
|
-
_define_property(this, "json", void 0);
|
|
34
|
-
_define_property(this, "configPath", void 0);
|
|
35
|
-
_define_property(this, "rootPath", void 0);
|
|
21
|
+
_define_property._(this, "json", void 0);
|
|
22
|
+
_define_property._(this, "configPath", void 0);
|
|
23
|
+
_define_property._(this, "rootPath", void 0);
|
|
36
24
|
this.configPath = packageConfigPath;
|
|
37
25
|
this.rootPath = rootPath;
|
|
38
26
|
this.json = packageJson;
|
|
@@ -6,49 +6,10 @@ Object.defineProperty(exports, "getFinalConfig", {
|
|
|
6
6
|
enumerable: true,
|
|
7
7
|
get: () => getFinalConfig
|
|
8
8
|
});
|
|
9
|
-
const
|
|
9
|
+
const _interop_require_wildcard = require("@swc/helpers/_/_interop_require_wildcard");
|
|
10
|
+
const _path = /* @__PURE__ */ _interop_require_wildcard._(require("path"));
|
|
10
11
|
const _nodecorelibrary = require("@rushstack/node-core-library");
|
|
11
12
|
const _monorepo = require("./monorepo");
|
|
12
|
-
function _getRequireWildcardCache(nodeInterop) {
|
|
13
|
-
if (typeof WeakMap !== "function")
|
|
14
|
-
return null;
|
|
15
|
-
var cacheBabelInterop = /* @__PURE__ */ new WeakMap();
|
|
16
|
-
var cacheNodeInterop = /* @__PURE__ */ new WeakMap();
|
|
17
|
-
return (_getRequireWildcardCache = function(nodeInterop2) {
|
|
18
|
-
return nodeInterop2 ? cacheNodeInterop : cacheBabelInterop;
|
|
19
|
-
})(nodeInterop);
|
|
20
|
-
}
|
|
21
|
-
function _interop_require_wildcard(obj, nodeInterop) {
|
|
22
|
-
if (!nodeInterop && obj && obj.__esModule) {
|
|
23
|
-
return obj;
|
|
24
|
-
}
|
|
25
|
-
if (obj === null || typeof obj !== "object" && typeof obj !== "function") {
|
|
26
|
-
return {
|
|
27
|
-
default: obj
|
|
28
|
-
};
|
|
29
|
-
}
|
|
30
|
-
var cache = _getRequireWildcardCache(nodeInterop);
|
|
31
|
-
if (cache && cache.has(obj)) {
|
|
32
|
-
return cache.get(obj);
|
|
33
|
-
}
|
|
34
|
-
var newObj = {};
|
|
35
|
-
var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor;
|
|
36
|
-
for (var key in obj) {
|
|
37
|
-
if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) {
|
|
38
|
-
var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null;
|
|
39
|
-
if (desc && (desc.get || desc.set)) {
|
|
40
|
-
Object.defineProperty(newObj, key, desc);
|
|
41
|
-
} else {
|
|
42
|
-
newObj[key] = obj[key];
|
|
43
|
-
}
|
|
44
|
-
}
|
|
45
|
-
}
|
|
46
|
-
newObj.default = obj;
|
|
47
|
-
if (cache) {
|
|
48
|
-
cache.set(obj, newObj);
|
|
49
|
-
}
|
|
50
|
-
return newObj;
|
|
51
|
-
}
|
|
52
13
|
const defaultConfig = {};
|
|
53
14
|
const getFinalConfig = async (currentPath = process.cwd()) => {
|
|
54
15
|
const monorepo = (0, _monorepo.getMonorepoBaseData)(currentPath);
|
|
@@ -16,49 +16,10 @@ _export(exports, {
|
|
|
16
16
|
getPackageManager: () => getPackageManager,
|
|
17
17
|
getMonorepoBaseData: () => getMonorepoBaseData
|
|
18
18
|
});
|
|
19
|
-
const
|
|
19
|
+
const _interop_require_wildcard = require("@swc/helpers/_/_interop_require_wildcard");
|
|
20
|
+
const _path = /* @__PURE__ */ _interop_require_wildcard._(require("path"));
|
|
20
21
|
const _nodecorelibrary = require("@rushstack/node-core-library");
|
|
21
22
|
const _constants = require("../constants");
|
|
22
|
-
function _getRequireWildcardCache(nodeInterop) {
|
|
23
|
-
if (typeof WeakMap !== "function")
|
|
24
|
-
return null;
|
|
25
|
-
var cacheBabelInterop = /* @__PURE__ */ new WeakMap();
|
|
26
|
-
var cacheNodeInterop = /* @__PURE__ */ new WeakMap();
|
|
27
|
-
return (_getRequireWildcardCache = function(nodeInterop2) {
|
|
28
|
-
return nodeInterop2 ? cacheNodeInterop : cacheBabelInterop;
|
|
29
|
-
})(nodeInterop);
|
|
30
|
-
}
|
|
31
|
-
function _interop_require_wildcard(obj, nodeInterop) {
|
|
32
|
-
if (!nodeInterop && obj && obj.__esModule) {
|
|
33
|
-
return obj;
|
|
34
|
-
}
|
|
35
|
-
if (obj === null || typeof obj !== "object" && typeof obj !== "function") {
|
|
36
|
-
return {
|
|
37
|
-
default: obj
|
|
38
|
-
};
|
|
39
|
-
}
|
|
40
|
-
var cache = _getRequireWildcardCache(nodeInterop);
|
|
41
|
-
if (cache && cache.has(obj)) {
|
|
42
|
-
return cache.get(obj);
|
|
43
|
-
}
|
|
44
|
-
var newObj = {};
|
|
45
|
-
var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor;
|
|
46
|
-
for (var key in obj) {
|
|
47
|
-
if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) {
|
|
48
|
-
var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null;
|
|
49
|
-
if (desc && (desc.get || desc.set)) {
|
|
50
|
-
Object.defineProperty(newObj, key, desc);
|
|
51
|
-
} else {
|
|
52
|
-
newObj[key] = obj[key];
|
|
53
|
-
}
|
|
54
|
-
}
|
|
55
|
-
}
|
|
56
|
-
newObj.default = obj;
|
|
57
|
-
if (cache) {
|
|
58
|
-
cache.set(obj, newObj);
|
|
59
|
-
}
|
|
60
|
-
return newObj;
|
|
61
|
-
}
|
|
62
23
|
const useLerna = (monorepoRootPath) => {
|
|
63
24
|
if (_nodecorelibrary.FileSystem.exists(_path.join(monorepoRootPath, _constants.WORKSPACE_FILE.LERNA))) {
|
|
64
25
|
return true;
|
|
@@ -16,56 +16,13 @@ _export(exports, {
|
|
|
16
16
|
checkProjectChangeByGit: () => checkProjectChangeByGit,
|
|
17
17
|
checkProjectChangeByContent: () => checkProjectChangeByContent
|
|
18
18
|
});
|
|
19
|
-
const
|
|
19
|
+
const _interop_require_default = require("@swc/helpers/_/_interop_require_default");
|
|
20
|
+
const _interop_require_wildcard = require("@swc/helpers/_/_interop_require_wildcard");
|
|
21
|
+
const _path = /* @__PURE__ */ _interop_require_wildcard._(require("path"));
|
|
20
22
|
const _nodecorelibrary = require("@rushstack/node-core-library");
|
|
21
23
|
const _packagedepshash = require("@rushstack/package-deps-hash");
|
|
22
24
|
const _utils = require("@modern-js/utils");
|
|
23
|
-
const _md5 = /* @__PURE__ */ _interop_require_default(require("md5"));
|
|
24
|
-
function _interop_require_default(obj) {
|
|
25
|
-
return obj && obj.__esModule ? obj : {
|
|
26
|
-
default: obj
|
|
27
|
-
};
|
|
28
|
-
}
|
|
29
|
-
function _getRequireWildcardCache(nodeInterop) {
|
|
30
|
-
if (typeof WeakMap !== "function")
|
|
31
|
-
return null;
|
|
32
|
-
var cacheBabelInterop = /* @__PURE__ */ new WeakMap();
|
|
33
|
-
var cacheNodeInterop = /* @__PURE__ */ new WeakMap();
|
|
34
|
-
return (_getRequireWildcardCache = function(nodeInterop2) {
|
|
35
|
-
return nodeInterop2 ? cacheNodeInterop : cacheBabelInterop;
|
|
36
|
-
})(nodeInterop);
|
|
37
|
-
}
|
|
38
|
-
function _interop_require_wildcard(obj, nodeInterop) {
|
|
39
|
-
if (!nodeInterop && obj && obj.__esModule) {
|
|
40
|
-
return obj;
|
|
41
|
-
}
|
|
42
|
-
if (obj === null || typeof obj !== "object" && typeof obj !== "function") {
|
|
43
|
-
return {
|
|
44
|
-
default: obj
|
|
45
|
-
};
|
|
46
|
-
}
|
|
47
|
-
var cache = _getRequireWildcardCache(nodeInterop);
|
|
48
|
-
if (cache && cache.has(obj)) {
|
|
49
|
-
return cache.get(obj);
|
|
50
|
-
}
|
|
51
|
-
var newObj = {};
|
|
52
|
-
var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor;
|
|
53
|
-
for (var key in obj) {
|
|
54
|
-
if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) {
|
|
55
|
-
var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null;
|
|
56
|
-
if (desc && (desc.get || desc.set)) {
|
|
57
|
-
Object.defineProperty(newObj, key, desc);
|
|
58
|
-
} else {
|
|
59
|
-
newObj[key] = obj[key];
|
|
60
|
-
}
|
|
61
|
-
}
|
|
62
|
-
}
|
|
63
|
-
newObj.default = obj;
|
|
64
|
-
if (cache) {
|
|
65
|
-
cache.set(obj, newObj);
|
|
66
|
-
}
|
|
67
|
-
return newObj;
|
|
68
|
-
}
|
|
25
|
+
const _md5 = /* @__PURE__ */ _interop_require_default._(require("md5"));
|
|
69
26
|
const PROJECT_CONTENT_FILE_NAME = "project-content.json";
|
|
70
27
|
const MONOREPO_GIT_FILE_NAME = "monorepo-git.json";
|
|
71
28
|
const PROJECT_MEMORY_PATH = ".project-memory";
|
|
@@ -6,49 +6,10 @@ Object.defineProperty(exports, "clearProjectsMemoryFile", {
|
|
|
6
6
|
enumerable: true,
|
|
7
7
|
get: () => clearProjectsMemoryFile
|
|
8
8
|
});
|
|
9
|
-
const
|
|
9
|
+
const _interop_require_wildcard = require("@swc/helpers/_/_interop_require_wildcard");
|
|
10
|
+
const _path = /* @__PURE__ */ _interop_require_wildcard._(require("path"));
|
|
10
11
|
const _nodecorelibrary = require("@rushstack/node-core-library");
|
|
11
12
|
const _checkProjectChange = require("./checkProjectChange");
|
|
12
|
-
function _getRequireWildcardCache(nodeInterop) {
|
|
13
|
-
if (typeof WeakMap !== "function")
|
|
14
|
-
return null;
|
|
15
|
-
var cacheBabelInterop = /* @__PURE__ */ new WeakMap();
|
|
16
|
-
var cacheNodeInterop = /* @__PURE__ */ new WeakMap();
|
|
17
|
-
return (_getRequireWildcardCache = function(nodeInterop2) {
|
|
18
|
-
return nodeInterop2 ? cacheNodeInterop : cacheBabelInterop;
|
|
19
|
-
})(nodeInterop);
|
|
20
|
-
}
|
|
21
|
-
function _interop_require_wildcard(obj, nodeInterop) {
|
|
22
|
-
if (!nodeInterop && obj && obj.__esModule) {
|
|
23
|
-
return obj;
|
|
24
|
-
}
|
|
25
|
-
if (obj === null || typeof obj !== "object" && typeof obj !== "function") {
|
|
26
|
-
return {
|
|
27
|
-
default: obj
|
|
28
|
-
};
|
|
29
|
-
}
|
|
30
|
-
var cache = _getRequireWildcardCache(nodeInterop);
|
|
31
|
-
if (cache && cache.has(obj)) {
|
|
32
|
-
return cache.get(obj);
|
|
33
|
-
}
|
|
34
|
-
var newObj = {};
|
|
35
|
-
var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor;
|
|
36
|
-
for (var key in obj) {
|
|
37
|
-
if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) {
|
|
38
|
-
var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null;
|
|
39
|
-
if (desc && (desc.get || desc.set)) {
|
|
40
|
-
Object.defineProperty(newObj, key, desc);
|
|
41
|
-
} else {
|
|
42
|
-
newObj[key] = obj[key];
|
|
43
|
-
}
|
|
44
|
-
}
|
|
45
|
-
}
|
|
46
|
-
newObj.default = obj;
|
|
47
|
-
if (cache) {
|
|
48
|
-
cache.set(obj, newObj);
|
|
49
|
-
}
|
|
50
|
-
return newObj;
|
|
51
|
-
}
|
|
52
13
|
const clearProjectsMemoryFile = (projects) => {
|
|
53
14
|
for (const project of projects) {
|
|
54
15
|
const memoryFilePath = _path.join(project.extra.path, _checkProjectChange.PROJECT_MEMORY_PATH, _checkProjectChange.PROJECT_CONTENT_FILE_NAME);
|
|
@@ -13,57 +13,14 @@ _export(exports, {
|
|
|
13
13
|
getProjectsByPackageConfig: () => getProjectsByPackageConfig,
|
|
14
14
|
syncGetProjectsByPackageConfig: () => syncGetProjectsByPackageConfig
|
|
15
15
|
});
|
|
16
|
-
const
|
|
16
|
+
const _interop_require_default = require("@swc/helpers/_/_interop_require_default");
|
|
17
|
+
const _interop_require_wildcard = require("@swc/helpers/_/_interop_require_wildcard");
|
|
18
|
+
const _path = /* @__PURE__ */ _interop_require_wildcard._(require("path"));
|
|
17
19
|
const _nodecorelibrary = require("@rushstack/node-core-library");
|
|
18
20
|
const _utils = require("@modern-js/utils");
|
|
19
|
-
const _pmap = /* @__PURE__ */ _interop_require_default(require("p-map"));
|
|
21
|
+
const _pmap = /* @__PURE__ */ _interop_require_default._(require("p-map"));
|
|
20
22
|
const _error = require("../log/error");
|
|
21
23
|
const _package = require("../package");
|
|
22
|
-
function _interop_require_default(obj) {
|
|
23
|
-
return obj && obj.__esModule ? obj : {
|
|
24
|
-
default: obj
|
|
25
|
-
};
|
|
26
|
-
}
|
|
27
|
-
function _getRequireWildcardCache(nodeInterop) {
|
|
28
|
-
if (typeof WeakMap !== "function")
|
|
29
|
-
return null;
|
|
30
|
-
var cacheBabelInterop = /* @__PURE__ */ new WeakMap();
|
|
31
|
-
var cacheNodeInterop = /* @__PURE__ */ new WeakMap();
|
|
32
|
-
return (_getRequireWildcardCache = function(nodeInterop2) {
|
|
33
|
-
return nodeInterop2 ? cacheNodeInterop : cacheBabelInterop;
|
|
34
|
-
})(nodeInterop);
|
|
35
|
-
}
|
|
36
|
-
function _interop_require_wildcard(obj, nodeInterop) {
|
|
37
|
-
if (!nodeInterop && obj && obj.__esModule) {
|
|
38
|
-
return obj;
|
|
39
|
-
}
|
|
40
|
-
if (obj === null || typeof obj !== "object" && typeof obj !== "function") {
|
|
41
|
-
return {
|
|
42
|
-
default: obj
|
|
43
|
-
};
|
|
44
|
-
}
|
|
45
|
-
var cache = _getRequireWildcardCache(nodeInterop);
|
|
46
|
-
if (cache && cache.has(obj)) {
|
|
47
|
-
return cache.get(obj);
|
|
48
|
-
}
|
|
49
|
-
var newObj = {};
|
|
50
|
-
var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor;
|
|
51
|
-
for (var key in obj) {
|
|
52
|
-
if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) {
|
|
53
|
-
var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null;
|
|
54
|
-
if (desc && (desc.get || desc.set)) {
|
|
55
|
-
Object.defineProperty(newObj, key, desc);
|
|
56
|
-
} else {
|
|
57
|
-
newObj[key] = obj[key];
|
|
58
|
-
}
|
|
59
|
-
}
|
|
60
|
-
}
|
|
61
|
-
newObj.default = obj;
|
|
62
|
-
if (cache) {
|
|
63
|
-
cache.set(obj, newObj);
|
|
64
|
-
}
|
|
65
|
-
return newObj;
|
|
66
|
-
}
|
|
67
24
|
const normalize = (results) => results.map((fp) => _path.normalize(fp));
|
|
68
25
|
const getGlobOpts = (rootPath, packageConfigs, ignore = []) => {
|
|
69
26
|
const globOpts = {
|
|
@@ -13,52 +13,13 @@ _export(exports, {
|
|
|
13
13
|
getProjectsByWorkspaceFile: () => getProjectsByWorkspaceFile,
|
|
14
14
|
syncGetProjectsByWorkspaceFile: () => syncGetProjectsByWorkspaceFile
|
|
15
15
|
});
|
|
16
|
-
const
|
|
16
|
+
const _interop_require_wildcard = require("@swc/helpers/_/_interop_require_wildcard");
|
|
17
|
+
const _path = /* @__PURE__ */ _interop_require_wildcard._(require("path"));
|
|
17
18
|
const _nodecorelibrary = require("@rushstack/node-core-library");
|
|
18
19
|
const _utils = require("@modern-js/utils");
|
|
19
20
|
const _monorepo = require("../parse-config/monorepo");
|
|
20
21
|
const _constants = require("../constants");
|
|
21
22
|
const _getProjectsByPackagesConfig = require("./getProjectsByPackagesConfig");
|
|
22
|
-
function _getRequireWildcardCache(nodeInterop) {
|
|
23
|
-
if (typeof WeakMap !== "function")
|
|
24
|
-
return null;
|
|
25
|
-
var cacheBabelInterop = /* @__PURE__ */ new WeakMap();
|
|
26
|
-
var cacheNodeInterop = /* @__PURE__ */ new WeakMap();
|
|
27
|
-
return (_getRequireWildcardCache = function(nodeInterop2) {
|
|
28
|
-
return nodeInterop2 ? cacheNodeInterop : cacheBabelInterop;
|
|
29
|
-
})(nodeInterop);
|
|
30
|
-
}
|
|
31
|
-
function _interop_require_wildcard(obj, nodeInterop) {
|
|
32
|
-
if (!nodeInterop && obj && obj.__esModule) {
|
|
33
|
-
return obj;
|
|
34
|
-
}
|
|
35
|
-
if (obj === null || typeof obj !== "object" && typeof obj !== "function") {
|
|
36
|
-
return {
|
|
37
|
-
default: obj
|
|
38
|
-
};
|
|
39
|
-
}
|
|
40
|
-
var cache = _getRequireWildcardCache(nodeInterop);
|
|
41
|
-
if (cache && cache.has(obj)) {
|
|
42
|
-
return cache.get(obj);
|
|
43
|
-
}
|
|
44
|
-
var newObj = {};
|
|
45
|
-
var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor;
|
|
46
|
-
for (var key in obj) {
|
|
47
|
-
if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) {
|
|
48
|
-
var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null;
|
|
49
|
-
if (desc && (desc.get || desc.set)) {
|
|
50
|
-
Object.defineProperty(newObj, key, desc);
|
|
51
|
-
} else {
|
|
52
|
-
newObj[key] = obj[key];
|
|
53
|
-
}
|
|
54
|
-
}
|
|
55
|
-
}
|
|
56
|
-
newObj.default = obj;
|
|
57
|
-
if (cache) {
|
|
58
|
-
cache.set(obj, newObj);
|
|
59
|
-
}
|
|
60
|
-
return newObj;
|
|
61
|
-
}
|
|
62
23
|
const getProjectsByWorkspaceFile = async (rootPath, config, ignoreConfigs) => {
|
|
63
24
|
var _config_workspaceFile;
|
|
64
25
|
let { workspaceFile } = config;
|
|
@@ -13,49 +13,10 @@ _export(exports, {
|
|
|
13
13
|
removeLockFile: () => removeLockFile,
|
|
14
14
|
installByPackageManager: () => installByPackageManager
|
|
15
15
|
});
|
|
16
|
-
const
|
|
16
|
+
const _interop_require_wildcard = require("@swc/helpers/_/_interop_require_wildcard");
|
|
17
|
+
const _path = /* @__PURE__ */ _interop_require_wildcard._(require("path"));
|
|
17
18
|
const _utils = require("@modern-js/utils");
|
|
18
19
|
const _constants = require("../constants");
|
|
19
|
-
function _getRequireWildcardCache(nodeInterop) {
|
|
20
|
-
if (typeof WeakMap !== "function")
|
|
21
|
-
return null;
|
|
22
|
-
var cacheBabelInterop = /* @__PURE__ */ new WeakMap();
|
|
23
|
-
var cacheNodeInterop = /* @__PURE__ */ new WeakMap();
|
|
24
|
-
return (_getRequireWildcardCache = function(nodeInterop2) {
|
|
25
|
-
return nodeInterop2 ? cacheNodeInterop : cacheBabelInterop;
|
|
26
|
-
})(nodeInterop);
|
|
27
|
-
}
|
|
28
|
-
function _interop_require_wildcard(obj, nodeInterop) {
|
|
29
|
-
if (!nodeInterop && obj && obj.__esModule) {
|
|
30
|
-
return obj;
|
|
31
|
-
}
|
|
32
|
-
if (obj === null || typeof obj !== "object" && typeof obj !== "function") {
|
|
33
|
-
return {
|
|
34
|
-
default: obj
|
|
35
|
-
};
|
|
36
|
-
}
|
|
37
|
-
var cache = _getRequireWildcardCache(nodeInterop);
|
|
38
|
-
if (cache && cache.has(obj)) {
|
|
39
|
-
return cache.get(obj);
|
|
40
|
-
}
|
|
41
|
-
var newObj = {};
|
|
42
|
-
var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor;
|
|
43
|
-
for (var key in obj) {
|
|
44
|
-
if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) {
|
|
45
|
-
var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null;
|
|
46
|
-
if (desc && (desc.get || desc.set)) {
|
|
47
|
-
Object.defineProperty(newObj, key, desc);
|
|
48
|
-
} else {
|
|
49
|
-
newObj[key] = obj[key];
|
|
50
|
-
}
|
|
51
|
-
}
|
|
52
|
-
}
|
|
53
|
-
newObj.default = obj;
|
|
54
|
-
if (cache) {
|
|
55
|
-
cache.set(obj, newObj);
|
|
56
|
-
}
|
|
57
|
-
return newObj;
|
|
58
|
-
}
|
|
59
20
|
const removeLockFile = (rootPath, packageManager) => {
|
|
60
21
|
if (packageManager === "pnpm") {
|
|
61
22
|
_utils.fs.removeSync(_path.join(rootPath, _constants.LOCK_FILE.PNPM));
|
|
@@ -1,16 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
if (key in obj) {
|
|
3
|
-
Object.defineProperty(obj, key, {
|
|
4
|
-
value,
|
|
5
|
-
enumerable: true,
|
|
6
|
-
configurable: true,
|
|
7
|
-
writable: true
|
|
8
|
-
});
|
|
9
|
-
} else {
|
|
10
|
-
obj[key] = value;
|
|
11
|
-
}
|
|
12
|
-
return obj;
|
|
13
|
-
}
|
|
1
|
+
import { _ as _define_property } from "@swc/helpers/_/_define_property";
|
|
14
2
|
export class EdgeManager {
|
|
15
3
|
reduceOneEdge(project) {
|
|
16
4
|
if (!(project.name in this._dependencyEdgeHash)) {
|
package/dist/esm/dag/operator.js
CHANGED
|
@@ -1,16 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
if (key in obj) {
|
|
3
|
-
Object.defineProperty(obj, key, {
|
|
4
|
-
value,
|
|
5
|
-
enumerable: true,
|
|
6
|
-
configurable: true,
|
|
7
|
-
writable: true
|
|
8
|
-
});
|
|
9
|
-
} else {
|
|
10
|
-
obj[key] = value;
|
|
11
|
-
}
|
|
12
|
-
return obj;
|
|
13
|
-
}
|
|
1
|
+
import { _ as _define_property } from "@swc/helpers/_/_define_property";
|
|
14
2
|
import pMap from "p-map";
|
|
15
3
|
import { errorLog } from "../log/error";
|
|
16
4
|
import { TaskRunner } from "./task";
|
package/dist/esm/dag/task.js
CHANGED
|
@@ -1,16 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
if (key in obj) {
|
|
3
|
-
Object.defineProperty(obj, key, {
|
|
4
|
-
value,
|
|
5
|
-
enumerable: true,
|
|
6
|
-
configurable: true,
|
|
7
|
-
writable: true
|
|
8
|
-
});
|
|
9
|
-
} else {
|
|
10
|
-
obj[key] = value;
|
|
11
|
-
}
|
|
12
|
-
return obj;
|
|
13
|
-
}
|
|
1
|
+
import { _ as _define_property } from "@swc/helpers/_/_define_property";
|
|
14
2
|
import { EventEmitter } from "events";
|
|
15
3
|
import pMap from "p-map";
|
|
16
4
|
export class TaskRunner extends EventEmitter {
|
|
@@ -1,16 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
if (key in obj) {
|
|
3
|
-
Object.defineProperty(obj, key, {
|
|
4
|
-
value,
|
|
5
|
-
enumerable: true,
|
|
6
|
-
configurable: true,
|
|
7
|
-
writable: true
|
|
8
|
-
});
|
|
9
|
-
} else {
|
|
10
|
-
obj[key] = value;
|
|
11
|
-
}
|
|
12
|
-
return obj;
|
|
13
|
-
}
|
|
1
|
+
import { _ as _define_property } from "@swc/helpers/_/_define_property";
|
|
14
2
|
import * as path from "path";
|
|
15
3
|
import { globby } from "@modern-js/utils";
|
|
16
4
|
export class WatchedProjectsState {
|
package/dist/esm/index.js
CHANGED
|
@@ -5,6 +5,7 @@ import { getLocaleLanguage } from "@modern-js/plugin-i18n/language-detector";
|
|
|
5
5
|
import { i18n } from "./locale";
|
|
6
6
|
import { newCli, deployCli, clearCli } from "./cli";
|
|
7
7
|
import { hooks } from "./hooks";
|
|
8
|
+
export * from "./projects/getProjects";
|
|
8
9
|
const upgradeModel = Import.lazy("@modern-js/upgrade", require);
|
|
9
10
|
export default () => ({
|
|
10
11
|
name: "@modern-js/monorepo-tools",
|
|
@@ -1,16 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
if (key in obj) {
|
|
3
|
-
Object.defineProperty(obj, key, {
|
|
4
|
-
value,
|
|
5
|
-
enumerable: true,
|
|
6
|
-
configurable: true,
|
|
7
|
-
writable: true
|
|
8
|
-
});
|
|
9
|
-
} else {
|
|
10
|
-
obj[key] = value;
|
|
11
|
-
}
|
|
12
|
-
return obj;
|
|
13
|
-
}
|
|
1
|
+
import { _ as _define_property } from "@swc/helpers/_/_define_property";
|
|
14
2
|
import { Signale } from "@modern-js/utils";
|
|
15
3
|
import { formatLog } from "./utils";
|
|
16
4
|
const createLogger = (name, config) => {
|
|
@@ -1,16 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
if (key in obj) {
|
|
3
|
-
Object.defineProperty(obj, key, {
|
|
4
|
-
value,
|
|
5
|
-
enumerable: true,
|
|
6
|
-
configurable: true,
|
|
7
|
-
writable: true
|
|
8
|
-
});
|
|
9
|
-
} else {
|
|
10
|
-
obj[key] = value;
|
|
11
|
-
}
|
|
12
|
-
return obj;
|
|
13
|
-
}
|
|
1
|
+
import { _ as _define_property } from "@swc/helpers/_/_define_property";
|
|
14
2
|
export class Package {
|
|
15
3
|
get name() {
|
|
16
4
|
return this.json.name;
|
package/dist/types/index.d.ts
CHANGED
package/package.json
CHANGED
|
@@ -15,7 +15,7 @@
|
|
|
15
15
|
"modern",
|
|
16
16
|
"modern.js"
|
|
17
17
|
],
|
|
18
|
-
"version": "2.
|
|
18
|
+
"version": "2.20.0",
|
|
19
19
|
"jsnext:source": "./src/index.ts",
|
|
20
20
|
"types": "./dist/types/index.d.ts",
|
|
21
21
|
"main": "./dist/cjs/index.js",
|
|
@@ -37,20 +37,20 @@
|
|
|
37
37
|
"modern": "./bin/modern.js"
|
|
38
38
|
},
|
|
39
39
|
"dependencies": {
|
|
40
|
-
"@babel/runtime": "^7.18.0",
|
|
41
40
|
"@rushstack/node-core-library": "^3.39.1",
|
|
42
41
|
"@rushstack/package-deps-hash": "^3.0.54",
|
|
43
42
|
"anymatch": "^3.1.2",
|
|
44
43
|
"md5": "^2.3.0",
|
|
45
44
|
"p-map": "^4.0.0",
|
|
46
|
-
"@
|
|
47
|
-
"@modern-js/
|
|
48
|
-
"@modern-js/
|
|
49
|
-
"@modern-js/
|
|
50
|
-
"@modern-js/plugin
|
|
51
|
-
"@modern-js/plugin-
|
|
52
|
-
"@modern-js/plugin-
|
|
53
|
-
"@modern-js/
|
|
45
|
+
"@swc/helpers": "0.5.1",
|
|
46
|
+
"@modern-js/core": "2.20.0",
|
|
47
|
+
"@modern-js/new-action": "2.20.0",
|
|
48
|
+
"@modern-js/upgrade": "2.20.0",
|
|
49
|
+
"@modern-js/plugin": "2.20.0",
|
|
50
|
+
"@modern-js/plugin-changeset": "2.20.0",
|
|
51
|
+
"@modern-js/plugin-i18n": "2.20.0",
|
|
52
|
+
"@modern-js/plugin-lint": "2.20.0",
|
|
53
|
+
"@modern-js/utils": "2.20.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": "^4",
|
|
61
|
-
"@scripts/build": "2.
|
|
62
|
-
"@scripts/jest-config": "2.
|
|
61
|
+
"@scripts/build": "2.20.0",
|
|
62
|
+
"@scripts/jest-config": "2.20.0"
|
|
63
63
|
},
|
|
64
64
|
"sideEffects": false,
|
|
65
65
|
"publishConfig": {
|