Crawlee—A web scraping and browser automation library for Node.js to build reliable crawlers. In JavaScript and TypeScript. Extract data for AI, LLMs, RAG, or GPTs. Download HTML, PDF, JPG, PNG, and other files from websites. Works with Puppeteer, Playwright, Cheerio, JSDOM, and raw HTTP. Both headful and headless mode. With proxy rotation.
TypeScript apifyautomationcrawlercrawlingheadlessheadless-chromejavascriptnodejsnpmplaywrightpuppeteerscraperscrapingtypescriptweb-crawlerweb-crawlingweb-scraping
PR fixes
Marek Trunkat093ce7eb827a
diff --git a/package.json b/package.jsonindex 73e1a7e37..91684f362 100644--- a/package.json+++ b/package.json@@ -98,7 +98,6 @@"nyc": "^14.0.0","portastic": "^1.0.1","proxy": "^0.2.4",- "semver": "^6.1.1","sinon": "^7.1.1","sinon-stub-promise": "^4.0.0","socket.io-client": "^2.2.0",diff --git a/src/index.js b/src/index.jsindex 3a6df31c9..0bf23aa26 100644--- a/src/index.js+++ b/src/index.js@@ -15,7 +15,7 @@ import Request from './request';import { RequestList, openRequestList } from './request_list';import { openRequestQueue } from './request_queue';import SettingsRotator from './settings_rotator';-import { apifyClient, getMemoryInfo, isAtHome, publicUtils, logSystemInfo, printOudatedSdkWarning } from './utils';+import { apifyClient, getMemoryInfo, isAtHome, publicUtils, logSystemInfo, printOutdatedSdkWarning } from './utils';import { puppeteerUtils } from './puppeteer_utils';import { socialUtils } from './utils_social';import { enqueueLinks } from './enqueue_links/enqueue_links';@@ -41,7 +41,7 @@ if (process.env[EMULATION_ENV_VAR]) {logSystemInfo();// Log warning if SDK is outdated.-printOudatedSdkWarning();+printOutdatedSdkWarning();/*** The following section describes all functions and properties provided by the `apify` package,diff --git a/src/utils.js b/src/utils.jsindex 1dac583f0..61b301685 100644--- a/src/utils.js+++ b/src/utils.js@@ -623,13 +623,13 @@ export const snakeCaseToCamelCase = (snakeCaseStr) => {** @ignore*/-export const printOudatedSdkWarning = () => {+export const printOutdatedSdkWarning = () => {const latestApifyVersion = process.env[ENV_VARS.SDK_LATEST_VERSION];if (!latestApifyVersion || !semver.lt(apifyVersion, latestApifyVersion)) return;// eslint-disable-next-linelog.warning(`You are using an outdated version (${apifyVersion}) of Apify SDK. We recommend you to update to the latest version (${latestApifyVersion}).- Read more about Apify SDK versioning at: https://kb.apify.com/en/articles/3184510-apify-sdk-versioning`);+ Read more about Apify SDK versioning at: https://kb.apify.com/en/articles/3184510-updates-and-versioning-of-apify-sdk`);};/**diff --git a/test/utils.js b/test/utils.jsindex d19209ada..ba220837f 100644--- a/test/utils.js+++ b/test/utils.js@@ -882,7 +882,7 @@ describe('utils.addTimeoutToPromise()', () => {});});-describe('utils.printOudatedSdkWarning()', () => {+describe('utils.printOutdatedSdkWarning()', () => {let logMock;const currentVersion = require('../package.json').version; // eslint-disable-line@@ -899,21 +899,21 @@ describe('utils.printOudatedSdkWarning()', () => {it('should do nothing when ENV_VARS.SDK_LATEST_VERSION is not set', () => {delete process.env[ENV_VARS.SDK_LATEST_VERSION];logMock.expects('warning').never();- utils.printOudatedSdkWarning();+ utils.printOutdatedSdkWarning();});it('should correctly work when outdated', () => {process.env[ENV_VARS.SDK_LATEST_VERSION] = semver.inc(currentVersion, 'minor');console.log(process.env[ENV_VARS.SDK_LATEST_VERSION]);logMock.expects('warning').once();- utils.printOudatedSdkWarning();+ utils.printOutdatedSdkWarning();delete process.env[ENV_VARS.SDK_LATEST_VERSION];});it('should correctly work when up to date', () => {process.env[ENV_VARS.SDK_LATEST_VERSION] = '0.13.0';logMock.expects('warning').never();- utils.printOudatedSdkWarning();+ utils.printOutdatedSdkWarning();delete process.env[ENV_VARS.SDK_LATEST_VERSION];});});