Skip to content

Commit

Permalink
Replace lodash.clonedeep (#4388)
Browse files Browse the repository at this point in the history
* Replace lodash.clonedeep

* simplify
  • Loading branch information
soulgalore authored Jan 7, 2025
1 parent 8e0e659 commit e3a104e
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 14 deletions.
5 changes: 2 additions & 3 deletions lib/plugins/axe/axePostScript.cjs
Original file line number Diff line number Diff line change
@@ -1,15 +1,14 @@
const axe = require('axe-core').source;
const clone = require('lodash.clonedeep');

module.exports = async function runAxe(context) {
// Insert the axe source
await context.selenium.driver.executeScript(axe);

const runOptions = context.options.axe.run
? clone(context.options.axe.run)
? structuredClone(context.options.axe.run)
: {};
const configureOptions = context.options.axe
? clone(context.options.axe)
? structuredClone(context.options.axe)
: {};
delete configureOptions.run;

Expand Down
8 changes: 4 additions & 4 deletions lib/support/filterRegistry.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import clone from 'lodash.clonedeep';
import { filterMetrics } from './metricsFilter.js';

let filterForType = {};
Expand Down Expand Up @@ -34,7 +33,8 @@ export function filterMessage(message) {
return message;
}

const filteredMessage = clone(message);
filteredMessage.data = filterMetrics(filteredMessage.data, filterConfig);
return filteredMessage;
return {
...message,
data: filterMetrics(message.data, filterConfig)
};
}
6 changes: 0 additions & 6 deletions npm-shrinkwrap.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,6 @@
"influx": "5.9.3",
"jstransformer-markdown-it": "3.0.0",
"junit-report-builder": "3.2.1",
"lodash.clonedeep": "4.5.0",
"lodash.get": "4.4.2",
"lodash.isempty": "4.4.0",
"lodash.merge": "4.6.2",
Expand Down

0 comments on commit e3a104e

Please sign in to comment.