Skip to content

Commit

Permalink
refactor: only import mapLimit from async
Browse files Browse the repository at this point in the history
  • Loading branch information
mcarvin8 committed Jan 16, 2025
1 parent b7b9244 commit 07ed10c
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions src/helpers/transformDeployCoverageReport.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
'use strict';

import async from 'async';
import { mapLimit } from 'async';

import { getCoverageHandler } from '../handlers/getCoverageHandler.js';
import { DeployCoverageData } from './types.js';
Expand Down Expand Up @@ -37,7 +37,7 @@ export async function transformDeployCoverageReport(
};

const concurrencyLimit = getConcurrencyThreshold();
await async.mapLimit(Object.keys(data).filter((fileName) => Object.hasOwn(data, fileName)), concurrencyLimit, async (fileName: string) => {
await mapLimit(Object.keys(data).filter((fileName) => Object.hasOwn(data, fileName)), concurrencyLimit, async (fileName: string) => {
const result = await processFile(fileName);
if (result) {
filesProcessed++;
Expand Down
4 changes: 2 additions & 2 deletions src/helpers/transformTestCoverageReport.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
'use strict';

import async from 'async';
import { mapLimit } from 'async';

import { getCoverageHandler } from '../handlers/getCoverageHandler.js';
import { TestCoverageData } from './types.js';
Expand Down Expand Up @@ -40,7 +40,7 @@ export async function transformTestCoverageReport(
};

const concurrencyLimit = getConcurrencyThreshold();
await async.mapLimit(coverageData, concurrencyLimit, async (data: TestCoverageData) => {
await mapLimit(coverageData, concurrencyLimit, async (data: TestCoverageData) => {
const result = await processFile(data);
if (result) {
filesProcessed++;
Expand Down

0 comments on commit 07ed10c

Please sign in to comment.