@lage-run/cli 0.13.1 → 0.14.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.json CHANGED
@@ -2,7 +2,131 @@
2
2
  "name": "@lage-run/cli",
3
3
  "entries": [
4
4
  {
5
- "date": "Thu, 06 Apr 2023 22:27:27 GMT",
5
+ "date": "Tue, 25 Apr 2023 02:50:56 GMT",
6
+ "tag": "@lage-run/cli_v0.14.0",
7
+ "version": "0.14.0",
8
+ "comments": {
9
+ "minor": [
10
+ {
11
+ "author": "stchur@microsoft.com",
12
+ "package": "@lage-run/cli",
13
+ "commit": "a2e112e8aafee26380684efca4db994a9c5e3801",
14
+ "comment": "Add support for --log-file (to be used in concert with --reporter vfl"
15
+ },
16
+ {
17
+ "author": "beachball",
18
+ "package": "@lage-run/cli",
19
+ "comment": "Bump @lage-run/config to v0.1.4",
20
+ "commit": "a2e112e8aafee26380684efca4db994a9c5e3801"
21
+ },
22
+ {
23
+ "author": "beachball",
24
+ "package": "@lage-run/cli",
25
+ "comment": "Bump @lage-run/logger to v1.3.0",
26
+ "commit": "a2e112e8aafee26380684efca4db994a9c5e3801"
27
+ },
28
+ {
29
+ "author": "beachball",
30
+ "package": "@lage-run/cli",
31
+ "comment": "Bump @lage-run/scheduler to v0.11.3",
32
+ "commit": "a2e112e8aafee26380684efca4db994a9c5e3801"
33
+ },
34
+ {
35
+ "author": "beachball",
36
+ "package": "@lage-run/cli",
37
+ "comment": "Bump @lage-run/scheduler-types to v0.3.8",
38
+ "commit": "a2e112e8aafee26380684efca4db994a9c5e3801"
39
+ },
40
+ {
41
+ "author": "beachball",
42
+ "package": "@lage-run/cli",
43
+ "comment": "Bump @lage-run/target-graph to v0.8.4",
44
+ "commit": "a2e112e8aafee26380684efca4db994a9c5e3801"
45
+ },
46
+ {
47
+ "author": "beachball",
48
+ "package": "@lage-run/cli",
49
+ "comment": "Bump @lage-run/cache to v0.5.4",
50
+ "commit": "a2e112e8aafee26380684efca4db994a9c5e3801"
51
+ },
52
+ {
53
+ "author": "beachball",
54
+ "package": "@lage-run/cli",
55
+ "comment": "Bump @lage-run/reporters to v1.2.0",
56
+ "commit": "a2e112e8aafee26380684efca4db994a9c5e3801"
57
+ }
58
+ ],
59
+ "patch": [
60
+ {
61
+ "author": "elcraig@microsoft.com",
62
+ "package": "@lage-run/cli",
63
+ "commit": "a2e112e8aafee26380684efca4db994a9c5e3801",
64
+ "comment": "Update repository and homepage"
65
+ },
66
+ {
67
+ "author": "stchur@microsoft.com",
68
+ "package": "@lage-run/cli",
69
+ "commit": "a2e112e8aafee26380684efca4db994a9c5e3801",
70
+ "comment": {
71
+ "title": "Add reporter cleanup to watchAction"
72
+ }
73
+ }
74
+ ]
75
+ }
76
+ },
77
+ {
78
+ "date": "Fri, 14 Apr 2023 04:37:54 GMT",
79
+ "tag": "@lage-run/cli_v0.13.2",
80
+ "version": "0.13.2",
81
+ "comments": {
82
+ "patch": [
83
+ {
84
+ "author": "kchau@microsoft.com",
85
+ "package": "@lage-run/cli",
86
+ "commit": "bb22ec2ee3a793eef0a09feb6759f7c10db65fe0",
87
+ "comment": "making lage boot faster"
88
+ },
89
+ {
90
+ "author": "beachball",
91
+ "package": "@lage-run/cli",
92
+ "comment": "Bump @lage-run/config to v0.1.3",
93
+ "commit": "bb22ec2ee3a793eef0a09feb6759f7c10db65fe0"
94
+ },
95
+ {
96
+ "author": "beachball",
97
+ "package": "@lage-run/cli",
98
+ "comment": "Bump @lage-run/scheduler to v0.11.2",
99
+ "commit": "bb22ec2ee3a793eef0a09feb6759f7c10db65fe0"
100
+ },
101
+ {
102
+ "author": "beachball",
103
+ "package": "@lage-run/cli",
104
+ "comment": "Bump @lage-run/scheduler-types to v0.3.7",
105
+ "commit": "bb22ec2ee3a793eef0a09feb6759f7c10db65fe0"
106
+ },
107
+ {
108
+ "author": "beachball",
109
+ "package": "@lage-run/cli",
110
+ "comment": "Bump @lage-run/target-graph to v0.8.3",
111
+ "commit": "bb22ec2ee3a793eef0a09feb6759f7c10db65fe0"
112
+ },
113
+ {
114
+ "author": "beachball",
115
+ "package": "@lage-run/cli",
116
+ "comment": "Bump @lage-run/cache to v0.5.3",
117
+ "commit": "bb22ec2ee3a793eef0a09feb6759f7c10db65fe0"
118
+ },
119
+ {
120
+ "author": "beachball",
121
+ "package": "@lage-run/cli",
122
+ "comment": "Bump @lage-run/reporters to v1.1.2",
123
+ "commit": "bb22ec2ee3a793eef0a09feb6759f7c10db65fe0"
124
+ }
125
+ ]
126
+ }
127
+ },
128
+ {
129
+ "date": "Thu, 06 Apr 2023 22:27:50 GMT",
6
130
  "tag": "@lage-run/cli_v0.13.1",
7
131
  "version": "0.13.1",
8
132
  "comments": {
package/CHANGELOG.md CHANGED
@@ -1,12 +1,46 @@
1
1
  # Change Log - @lage-run/cli
2
2
 
3
- This log was last generated on Thu, 06 Apr 2023 22:27:27 GMT and should not be manually modified.
3
+ This log was last generated on Tue, 25 Apr 2023 02:50:56 GMT and should not be manually modified.
4
4
 
5
5
  <!-- Start content -->
6
6
 
7
+ ## 0.14.0
8
+
9
+ Tue, 25 Apr 2023 02:50:56 GMT
10
+
11
+ ### Minor changes
12
+
13
+ - Add support for --log-file (to be used in concert with --reporter vfl (stchur@microsoft.com)
14
+ - Bump @lage-run/config to v0.1.4
15
+ - Bump @lage-run/logger to v1.3.0
16
+ - Bump @lage-run/scheduler to v0.11.3
17
+ - Bump @lage-run/scheduler-types to v0.3.8
18
+ - Bump @lage-run/target-graph to v0.8.4
19
+ - Bump @lage-run/cache to v0.5.4
20
+ - Bump @lage-run/reporters to v1.2.0
21
+
22
+ ### Patches
23
+
24
+ - Update repository and homepage (elcraig@microsoft.com)
25
+ - [object Object] (stchur@microsoft.com)
26
+
27
+ ## 0.13.2
28
+
29
+ Fri, 14 Apr 2023 04:37:54 GMT
30
+
31
+ ### Patches
32
+
33
+ - making lage boot faster (kchau@microsoft.com)
34
+ - Bump @lage-run/config to v0.1.3
35
+ - Bump @lage-run/scheduler to v0.11.2
36
+ - Bump @lage-run/scheduler-types to v0.3.7
37
+ - Bump @lage-run/target-graph to v0.8.3
38
+ - Bump @lage-run/cache to v0.5.3
39
+ - Bump @lage-run/reporters to v1.1.2
40
+
7
41
  ## 0.13.1
8
42
 
9
- Thu, 06 Apr 2023 22:27:27 GMT
43
+ Thu, 06 Apr 2023 22:27:50 GMT
10
44
 
11
45
  ### Patches
12
46
 
@@ -19,5 +19,5 @@ function addLoggerOptions(program) {
19
19
  "error",
20
20
  "verbose",
21
21
  "silly"
22
- ]).conflicts("verbose")).option("--verbose", "verbose output", false);
22
+ ]).conflicts("verbose")).addOption(new _commander.Option("--log-file <file>", "when used with --reporter vfl, writes verbose, ungrouped logs to the specified file")).option("--verbose", "verbose output", false);
23
23
  }
