@lage-run/cli 0.23.8 → 0.23.10

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,103 @@
2
2
  "name": "@lage-run/cli",
3
3
  "entries": [
4
4
  {
5
- "date": "Mon, 21 Oct 2024 22:18:24 GMT",
5
+ "date": "Fri, 01 Nov 2024 08:07:21 GMT",
6
+ "version": "0.23.10",
7
+ "tag": "@lage-run/cli_v0.23.10",
8
+ "comments": {
9
+ "patch": [
10
+ {
11
+ "author": "kchau@microsoft.com",
12
+ "package": "@lage-run/cli",
13
+ "commit": "0266df845498d81e8bfb2bd88abd5d4ad4177f6a",
14
+ "comment": "skip using npm client if running a node script"
15
+ },
16
+ {
17
+ "author": "beachball",
18
+ "package": "@lage-run/cli",
19
+ "comment": "Bump @lage-run/config to v0.4.7",
20
+ "commit": "not available"
21
+ },
22
+ {
23
+ "author": "beachball",
24
+ "package": "@lage-run/cli",
25
+ "comment": "Bump @lage-run/runners to v1.0.7",
26
+ "commit": "not available"
27
+ },
28
+ {
29
+ "author": "beachball",
30
+ "package": "@lage-run/cli",
31
+ "comment": "Bump @lage-run/scheduler to v1.3.7",
32
+ "commit": "not available"
33
+ }
34
+ ]
35
+ }
36
+ },
37
+ {
38
+ "date": "Tue, 22 Oct 2024 15:19:29 GMT",
39
+ "version": "0.23.9",
40
+ "tag": "@lage-run/cli_v0.23.9",
41
+ "comments": {
42
+ "patch": [
43
+ {
44
+ "author": "email not defined",
45
+ "package": "@lage-run/cli",
46
+ "commit": "067b34dac0e6621e6dab889b4ecb3ffb96ed3b7c",
47
+ "comment": "Update dependency workspace-tools to v0.37.0"
48
+ },
49
+ {
50
+ "author": "beachball",
51
+ "package": "@lage-run/cli",
52
+ "comment": "Bump @lage-run/cache to v1.3.7",
53
+ "commit": "not available"
54
+ },
55
+ {
56
+ "author": "beachball",
57
+ "package": "@lage-run/cli",
58
+ "comment": "Bump @lage-run/config to v0.4.6",
59
+ "commit": "not available"
60
+ },
61
+ {
62
+ "author": "beachball",
63
+ "package": "@lage-run/cli",
64
+ "comment": "Bump @lage-run/hasher to v1.6.3",
65
+ "commit": "not available"
66
+ },
67
+ {
68
+ "author": "beachball",
69
+ "package": "@lage-run/cli",
70
+ "comment": "Bump @lage-run/reporters to v1.2.15",
71
+ "commit": "not available"
72
+ },
73
+ {
74
+ "author": "beachball",
75
+ "package": "@lage-run/cli",
76
+ "comment": "Bump @lage-run/runners to v1.0.6",
77
+ "commit": "not available"
78
+ },
79
+ {
80
+ "author": "beachball",
81
+ "package": "@lage-run/cli",
82
+ "comment": "Bump @lage-run/scheduler to v1.3.6",
83
+ "commit": "not available"
84
+ },
85
+ {
86
+ "author": "beachball",
87
+ "package": "@lage-run/cli",
88
+ "comment": "Bump @lage-run/scheduler-types to v0.3.19",
89
+ "commit": "not available"
90
+ },
91
+ {
92
+ "author": "beachball",
93
+ "package": "@lage-run/cli",
94
+ "comment": "Bump @lage-run/target-graph to v0.9.3",
95
+ "commit": "not available"
96
+ }
97
+ ]
98
+ }
99
+ },
100
+ {
101
+ "date": "Mon, 21 Oct 2024 22:18:54 GMT",
6
102
  "version": "0.23.8",
7
103
  "tag": "@lage-run/cli_v0.23.8",
8
104
  "comments": {
package/CHANGELOG.md CHANGED
@@ -1,12 +1,39 @@
1
1
  # Change Log - @lage-run/cli
2
2
 
3
- <!-- This log was last generated on Mon, 21 Oct 2024 22:18:24 GMT and should not be manually modified. -->
3
+ <!-- This log was last generated on Fri, 01 Nov 2024 08:07:21 GMT and should not be manually modified. -->
4
4
 
5
5
  <!-- Start content -->
6
6
 
7
+ ## 0.23.10
8
+
9
+ Fri, 01 Nov 2024 08:07:21 GMT
10
+
11
+ ### Patches
12
+
13
+ - skip using npm client if running a node script (kchau@microsoft.com)
14
+ - Bump @lage-run/config to v0.4.7
15
+ - Bump @lage-run/runners to v1.0.7
16
+ - Bump @lage-run/scheduler to v1.3.7
17
+
18
+ ## 0.23.9
19
+
20
+ Tue, 22 Oct 2024 15:19:29 GMT
21
+
22
+ ### Patches
23
+
24
+ - Update dependency workspace-tools to v0.37.0 (email not defined)
25
+ - Bump @lage-run/cache to v1.3.7
26
+ - Bump @lage-run/config to v0.4.6
27
+ - Bump @lage-run/hasher to v1.6.3
28
+ - Bump @lage-run/reporters to v1.2.15
29
+ - Bump @lage-run/runners to v1.0.6
30
+ - Bump @lage-run/scheduler to v1.3.6
31
+ - Bump @lage-run/scheduler-types to v0.3.19
32
+ - Bump @lage-run/target-graph to v0.9.3
33
+
7
34
  ## 0.23.8
8
35
 
9
- Mon, 21 Oct 2024 22:18:24 GMT
36
+ Mon, 21 Oct 2024 22:18:54 GMT
10
37
 
11
38
  ### Patches
12
39
 
@@ -16,6 +16,7 @@ const _getFilteredPackages = require("../../filter/getFilteredPackages.js");
16
16
  const _logger = /*#__PURE__*/ _interop_require_default(require("@lage-run/logger"));
17
17
  const _targetgraph = require("@lage-run/target-graph");
18
18
  const _path = /*#__PURE__*/ _interop_require_default(require("path"));
19
+ const _shellquote = require("shell-quote");
19
20
  const _initializeReporters = require("../initializeReporters.js");
20
21
  const _runners = require("@lage-run/runners");
21
22
  const _getBinPaths = require("../../getBinPaths.js");
@@ -66,7 +67,7 @@ async function infoAction(options, command) {
66
67
  const runnerPicker = new _runners.TargetRunnerPicker(pickerOptions);
67
68
  const optimizedTargets = await optimizeTargetGraph(targetGraph, runnerPicker);
68
69
  const binPaths = (0, _getBinPaths.getBinPaths)();
69
- const packageTasks = optimizedTargets.map((target)=>generatePackageTask(target, taskArgs, config, options, binPaths));
70
+ const packageTasks = optimizedTargets.map((target)=>generatePackageTask(target, taskArgs, config, options, binPaths, packageInfos));
70
71
  logger.info("info", {
71
72
  command: command.args,
72
73
  scope,
@@ -88,8 +89,8 @@ async function optimizeTargetGraph(graph, runnerPicker) {
88
89
  });
89
90
  return (0, _targetgraph.transitiveReduction)(targetMinimizedNodes);
90
91
  }
91
- function generatePackageTask(target, taskArgs, config, options, binPaths) {
92
- const command = generateCommand(target, taskArgs, config, options, binPaths);
92
+ function generatePackageTask(target, taskArgs, config, options, binPaths, packageInfos) {
93
+ const command = generateCommand(target, taskArgs, config, options, binPaths, packageInfos);
93
94
  const workingDirectory = getWorkingDirectory(target);
94
95
  const packageTask = {
95
96
  id: target.id,
@@ -101,9 +102,21 @@ function generatePackageTask(target, taskArgs, config, options, binPaths) {
101
102
  };
102
103
  return packageTask;
103
104
  }
104
- function generateCommand(target, taskArgs, config, options, binPaths) {
105
+ function generateCommand(target, taskArgs, config, options, binPaths, packageInfos) {
105
106
  const shouldRunWorkersAsService = typeof process.env.LAGE_WORKER_SERVER === "string" && process.env.LAGE_WORKER_SERVER !== "false" || !!options.server;
106
107
  if (target.type === "npmScript") {
108
+ const script = target.packageName !== undefined ? packageInfos[target.packageName]?.scripts?.[target.task] : undefined;
109
+ // If the script is a node script, and that it does not have any shell operators (&&, ||, etc)
110
+ // then we can simply pass this along to info command rather than using npm client to run it.
111
+ if (script && script.startsWith("node")) {
112
+ const parsed = (0, _shellquote.parse)(script);
113
+ if (parsed.length > 0 && parsed.every((entry)=>typeof entry === "string")) {
114
+ return [
115
+ ...parsed,
116
+ ...taskArgs
117
+ ];
118
+ }
119
+ }
107
120
  const npmClient = config.npmClient ?? "npm";
108
121
  const command = [
109
122
  npmClient,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lage-run/cli",
3
- "version": "0.23.8",
3
+ "version": "0.23.10",
4
4
  "description": "Command Line Interface for Lage",
5
5
  "repository": {
6
6
  "type": "git",
@@ -21,29 +21,31 @@
21
21
  "lint": "monorepo-scripts lint"
22
22
  },
23
23
  "dependencies": {
24
- "@lage-run/cache": "^1.3.6",
25
- "@lage-run/config": "^0.4.5",
24
+ "@lage-run/cache": "^1.3.7",
25
+ "@lage-run/config": "^0.4.7",
26
26
  "@lage-run/globby": "^14.2.0",
27
- "@lage-run/hasher": "^1.6.2",
27
+ "@lage-run/hasher": "^1.6.3",
28
28
  "@lage-run/logger": "^1.3.1",
29
- "@lage-run/reporters": "^1.2.14",
29
+ "@lage-run/reporters": "^1.2.15",
30
30
  "@lage-run/rpc": "^1.2.3",
31
- "@lage-run/runners": "^1.0.5",
32
- "@lage-run/scheduler": "^1.3.5",
33
- "@lage-run/scheduler-types": "^0.3.18",
34
- "@lage-run/target-graph": "^0.9.2",
31
+ "@lage-run/runners": "^1.0.7",
32
+ "@lage-run/scheduler": "^1.3.7",
33
+ "@lage-run/scheduler-types": "^0.3.19",
34
+ "@lage-run/target-graph": "^0.9.3",
35
35
  "@lage-run/worker-threads-pool": "^0.8.4",
36
36
  "chokidar": "3.5.3",
37
37
  "commander": "9.5.0",
38
38
  "execa": "5.1.1",
39
39
  "fast-glob": "3.3.2",
40
40
  "proper-lockfile": "^4.1.2",
41
- "workspace-tools": "0.36.4"
41
+ "shell-quote": "^1.8.1",
42
+ "workspace-tools": "0.37.0"
42
43
  },
43
44
  "devDependencies": {
44
45
  "@lage-run/monorepo-fixture": "*",
45
46
  "@lage-run/monorepo-scripts": "*",
46
- "@types/proper-lockfile": "^4.1.4"
47
+ "@types/proper-lockfile": "^4.1.4",
48
+ "@types/shell-quote": "^1.7.5"
47
49
  },
48
50
  "publishConfig": {
49
51
  "access": "public"