@wdio/config 8.36.0 → 8.37.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.
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ConfigParser.d.ts","sourceRoot":"","sources":["../../src/node/ConfigParser.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,YAAY,EAAE,OAAO,
|
|
1
|
+
{"version":3,"file":"ConfigParser.d.ts","sourceRoot":"","sources":["../../src/node/ConfigParser.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,YAAY,EAAE,OAAO,EAAa,QAAQ,EAAE,MAAM,aAAa,CAAA;AAQ7E,OAAO,KAAK,EAAE,WAAW,EAAE,mBAAmB,EAAE,MAAM,aAAa,CAAA;AAMnE,KAAK,IAAI,GAAG,MAAM,GAAG,MAAM,EAAE,CAAA;AAK7B,UAAU,+BAAgC,SAAQ,IAAI,CAAC,OAAO,CAAC,UAAU,EAAE,cAAc,CAAC;IACtF,KAAK,CAAC,EAAE,OAAO,CAAA;IACf,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,IAAI,CAAC,EAAE,MAAM,EAAE,CAAA;IACf,KAAK,CAAC,EAAE,MAAM,EAAE,CAAA;IAChB,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB,YAAY,CAAC,EAAE,YAAY,CAAC,kBAAkB,CAAA;IAC9C,OAAO,EAAE,MAAM,CAAA;CAClB;AAED,UAAU,WAAY,SAAQ,IAAI,CAAC,OAAO,CAAC,+BAA+B,CAAC,EAAE,OAAO,GAAG,SAAS,CAAC;IAC7F,KAAK,CAAC,EAAE,IAAI,EAAE,CAAA;IACd,YAAY,CAAC,EAAE,IAAI,EAAE,CAAA;IACrB,OAAO,CAAC,EAAE,MAAM,EAAE,CAAA;IAClB,cAAc,CAAC,EAAE,MAAM,EAAE,CAAA;CAC5B;AAED,MAAM,CAAC,OAAO,OAAO,YAAY;;IAQzB;;;OAGG;IACH,OAAO,CAAC,cAAc;IACtB,OAAO,CAAC,YAAY;IACpB,OAAO,CAAC,qBAAqB;IAXjC,OAAO,CAAC,OAAO,CAAiC;IAChD,OAAO,CAAC,aAAa,CAAsC;gBAGvD,cAAc,EAAE,MAAM;IACtB;;;OAGG;IACK,cAAc,GAAE,OAAO,CAAC,+BAA+B,CAAM,EAC7D,YAAY,GAAE,WAAyC,EACvD,qBAAqB,GAAE,mBAA0C;IA2B7E;;OAEG;IACG,UAAU,CAAC,MAAM,GAAE,WAAgB;IA+BzC;;;OAGG;YACW,aAAa;IAsD3B;;;;OAIG;IACH,OAAO,CAAC,KAAK;IA4Eb;;;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;IA4D/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,WAAW,EAAE,MAAM,EAAE;IAyBhD,KAAK,CAAC,KAAK,EAAE,IAAI,EAAE;CAWtB"}
|
|
@@ -1,12 +1,13 @@
|
|
|
1
1
|
import path from 'node:path';
|
|
2
2
|
import logger from '@wdio/logger';
|
|
3
|
-
import { deepmerge } from 'deepmerge-ts';
|
|
3
|
+
import { deepmerge, deepmergeCustom } from 'deepmerge-ts';
|
|
4
4
|
import RequireLibrary from './RequireLibrary.js';
|
|
5
5
|
import FileSystemPathService from './FileSystemPathService.js';
|
|
6
6
|
import { makeRelativeToCWD, loadAutoCompilers } from './utils.js';
|
|
7
7
|
import { removeLineNumbers, isCucumberFeatureWithLineNumber, validObjectOrArray } from '../utils.js';
|
|
8
8
|
import { SUPPORTED_HOOKS, SUPPORTED_FILE_EXTENSIONS, DEFAULT_CONFIGS, NO_NAMED_CONFIG_EXPORT } from '../constants.js';
|
|
9
9
|
const log = logger('@wdio/config:ConfigParser');
|
|
10
|
+
const MERGE_DUPLICATION = ['services', 'reporters'];
|
|
10
11
|
export default class ConfigParser {
|
|
11
12
|
_initialConfig;
|
|
12
13
|
_pathService;
|
|
@@ -133,7 +134,20 @@ export default class ConfigParser {
|
|
|
133
134
|
merge(object = {}, addPathToSpecs = true) {
|
|
134
135
|
const spec = Array.isArray(object.spec) ? object.spec : [];
|
|
135
136
|
const exclude = Array.isArray(object.exclude) ? object.exclude : [];
|
|
136
|
-
|
|
137
|
+
/**
|
|
138
|
+
* Add deepmergeCustom to remove array('services', 'reporters', 'capabilities') duplication in the config object
|
|
139
|
+
*/
|
|
140
|
+
const customDeepMerge = deepmergeCustom({
|
|
141
|
+
mergeArrays: ([oldValue, newValue], utils, meta) => {
|
|
142
|
+
const key = meta?.key;
|
|
143
|
+
if (meta && MERGE_DUPLICATION.includes(key)) {
|
|
144
|
+
const origWithoutObjectEntries = oldValue.filter((value) => typeof value !== 'object');
|
|
145
|
+
return Array.from(new Set(deepmerge(newValue, origWithoutObjectEntries)));
|
|
146
|
+
}
|
|
147
|
+
return utils.actions.defaultMerge;
|
|
148
|
+
}
|
|
149
|
+
});
|
|
150
|
+
this._config = customDeepMerge(this._config, object);
|
|
137
151
|
/**
|
|
138
152
|
* overwrite config specs that got piped into the wdio command,
|
|
139
153
|
* also adhering to the wdio-prefixes from a capability
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@wdio/config",
|
|
3
|
-
"version": "8.
|
|
3
|
+
"version": "8.37.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",
|
|
@@ -37,8 +37,8 @@
|
|
|
37
37
|
},
|
|
38
38
|
"dependencies": {
|
|
39
39
|
"@wdio/logger": "8.28.0",
|
|
40
|
-
"@wdio/types": "8.
|
|
41
|
-
"@wdio/utils": "8.
|
|
40
|
+
"@wdio/types": "8.37.0",
|
|
41
|
+
"@wdio/utils": "8.37.0",
|
|
42
42
|
"decamelize": "^6.0.0",
|
|
43
43
|
"deepmerge-ts": "^5.0.0",
|
|
44
44
|
"glob": "^10.2.2",
|
|
@@ -51,5 +51,5 @@
|
|
|
51
51
|
"minimatch": "^9.0.0",
|
|
52
52
|
"tsconfig-paths": "^4.1.0"
|
|
53
53
|
},
|
|
54
|
-
"gitHead": "
|
|
54
|
+
"gitHead": "cefb415aa315075fb6b682c6d059d9ff37fbefb8"
|
|
55
55
|
}
|