Socket
Socket
Sign inDemoInstall

@wdio/config

Package Overview
Dependencies
Maintainers
3
Versions
329
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@wdio/config - npm Package Compare versions

Comparing version 9.0.0-alpha.78 to 9.0.0-alpha.113

18

build/node/ConfigParser.js
import path from 'node:path';
import logger from '@wdio/logger';
import { deepmerge } from 'deepmerge-ts';
import { deepmerge, deepmergeCustom } from 'deepmerge-ts';
import RequireLibrary from './RequireLibrary.js';

@@ -10,2 +10,3 @@ import FileSystemPathService from './FileSystemPathService.js';

const log = logger('@wdio/config:ConfigParser');
const MERGE_DUPLICATION = ['services', 'reporters'];
export default class ConfigParser {

@@ -137,4 +138,17 @@ _initialConfig;

const exclude = Array.isArray(object.exclude) ? object.exclude : [];
this._config = deepmerge(this._config, object);
/**
* Add deepmergeCustom to remove array('services', 'reporters', 'capabilities') duplication in the config object
*/
const customDeepMerge = deepmergeCustom({
mergeArrays: ([oldValue, newValue], utils, meta) => {
const key = meta?.key;
if (meta && MERGE_DUPLICATION.includes(key)) {
const origWithoutObjectEntries = oldValue.filter((value) => typeof value !== 'object');
return Array.from(new Set(deepmerge(newValue, origWithoutObjectEntries)));
}
return utils.actions.defaultMerge;
}
});
this._config = customDeepMerge(this._config, object);
/**
* overwrite config specs that got piped into the wdio command,

@@ -141,0 +155,0 @@ * also adhering to the wdio-prefixes from a capability

10

package.json
{
"name": "@wdio/config",
"version": "9.0.0-alpha.78+fee2f8a88",
"version": "9.0.0-alpha.113+ceeac488e",
"description": "A helper utility to parse and validate WebdriverIO options",

@@ -39,5 +39,5 @@ "author": "Christian Bromann <mail@bromann.dev>",

"dependencies": {
"@wdio/logger": "9.0.0-alpha.78+fee2f8a88",
"@wdio/types": "9.0.0-alpha.78+fee2f8a88",
"@wdio/utils": "9.0.0-alpha.78+fee2f8a88",
"@wdio/logger": "9.0.0-alpha.113+ceeac488e",
"@wdio/types": "9.0.0-alpha.113+ceeac488e",
"@wdio/utils": "9.0.0-alpha.113+ceeac488e",
"decamelize": "^6.0.0",

@@ -54,3 +54,3 @@ "deepmerge-ts": "^5.0.0",

},
"gitHead": "fee2f8a88d132537795eaf144abf1a7e242f99ff"
"gitHead": "ceeac488e86da4d6ffad891632183085e4332be7"
}

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc