@crawlee/basic 4.0.0-beta.72 → 4.0.0-beta.73

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.
@@ -2,7 +2,7 @@ import { writeFile } from 'node:fs/promises';
2
2
  import { dirname } from 'node:path';
3
3
  import { AutoscaledPool, bindMethodsToServiceLocator, BLOCKED_STATUS_CODES, ContextPipeline, ContextPipelineCleanupError, ContextPipelineInitializationError, ContextPipelineInterruptedError, CriticalError, Dataset, enqueueLinks, EnqueueStrategy, KeyValueStore, log, LogLevel, mergeCookies, MissingSessionError, NavigationSkippedError, NonRetryableError, purgeDefaultStorages, RequestHandlerError, RequestManagerTandem, RequestQueue, RequestState, RetryRequestError, Router, ServiceLocator, serviceLocator, Session, SessionError, SessionPool, Statistics, validateUserData, validators, } from '@crawlee/core';
4
4
  import { FetchHttpClient } from '@crawlee/http-client';
5
- import { getObjectType, isAsyncIterable, isIterable, RobotsTxtFile, ROTATE_PROXY_ERRORS, sleep } from '@crawlee/utils';
5
+ import { getObjectType, isAsyncIterable, isIterable, RobotsTxtFile, ROTATE_PROXY_ERRORS } from '@crawlee/utils';
6
6
  import { stringify } from 'csv-stringify/sync';
7
7
  import { ensureDir, writeJSON } from 'fs-extra/esm';
8
8
  import ow from 'ow';
@@ -775,12 +775,7 @@ export class BasicCrawler {
775
775
  finished = true;
776
776
  }
777
777
  periodicLogger.stop();
778
- // Give the event loop a single tick to flush the HTTP
779
- // 1ms is enough because we already have a keep-alive connection to the API
780
- await Promise.race([
781
- this.setStatusMessage(`Finished! Total ${this.stats.state.requestsFinished + this.stats.state.requestsFailed} requests: ${this.stats.state.requestsFinished} succeeded, ${this.stats.state.requestsFailed} failed.`, { isStatusMessageTerminal: true, level: 'INFO' }),
782
- sleep(1),
783
- ]);
778
+ this.setStatusMessage(`Finished! Total ${this.stats.state.requestsFinished + this.stats.state.requestsFailed} requests: ${this.stats.state.requestsFinished} succeeded, ${this.stats.state.requestsFailed} failed.`, { isStatusMessageTerminal: true, level: 'INFO' });
784
779
  this.running = false;
785
780
  this.hasFinishedBefore = true;
786
781
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@crawlee/basic",
3
- "version": "4.0.0-beta.72",
3
+ "version": "4.0.0-beta.73",
4
4
  "description": "The scalable web crawling and scraping library for JavaScript/Node.js. Enables development of data extraction and web automation jobs (not only) with headless Chrome and Puppeteer.",
5
5
  "engines": {
6
6
  "node": ">=22.0.0"
@@ -42,10 +42,10 @@
42
42
  "@apify/datastructures": "^2.0.0",
43
43
  "@apify/timeout": "^0.3.2",
44
44
  "@apify/utilities": "^2.15.5",
45
- "@crawlee/core": "4.0.0-beta.72",
46
- "@crawlee/http-client": "4.0.0-beta.72",
47
- "@crawlee/types": "4.0.0-beta.72",
48
- "@crawlee/utils": "4.0.0-beta.72",
45
+ "@crawlee/core": "4.0.0-beta.73",
46
+ "@crawlee/http-client": "4.0.0-beta.73",
47
+ "@crawlee/types": "4.0.0-beta.73",
48
+ "@crawlee/utils": "4.0.0-beta.73",
49
49
  "csv-stringify": "^6.5.2",
50
50
  "fs-extra": "^11.3.0",
51
51
  "ow": "^2.0.0",
@@ -54,7 +54,7 @@
54
54
  "type-fest": "^4.41.0"
55
55
  },
56
56
  "optionalDependencies": {
57
- "@crawlee/impit-client": "^4.0.0-beta.72"
57
+ "@crawlee/impit-client": "^4.0.0-beta.73"
58
58
  },
59
59
  "lerna": {
60
60
  "command": {
@@ -63,5 +63,5 @@
63
63
  }
64
64
  }
65
65
  },
66
- "gitHead": "3f698f0120bc3e6cc87b66d0127b5f36c125c255"
66
+ "gitHead": "d19ee418b814ada81b1520a6b7c4f889bb540f0c"
67
67
  }