socket-function 1.1.28 → 1.1.29

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/package.json +1 -1
  2. package/src/batching.ts +2 -1
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "socket-function",
3
- "version": "1.1.28",
3
+ "version": "1.1.29",
4
4
  "main": "index.js",
5
5
  "license": "MIT",
6
6
  "dependencies": {
package/src/batching.ts CHANGED
@@ -1,4 +1,5 @@
1
1
  import { formatTime } from "./formatting/format";
2
+ import { red } from "./formatting/logColors";
2
3
  import { PromiseObj, isNode, timeoutToError } from "./misc";
3
4
  import { measureWrap } from "./profiling/measure";
4
5
  import { AnyFunction, Args, MaybePromise } from "./types";
@@ -395,7 +396,7 @@ export async function safeLoop<T, R>(config: {
395
396
  while (!done) {
396
397
  await delay(5000);
397
398
  if (done) break;
398
- let message = `SLOW LOOP | ${index} / ${data.length} | ${formatTime(Date.now() - startTime)} | ${label}`;
399
+ let message = `${red("SLOW LOOP")} | ${index} / ${data.length} | ${formatTime(Date.now() - startTime)} | ${label}`;
399
400
  let timeOnCurrent = Date.now() - indexStartTime;
400
401
  if (timeOnCurrent > 5000) {
401
402
  message += `| SLOW INDEX (${index}) ${formatTime(timeOnCurrent)}+`;