@wdio/config 8.18.2 → 8.19.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/build/constants.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../src/constants.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAA;AAKpD,eAAO,MAAM,eAAe,EAAE,MAAM,IAAI,CAAC,OAAO,CAAC,UAAU,EAAE,cAAc,
|
|
1
|
+
{"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../src/constants.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAA;AAKpD,eAAO,MAAM,eAAe,EAAE,MAAM,IAAI,CAAC,OAAO,CAAC,UAAU,EAAE,cAAc,CAoFzE,CAAA;AAEF,eAAO,MAAM,eAAe,EAAE,CAAC,MAAM,QAAQ,CAAC,KAAK,CAAC,EAMnD,CAAA;AAED,eAAO,MAAM,yBAAyB,UAErC,CAAA;AAED,eAAO,MAAM,sBAAsB,QAIlC,CAAA"}
|
package/build/constants.js
CHANGED
|
@@ -91,6 +91,7 @@ export default class ConfigParser {
|
|
|
91
91
|
* @return {String[] | String[][]} list of spec files with excludes removed
|
|
92
92
|
*/
|
|
93
93
|
filterSpecs(specs: Spec[], exclude: string[]): Spec[];
|
|
94
|
+
shard(specs: Spec[]): Spec[];
|
|
94
95
|
}
|
|
95
96
|
export {};
|
|
96
97
|
//# sourceMappingURL=ConfigParser.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ConfigParser.d.ts","sourceRoot":"","sources":["../../src/lib/ConfigParser.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,YAAY,EAAE,OAAO,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAA;AAU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AAE,MAAM,GAAE,WAAgB;IA+B1C;;;OAGG;YACW,aAAa;IAsD3B;;;OAGG;IACH,OAAO,CAAC,KAAK;IA+Cb;;;OAGG;IACH,UAAU,CAAC,OAAO,EAAE,QAAQ,CAAC,KAAK;IAkClC;;;OAGG;IACH,QAAQ,CAAC,QAAQ,CAAC,EAAE,IAAI,EAAE,EAAE,UAAU,CAAC,EAAE,IAAI,EAAE;IA0D/C;;;;;;;;OAQG;IACH,0BAA0B,CAAC,cAAc,EAAE,MAAM,EAAE,EAAE,KAAK,EAAE,IAAI,EAAE;IA8ClE;;OAEG;IACH,SAAS;IAOT;;OAEG;IACH,eAAe,CAAC,CAAC,CAAC,EAAE,MAAM;IAY1B;;;;;;;;OAQG;IACH,MAAM,CAAC,YAAY,CAAC,QAAQ,EAAE,IAAI,EAAE,EAAE,OAAO,EAAE,MAAM,EAAE,WAAW,GAAE,WAAyC,EAAE,cAAc,CAAC,EAAE,MAAM;IAkDtI;;;;;;OAMG;IACH,WAAW,CAAC,KAAK,EAAE,IAAI,EAAE,EAAE,OAAO,EAAE,MAAM,EAAE;IAW5C,KAAK,CAAE,KAAK,EAAE,IAAI,EAAE;CAWvB"}
|
|
@@ -250,7 +250,7 @@ export default class ConfigParser {
|
|
|
250
250
|
else if (multiRun && !hasSubsetOfSpecsDefined) {
|
|
251
251
|
throw new Error('The --multi-run flag requires that either the --spec or --suite flag is also set');
|
|
252
252
|
}
|
|
253
|
-
return this.filterSpecs(specs, exclude);
|
|
253
|
+
return this.shard(this.filterSpecs(specs, exclude));
|
|
254
254
|
}
|
|
255
255
|
/**
|
|
256
256
|
* sets config attribute with file paths from filtering
|
|
@@ -393,4 +393,14 @@ export default class ConfigParser {
|
|
|
393
393
|
return returnVal;
|
|
394
394
|
}, []);
|
|
395
395
|
}
|
|
396
|
+
shard(specs) {
|
|
397
|
+
if (!this._config.shard || this._config.shard.total === 1) {
|
|
398
|
+
return specs;
|
|
399
|
+
}
|
|
400
|
+
const { total, current } = this._config.shard;
|
|
401
|
+
const totalSpecs = specs.length;
|
|
402
|
+
const specsPerShard = Math.max(Math.round(totalSpecs / total), 1);
|
|
403
|
+
const end = current === total ? undefined : specsPerShard * current;
|
|
404
|
+
return specs.slice(current * specsPerShard - specsPerShard, end);
|
|
405
|
+
}
|
|
396
406
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@wdio/config",
|
|
3
|
-
"version": "8.
|
|
3
|
+
"version": "8.19.0",
|
|
4
4
|
"description": "A helper utility to parse and validate WebdriverIO options",
|
|
5
5
|
"author": "Christian Bromann <mail@bromann.dev>",
|
|
6
6
|
"homepage": "https://github.com/webdriverio/webdriverio/tree/main/packages/wdio-config",
|
|
@@ -30,8 +30,8 @@
|
|
|
30
30
|
},
|
|
31
31
|
"dependencies": {
|
|
32
32
|
"@wdio/logger": "8.16.17",
|
|
33
|
-
"@wdio/types": "8.
|
|
34
|
-
"@wdio/utils": "8.
|
|
33
|
+
"@wdio/types": "8.19.0",
|
|
34
|
+
"@wdio/utils": "8.19.0",
|
|
35
35
|
"decamelize": "^6.0.0",
|
|
36
36
|
"deepmerge-ts": "^5.0.0",
|
|
37
37
|
"glob": "^10.2.2",
|
|
@@ -45,5 +45,5 @@
|
|
|
45
45
|
"minimatch": "^9.0.0",
|
|
46
46
|
"tsconfig-paths": "^4.1.0"
|
|
47
47
|
},
|
|
48
|
-
"gitHead": "
|
|
48
|
+
"gitHead": "5179b3b3d0bced033e719890baf4517137ac1576"
|
|
49
49
|
}
|