@rushstack/rush-sdk 5.169.3 → 5.170.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.
@@ -2094,7 +2094,7 @@ export declare interface IOperationSettings {
2094
2094
  * How many concurrency units this operation should take up during execution. The maximum concurrent units is
2095
2095
  * determined by the -p flag.
2096
2096
  */
2097
- weight?: number;
2097
+ weight?: number | `${number}%`;
2098
2098
  /**
2099
2099
  * If true, this operation can use cobuilds for orchestration without restoring build cache entries.
2100
2100
  */
@@ -5,7 +5,7 @@
5
5
  "toolPackages": [
6
6
  {
7
7
  "packageName": "@microsoft/api-extractor",
8
- "packageVersion": "7.57.2"
8
+ "packageVersion": "7.57.7"
9
9
  }
10
10
  ]
11
11
  }
@@ -1,3 +1,5 @@
1
1
  const _m = require("../../../lib-shim/index.js")._rushSdk_loadInternalModule("cli/parsing/ParseParallelism");
2
2
  module.exports = _m;
3
+ exports.getNumberOfCores = _m.getNumberOfCores;
3
4
  exports.parseParallelism = _m.parseParallelism;
5
+ exports.parseParallelismPercent = _m.parseParallelismPercent;
@@ -131,7 +131,7 @@ export interface IOperationSettings {
131
131
  * How many concurrency units this operation should take up during execution. The maximum concurrent units is
132
132
  * determined by the -p flag.
133
133
  */
134
- weight?: number;
134
+ weight?: number | `${number}%`;
135
135
  /**
136
136
  * If true, this operation can use cobuilds for orchestration without restoring build cache entries.
137
137
  */
@@ -1,3 +1,14 @@
1
+ export declare function getNumberOfCores(): number;
2
+ /**
3
+ * Since the JSON value is a string, it must be a percentage like "50%",
4
+ * which we convert to a number based on the available parallelism.
5
+ * For example, if the available parallelism (not the -p flag) is 8 and the weight is "50%",
6
+ * then the resulting weight will be 4.
7
+ *
8
+ * @param weight
9
+ * @returns
10
+ */
11
+ export declare function parseParallelismPercent(weight: string, numberOfCores?: number): number;
1
12
  /**
2
13
  * Parses a command line specification for desired parallelism.
3
14
  * Factored out to enable unit tests
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rushstack/rush-sdk",
3
- "version": "5.169.3",
3
+ "version": "5.170.0",
4
4
  "description": "An API for interacting with the Rush engine",
5
5
  "repository": {
6
6
  "type": "git",
@@ -39,23 +39,23 @@
39
39
  "dependencies": {
40
40
  "@pnpm/lockfile.types-900": "npm:@pnpm/lockfile.types@~900.0.0",
41
41
  "tapable": "2.2.1",
42
- "@rushstack/credential-cache": "0.2.3",
43
- "@rushstack/lookup-by-path": "0.9.3",
44
- "@rushstack/node-core-library": "5.20.1",
45
- "@rushstack/terminal": "0.22.1",
46
- "@rushstack/package-deps-hash": "4.7.3"
42
+ "@rushstack/credential-cache": "0.2.7",
43
+ "@rushstack/node-core-library": "5.20.3",
44
+ "@rushstack/terminal": "0.22.3",
45
+ "@rushstack/lookup-by-path": "0.9.7",
46
+ "@rushstack/package-deps-hash": "4.7.7"
47
47
  },
48
48
  "devDependencies": {
49
49
  "@types/semver": "7.5.0",
50
50
  "@types/webpack-env": "1.18.8",
51
51
  "eslint": "~9.37.0",
52
52
  "webpack": "~5.105.2",
53
- "@microsoft/rush-lib": "5.169.3",
54
- "@rushstack/heft-webpack5-plugin": "1.3.3",
55
- "@rushstack/heft": "1.2.3",
56
- "@rushstack/stream-collator": "4.2.3",
57
- "@rushstack/ts-command-line": "5.3.1",
58
- "@rushstack/webpack-preserve-dynamic-require-plugin": "0.12.4",
53
+ "@microsoft/rush-lib": "5.170.0",
54
+ "@rushstack/heft-webpack5-plugin": "1.3.7",
55
+ "@rushstack/stream-collator": "4.2.7",
56
+ "@rushstack/webpack-preserve-dynamic-require-plugin": "0.12.8",
57
+ "@rushstack/ts-command-line": "5.3.3",
58
+ "@rushstack/heft": "1.2.7",
59
59
  "local-node-rig": "1.0.0"
60
60
  },
61
61
  "sideEffects": false,