From bb41f2a59aa41af0b906f0cb9a11ffa6332e56dd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jimmy=20W=C3=A4rting?= Date: Tue, 16 Nov 2021 19:34:17 +0100 Subject: [PATCH] be explicit (#1769) --- lib/applyEach.js | 4 +- lib/applyEachSeries.js | 4 +- lib/asyncify.js | 6 +- lib/auto.js | 8 +- lib/autoInject.js | 6 +- lib/cargo.js | 2 +- lib/cargoQueue.js | 2 +- lib/compose.js | 2 +- lib/concat.js | 4 +- lib/concatLimit.js | 6 +- lib/concatSeries.js | 4 +- lib/detect.js | 6 +- lib/detectLimit.js | 6 +- lib/detectSeries.js | 6 +- lib/dir.js | 2 +- lib/doUntil.js | 4 +- lib/doWhilst.js | 6 +- lib/each.js | 8 +- lib/eachLimit.js | 8 +- lib/eachOf.js | 14 +-- lib/eachOfLimit.js | 6 +- lib/eachOfSeries.js | 4 +- lib/eachSeries.js | 4 +- lib/ensureAsync.js | 4 +- lib/every.js | 6 +- lib/everyLimit.js | 6 +- lib/everySeries.js | 6 +- lib/filter.js | 6 +- lib/filterLimit.js | 6 +- lib/filterSeries.js | 6 +- lib/forever.js | 8 +- lib/groupBy.js | 2 +- lib/groupByLimit.js | 6 +- lib/groupBySeries.js | 2 +- lib/index.js | 153 +++++++++++++++---------------- lib/internal/applyEach.js | 4 +- lib/internal/asyncEachOfLimit.js | 2 +- lib/internal/consoleFunc.js | 2 +- lib/internal/createTester.js | 4 +- lib/internal/eachOfLimit.js | 14 ++- lib/internal/filter.js | 5 +- lib/internal/iterator.js | 4 +- lib/internal/map.js | 2 +- lib/internal/parallel.js | 6 +- lib/internal/queue.js | 8 +- lib/internal/reject.js | 4 +- lib/internal/setImmediate.js | 1 - lib/internal/wrapAsync.js | 2 +- lib/log.js | 2 +- lib/map.js | 6 +- lib/mapLimit.js | 6 +- lib/mapSeries.js | 6 +- lib/mapValues.js | 2 +- lib/mapValuesLimit.js | 8 +- lib/mapValuesSeries.js | 2 +- lib/memoize.js | 6 +- lib/nextTick.js | 3 +- lib/parallel.js | 4 +- lib/parallelLimit.js | 4 +- lib/priorityQueue.js | 6 +- lib/queue.js | 4 +- lib/race.js | 6 +- lib/reduce.js | 8 +- lib/reduceRight.js | 2 +- lib/reflect.js | 4 +- lib/reflectAll.js | 2 +- lib/reject.js | 6 +- lib/rejectLimit.js | 6 +- lib/rejectSeries.js | 6 +- lib/retry.js | 4 +- lib/retryable.js | 8 +- lib/seq.js | 6 +- lib/series.js | 4 +- lib/setImmediate.js | 2 +- lib/some.js | 6 +- lib/someLimit.js | 6 +- lib/someSeries.js | 6 +- lib/sortBy.js | 6 +- lib/timeout.js | 4 +- lib/times.js | 2 +- lib/timesLimit.js | 6 +- lib/timesSeries.js | 2 +- lib/transform.js | 8 +- lib/tryEach.js | 6 +- lib/until.js | 4 +- lib/waterfall.js | 9 +- lib/whilst.js | 6 +- perf/benchmark.js | 4 +- 88 files changed, 291 insertions(+), 298 deletions(-) diff --git a/lib/applyEach.js b/lib/applyEach.js index b7f880f45..a03dd71a1 100644 --- a/lib/applyEach.js +++ b/lib/applyEach.js @@ -1,5 +1,5 @@ -import applyEach from './internal/applyEach'; -import map from './map'; +import applyEach from './internal/applyEach.js' +import map from './map.js' /** * Applies the provided arguments to each function in the array, calling diff --git a/lib/applyEachSeries.js b/lib/applyEachSeries.js index ae2661603..9dec9ece2 100644 --- a/lib/applyEachSeries.js +++ b/lib/applyEachSeries.js @@ -1,5 +1,5 @@ -import applyEach from './internal/applyEach'; -import mapSeries from './mapSeries'; +import applyEach from './internal/applyEach.js' +import mapSeries from './mapSeries.js' /** * The same as [`applyEach`]{@link module:ControlFlow.applyEach} but runs only a single async operation at a time. diff --git a/lib/asyncify.js b/lib/asyncify.js index 24573771a..21eebee1f 100644 --- a/lib/asyncify.js +++ b/lib/asyncify.js @@ -1,6 +1,6 @@ -import initialParams from './internal/initialParams'; -import setImmediate from './internal/setImmediate'; -import { isAsync } from './internal/wrapAsync' +import initialParams from './internal/initialParams.js' +import setImmediate from './internal/setImmediate.js' +import { isAsync } from './internal/wrapAsync.js' /** * Take a sync function and make it async, passing its return value to a diff --git a/lib/auto.js b/lib/auto.js index 58a8c4570..82251ebd9 100644 --- a/lib/auto.js +++ b/lib/auto.js @@ -1,7 +1,7 @@ -import once from './internal/once'; -import onlyOnce from './internal/onlyOnce'; -import wrapAsync from './internal/wrapAsync'; -import { promiseCallback, PROMISE_SYMBOL } from './internal/promiseCallback' +import once from './internal/once.js' +import onlyOnce from './internal/onlyOnce.js' +import wrapAsync from './internal/wrapAsync.js' +import { promiseCallback, PROMISE_SYMBOL } from './internal/promiseCallback.js' /** * Determines the best order for running the {@link AsyncFunction}s in `tasks`, based on diff --git a/lib/autoInject.js b/lib/autoInject.js index 8d0033336..cff2eb690 100644 --- a/lib/autoInject.js +++ b/lib/autoInject.js @@ -1,6 +1,6 @@ -import auto from './auto'; -import wrapAsync from './internal/wrapAsync'; -import { isAsync } from './internal/wrapAsync'; +import auto from './auto.js' +import wrapAsync from './internal/wrapAsync.js' +import { isAsync } from './internal/wrapAsync.js' var FN_ARGS = /^(?:async\s+)?(?:function)?\s*\w*\s*\(\s*([^)]+)\s*\)(?:\s*{)/; var ARROW_FN_ARGS = /^(?:async\s+)?\(?\s*([^)=]+)\s*\)?(?:\s*=>)/; diff --git a/lib/cargo.js b/lib/cargo.js index 1afdc0ea4..ef052027b 100644 --- a/lib/cargo.js +++ b/lib/cargo.js @@ -1,4 +1,4 @@ -import queue from './internal/queue'; +import queue from './internal/queue.js' /** * Creates a `cargo` object with the specified payload. Tasks added to the diff --git a/lib/cargoQueue.js b/lib/cargoQueue.js index 482314537..f4bffb908 100644 --- a/lib/cargoQueue.js +++ b/lib/cargoQueue.js @@ -1,4 +1,4 @@ -import queue from './internal/queue'; +import queue from './internal/queue.js' /** * Creates a `cargoQueue` object with the specified payload. Tasks added to the diff --git a/lib/compose.js b/lib/compose.js index ea97c43a5..b5dc49024 100644 --- a/lib/compose.js +++ b/lib/compose.js @@ -1,4 +1,4 @@ -import seq from './seq'; +import seq from './seq.js' /** * Creates a function which is a composition of the passed asynchronous diff --git a/lib/concat.js b/lib/concat.js index 73435ded9..8dab7a886 100644 --- a/lib/concat.js +++ b/lib/concat.js @@ -1,5 +1,5 @@ -import concatLimit from './concatLimit'; -import awaitify from './internal/awaitify' +import concatLimit from './concatLimit.js' +import awaitify from './internal/awaitify.js' /** * Applies `iteratee` to each item in `coll`, concatenating the results. Returns diff --git a/lib/concatLimit.js b/lib/concatLimit.js index e8f5b867d..40cb6b088 100644 --- a/lib/concatLimit.js +++ b/lib/concatLimit.js @@ -1,6 +1,6 @@ -import wrapAsync from './internal/wrapAsync'; -import mapLimit from './mapLimit'; -import awaitify from './internal/awaitify' +import wrapAsync from './internal/wrapAsync.js' +import mapLimit from './mapLimit.js' +import awaitify from './internal/awaitify.js' /** * The same as [`concat`]{@link module:Collections.concat} but runs a maximum of `limit` async operations at a time. diff --git a/lib/concatSeries.js b/lib/concatSeries.js index 68a8018fc..34311f0e6 100644 --- a/lib/concatSeries.js +++ b/lib/concatSeries.js @@ -1,5 +1,5 @@ -import concatLimit from './concatLimit'; -import awaitify from './internal/awaitify' +import concatLimit from './concatLimit.js' +import awaitify from './internal/awaitify.js' /** * The same as [`concat`]{@link module:Collections.concat} but runs only a single async operation at a time. diff --git a/lib/detect.js b/lib/detect.js index 0b63df46a..43fab1e69 100644 --- a/lib/detect.js +++ b/lib/detect.js @@ -1,6 +1,6 @@ -import createTester from './internal/createTester'; -import eachOf from './eachOf' -import awaitify from './internal/awaitify' +import createTester from './internal/createTester.js' +import eachOf from './eachOf.js' +import awaitify from './internal/awaitify.js' /** * Returns the first value in `coll` that passes an async truth test. The diff --git a/lib/detectLimit.js b/lib/detectLimit.js index 7630d6d0c..8ba89a07d 100644 --- a/lib/detectLimit.js +++ b/lib/detectLimit.js @@ -1,6 +1,6 @@ -import createTester from './internal/createTester'; -import eachOfLimit from './internal/eachOfLimit' -import awaitify from './internal/awaitify' +import createTester from './internal/createTester.js' +import eachOfLimit from './internal/eachOfLimit.js' +import awaitify from './internal/awaitify.js' /** * The same as [`detect`]{@link module:Collections.detect} but runs a maximum of `limit` async operations at a diff --git a/lib/detectSeries.js b/lib/detectSeries.js index e85c4f8d0..18a7b17f2 100644 --- a/lib/detectSeries.js +++ b/lib/detectSeries.js @@ -1,6 +1,6 @@ -import createTester from './internal/createTester' -import eachOfLimit from './internal/eachOfLimit' -import awaitify from './internal/awaitify' +import createTester from './internal/createTester.js' +import eachOfLimit from './internal/eachOfLimit.js' +import awaitify from './internal/awaitify.js' /** * The same as [`detect`]{@link module:Collections.detect} but runs only a single async operation at a time. diff --git a/lib/dir.js b/lib/dir.js index 8a5b5e3ee..77e03c66b 100644 --- a/lib/dir.js +++ b/lib/dir.js @@ -1,4 +1,4 @@ -import consoleFunc from './internal/consoleFunc'; +import consoleFunc from './internal/consoleFunc.js' /** * Logs the result of an [`async` function]{@link AsyncFunction} to the diff --git a/lib/doUntil.js b/lib/doUntil.js index a484df6be..f888cadff 100644 --- a/lib/doUntil.js +++ b/lib/doUntil.js @@ -1,5 +1,5 @@ -import doWhilst from './doWhilst'; -import wrapAsync from './internal/wrapAsync'; +import doWhilst from './doWhilst.js' +import wrapAsync from './internal/wrapAsync.js' /** * Like ['doWhilst']{@link module:ControlFlow.doWhilst}, except the `test` is inverted. Note the diff --git a/lib/doWhilst.js b/lib/doWhilst.js index 3d9a1afc4..17f7d9866 100644 --- a/lib/doWhilst.js +++ b/lib/doWhilst.js @@ -1,6 +1,6 @@ -import onlyOnce from './internal/onlyOnce'; -import wrapAsync from './internal/wrapAsync'; -import awaitify from './internal/awaitify' +import onlyOnce from './internal/onlyOnce.js' +import wrapAsync from './internal/wrapAsync.js' +import awaitify from './internal/awaitify.js' /** * The post-check version of [`whilst`]{@link module:ControlFlow.whilst}. To reflect the difference in diff --git a/lib/each.js b/lib/each.js index e4cde8c10..476faed25 100644 --- a/lib/each.js +++ b/lib/each.js @@ -1,7 +1,7 @@ -import eachOf from './eachOf'; -import withoutIndex from './internal/withoutIndex'; -import wrapAsync from './internal/wrapAsync' -import awaitify from './internal/awaitify' +import eachOf from './eachOf.js' +import withoutIndex from './internal/withoutIndex.js' +import wrapAsync from './internal/wrapAsync.js' +import awaitify from './internal/awaitify.js' /** * Applies the function `iteratee` to each item in `coll`, in parallel. diff --git a/lib/eachLimit.js b/lib/eachLimit.js index 5c491e841..d72796ef1 100644 --- a/lib/eachLimit.js +++ b/lib/eachLimit.js @@ -1,7 +1,7 @@ -import eachOfLimit from './internal/eachOfLimit'; -import withoutIndex from './internal/withoutIndex'; -import wrapAsync from './internal/wrapAsync'; -import awaitify from './internal/awaitify' +import eachOfLimit from './internal/eachOfLimit.js' +import withoutIndex from './internal/withoutIndex.js' +import wrapAsync from './internal/wrapAsync.js' +import awaitify from './internal/awaitify.js' /** * The same as [`each`]{@link module:Collections.each} but runs a maximum of `limit` async operations at a time. diff --git a/lib/eachOf.js b/lib/eachOf.js index 207cec0ff..7c16ffffa 100644 --- a/lib/eachOf.js +++ b/lib/eachOf.js @@ -1,10 +1,10 @@ -import isArrayLike from './internal/isArrayLike'; -import breakLoop from './internal/breakLoop'; -import eachOfLimit from './eachOfLimit'; -import once from './internal/once'; -import onlyOnce from './internal/onlyOnce'; -import wrapAsync from './internal/wrapAsync'; -import awaitify from './internal/awaitify' +import isArrayLike from './internal/isArrayLike.js' +import breakLoop from './internal/breakLoop.js' +import eachOfLimit from './eachOfLimit.js' +import once from './internal/once.js' +import onlyOnce from './internal/onlyOnce.js' +import wrapAsync from './internal/wrapAsync.js' +import awaitify from './internal/awaitify.js' // eachOf implementation optimized for array-likes function eachOfArrayLike(coll, iteratee, callback) { diff --git a/lib/eachOfLimit.js b/lib/eachOfLimit.js index f65d7d187..8932de95e 100644 --- a/lib/eachOfLimit.js +++ b/lib/eachOfLimit.js @@ -1,6 +1,6 @@ -import _eachOfLimit from './internal/eachOfLimit'; -import wrapAsync from './internal/wrapAsync'; -import awaitify from './internal/awaitify' +import _eachOfLimit from './internal/eachOfLimit.js' +import wrapAsync from './internal/wrapAsync.js' +import awaitify from './internal/awaitify.js' /** * The same as [`eachOf`]{@link module:Collections.eachOf} but runs a maximum of `limit` async operations at a diff --git a/lib/eachOfSeries.js b/lib/eachOfSeries.js index c48a66b8b..5dc04a851 100644 --- a/lib/eachOfSeries.js +++ b/lib/eachOfSeries.js @@ -1,5 +1,5 @@ -import eachOfLimit from './eachOfLimit'; -import awaitify from './internal/awaitify' +import eachOfLimit from './eachOfLimit.js' +import awaitify from './internal/awaitify.js' /** * The same as [`eachOf`]{@link module:Collections.eachOf} but runs only a single async operation at a time. diff --git a/lib/eachSeries.js b/lib/eachSeries.js index 383145621..6c163f14c 100644 --- a/lib/eachSeries.js +++ b/lib/eachSeries.js @@ -1,5 +1,5 @@ -import eachLimit from './eachLimit'; -import awaitify from './internal/awaitify' +import eachLimit from './eachLimit.js' +import awaitify from './internal/awaitify.js' /** * The same as [`each`]{@link module:Collections.each} but runs only a single async operation at a time. diff --git a/lib/ensureAsync.js b/lib/ensureAsync.js index b2b35b94f..1b4a69598 100644 --- a/lib/ensureAsync.js +++ b/lib/ensureAsync.js @@ -1,5 +1,5 @@ -import setImmediate from './internal/setImmediate'; -import { isAsync } from './internal/wrapAsync'; +import setImmediate from './internal/setImmediate.js' +import { isAsync } from './internal/wrapAsync.js' /** * Wrap an async function and ensure it calls its callback on a later tick of diff --git a/lib/every.js b/lib/every.js index 0a6bc5496..b035401a5 100644 --- a/lib/every.js +++ b/lib/every.js @@ -1,6 +1,6 @@ -import createTester from './internal/createTester'; -import eachOf from './eachOf' -import awaitify from './internal/awaitify' +import createTester from './internal/createTester.js' +import eachOf from './eachOf.js' +import awaitify from './internal/awaitify.js' /** * Returns `true` if every element in `coll` satisfies an async test. If any diff --git a/lib/everyLimit.js b/lib/everyLimit.js index 787c704d9..6bb350aac 100644 --- a/lib/everyLimit.js +++ b/lib/everyLimit.js @@ -1,6 +1,6 @@ -import createTester from './internal/createTester'; -import eachOfLimit from './internal/eachOfLimit' -import awaitify from './internal/awaitify' +import createTester from './internal/createTester.js' +import eachOfLimit from './internal/eachOfLimit.js' +import awaitify from './internal/awaitify.js' /** * The same as [`every`]{@link module:Collections.every} but runs a maximum of `limit` async operations at a time. diff --git a/lib/everySeries.js b/lib/everySeries.js index 07d261266..a9d0a4fdd 100644 --- a/lib/everySeries.js +++ b/lib/everySeries.js @@ -1,6 +1,6 @@ -import createTester from './internal/createTester'; -import eachOfSeries from './eachOfSeries'; -import awaitify from './internal/awaitify'; +import createTester from './internal/createTester.js' +import eachOfSeries from './eachOfSeries.js' +import awaitify from './internal/awaitify.js' /** * The same as [`every`]{@link module:Collections.every} but runs only a single async operation at a time. diff --git a/lib/filter.js b/lib/filter.js index 24285500a..5de1ab62c 100644 --- a/lib/filter.js +++ b/lib/filter.js @@ -1,6 +1,6 @@ -import _filter from './internal/filter'; -import eachOf from './eachOf' -import awaitify from './internal/awaitify' +import _filter from './internal/filter.js' +import eachOf from './eachOf.js' +import awaitify from './internal/awaitify.js' /** * Returns a new array of all the values in `coll` which pass an async truth diff --git a/lib/filterLimit.js b/lib/filterLimit.js index b421caa83..9edd84b31 100644 --- a/lib/filterLimit.js +++ b/lib/filterLimit.js @@ -1,6 +1,6 @@ -import _filter from './internal/filter'; -import eachOfLimit from './internal/eachOfLimit' -import awaitify from './internal/awaitify' +import _filter from './internal/filter.js' +import eachOfLimit from './internal/eachOfLimit.js' +import awaitify from './internal/awaitify.js' /** * The same as [`filter`]{@link module:Collections.filter} but runs a maximum of `limit` async operations at a diff --git a/lib/filterSeries.js b/lib/filterSeries.js index f53c3d842..654951711 100644 --- a/lib/filterSeries.js +++ b/lib/filterSeries.js @@ -1,6 +1,6 @@ -import _filter from './internal/filter'; -import eachOfSeries from './eachOfSeries' -import awaitify from './internal/awaitify' +import _filter from './internal/filter.js' +import eachOfSeries from './eachOfSeries.js' +import awaitify from './internal/awaitify.js' /** * The same as [`filter`]{@link module:Collections.filter} but runs only a single async operation at a time. diff --git a/lib/forever.js b/lib/forever.js index 4914c21b7..2f3967c92 100644 --- a/lib/forever.js +++ b/lib/forever.js @@ -1,7 +1,7 @@ -import onlyOnce from './internal/onlyOnce'; -import ensureAsync from './ensureAsync'; -import wrapAsync from './internal/wrapAsync'; -import awaitify from './internal/awaitify' +import onlyOnce from './internal/onlyOnce.js' +import ensureAsync from './ensureAsync.js' +import wrapAsync from './internal/wrapAsync.js' +import awaitify from './internal/awaitify.js' /** * Calls the asynchronous function `fn` with a callback parameter that allows it diff --git a/lib/groupBy.js b/lib/groupBy.js index c6949b25f..1a9547656 100644 --- a/lib/groupBy.js +++ b/lib/groupBy.js @@ -1,4 +1,4 @@ -import groupByLimit from './groupByLimit'; +import groupByLimit from './groupByLimit.js' /** * Returns a new object, where each value corresponds to an array of items, from diff --git a/lib/groupByLimit.js b/lib/groupByLimit.js index 6a0d7ac9c..a5d20ccd4 100644 --- a/lib/groupByLimit.js +++ b/lib/groupByLimit.js @@ -1,6 +1,6 @@ -import mapLimit from './mapLimit'; -import wrapAsync from './internal/wrapAsync'; -import awaitify from './internal/awaitify' +import mapLimit from './mapLimit.js' +import wrapAsync from './internal/wrapAsync.js' +import awaitify from './internal/awaitify.js' /** * The same as [`groupBy`]{@link module:Collections.groupBy} but runs a maximum of `limit` async operations at a time. diff --git a/lib/groupBySeries.js b/lib/groupBySeries.js index b5452e41a..8830133f5 100644 --- a/lib/groupBySeries.js +++ b/lib/groupBySeries.js @@ -1,4 +1,4 @@ -import groupByLimit from './groupByLimit'; +import groupByLimit from './groupByLimit.js' /** * The same as [`groupBy`]{@link module:Collections.groupBy} but runs only a single async operation at a time. diff --git a/lib/index.js b/lib/index.js index 8c3ddfd2c..3794823ac 100644 --- a/lib/index.js +++ b/lib/index.js @@ -63,82 +63,82 @@ * @module Utils */ -import apply from './apply' -import applyEach from './applyEach' -import applyEachSeries from './applyEachSeries' -import asyncify from './asyncify' -import auto from './auto' -import autoInject from './autoInject' -import cargo from './cargo' -import cargoQueue from './cargoQueue' -import compose from './compose' -import concat from './concat' -import concatLimit from './concatLimit' -import concatSeries from './concatSeries' -import constant from './constant' -import detect from './detect' -import detectLimit from './detectLimit' -import detectSeries from './detectSeries' -import dir from './dir' -import doUntil from './doUntil' -import doWhilst from './doWhilst' -import each from './each' -import eachLimit from './eachLimit' -import eachOf from './eachOf' -import eachOfLimit from './eachOfLimit' -import eachOfSeries from './eachOfSeries' -import eachSeries from './eachSeries' -import ensureAsync from './ensureAsync' -import every from './every' -import everyLimit from './everyLimit' -import everySeries from './everySeries' -import filter from './filter' -import filterLimit from './filterLimit' -import filterSeries from './filterSeries' -import forever from './forever' -import groupBy from './groupBy' -import groupByLimit from './groupByLimit' -import groupBySeries from './groupBySeries' -import log from './log' -import map from './map' -import mapLimit from './mapLimit' -import mapSeries from './mapSeries' -import mapValues from './mapValues' -import mapValuesLimit from './mapValuesLimit' -import mapValuesSeries from './mapValuesSeries' -import memoize from './memoize' -import nextTick from './nextTick' -import parallel from './parallel' -import parallelLimit from './parallelLimit' -import priorityQueue from './priorityQueue' -import queue from './queue' -import race from './race' -import reduce from './reduce' -import reduceRight from './reduceRight' -import reflect from './reflect' -import reflectAll from './reflectAll' -import reject from './reject' -import rejectLimit from './rejectLimit' -import rejectSeries from './rejectSeries' -import retry from './retry' -import retryable from './retryable' -import seq from './seq' -import series from './series' -import setImmediate from './setImmediate' -import some from './some' -import someLimit from './someLimit' -import someSeries from './someSeries' -import sortBy from './sortBy' -import timeout from './timeout' -import times from './times' -import timesLimit from './timesLimit' -import timesSeries from './timesSeries' -import transform from './transform' -import tryEach from './tryEach' -import unmemoize from './unmemoize' -import until from './until' -import waterfall from './waterfall' -import whilst from './whilst' +import apply from './apply.js' +import applyEach from './applyEach.js' +import applyEachSeries from './applyEachSeries.js' +import asyncify from './asyncify.js' +import auto from './auto.js' +import autoInject from './autoInject.js' +import cargo from './cargo.js' +import cargoQueue from './cargoQueue.js' +import compose from './compose.js' +import concat from './concat.js' +import concatLimit from './concatLimit.js' +import concatSeries from './concatSeries.js' +import constant from './constant.js' +import detect from './detect.js' +import detectLimit from './detectLimit.js' +import detectSeries from './detectSeries.js' +import dir from './dir.js' +import doUntil from './doUntil.js' +import doWhilst from './doWhilst.js' +import each from './each.js' +import eachLimit from './eachLimit.js' +import eachOf from './eachOf.js' +import eachOfLimit from './eachOfLimit.js' +import eachOfSeries from './eachOfSeries.js' +import eachSeries from './eachSeries.js' +import ensureAsync from './ensureAsync.js' +import every from './every.js' +import everyLimit from './everyLimit.js' +import everySeries from './everySeries.js' +import filter from './filter.js' +import filterLimit from './filterLimit.js' +import filterSeries from './filterSeries.js' +import forever from './forever.js' +import groupBy from './groupBy.js' +import groupByLimit from './groupByLimit.js' +import groupBySeries from './groupBySeries.js' +import log from './log.js' +import map from './map.js' +import mapLimit from './mapLimit.js' +import mapSeries from './mapSeries.js' +import mapValues from './mapValues.js' +import mapValuesLimit from './mapValuesLimit.js' +import mapValuesSeries from './mapValuesSeries.js' +import memoize from './memoize.js' +import nextTick from './nextTick.js' +import parallel from './parallel.js' +import parallelLimit from './parallelLimit.js' +import priorityQueue from './priorityQueue.js' +import queue from './queue.js' +import race from './race.js' +import reduce from './reduce.js' +import reduceRight from './reduceRight.js' +import reflect from './reflect.js' +import reflectAll from './reflectAll.js' +import reject from './reject.js' +import rejectLimit from './rejectLimit.js' +import rejectSeries from './rejectSeries.js' +import retry from './retry.js' +import retryable from './retryable.js' +import seq from './seq.js' +import series from './series.js' +import setImmediate from './setImmediate.js' +import some from './some.js' +import someLimit from './someLimit.js' +import someSeries from './someSeries.js' +import sortBy from './sortBy.js' +import timeout from './timeout.js' +import times from './times.js' +import timesLimit from './timesLimit.js' +import timesSeries from './timesSeries.js' +import transform from './transform.js' +import tryEach from './tryEach.js' +import unmemoize from './unmemoize.js' +import until from './until.js' +import waterfall from './waterfall.js' +import whilst from './whilst.js' export default { apply, @@ -355,4 +355,3 @@ export { whilst as during, doWhilst as doDuring }; - diff --git a/lib/internal/applyEach.js b/lib/internal/applyEach.js index c08a5eb94..3a9ea3ab3 100644 --- a/lib/internal/applyEach.js +++ b/lib/internal/applyEach.js @@ -1,5 +1,5 @@ -import wrapAsync from './wrapAsync'; -import awaitify from './awaitify' +import wrapAsync from './wrapAsync.js' +import awaitify from './awaitify.js' export default function (eachfn) { return function applyEach(fns, ...callArgs) { diff --git a/lib/internal/asyncEachOfLimit.js b/lib/internal/asyncEachOfLimit.js index 69d5e7453..46b08c6e0 100644 --- a/lib/internal/asyncEachOfLimit.js +++ b/lib/internal/asyncEachOfLimit.js @@ -1,4 +1,4 @@ -import breakLoop from './breakLoop'; +import breakLoop from './breakLoop.js' // for async generators export default function asyncEachOfLimit(generator, limit, iteratee, callback) { diff --git a/lib/internal/consoleFunc.js b/lib/internal/consoleFunc.js index 4ce5c9bda..3c2a39f15 100644 --- a/lib/internal/consoleFunc.js +++ b/lib/internal/consoleFunc.js @@ -1,4 +1,4 @@ -import wrapAsync from './wrapAsync'; +import wrapAsync from './wrapAsync.js' export default function consoleFunc(name) { return (fn, ...args) => wrapAsync(fn)(...args, (err, ...resultArgs) => { diff --git a/lib/internal/createTester.js b/lib/internal/createTester.js index 2c2745ece..ce7828a4e 100644 --- a/lib/internal/createTester.js +++ b/lib/internal/createTester.js @@ -1,5 +1,5 @@ -import breakLoop from './breakLoop'; -import wrapAsync from './wrapAsync' +import breakLoop from './breakLoop.js' +import wrapAsync from './wrapAsync.js' export default function _createTester(check, getResult) { return (eachfn, arr, _iteratee, cb) => { diff --git a/lib/internal/eachOfLimit.js b/lib/internal/eachOfLimit.js index ec6c8beee..063f8e59c 100644 --- a/lib/internal/eachOfLimit.js +++ b/lib/internal/eachOfLimit.js @@ -1,11 +1,9 @@ -import once from './once'; - -import iterator from './iterator'; -import onlyOnce from './onlyOnce'; -import {isAsyncGenerator, isAsyncIterable} from './wrapAsync' -import asyncEachOfLimit from './asyncEachOfLimit' - -import breakLoop from './breakLoop'; +import once from './once.js' +import iterator from './iterator.js' +import onlyOnce from './onlyOnce.js' +import {isAsyncGenerator, isAsyncIterable} from './wrapAsync.js' +import asyncEachOfLimit from './asyncEachOfLimit.js' +import breakLoop from './breakLoop.js' export default (limit) => { return (obj, iteratee, callback) => { diff --git a/lib/internal/filter.js b/lib/internal/filter.js index 936dac6a9..a0478059b 100644 --- a/lib/internal/filter.js +++ b/lib/internal/filter.js @@ -1,6 +1,5 @@ -import isArrayLike from './isArrayLike'; - -import wrapAsync from './wrapAsync'; +import isArrayLike from './isArrayLike.js' +import wrapAsync from './wrapAsync.js' function filterArray(eachfn, arr, iteratee, callback) { var truthValues = new Array(arr.length); diff --git a/lib/internal/iterator.js b/lib/internal/iterator.js index 02526e0fd..2fe85c3d0 100644 --- a/lib/internal/iterator.js +++ b/lib/internal/iterator.js @@ -1,5 +1,5 @@ -import isArrayLike from './isArrayLike'; -import getIterator from './getIterator'; +import isArrayLike from './isArrayLike.js' +import getIterator from './getIterator.js' function createArrayIterator(coll) { var i = -1; diff --git a/lib/internal/map.js b/lib/internal/map.js index 092f76d71..ca995793c 100644 --- a/lib/internal/map.js +++ b/lib/internal/map.js @@ -1,4 +1,4 @@ -import wrapAsync from './wrapAsync'; +import wrapAsync from './wrapAsync.js' export default function _asyncMap(eachfn, arr, iteratee, callback) { arr = arr || []; diff --git a/lib/internal/parallel.js b/lib/internal/parallel.js index 790b6e860..f4f91ea78 100644 --- a/lib/internal/parallel.js +++ b/lib/internal/parallel.js @@ -1,6 +1,6 @@ -import isArrayLike from './isArrayLike'; -import wrapAsync from './wrapAsync'; -import awaitify from './awaitify' +import isArrayLike from './isArrayLike.js' +import wrapAsync from './wrapAsync.js' +import awaitify from './awaitify.js' export default awaitify((eachfn, tasks, callback) => { var results = isArrayLike(tasks) ? [] : {}; diff --git a/lib/internal/queue.js b/lib/internal/queue.js index bb3e16b7c..886fe7ab1 100644 --- a/lib/internal/queue.js +++ b/lib/internal/queue.js @@ -1,7 +1,7 @@ -import onlyOnce from './onlyOnce'; -import setImmediate from './setImmediate'; -import DLL from './DoublyLinkedList'; -import wrapAsync from './wrapAsync'; +import onlyOnce from './onlyOnce.js' +import setImmediate from './setImmediate.js' +import DLL from './DoublyLinkedList.js' +import wrapAsync from './wrapAsync.js' export default function queue(worker, concurrency, payload) { if (concurrency == null) { diff --git a/lib/internal/reject.js b/lib/internal/reject.js index d0549cc04..59b07863c 100644 --- a/lib/internal/reject.js +++ b/lib/internal/reject.js @@ -1,5 +1,5 @@ -import filter from './filter'; -import wrapAsync from './wrapAsync' +import filter from './filter.js' +import wrapAsync from './wrapAsync.js' export default function reject(eachfn, arr, _iteratee, callback) { const iteratee = wrapAsync(_iteratee) diff --git a/lib/internal/setImmediate.js b/lib/internal/setImmediate.js index 4ef39a051..bafd40c0a 100644 --- a/lib/internal/setImmediate.js +++ b/lib/internal/setImmediate.js @@ -1,4 +1,3 @@ -'use strict'; /* istanbul ignore file */ export var hasQueueMicrotask = typeof queueMicrotask === 'function' && queueMicrotask; diff --git a/lib/internal/wrapAsync.js b/lib/internal/wrapAsync.js index 270cf8fb6..4e21f822b 100644 --- a/lib/internal/wrapAsync.js +++ b/lib/internal/wrapAsync.js @@ -1,4 +1,4 @@ -import asyncify from '../asyncify'; +import asyncify from '../asyncify.js' function isAsync(fn) { return fn[Symbol.toStringTag] === 'AsyncFunction'; diff --git a/lib/log.js b/lib/log.js index c39e03352..158ff168c 100644 --- a/lib/log.js +++ b/lib/log.js @@ -1,4 +1,4 @@ -import consoleFunc from './internal/consoleFunc'; +import consoleFunc from './internal/consoleFunc.js' /** * Logs the result of an `async` function to the `console`. Only works in diff --git a/lib/map.js b/lib/map.js index 2a8a03b3b..68f71edfd 100644 --- a/lib/map.js +++ b/lib/map.js @@ -1,6 +1,6 @@ -import _map from './internal/map'; -import eachOf from './eachOf' -import awaitify from './internal/awaitify' +import _map from './internal/map.js' +import eachOf from './eachOf.js' +import awaitify from './internal/awaitify.js' /** * Produces a new collection of values by mapping each value in `coll` through diff --git a/lib/mapLimit.js b/lib/mapLimit.js index 63fade22c..0717ff137 100644 --- a/lib/mapLimit.js +++ b/lib/mapLimit.js @@ -1,6 +1,6 @@ -import _map from './internal/map'; -import eachOfLimit from './internal/eachOfLimit' -import awaitify from './internal/awaitify' +import _map from './internal/map.js' +import eachOfLimit from './internal/eachOfLimit.js' +import awaitify from './internal/awaitify.js' /** * The same as [`map`]{@link module:Collections.map} but runs a maximum of `limit` async operations at a time. diff --git a/lib/mapSeries.js b/lib/mapSeries.js index 55c683124..a77157be7 100644 --- a/lib/mapSeries.js +++ b/lib/mapSeries.js @@ -1,6 +1,6 @@ -import _map from './internal/map'; -import eachOfSeries from './eachOfSeries' -import awaitify from './internal/awaitify' +import _map from './internal/map.js' +import eachOfSeries from './eachOfSeries.js' +import awaitify from './internal/awaitify.js' /** * The same as [`map`]{@link module:Collections.map} but runs only a single async operation at a time. diff --git a/lib/mapValues.js b/lib/mapValues.js index 0d44ce464..9cebf58a1 100644 --- a/lib/mapValues.js +++ b/lib/mapValues.js @@ -1,4 +1,4 @@ -import mapValuesLimit from './mapValuesLimit'; +import mapValuesLimit from './mapValuesLimit.js' /** * A relative of [`map`]{@link module:Collections.map}, designed for use with objects. diff --git a/lib/mapValuesLimit.js b/lib/mapValuesLimit.js index f34943d38..001375e35 100644 --- a/lib/mapValuesLimit.js +++ b/lib/mapValuesLimit.js @@ -1,7 +1,7 @@ -import eachOfLimit from './internal/eachOfLimit' -import awaitify from './internal/awaitify' -import once from './internal/once'; -import wrapAsync from './internal/wrapAsync'; +import eachOfLimit from './internal/eachOfLimit.js' +import awaitify from './internal/awaitify.js' +import once from './internal/once.js' +import wrapAsync from './internal/wrapAsync.js' /** * The same as [`mapValues`]{@link module:Collections.mapValues} but runs a maximum of `limit` async operations at a diff --git a/lib/mapValuesSeries.js b/lib/mapValuesSeries.js index 59e4b1a54..35c46c6d7 100644 --- a/lib/mapValuesSeries.js +++ b/lib/mapValuesSeries.js @@ -1,4 +1,4 @@ -import mapValuesLimit from './mapValuesLimit'; +import mapValuesLimit from './mapValuesLimit.js' /** * The same as [`mapValues`]{@link module:Collections.mapValues} but runs only a single async operation at a time. diff --git a/lib/memoize.js b/lib/memoize.js index d8001069e..56b2368e6 100644 --- a/lib/memoize.js +++ b/lib/memoize.js @@ -1,6 +1,6 @@ -import setImmediate from './internal/setImmediate'; -import initialParams from './internal/initialParams'; -import wrapAsync from './internal/wrapAsync'; +import setImmediate from './internal/setImmediate.js' +import initialParams from './internal/initialParams.js' +import wrapAsync from './internal/wrapAsync.js' /** * Caches the results of an async function. When creating a hash to store diff --git a/lib/nextTick.js b/lib/nextTick.js index ab8ce9acc..a7965a214 100644 --- a/lib/nextTick.js +++ b/lib/nextTick.js @@ -1,6 +1,5 @@ -'use strict'; /* istanbul ignore file */ -import { hasNextTick, hasSetImmediate, fallback, wrap } from './internal/setImmediate'; +import { hasNextTick, hasSetImmediate, fallback, wrap } from './internal/setImmediate.js' /** * Calls `callback` on a later loop around the event loop. In Node.js this just diff --git a/lib/parallel.js b/lib/parallel.js index 1124ac38f..d50a0df00 100644 --- a/lib/parallel.js +++ b/lib/parallel.js @@ -1,5 +1,5 @@ -import eachOf from './eachOf'; -import _parallel from './internal/parallel'; +import eachOf from './eachOf.js' +import _parallel from './internal/parallel.js' /** * Run the `tasks` collection of functions in parallel, without waiting until diff --git a/lib/parallelLimit.js b/lib/parallelLimit.js index ee4335c89..4f87403f0 100644 --- a/lib/parallelLimit.js +++ b/lib/parallelLimit.js @@ -1,5 +1,5 @@ -import eachOfLimit from './internal/eachOfLimit'; -import parallel from './internal/parallel'; +import eachOfLimit from './internal/eachOfLimit.js' +import parallel from './internal/parallel.js' /** * The same as [`parallel`]{@link module:ControlFlow.parallel} but runs a maximum of `limit` async operations at a diff --git a/lib/priorityQueue.js b/lib/priorityQueue.js index 83d7429a7..53ea0174a 100644 --- a/lib/priorityQueue.js +++ b/lib/priorityQueue.js @@ -1,6 +1,6 @@ -import setImmediate from './setImmediate'; -import queue from './queue'; -import Heap from './internal/Heap'; +import setImmediate from './setImmediate.js' +import queue from './queue.js' +import Heap from './internal/Heap.js' /** * The same as [async.queue]{@link module:ControlFlow.queue} only tasks are assigned a priority and diff --git a/lib/queue.js b/lib/queue.js index 45e4e7f16..0884b3b91 100644 --- a/lib/queue.js +++ b/lib/queue.js @@ -1,5 +1,5 @@ -import queue from './internal/queue'; -import wrapAsync from './internal/wrapAsync'; +import queue from './internal/queue.js' +import wrapAsync from './internal/wrapAsync.js' /** * A queue of tasks for the worker function to complete. diff --git a/lib/race.js b/lib/race.js index 05101a3bd..0d4d4bf21 100644 --- a/lib/race.js +++ b/lib/race.js @@ -1,6 +1,6 @@ -import once from './internal/once'; -import wrapAsync from './internal/wrapAsync'; -import awaitify from './internal/awaitify'; +import once from './internal/once.js' +import wrapAsync from './internal/wrapAsync.js' +import awaitify from './internal/awaitify.js' /** * Runs the `tasks` array of functions in parallel, without waiting until the diff --git a/lib/reduce.js b/lib/reduce.js index feaa95992..15a7ba40c 100644 --- a/lib/reduce.js +++ b/lib/reduce.js @@ -1,7 +1,7 @@ -import eachOfSeries from './eachOfSeries'; -import once from './internal/once'; -import wrapAsync from './internal/wrapAsync'; -import awaitify from './internal/awaitify' +import eachOfSeries from './eachOfSeries.js' +import once from './internal/once.js' +import wrapAsync from './internal/wrapAsync.js' +import awaitify from './internal/awaitify.js' /** * Reduces `coll` into a single value using an async `iteratee` to return each diff --git a/lib/reduceRight.js b/lib/reduceRight.js index 83ff31f7b..f58e37cc2 100644 --- a/lib/reduceRight.js +++ b/lib/reduceRight.js @@ -1,4 +1,4 @@ -import reduce from './reduce'; +import reduce from './reduce.js' /** * Same as [`reduce`]{@link module:Collections.reduce}, only operates on `array` in reverse order. diff --git a/lib/reflect.js b/lib/reflect.js index d2930a057..2bd6ef2c4 100644 --- a/lib/reflect.js +++ b/lib/reflect.js @@ -1,5 +1,5 @@ -import initialParams from './internal/initialParams'; -import wrapAsync from './internal/wrapAsync'; +import initialParams from './internal/initialParams.js' +import wrapAsync from './internal/wrapAsync.js' /** * Wraps the async function in another function that always completes with a diff --git a/lib/reflectAll.js b/lib/reflectAll.js index 12db89cdf..77fb49687 100644 --- a/lib/reflectAll.js +++ b/lib/reflectAll.js @@ -1,4 +1,4 @@ -import reflect from './reflect'; +import reflect from './reflect.js' /** * A helper function that wraps an array or an object of functions with `reflect`. diff --git a/lib/reject.js b/lib/reject.js index 127430e10..f1355ced1 100644 --- a/lib/reject.js +++ b/lib/reject.js @@ -1,6 +1,6 @@ -import _reject from './internal/reject'; -import eachOf from './eachOf' -import awaitify from './internal/awaitify' +import _reject from './internal/reject.js' +import eachOf from './eachOf.js' +import awaitify from './internal/awaitify.js' /** * The opposite of [`filter`]{@link module:Collections.filter}. Removes values that pass an `async` truth test. diff --git a/lib/rejectLimit.js b/lib/rejectLimit.js index d58b291f0..c695c505e 100644 --- a/lib/rejectLimit.js +++ b/lib/rejectLimit.js @@ -1,6 +1,6 @@ -import _reject from './internal/reject'; -import eachOfLimit from './internal/eachOfLimit' -import awaitify from './internal/awaitify' +import _reject from './internal/reject.js' +import eachOfLimit from './internal/eachOfLimit.js' +import awaitify from './internal/awaitify.js' /** * The same as [`reject`]{@link module:Collections.reject} but runs a maximum of `limit` async operations at a * time. diff --git a/lib/rejectSeries.js b/lib/rejectSeries.js index 56b08a308..c7b8d6709 100644 --- a/lib/rejectSeries.js +++ b/lib/rejectSeries.js @@ -1,6 +1,6 @@ -import _reject from './internal/reject'; -import eachOfSeries from './eachOfSeries' -import awaitify from './internal/awaitify' +import _reject from './internal/reject.js' +import eachOfSeries from './eachOfSeries.js' +import awaitify from './internal/awaitify.js' /** * The same as [`reject`]{@link module:Collections.reject} but runs only a single async operation at a time. diff --git a/lib/retry.js b/lib/retry.js index 55dce0a9a..e7c78e27a 100644 --- a/lib/retry.js +++ b/lib/retry.js @@ -1,5 +1,5 @@ -import wrapAsync from './internal/wrapAsync'; -import { promiseCallback, PROMISE_SYMBOL } from './internal/promiseCallback'; +import wrapAsync from './internal/wrapAsync.js' +import { promiseCallback, PROMISE_SYMBOL } from './internal/promiseCallback.js' function constant(value) { return function () { diff --git a/lib/retryable.js b/lib/retryable.js index ad99801d1..cc7d636fc 100644 --- a/lib/retryable.js +++ b/lib/retryable.js @@ -1,7 +1,7 @@ -import retry from './retry'; -import initialParams from './internal/initialParams'; -import {default as wrapAsync, isAsync} from './internal/wrapAsync'; -import { promiseCallback, PROMISE_SYMBOL } from './internal/promiseCallback'; +import retry from './retry.js' +import initialParams from './internal/initialParams.js' +import {default as wrapAsync, isAsync} from './internal/wrapAsync.js' +import { promiseCallback, PROMISE_SYMBOL } from './internal/promiseCallback.js' /** * A close relative of [`retry`]{@link module:ControlFlow.retry}. This method diff --git a/lib/seq.js b/lib/seq.js index 6c9ede711..fb8c2e7c1 100644 --- a/lib/seq.js +++ b/lib/seq.js @@ -1,6 +1,6 @@ -import reduce from './reduce'; -import wrapAsync from './internal/wrapAsync'; -import { promiseCallback, PROMISE_SYMBOL } from './internal/promiseCallback'; +import reduce from './reduce.js' +import wrapAsync from './internal/wrapAsync.js' +import { promiseCallback, PROMISE_SYMBOL } from './internal/promiseCallback.js' /** * Version of the compose function that is more natural to read. Each function diff --git a/lib/series.js b/lib/series.js index cbec2e834..7518e6212 100644 --- a/lib/series.js +++ b/lib/series.js @@ -1,5 +1,5 @@ -import _parallel from './internal/parallel'; -import eachOfSeries from './eachOfSeries'; +import _parallel from './internal/parallel.js' +import eachOfSeries from './eachOfSeries.js' /** * Run the functions in the `tasks` collection in series, each one running once diff --git a/lib/setImmediate.js b/lib/setImmediate.js index 847607102..8b32339e5 100644 --- a/lib/setImmediate.js +++ b/lib/setImmediate.js @@ -1,4 +1,4 @@ -import setImmediate from './internal/setImmediate'; +import setImmediate from './internal/setImmediate.js' /** * Calls `callback` on a later loop around the event loop. In Node.js this just diff --git a/lib/some.js b/lib/some.js index 1d7f6fd1e..0420ea8a1 100644 --- a/lib/some.js +++ b/lib/some.js @@ -1,6 +1,6 @@ -import createTester from './internal/createTester'; -import eachOf from './eachOf' -import awaitify from './internal/awaitify' +import createTester from './internal/createTester.js' +import eachOf from './eachOf.js' +import awaitify from './internal/awaitify.js' /** * Returns `true` if at least one element in the `coll` satisfies an async test. diff --git a/lib/someLimit.js b/lib/someLimit.js index 2defb28d6..db0c94be1 100644 --- a/lib/someLimit.js +++ b/lib/someLimit.js @@ -1,6 +1,6 @@ -import createTester from './internal/createTester'; -import eachOfLimit from './internal/eachOfLimit' -import awaitify from './internal/awaitify' +import createTester from './internal/createTester.js' +import eachOfLimit from './internal/eachOfLimit.js' +import awaitify from './internal/awaitify.js' /** * The same as [`some`]{@link module:Collections.some} but runs a maximum of `limit` async operations at a time. diff --git a/lib/someSeries.js b/lib/someSeries.js index 78421247e..5f83a12e7 100644 --- a/lib/someSeries.js +++ b/lib/someSeries.js @@ -1,6 +1,6 @@ -import createTester from './internal/createTester'; -import eachOfSeries from './eachOfSeries'; -import awaitify from './internal/awaitify'; +import createTester from './internal/createTester.js' +import eachOfSeries from './eachOfSeries.js' +import awaitify from './internal/awaitify.js' /** * The same as [`some`]{@link module:Collections.some} but runs only a single async operation at a time. diff --git a/lib/sortBy.js b/lib/sortBy.js index 7a1b9fbbb..bcb347315 100644 --- a/lib/sortBy.js +++ b/lib/sortBy.js @@ -1,6 +1,6 @@ -import map from './map'; -import wrapAsync from './internal/wrapAsync'; -import awaitify from './internal/awaitify' +import map from './map.js' +import wrapAsync from './internal/wrapAsync.js' +import awaitify from './internal/awaitify.js' /** * Sorts a list by the results of running each `coll` value through an async diff --git a/lib/timeout.js b/lib/timeout.js index 920a1d7c3..35ef497d3 100644 --- a/lib/timeout.js +++ b/lib/timeout.js @@ -1,5 +1,5 @@ -import initialParams from './internal/initialParams'; -import wrapAsync from './internal/wrapAsync'; +import initialParams from './internal/initialParams.js' +import wrapAsync from './internal/wrapAsync.js' /** * Sets a time limit on an asynchronous function. If the function does not call diff --git a/lib/times.js b/lib/times.js index 15e798fda..beba1e4e8 100644 --- a/lib/times.js +++ b/lib/times.js @@ -1,4 +1,4 @@ -import timesLimit from './timesLimit'; +import timesLimit from './timesLimit.js' /** * Calls the `iteratee` function `n` times, and accumulates results in the same diff --git a/lib/timesLimit.js b/lib/timesLimit.js index 8880ccfed..4d8d23779 100644 --- a/lib/timesLimit.js +++ b/lib/timesLimit.js @@ -1,6 +1,6 @@ -import mapLimit from './mapLimit'; -import range from './internal/range'; -import wrapAsync from './internal/wrapAsync'; +import mapLimit from './mapLimit.js' +import range from './internal/range.js' +import wrapAsync from './internal/wrapAsync.js' /** * The same as [times]{@link module:ControlFlow.times} but runs a maximum of `limit` async operations at a diff --git a/lib/timesSeries.js b/lib/timesSeries.js index b56f6ec86..d16b1a252 100644 --- a/lib/timesSeries.js +++ b/lib/timesSeries.js @@ -1,4 +1,4 @@ -import timesLimit from './timesLimit'; +import timesLimit from './timesLimit.js' /** * The same as [times]{@link module:ControlFlow.times} but runs only a single async operation at a time. diff --git a/lib/transform.js b/lib/transform.js index d2aa29e7f..a835103e8 100644 --- a/lib/transform.js +++ b/lib/transform.js @@ -1,7 +1,7 @@ -import eachOf from './eachOf'; -import once from './internal/once'; -import wrapAsync from './internal/wrapAsync'; -import { promiseCallback, PROMISE_SYMBOL } from './internal/promiseCallback'; +import eachOf from './eachOf.js' +import once from './internal/once.js' +import wrapAsync from './internal/wrapAsync.js' +import { promiseCallback, PROMISE_SYMBOL } from './internal/promiseCallback.js' /** * A relative of `reduce`. Takes an Object or Array, and iterates over each diff --git a/lib/tryEach.js b/lib/tryEach.js index c968cb7e7..8fa314b1f 100644 --- a/lib/tryEach.js +++ b/lib/tryEach.js @@ -1,6 +1,6 @@ -import eachSeries from './eachSeries'; -import wrapAsync from './internal/wrapAsync'; -import awaitify from './internal/awaitify' +import eachSeries from './eachSeries.js' +import wrapAsync from './internal/wrapAsync.js' +import awaitify from './internal/awaitify.js' /** * It runs each task in series but stops whenever any of the functions were diff --git a/lib/until.js b/lib/until.js index 0f463dd02..fb6ce1731 100644 --- a/lib/until.js +++ b/lib/until.js @@ -1,5 +1,5 @@ -import whilst from './whilst'; -import wrapAsync from './internal/wrapAsync'; +import whilst from './whilst.js' +import wrapAsync from './internal/wrapAsync.js' /** * Repeatedly call `iteratee` until `test` returns `true`. Calls `callback` when diff --git a/lib/waterfall.js b/lib/waterfall.js index f9a6c2417..92783b2d7 100644 --- a/lib/waterfall.js +++ b/lib/waterfall.js @@ -1,8 +1,7 @@ -import once from './internal/once'; - -import onlyOnce from './internal/onlyOnce'; -import wrapAsync from './internal/wrapAsync'; -import awaitify from './internal/awaitify' +import once from './internal/once.js' +import onlyOnce from './internal/onlyOnce.js' +import wrapAsync from './internal/wrapAsync.js' +import awaitify from './internal/awaitify.js' /** * Runs the `tasks` array of functions in series, each passing their results to diff --git a/lib/whilst.js b/lib/whilst.js index cc0f91886..2a2a56cb7 100644 --- a/lib/whilst.js +++ b/lib/whilst.js @@ -1,6 +1,6 @@ -import onlyOnce from './internal/onlyOnce'; -import wrapAsync from './internal/wrapAsync'; -import awaitify from './internal/awaitify'; +import onlyOnce from './internal/onlyOnce.js' +import wrapAsync from './internal/wrapAsync.js' +import awaitify from './internal/awaitify.js' /** * Repeatedly call `iteratee`, while `test` returns `true`. Calls `callback` when diff --git a/perf/benchmark.js b/perf/benchmark.js index 12f0eac96..236acf6d3 100755 --- a/perf/benchmark.js +++ b/perf/benchmark.js @@ -6,8 +6,8 @@ var {exec, execSync} = require("child_process"); var fs = require("fs"); var path = require("path"); var mkdirp = require("mkdirp"); -var async = require("../"); -var suiteConfigs = require("./suites"); +var async = require("../index.js"); +var suiteConfigs = require("./suites.js"); var semver = require("semver"); var args = require("yargs")