@lage-run/cli 0.4.21 → 0.4.23
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.json +49 -1
- package/CHANGELOG.md +21 -2
- package/lib/filter/getFilteredPackages.js +34 -12
- package/lib/filter/getFilteredPackages.js.map +1 -1
- package/package.json +5 -5
package/CHANGELOG.json
CHANGED
|
@@ -2,7 +2,55 @@
|
|
|
2
2
|
"name": "@lage-run/cli",
|
|
3
3
|
"entries": [
|
|
4
4
|
{
|
|
5
|
-
"date": "Wed, 26 Oct 2022
|
|
5
|
+
"date": "Wed, 26 Oct 2022 22:48:28 GMT",
|
|
6
|
+
"tag": "@lage-run/cli_v0.4.23",
|
|
7
|
+
"version": "0.4.23",
|
|
8
|
+
"comments": {
|
|
9
|
+
"patch": [
|
|
10
|
+
{
|
|
11
|
+
"author": "email not defined",
|
|
12
|
+
"package": "@lage-run/cli",
|
|
13
|
+
"commit": "d7788f1c921d113f11334474adf362162041f9a6",
|
|
14
|
+
"comment": "run modified packages and their deps first if running with since option and hitting repoWideChanges"
|
|
15
|
+
}
|
|
16
|
+
]
|
|
17
|
+
}
|
|
18
|
+
},
|
|
19
|
+
{
|
|
20
|
+
"date": "Wed, 26 Oct 2022 22:01:13 GMT",
|
|
21
|
+
"tag": "@lage-run/cli_v0.4.22",
|
|
22
|
+
"version": "0.4.22",
|
|
23
|
+
"comments": {
|
|
24
|
+
"patch": [
|
|
25
|
+
{
|
|
26
|
+
"author": "beachball",
|
|
27
|
+
"package": "@lage-run/cli",
|
|
28
|
+
"comment": "Bump @lage-run/scheduler to v0.5.0",
|
|
29
|
+
"commit": "d4f959e1c46d50725f556f92917f1a1cf3ee0bd9"
|
|
30
|
+
},
|
|
31
|
+
{
|
|
32
|
+
"author": "beachball",
|
|
33
|
+
"package": "@lage-run/cli",
|
|
34
|
+
"comment": "Bump @lage-run/target-graph to v0.5.0",
|
|
35
|
+
"commit": "d4f959e1c46d50725f556f92917f1a1cf3ee0bd9"
|
|
36
|
+
},
|
|
37
|
+
{
|
|
38
|
+
"author": "beachball",
|
|
39
|
+
"package": "@lage-run/cli",
|
|
40
|
+
"comment": "Bump @lage-run/cache to v0.1.25",
|
|
41
|
+
"commit": "d4f959e1c46d50725f556f92917f1a1cf3ee0bd9"
|
|
42
|
+
},
|
|
43
|
+
{
|
|
44
|
+
"author": "beachball",
|
|
45
|
+
"package": "@lage-run/cli",
|
|
46
|
+
"comment": "Bump @lage-run/reporters to v0.2.31",
|
|
47
|
+
"commit": "d4f959e1c46d50725f556f92917f1a1cf3ee0bd9"
|
|
48
|
+
}
|
|
49
|
+
]
|
|
50
|
+
}
|
|
51
|
+
},
|
|
52
|
+
{
|
|
53
|
+
"date": "Wed, 26 Oct 2022 00:02:06 GMT",
|
|
6
54
|
"tag": "@lage-run/cli_v0.4.21",
|
|
7
55
|
"version": "0.4.21",
|
|
8
56
|
"comments": {
|
package/CHANGELOG.md
CHANGED
|
@@ -1,12 +1,31 @@
|
|
|
1
1
|
# Change Log - @lage-run/cli
|
|
2
2
|
|
|
3
|
-
This log was last generated on Wed, 26 Oct 2022
|
|
3
|
+
This log was last generated on Wed, 26 Oct 2022 22:48:28 GMT and should not be manually modified.
|
|
4
4
|
|
|
5
5
|
<!-- Start content -->
|
|
6
6
|
|
|
7
|
+
## 0.4.23
|
|
8
|
+
|
|
9
|
+
Wed, 26 Oct 2022 22:48:28 GMT
|
|
10
|
+
|
|
11
|
+
### Patches
|
|
12
|
+
|
|
13
|
+
- run modified packages and their deps first if running with since option and hitting repoWideChanges (email not defined)
|
|
14
|
+
|
|
15
|
+
## 0.4.22
|
|
16
|
+
|
|
17
|
+
Wed, 26 Oct 2022 22:01:13 GMT
|
|
18
|
+
|
|
19
|
+
### Patches
|
|
20
|
+
|
|
21
|
+
- Bump @lage-run/scheduler to v0.5.0
|
|
22
|
+
- Bump @lage-run/target-graph to v0.5.0
|
|
23
|
+
- Bump @lage-run/cache to v0.1.25
|
|
24
|
+
- Bump @lage-run/reporters to v0.2.31
|
|
25
|
+
|
|
7
26
|
## 0.4.21
|
|
8
27
|
|
|
9
|
-
Wed, 26 Oct 2022 00:
|
|
28
|
+
Wed, 26 Oct 2022 00:02:06 GMT
|
|
10
29
|
|
|
11
30
|
### Patches
|
|
12
31
|
|
|
@@ -31,13 +31,24 @@ function getFilteredPackages(options) {
|
|
|
31
31
|
// If scoped is defined, get scoped packages
|
|
32
32
|
const hasScopes = Array.isArray(scope) && scope.length > 0;
|
|
33
33
|
let scopedPackages = undefined;
|
|
34
|
+
let filteredPackages = undefined;
|
|
35
|
+
let changedPackages = undefined;
|
|
36
|
+
const hasSince = typeof since !== "undefined";
|
|
37
|
+
// If scope is defined, get scoped packages and return
|
|
34
38
|
if (hasScopes) {
|
|
35
39
|
scopedPackages = (0, workspace_tools_1.getScopedPackages)(scope, packageInfos);
|
|
40
|
+
// return filteredPackages;
|
|
41
|
+
return filterPackages({
|
|
42
|
+
logger,
|
|
43
|
+
packageInfos,
|
|
44
|
+
scopedPackages,
|
|
45
|
+
changedPackages,
|
|
46
|
+
includeDependencies,
|
|
47
|
+
includeDependents,
|
|
48
|
+
});
|
|
36
49
|
}
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
// Be specific with the changed packages only if no repo-wide changes occurred
|
|
40
|
-
if (hasSince && !hasRepoChanged(since, root, repoWideChanges, logger)) {
|
|
50
|
+
// If since is defined, get changed packages.
|
|
51
|
+
else if (hasSince) {
|
|
41
52
|
try {
|
|
42
53
|
changedPackages = (0, workspace_tools_1.getChangedPackages)(root, since, sinceIgnoreGlobs);
|
|
43
54
|
}
|
|
@@ -45,15 +56,26 @@ function getFilteredPackages(options) {
|
|
|
45
56
|
logger.warn(`An error in the git command has caused this scope run to include every package\n${e}`);
|
|
46
57
|
// if getChangedPackages throws, we will assume all have changed (using changedPackage = undefined)
|
|
47
58
|
}
|
|
59
|
+
filteredPackages = filterPackages({
|
|
60
|
+
logger,
|
|
61
|
+
packageInfos,
|
|
62
|
+
scopedPackages,
|
|
63
|
+
changedPackages,
|
|
64
|
+
includeDependencies,
|
|
65
|
+
includeDependents,
|
|
66
|
+
});
|
|
67
|
+
// If the defined repo-wide changes are detected the get all packages and append to the filtered packages.
|
|
68
|
+
// This alo ensures that the modified packages are always run first.
|
|
69
|
+
if (hasRepoChanged(since, root, repoWideChanges, logger)) {
|
|
70
|
+
logger.verbose(`Repo-wide changes detected, running all packages. The following changed packages and their deps (if specified) will be run first: ${filteredPackages.join(",")}`);
|
|
71
|
+
filteredPackages = [...new Set(filteredPackages.concat(Object.keys(packageInfos)))];
|
|
72
|
+
}
|
|
73
|
+
return filteredPackages;
|
|
74
|
+
}
|
|
75
|
+
else {
|
|
76
|
+
// If neither scope or since is defined, return all packages
|
|
77
|
+
return Object.keys(packageInfos);
|
|
48
78
|
}
|
|
49
|
-
return filterPackages({
|
|
50
|
-
logger,
|
|
51
|
-
packageInfos,
|
|
52
|
-
scopedPackages,
|
|
53
|
-
changedPackages,
|
|
54
|
-
includeDependencies,
|
|
55
|
-
includeDependents,
|
|
56
|
-
});
|
|
57
79
|
}
|
|
58
80
|
exports.getFilteredPackages = getFilteredPackages;
|
|
59
81
|
function hasRepoChanged(since, root, environmentGlob, logger) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"getFilteredPackages.js","sourceRoot":"","sources":["../../src/filter/getFilteredPackages.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,qDAOyB;AACzB,8CAAgC;AAGhC,SAAgB,mBAAmB,CAAC,OAUnC;IACC,MAAM,EAAE,KAAK,EAAE,KAAK,EAAE,gBAAgB,EAAE,eAAe,EAAE,iBAAiB,EAAE,mBAAmB,EAAE,MAAM,EAAE,YAAY,EAAE,IAAI,EAAE,GAAG,OAAO,CAAC;IAExI,4CAA4C;IAC5C,MAAM,SAAS,GAAG,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,IAAI,KAAK,CAAC,MAAM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AC,CAAC,CAAC;KAC7E;IAED,qDAAqD;IACrD,IAAI,mBAAmB,EAAE;QACvB,MAAM,CAAC,OAAO,CAAC,0CAA0C,CAAC,CAAC;QAC3D,QAAQ,GAAG,QAAQ,CAAC,MAAM,CAAC,IAAA,2CAAyB,EAAC,QAAQ,EAAE,YAAY,CAAC,CAAC,CAAC;KAC/E;IAED,MAAM,MAAM,GAAG,IAAI,GAAG,CAAC,QAAQ,CAAC,CAAC;IAEjC,OAAO,CAAC,GAAG,MAAM,CAAC,CAAC;AACrB,CAAC;AA/CD,wCA+CC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@lage-run/cli",
|
|
3
|
-
"version": "0.4.
|
|
3
|
+
"version": "0.4.23",
|
|
4
4
|
"description": "Command Line Interface for Lage",
|
|
5
5
|
"repository": {
|
|
6
6
|
"url": "https://github.com/microsoft/lage"
|
|
@@ -19,10 +19,10 @@
|
|
|
19
19
|
"dependencies": {
|
|
20
20
|
"@lage-run/find-npm-client": "^0.1.1",
|
|
21
21
|
"@lage-run/logger": "^1.2.0",
|
|
22
|
-
"@lage-run/scheduler": "^0.
|
|
23
|
-
"@lage-run/target-graph": "^0.
|
|
24
|
-
"@lage-run/cache": "^0.1.
|
|
25
|
-
"@lage-run/reporters": "^0.2.
|
|
22
|
+
"@lage-run/scheduler": "^0.5.0",
|
|
23
|
+
"@lage-run/target-graph": "^0.5.0",
|
|
24
|
+
"@lage-run/cache": "^0.1.25",
|
|
25
|
+
"@lage-run/reporters": "^0.2.31",
|
|
26
26
|
"commander": "^9.4.0",
|
|
27
27
|
"workspace-tools": "^0.28.0",
|
|
28
28
|
"chokidar": "3.5.3"
|