@lage-run/config 0.7.0 → 0.7.2

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,43 @@
2
2
  "name": "@lage-run/config",
3
3
  "entries": [
4
4
  {
5
- "date": "Tue, 21 Oct 2025 23:42:14 GMT",
5
+ "date": "Sat, 24 Jan 2026 09:00:58 GMT",
6
+ "version": "0.7.2",
7
+ "tag": "@lage-run/config_v0.7.2",
8
+ "comments": {
9
+ "patch": [
10
+ {
11
+ "author": "elcraig@microsoft.com",
12
+ "package": "@lage-run/config",
13
+ "commit": "092607a7d55561a9342ab3265ccab0142dd59b9b",
14
+ "comment": "Add explicit module boundary types and update typescript version"
15
+ },
16
+ {
17
+ "author": "email not defined",
18
+ "package": "@lage-run/config",
19
+ "commit": "092607a7d55561a9342ab3265ccab0142dd59b9b",
20
+ "comment": "Update dependency workspace-tools to v0.40.4 and fix deprecated API usage"
21
+ }
22
+ ]
23
+ }
24
+ },
25
+ {
26
+ "date": "Thu, 15 Jan 2026 23:24:00 GMT",
27
+ "version": "0.7.1",
28
+ "tag": "@lage-run/config_v0.7.1",
29
+ "comments": {
30
+ "patch": [
31
+ {
32
+ "author": "renovate@whitesourcesoftware.com",
33
+ "package": "@lage-run/config",
34
+ "commit": "3d7ac61faadf82097fb2996431b537b2a9baa0e3",
35
+ "comment": "Update dependency workspace-tools to v0.40.0"
36
+ }
37
+ ]
38
+ }
39
+ },
40
+ {
41
+ "date": "Tue, 21 Oct 2025 23:42:35 GMT",
6
42
  "version": "0.7.0",
7
43
  "tag": "@lage-run/config_v0.7.0",
8
44
  "comments": {
package/CHANGELOG.md CHANGED
@@ -1,12 +1,29 @@
1
1
  # Change Log - @lage-run/config
2
2
 
3
- <!-- This log was last generated on Tue, 21 Oct 2025 23:42:14 GMT and should not be manually modified. -->
3
+ <!-- This log was last generated on Sat, 24 Jan 2026 09:00:58 GMT and should not be manually modified. -->
4
4
 
5
5
  <!-- Start content -->
6
6
 
7
+ ## 0.7.2
8
+
9
+ Sat, 24 Jan 2026 09:00:58 GMT
10
+
11
+ ### Patches
12
+
13
+ - Add explicit module boundary types and update typescript version (elcraig@microsoft.com)
14
+ - Update dependency workspace-tools to v0.40.4 and fix deprecated API usage (email not defined)
15
+
16
+ ## 0.7.1
17
+
18
+ Thu, 15 Jan 2026 23:24:00 GMT
19
+
20
+ ### Patches
21
+
22
+ - Update dependency workspace-tools to v0.40.0 (renovate@whitesourcesoftware.com)
23
+
7
24
  ## 0.7.0
8
25
 
9
- Tue, 21 Oct 2025 23:42:14 GMT
26
+ Tue, 21 Oct 2025 23:42:35 GMT
10
27
 
11
28
  ### Minor changes
12
29
 
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/getMaxWorkersPerTask.ts"],"sourcesContent":["import type { ConfigOptions } from \"./types/ConfigOptions.js\";\n\nexport function getMaxWorkersPerTask(pipelineConfig: ConfigOptions[\"pipeline\"], concurrency: number) {\n const maxWorkersPerTask = new Map<string, number>();\n\n let generalPoolCount = 0;\n let generatelPoolMaxWorkers = 0;\n\n let dedicatedPoolCount = 0;\n let dedicatedPoolMaxWorkers = 0;\n\n for (const [task, taskConfig] of Object.entries(pipelineConfig)) {\n if (!Array.isArray(taskConfig) && !task.includes(\"#\")) {\n const maxWorkerOption: number | undefined = taskConfig.maxWorkers ?? taskConfig.options?.maxWorkers;\n\n if (typeof maxWorkerOption === \"undefined\") {\n generalPoolCount++;\n continue;\n }\n\n let maxWorkers = 0;\n\n if (typeof maxWorkerOption !== \"number\") {\n throw new Error(`Invalid maxWorkers value: ${maxWorkerOption}`);\n } else {\n maxWorkers = maxWorkerOption;\n }\n\n maxWorkersPerTask.set(task, maxWorkers);\n dedicatedPoolCount++;\n dedicatedPoolMaxWorkers += maxWorkers;\n }\n }\n\n if (dedicatedPoolCount > 0 && generalPoolCount > 0) {\n const avgMaxWorkers = dedicatedPoolMaxWorkers / dedicatedPoolCount;\n generatelPoolMaxWorkers = Math.max(1, Math.floor(avgMaxWorkers * generalPoolCount));\n }\n\n const grandTotal = dedicatedPoolMaxWorkers + generatelPoolMaxWorkers;\n\n // try to adjust the maxWorkersPerTask to fit the concurrency\n if (grandTotal > concurrency) {\n let newTotal = 0;\n for (const [task, maxWorkers] of maxWorkersPerTask.entries()) {\n const newMaxWorkers = Math.max(1, Math.floor((maxWorkers / grandTotal) * concurrency));\n newTotal += newMaxWorkers;\n maxWorkersPerTask.set(task, newMaxWorkers);\n }\n\n if (newTotal > concurrency) {\n throw new Error(\n \"Could not adjust maxWorkers per task to fit the concurrency, try reducing the maxWorkers, or increasing the --concurrency CLI argument, or separate the tasks to be run\"\n );\n }\n }\n\n return maxWorkersPerTask;\n}\n\nexport function getMaxWorkersPerTaskFromOptions(maxWorkersPerTask: string[]) {\n return new Map([\n ...maxWorkersPerTask.map((setting) => {\n const [task, maxWorkers] = setting.split(/[=:]/);\n return [task, parseInt(maxWorkers, 10)] as [string, number];\n }),\n ]);\n}\n"],"names":["getMaxWorkersPerTask","getMaxWorkersPerTaskFromOptions","pipelineConfig","concurrency","maxWorkersPerTask","Map","generalPoolCount","generatelPoolMaxWorkers","dedicatedPoolCount","dedicatedPoolMaxWorkers","task","taskConfig","Object","entries","Array","isArray","includes","maxWorkerOption","maxWorkers","options","Error","set","avgMaxWorkers","Math","max","floor","grandTotal","newTotal","newMaxWorkers","map","setting","split","parseInt"],"mappings":";;;;;;;;;;;QAEgBA;eAAAA;;QA0DAC;eAAAA;;;AA1DT,SAASD,qBAAqBE,cAAyC,EAAEC,WAAmB;IACjG,MAAMC,oBAAoB,IAAIC;IAE9B,IAAIC,mBAAmB;IACvB,IAAIC,0BAA0B;IAE9B,IAAIC,qBAAqB;IACzB,IAAIC,0BAA0B;IAE9B,KAAK,MAAM,CAACC,MAAMC,WAAW,IAAIC,OAAOC,OAAO,CAACX,gBAAiB;QAC/D,IAAI,CAACY,MAAMC,OAAO,CAACJ,eAAe,CAACD,KAAKM,QAAQ,CAAC,MAAM;YACrD,MAAMC,kBAAsCN,WAAWO,UAAU,IAAIP,WAAWQ,OAAO,EAAED;YAEzF,IAAI,OAAOD,oBAAoB,aAAa;gBAC1CX;gBACA;YACF;YAEA,IAAIY,aAAa;YAEjB,IAAI,OAAOD,oBAAoB,UAAU;gBACvC,MAAM,IAAIG,MAAM,CAAC,0BAA0B,EAAEH,iBAAiB;YAChE,OAAO;gBACLC,aAAaD;YACf;YAEAb,kBAAkBiB,GAAG,CAACX,MAAMQ;YAC5BV;YACAC,2BAA2BS;QAC7B;IACF;IAEA,IAAIV,qBAAqB,KAAKF,mBAAmB,GAAG;QAClD,MAAMgB,gBAAgBb,0BAA0BD;QAChDD,0BAA0BgB,KAAKC,GAAG,CAAC,GAAGD,KAAKE,KAAK,CAACH,gBAAgBhB;IACnE;IAEA,MAAMoB,aAAajB,0BAA0BF;IAE7C,6DAA6D;IAC7D,IAAImB,aAAavB,aAAa;QAC5B,IAAIwB,WAAW;QACf,KAAK,MAAM,CAACjB,MAAMQ,WAAW,IAAId,kBAAkBS,OAAO,GAAI;YAC5D,MAAMe,gBAAgBL,KAAKC,GAAG,CAAC,GAAGD,KAAKE,KAAK,CAAC,AAACP,aAAaQ,aAAcvB;YACzEwB,YAAYC;YACZxB,kBAAkBiB,GAAG,CAACX,MAAMkB;QAC9B;QAEA,IAAID,WAAWxB,aAAa;YAC1B,MAAM,IAAIiB,MACR;QAEJ;IACF;IAEA,OAAOhB;AACT;AAEO,SAASH,gCAAgCG,iBAA2B;IACzE,OAAO,IAAIC,IAAI;WACVD,kBAAkByB,GAAG,CAAC,CAACC;YACxB,MAAM,CAACpB,MAAMQ,WAAW,GAAGY,QAAQC,KAAK,CAAC;YACzC,OAAO;gBAACrB;gBAAMsB,SAASd,YAAY;aAAI;QACzC;KACD;AACH"}
1
+ {"version":3,"sources":["../src/getMaxWorkersPerTask.ts"],"sourcesContent":["import type { ConfigOptions } from \"./types/ConfigOptions.js\";\n\nexport function getMaxWorkersPerTask(pipelineConfig: ConfigOptions[\"pipeline\"], concurrency: number): Map<string, number> {\n const maxWorkersPerTask = new Map<string, number>();\n\n let generalPoolCount = 0;\n let generatelPoolMaxWorkers = 0;\n\n let dedicatedPoolCount = 0;\n let dedicatedPoolMaxWorkers = 0;\n\n for (const [task, taskConfig] of Object.entries(pipelineConfig)) {\n if (!Array.isArray(taskConfig) && !task.includes(\"#\")) {\n const maxWorkerOption: number | undefined = taskConfig.maxWorkers ?? taskConfig.options?.maxWorkers;\n\n if (typeof maxWorkerOption === \"undefined\") {\n generalPoolCount++;\n continue;\n }\n\n let maxWorkers = 0;\n\n if (typeof maxWorkerOption !== \"number\") {\n throw new Error(`Invalid maxWorkers value: ${maxWorkerOption}`);\n } else {\n maxWorkers = maxWorkerOption;\n }\n\n maxWorkersPerTask.set(task, maxWorkers);\n dedicatedPoolCount++;\n dedicatedPoolMaxWorkers += maxWorkers;\n }\n }\n\n if (dedicatedPoolCount > 0 && generalPoolCount > 0) {\n const avgMaxWorkers = dedicatedPoolMaxWorkers / dedicatedPoolCount;\n generatelPoolMaxWorkers = Math.max(1, Math.floor(avgMaxWorkers * generalPoolCount));\n }\n\n const grandTotal = dedicatedPoolMaxWorkers + generatelPoolMaxWorkers;\n\n // try to adjust the maxWorkersPerTask to fit the concurrency\n if (grandTotal > concurrency) {\n let newTotal = 0;\n for (const [task, maxWorkers] of maxWorkersPerTask.entries()) {\n const newMaxWorkers = Math.max(1, Math.floor((maxWorkers / grandTotal) * concurrency));\n newTotal += newMaxWorkers;\n maxWorkersPerTask.set(task, newMaxWorkers);\n }\n\n if (newTotal > concurrency) {\n throw new Error(\n \"Could not adjust maxWorkers per task to fit the concurrency, try reducing the maxWorkers, or increasing the --concurrency CLI argument, or separate the tasks to be run\"\n );\n }\n }\n\n return maxWorkersPerTask;\n}\n\nexport function getMaxWorkersPerTaskFromOptions(maxWorkersPerTask: string[]): Map<string, number> {\n return new Map([\n ...maxWorkersPerTask.map((setting) => {\n const [task, maxWorkers] = setting.split(/[=:]/);\n return [task, parseInt(maxWorkers, 10)] as [string, number];\n }),\n ]);\n}\n"],"names":["getMaxWorkersPerTask","getMaxWorkersPerTaskFromOptions","pipelineConfig","concurrency","maxWorkersPerTask","Map","generalPoolCount","generatelPoolMaxWorkers","dedicatedPoolCount","dedicatedPoolMaxWorkers","task","taskConfig","Object","entries","Array","isArray","includes","maxWorkerOption","maxWorkers","options","Error","set","avgMaxWorkers","Math","max","floor","grandTotal","newTotal","newMaxWorkers","map","setting","split","parseInt"],"mappings":";;;;;;;;;;;QAEgBA;eAAAA;;QA0DAC;eAAAA;;;AA1DT,SAASD,qBAAqBE,cAAyC,EAAEC,WAAmB;IACjG,MAAMC,oBAAoB,IAAIC;IAE9B,IAAIC,mBAAmB;IACvB,IAAIC,0BAA0B;IAE9B,IAAIC,qBAAqB;IACzB,IAAIC,0BAA0B;IAE9B,KAAK,MAAM,CAACC,MAAMC,WAAW,IAAIC,OAAOC,OAAO,CAACX,gBAAiB;QAC/D,IAAI,CAACY,MAAMC,OAAO,CAACJ,eAAe,CAACD,KAAKM,QAAQ,CAAC,MAAM;YACrD,MAAMC,kBAAsCN,WAAWO,UAAU,IAAIP,WAAWQ,OAAO,EAAED;YAEzF,IAAI,OAAOD,oBAAoB,aAAa;gBAC1CX;gBACA;YACF;YAEA,IAAIY,aAAa;YAEjB,IAAI,OAAOD,oBAAoB,UAAU;gBACvC,MAAM,IAAIG,MAAM,CAAC,0BAA0B,EAAEH,iBAAiB;YAChE,OAAO;gBACLC,aAAaD;YACf;YAEAb,kBAAkBiB,GAAG,CAACX,MAAMQ;YAC5BV;YACAC,2BAA2BS;QAC7B;IACF;IAEA,IAAIV,qBAAqB,KAAKF,mBAAmB,GAAG;QAClD,MAAMgB,gBAAgBb,0BAA0BD;QAChDD,0BAA0BgB,KAAKC,GAAG,CAAC,GAAGD,KAAKE,KAAK,CAACH,gBAAgBhB;IACnE;IAEA,MAAMoB,aAAajB,0BAA0BF;IAE7C,6DAA6D;IAC7D,IAAImB,aAAavB,aAAa;QAC5B,IAAIwB,WAAW;QACf,KAAK,MAAM,CAACjB,MAAMQ,WAAW,IAAId,kBAAkBS,OAAO,GAAI;YAC5D,MAAMe,gBAAgBL,KAAKC,GAAG,CAAC,GAAGD,KAAKE,KAAK,CAAC,AAACP,aAAaQ,aAAcvB;YACzEwB,YAAYC;YACZxB,kBAAkBiB,GAAG,CAACX,MAAMkB;QAC9B;QAEA,IAAID,WAAWxB,aAAa;YAC1B,MAAM,IAAIiB,MACR;QAEJ;IACF;IAEA,OAAOhB;AACT;AAEO,SAASH,gCAAgCG,iBAA2B;IACzE,OAAO,IAAIC,IAAI;WACVD,kBAAkByB,GAAG,CAAC,CAACC;YACxB,MAAM,CAACpB,MAAMQ,WAAW,GAAGY,QAAQC,KAAK,CAAC;YACzC,OAAO;gBAACrB;gBAAMsB,SAASd,YAAY;aAAI;QACzC;KACD;AACH"}
@@ -12,10 +12,9 @@ const _cosmiconfig = require("cosmiconfig");
12
12
  const _workspacetools = require("workspace-tools");
13
13
  const ConfigModuleName = "lage";
14
14
  async function readConfigFile(cwd) {
15
- // Verify presence of git
16
- const root = (0, _workspacetools.getWorkspaceRoot)(cwd);
15
+ const root = (0, _workspacetools.getWorkspaceManagerRoot)(cwd);
17
16
  if (!root) {
18
- throw new Error("This must be called inside a codebase that is part of a JavaScript workspace.");
17
+ throw new Error("This must be called inside a codebase that is part of a JavaScript monorepo.");
19
18
  }
20
19
  // Search for lage.config.js file
21
20
  const configExplorer = await (0, _cosmiconfig.cosmiconfig)(ConfigModuleName);
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/readConfigFile.ts"],"sourcesContent":["import { cosmiconfig } from \"cosmiconfig\";\nimport { getWorkspaceRoot } from \"workspace-tools\";\nimport type { ConfigOptions } from \"./types/ConfigOptions.js\";\n\nconst ConfigModuleName = \"lage\";\n\n/**\n * Read the lage config file if it exists, without filling in defaults.\n */\nexport async function readConfigFile(cwd: string): Promise<ConfigOptions | undefined> {\n // Verify presence of git\n const root = getWorkspaceRoot(cwd);\n if (!root) {\n throw new Error(\"This must be called inside a codebase that is part of a JavaScript workspace.\");\n }\n\n // Search for lage.config.js file\n const configExplorer = await cosmiconfig(ConfigModuleName);\n const results = await configExplorer.search(root ?? cwd);\n return results?.config || undefined;\n}\n"],"names":["readConfigFile","ConfigModuleName","cwd","root","getWorkspaceRoot","Error","configExplorer","cosmiconfig","results","search","config","undefined"],"mappings":";;;;+BASsBA;;;eAAAA;;;6BATM;gCACK;AAGjC,MAAMC,mBAAmB;AAKlB,eAAeD,eAAeE,GAAW;IAC9C,yBAAyB;IACzB,MAAMC,OAAOC,IAAAA,gCAAgB,EAACF;IAC9B,IAAI,CAACC,MAAM;QACT,MAAM,IAAIE,MAAM;IAClB;IAEA,iCAAiC;IACjC,MAAMC,iBAAiB,MAAMC,IAAAA,wBAAW,EAACN;IACzC,MAAMO,UAAU,MAAMF,eAAeG,MAAM,CAACN,QAAQD;IACpD,OAAOM,SAASE,UAAUC;AAC5B"}
1
+ {"version":3,"sources":["../src/readConfigFile.ts"],"sourcesContent":["import { cosmiconfig } from \"cosmiconfig\";\nimport { getWorkspaceManagerRoot } from \"workspace-tools\";\nimport type { ConfigOptions } from \"./types/ConfigOptions.js\";\n\nconst ConfigModuleName = \"lage\";\n\n/**\n * Read the lage config file if it exists, without filling in defaults.\n */\nexport async function readConfigFile(cwd: string): Promise<ConfigOptions | undefined> {\n const root = getWorkspaceManagerRoot(cwd);\n if (!root) {\n throw new Error(\"This must be called inside a codebase that is part of a JavaScript monorepo.\");\n }\n\n // Search for lage.config.js file\n const configExplorer = await cosmiconfig(ConfigModuleName);\n const results = await configExplorer.search(root ?? cwd);\n return results?.config || undefined;\n}\n"],"names":["readConfigFile","ConfigModuleName","cwd","root","getWorkspaceManagerRoot","Error","configExplorer","cosmiconfig","results","search","config","undefined"],"mappings":";;;;+BASsBA;;;eAAAA;;;6BATM;gCACY;AAGxC,MAAMC,mBAAmB;AAKlB,eAAeD,eAAeE,GAAW;IAC9C,MAAMC,OAAOC,IAAAA,uCAAuB,EAACF;IACrC,IAAI,CAACC,MAAM;QACT,MAAM,IAAIE,MAAM;IAClB;IAEA,iCAAiC;IACjC,MAAMC,iBAAiB,MAAMC,IAAAA,wBAAW,EAACN;IACzC,MAAMO,UAAU,MAAMF,eAAeG,MAAM,CAACN,QAAQD;IACpD,OAAOM,SAASE,UAAUC;AAC5B"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lage-run/config",
3
- "version": "0.7.0",
3
+ "version": "0.7.2",
4
4
  "description": "Config management for Lage",
5
5
  "repository": {
6
6
  "type": "git",
@@ -17,12 +17,12 @@
17
17
  "lint": "monorepo-scripts lint"
18
18
  },
19
19
  "dependencies": {
20
- "@lage-run/logger": "^1.3.1",
21
- "@lage-run/runners": "^1.2.4",
22
- "@lage-run/target-graph": "^0.12.0",
23
- "backfill-config": "6.7.1",
24
- "cosmiconfig": "7.1.0",
25
- "workspace-tools": "0.38.4"
20
+ "@lage-run/logger": "^1.3.2",
21
+ "@lage-run/runners": "^1.2.6",
22
+ "@lage-run/target-graph": "^0.12.2",
23
+ "backfill-config": "^6.7.1",
24
+ "cosmiconfig": "^7.1.0",
25
+ "workspace-tools": "^0.40.4"
26
26
  },
27
27
  "devDependencies": {
28
28
  "@lage-run/monorepo-scripts": "^1.0.0"