@@ -1,3 +1,3 @@
1
- import { JsonReporter, AdoReporter, LogReporter, ProgressReporter, ChromeTraceEventsReporter } from "@lage-run/reporters";
1
+ import { JsonReporter, AdoReporter, LogReporter, ProgressReporter, VerboseFileLogReporter, ChromeTraceEventsReporter } from "@lage-run/reporters";
2
2
  import type { ReporterInitOptions } from "../types/ReporterInitOptions.js";
3
- export declare function createReporter(reporter: string, options: ReporterInitOptions): ChromeTraceEventsReporter | JsonReporter | AdoReporter | LogReporter | ProgressReporter;
3
+ export declare function createReporter(reporter: string, options: ReporterInitOptions): ChromeTraceEventsReporter | JsonReporter | AdoReporter | LogReporter | VerboseFileLogReporter | ProgressReporter;
@@ -17,7 +17,7 @@ function _interopRequireDefault(obj) {
17
17
  };
18
18
  }
19
19
  function createReporter(reporter, options) {
20
- const { verbose , grouped , logLevel: logLevelName , concurrency , profile , progress } = options;
20
+ const { verbose , grouped , logLevel: logLevelName , concurrency , profile , progress , logFile } = options;
21
21
  const logLevel = _logger.LogLevel[logLevelName];
22
22
  const root = (0, _workspaceTools.findPackageRoot)(__filename);
23
23
  const packageJson = JSON.parse((0, _fs.readFileSync)(_path.default.join(root, "package.json"), "utf-8"));
@@ -44,6 +44,9 @@ function createReporter(reporter, options) {
44
44
  grouped,
45
45
  logLevel: verbose ? _logger.LogLevel.verbose : logLevel
46
46
  });
