From 015e58a00130b2f8373465dd97c95143e8066896 Mon Sep 17 00:00:00 2001 From: Peter Hedenskog Date: Sun, 29 Dec 2024 13:46:17 +0100 Subject: [PATCH] Replace flatten (#4371) --- lib/plugins/text/textBuilder.js | 3 +-- npm-shrinkwrap.json | 8 +------- package.json | 1 - 3 files changed, 2 insertions(+), 10 deletions(-) diff --git a/lib/plugins/text/textBuilder.js b/lib/plugins/text/textBuilder.js index 9264edf65f..3c0f174937 100644 --- a/lib/plugins/text/textBuilder.js +++ b/lib/plugins/text/textBuilder.js @@ -1,5 +1,4 @@ import table from 'text-table'; -import flatten from 'lodash.flatten'; import clic from 'cli-color'; import chunk from 'lodash.chunk'; @@ -37,7 +36,7 @@ function getHeader(context, options) { } function getBoxes(metrics, html) { - return flatten(chunk(summaryBoxesSetup(metrics, html).filter(Boolean), 3)); + return chunk(summaryBoxesSetup(metrics, html).filter(Boolean), 3).flat(); } // foo bar -> fb diff --git a/npm-shrinkwrap.json b/npm-shrinkwrap.json index 60320179c1..9e22580eb5 100644 --- a/npm-shrinkwrap.json +++ b/npm-shrinkwrap.json @@ -33,7 +33,6 @@ "junit-report-builder": "3.2.1", "lodash.chunk": "4.2.0", "lodash.clonedeep": "4.5.0", - "lodash.flatten": "4.4.0", "lodash.foreach": "4.5.0", "lodash.get": "4.4.2", "lodash.isempty": "4.4.0", @@ -7809,12 +7808,7 @@ "node_modules/lodash.clonedeep": { "version": "4.5.0", "resolved": "https://registry.npmjs.org/lodash.clonedeep/-/lodash.clonedeep-4.5.0.tgz", - "integrity": "sha1-4j8/nE+Pvd6HJSnBBxhXoIblzO8=" - }, - "node_modules/lodash.flatten": { - "version": "4.4.0", - "resolved": "https://registry.npmjs.org/lodash.flatten/-/lodash.flatten-4.4.0.tgz", - "integrity": "sha1-8xwiIlqWMtK7+OSt2+8kCqdlph8=" + "integrity": "sha512-H5ZhCF25riFd9uB5UCkVKo61m3S/xZk1x4wA6yp/L3RFP6Z/eHH1ymQcGLo7J3GMPfm0V/7m1tryHuGVxpqEBQ==" }, "node_modules/lodash.foreach": { "version": "4.5.0", diff --git a/package.json b/package.json index 476f38181d..a9f30d8a10 100644 --- a/package.json +++ b/package.json @@ -103,7 +103,6 @@ "junit-report-builder": "3.2.1", "lodash.chunk": "4.2.0", "lodash.clonedeep": "4.5.0", - "lodash.flatten": "4.4.0", "lodash.foreach": "4.5.0", "lodash.get": "4.4.2", "lodash.isempty": "4.4.0",