47
+ case "verboseFileLog":
48
+ case "vfl":
49
+ return new _reporters.VerboseFileLogReporter(logFile);
47
50
  default:
48
51
  if (progress && !(logLevel >= _logger.LogLevel.verbose || verbose || grouped)) {
49
52
  return new _reporters.ProgressReporter({
@@ -67,6 +67,10 @@ Choosing a different reporter while logging (e.g. nice outputs for Azure DevOps)
67
67
 
68
68
  $ lage build test lint --reporter=azureDevOps
69
69
 
70
+ Or combine multiple reporters (e.g. Azure DepOps with VerboseFileLog)
71
+
72
+ $ lage build test lint --reporter azureDevOps --reporter vfl --log-file /my/verbose/log.file
73
+
70
74
  Ignoring files when calculating the scope with --since in addition to files specified in lage.config:
71
75
 
72
76
  $ lage build test lint --since origin/master --ignore "package.json" "yarn.lock" "**/.azure-pipelines/**"
@@ -29,7 +29,7 @@ async function runAction(options, command) {
29
29
  const allowNoTargetRuns = options.allowNoTargetRuns || config.allowNoTargetRuns;
30
30
  // Configure logger
31
31
  const logger = (0, _logger.default)();
32
- (0, _initializeReportersJs.initializeReporters)(logger, {
32
+ const reporters = (0, _initializeReportersJs.initializeReporters)(logger, {
33
33
  ...options,
34
34
  concurrency
35
35
  });
@@ -96,6 +96,9 @@ async function runAction(options, command) {
96
96
  const summary = await scheduler.run(root, targetGraph);
97
97
  await scheduler.cleanup();
98
98
  displaySummaryAndExit(summary, logger.reporters);
99
+ for (const reporter of reporters){
100
+ await reporter.cleanup?.();
101
+ }
99
102
  }
100
103
  function displaySummaryAndExit(summary, reporters) {
101
104
  if (summary.results !== "success") {
@@ -154,5 +154,6 @@ async function watchAction(options, command) {
154
154
  function displaySummary(summary, reporters) {
155
155
  for (const reporter of reporters){
156
156
  reporter.summarize(summary);
157
+ reporter.cleanup?.();
157
158
  }
158
159
  }
@@ -7,4 +7,5 @@ export interface ReporterInitOptions {
7
7
  concurrency: number;
8
8
  logLevel: keyof typeof LogLevel;
9
9
  profile?: boolean | string;
10
+ logFile?: string;
10
11
  }
package/package.json CHANGED
@@ -1,10 +1,12 @@
1
1
  {
2
2
  "name": "@lage-run/cli",
3
- "version": "0.13.1",
3
+ "version": "0.14.0",
4
4
  "description": "Command Line Interface for Lage",
5
5
  "repository": {
6
+ "type": "git",
6
7
  "url": "https://github.com/microsoft/lage"
7
8
  },
9
+ "homepage": "https://microsoft.github.io/lage/",
8
10
  "bin": {
9
11
  "lage": "./bin/lage"
10
12
  },
@@ -18,16 +20,16 @@
18
20
  "lint": "monorepo-scripts lint"
19
21
  },
20
22
  "dependencies": {
21
- "@lage-run/config": "^0.1.2",
23
+ "@lage-run/config": "^0.1.4",
22
24
  "@lage-run/find-npm-client": "^0.1.4",
23
- "@lage-run/logger": "^1.2.2",
24
- "@lage-run/scheduler": "^0.11.1",
25
- "@lage-run/scheduler-types": "^0.3.6",
26
- "@lage-run/target-graph": "^0.8.2",
27
- "@lage-run/cache": "^0.5.2",
28
- "@lage-run/reporters": "^1.1.1",
25
+ "@lage-run/logger": "^1.3.0",
26
+ "@lage-run/scheduler": "^0.11.3",
27
+ "@lage-run/scheduler-types": "^0.3.8",
28
+ "@lage-run/target-graph": "^0.8.4",
29
+ "@lage-run/cache": "^0.5.4",
30
+ "@lage-run/reporters": "^1.2.0",
29
31
  "commander": "^9.4.0",
30
- "workspace-tools": "^0.32.0",
32
+ "workspace-tools": "^0.34.0",
31
33
  "chokidar": "3.5.3",
32
34
  "fast-glob": "^3.2.11"
33
35
  },