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
feat(utils): split exports into public and /internal entry points (#3991)
Jindřich Bär6a94b86a38bd
diff --git a/docs/public-api/crawlee-basic.api.md b/docs/public-api/crawlee-basic.api.mdindex 80fbacb56..2bed167d8 100644--- a/docs/public-api/crawlee-basic.api.md+++ b/docs/public-api/crawlee-basic.api.md@@ -12,9 +12,9 @@ import type { Awaitable } from '@crawlee/types';import type { BaseHttpClient } from '@crawlee/types';import { BasePredicate } from 'ow';import { BooleanPredicate } from 'ow';-import { Cheerio } from '@crawlee/utils';-import { CheerioAPI } from '@crawlee/utils';-import { CheerioRoot } from '@crawlee/utils';+import { Cheerio } from '@crawlee/utils/internal';+import { CheerioAPI } from '@crawlee/utils/internal';+import { CheerioRoot } from '@crawlee/utils/internal';import { ConcurrencySystem } from '@crawlee/core';import { ConcurrencySystemOptions } from '@crawlee/core';import type { Configuration } from '@crawlee/core';@@ -24,7 +24,7 @@ import { CrawlingContext } from '@crawlee/core';import { Dataset } from '@crawlee/core';import type { DatasetExportOptions } from '@crawlee/core';import type { Dictionary } from '@crawlee/types';-import { Element as Element_2 } from '@crawlee/utils';+import { Element as Element_2 } from '@crawlee/utils/internal';import type { EventManager } from '@crawlee/core';import type { FinalStatistics } from '@crawlee/core';import type { GetUserDataFromRequest } from '@crawlee/core';diff --git a/docs/public-api/crawlee-cheerio.api.md b/docs/public-api/crawlee-cheerio.api.mdindex 7226247e8..f61a8121d 100644--- a/docs/public-api/crawlee-cheerio.api.md+++ b/docs/public-api/crawlee-cheerio.api.md@@ -7,7 +7,7 @@import type { BatchAddRequestsResult } from '@crawlee/types';import * as cheerio from 'cheerio';import type { CheerioAPI } from 'cheerio';-import { CheerioRoot } from '@crawlee/utils';+import { CheerioRoot } from '@crawlee/utils/internal';import { ContextPipeline } from '@crawlee/http';import type { CrawlingContext } from '@crawlee/http';import type { Dictionary } from '@crawlee/types';diff --git a/docs/public-api/crawlee-core.api.md b/docs/public-api/crawlee-core.api.mdindex 0d72df75b..3447370f1 100644--- a/docs/public-api/crawlee-core.api.md+++ b/docs/public-api/crawlee-core.api.md@@ -45,7 +45,7 @@ import type { StandardSchemaV1 } from '@standard-schema/spec';import type * as storage from '@crawlee/types';import { StorageBackend } from '@crawlee/types';import { StorageIdentifier } from '@crawlee/types';-import { tryAbsoluteURL } from '@crawlee/utils';+import { tryAbsoluteURL } from '@crawlee/utils/internal';import { z } from 'zod';// @public (undocumented)diff --git a/docs/public-api/crawlee-http.api.md b/docs/public-api/crawlee-http.api.mdindex 358b8fde0..f8303c50e 100644--- a/docs/public-api/crawlee-http.api.md+++ b/docs/public-api/crawlee-http.api.md@@ -11,7 +11,7 @@ import { BasePredicate } from 'ow';import { BasicCrawler } from '@crawlee/basic';import { BasicCrawlerOptions } from '@crawlee/basic';import { BooleanPredicate } from 'ow';-import { CheerioRoot } from '@crawlee/utils';+import { CheerioRoot } from '@crawlee/utils/internal';import { ConcurrencySystem } from '@crawlee/basic';import type { ConcurrencySystemOptions } from '@crawlee/basic';import { ContextPipeline } from '@crawlee/basic';diff --git a/docs/public-api/crawlee-jsdom.api.md b/docs/public-api/crawlee-jsdom.api.mdindex 7a8c41f03..5edf593b5 100644--- a/docs/public-api/crawlee-jsdom.api.md+++ b/docs/public-api/crawlee-jsdom.api.md@@ -9,7 +9,7 @@ import { ArrayPredicate } from 'ow';import { BasePredicate } from 'ow';import { BooleanPredicate } from 'ow';import { CheerioAPI } from 'cheerio';-import { CheerioRoot } from '@crawlee/utils';+import { CheerioRoot } from '@crawlee/utils/internal';import { ContextPipeline } from '@crawlee/http';import type { CrawlingContext } from '@crawlee/http';import type { Dictionary } from '@crawlee/types';diff --git a/docs/public-api/crawlee-linkedom.api.md b/docs/public-api/crawlee-linkedom.api.mdindex c3952085f..cf1b4affa 100644--- a/docs/public-api/crawlee-linkedom.api.md+++ b/docs/public-api/crawlee-linkedom.api.md@@ -5,7 +5,7 @@```tsimport * as cheerio from 'cheerio';-import { CheerioRoot } from '@crawlee/utils';+import { CheerioRoot } from '@crawlee/utils/internal';import { ContextPipeline } from '@crawlee/http';import type { CrawlingContext } from '@crawlee/http';import type { Dictionary } from '@crawlee/types';diff --git a/docs/public-api/crawlee-playwright.api.md b/docs/public-api/crawlee-playwright.api.mdindex 177b5fcb1..48b3b21d6 100644--- a/docs/public-api/crawlee-playwright.api.md+++ b/docs/public-api/crawlee-playwright.api.md@@ -22,7 +22,7 @@ import type { BrowserLaunchContext } from '@crawlee/browser';import type { BrowserType } from 'playwright';import { Cheerio } from 'cheerio';import { CheerioAPI } from '@crawlee/browser';-import { CheerioRoot } from '@crawlee/utils';+import { CheerioRoot } from '@crawlee/utils/internal';import { Configuration } from '@crawlee/browser';import { ContextPipeline } from '@crawlee/browser';import type { ContextPipeline as ContextPipeline_2 } from '@crawlee/core';diff --git a/docs/public-api/crawlee-puppeteer.api.md b/docs/public-api/crawlee-puppeteer.api.mdindex ec45e4f86..54969e9e2 100644--- a/docs/public-api/crawlee-puppeteer.api.md+++ b/docs/public-api/crawlee-puppeteer.api.md@@ -16,7 +16,7 @@ import type { BrowserCrawlingContext } from '@crawlee/browser';import type { BrowserHook } from '@crawlee/browser';import type { BrowserLaunchContext } from '@crawlee/browser';import { CheerioAPI } from '@crawlee/browser';-import { CheerioRoot } from '@crawlee/utils';+import { CheerioRoot } from '@crawlee/utils/internal';import type { ClickOptions } from 'puppeteer';import { Configuration } from '@crawlee/browser';import { ContextPipeline } from '@crawlee/browser';diff --git a/docs/public-api/crawlee-utils.api.md b/docs/public-api/crawlee-utils.api.mdindex 083fab3ff..ff0697a80 100644--- a/docs/public-api/crawlee-utils.api.md+++ b/docs/public-api/crawlee-utils.api.md@@ -5,21 +5,13 @@```tsimport type { BaseHttpClient } from '@crawlee/types';-import { Cheerio } from 'cheerio';-import { CheerioAPI } from 'cheerio';+import type { CheerioAPI } from 'cheerio';import type { CrawleeLogger } from '@crawlee/types';import type { Dictionary } from '@crawlee/types';-import { Element as Element_2 } from 'domhandler';--export { Cheerio }--export { CheerioAPI }--// @public (undocumented)-export type CheerioRoot = CheerioAPI;+// Not exported by the entry point; reachable only as a referenced type.// @public (undocumented)-export const CLOUDFLARE_RETRY_CSS_SELECTORS: string[];+type CheerioRoot = CheerioAPI;// @publicconst DISCORD_REGEX: RegExp;@@ -49,8 +41,6 @@ export interface DownloadListOfUrlsOptions {urlRegExp?: RegExp;}-export { Element_2 as Element }-// @publicconst EMAIL_REGEX: RegExp;@@ -66,9 +56,6 @@ function emailsFromUrls(urls: string[]): string[];// @publicexport function extractUrls(options: ExtractUrlsOptions): string[];-// @public-export function extractUrlsFromCheerio($: CheerioAPI, selector?: string, baseUrl?: string): string[];-// @public (undocumented)export interface ExtractUrlsOptions {string: string;@@ -96,9 +83,6 @@ const LINKEDIN_REGEX: RegExp;// @publicconst LINKEDIN_REGEX_GLOBAL: RegExp;-// @public-export function mergeAsyncIterables<T>(...iterables: AsyncIterable<T>[]): AsyncIterable<T>;-// Not exported by the entry point; reachable only as a referenced type.// @public (undocumented)interface NestedSitemap {@@ -158,9 +142,6 @@ const PINTEREST_REGEX: RegExp;// @publicconst PINTEREST_REGEX_GLOBAL: RegExp;-// @public-export const RETRY_CSS_SELECTORS: string[];-// @publicexport class RobotsTxtFile {static find(url: string, options?: {@@ -177,9 +158,6 @@ export class RobotsTxtFile {parseUrlsFromSitemaps(): Promise<string[]>;}-// @public-export const ROTATE_PROXY_ERRORS: string[];-// @publicexport class Sitemap {constructor(urls: string[]);@@ -284,21 +262,12 @@ const TIKTOK_REGEX: RegExp;// @publicconst TIKTOK_REGEX_GLOBAL: RegExp;-// @public-export function tryAbsoluteURL(href: string, baseUrl: string): string | undefined;-// @publicconst TWITTER_REGEX: RegExp;// @publicconst TWITTER_REGEX_GLOBAL: RegExp;-// @public-export const URL_NO_COMMAS_REGEX: RegExp;--// @public-export const URL_WITH_COMMAS_REGEX: RegExp;-// @publicconst YOUTUBE_REGEX: RegExp;diff --git a/packages/basic-crawler/src/index.ts b/packages/basic-crawler/src/index.tsindex e0df12996..3af68daab 100644--- a/packages/basic-crawler/src/index.ts+++ b/packages/basic-crawler/src/index.ts@@ -1,3 +1,3 @@export * from '@crawlee/core';export * from './internals/basic-crawler.js';-export type { CheerioRoot, CheerioAPI, Cheerio, Element } from '@crawlee/utils';+export type { CheerioRoot, CheerioAPI, Cheerio, Element } from '@crawlee/utils/internal';diff --git a/packages/basic-crawler/src/internals/basic-crawler.ts b/packages/basic-crawler/src/internals/basic-crawler.tsindex b42bdf55b..fe7c60d37 100644--- a/packages/basic-crawler/src/internals/basic-crawler.ts+++ b/packages/basic-crawler/src/internals/basic-crawler.ts@@ -87,7 +87,8 @@ import type {SetStatusMessageOptions,StorageBackend,} from '@crawlee/types';-import { isAsyncIterable, isIterable, RobotsTxtFile, ROTATE_PROXY_ERRORS } from '@crawlee/utils';+import { isAsyncIterable, isIterable, ROTATE_PROXY_ERRORS } from '@crawlee/utils/internal';+import { RobotsTxtFile } from '@crawlee/utils';import ow, { ArgumentError, type BasePredicate } from 'ow';import { getDomain } from 'tldts';import type { ReadonlyDeep, SetRequired } from 'type-fest';diff --git a/packages/browser-crawler/src/internals/browser-crawler.ts b/packages/browser-crawler/src/internals/browser-crawler.tsindex fd959fc69..8e805e036 100644--- a/packages/browser-crawler/src/internals/browser-crawler.ts+++ b/packages/browser-crawler/src/internals/browser-crawler.ts@@ -49,7 +49,8 @@ import type {ISession,} from '@crawlee/types';import type { RobotsTxtFile } from '@crawlee/utils';-import { CLOUDFLARE_RETRY_CSS_SELECTORS, RETRY_CSS_SELECTORS, sleep } from '@crawlee/utils';+import { CLOUDFLARE_RETRY_CSS_SELECTORS, RETRY_CSS_SELECTORS } from '@crawlee/utils/internal';+import { sleep } from '@crawlee/utils';import ow from 'ow';import type { ReadonlyDeep } from 'type-fest';diff --git a/packages/cheerio-crawler/src/internals/cheerio-crawler.ts b/packages/cheerio-crawler/src/internals/cheerio-crawler.tsindex 665676c2a..12d0898f4 100644--- a/packages/cheerio-crawler/src/internals/cheerio-crawler.ts+++ b/packages/cheerio-crawler/src/internals/cheerio-crawler.ts@@ -23,7 +23,8 @@ import {Router,} from '@crawlee/http';import type { BatchAddRequestsResult, Dictionary } from '@crawlee/types';-import { type CheerioRoot, extractUrlsFromCheerio, type RobotsTxtFile } from '@crawlee/utils';+import { type CheerioRoot, extractUrlsFromCheerio } from '@crawlee/utils/internal';+import { type RobotsTxtFile } from '@crawlee/utils';import type { CheerioAPI, CheerioOptions } from 'cheerio';import * as cheerio from 'cheerio';import { parseDocument } from 'htmlparser2';diff --git a/packages/core/src/enqueue_links/shared.ts b/packages/core/src/enqueue_links/shared.tsindex f1eb0aa79..e399a8ec2 100644--- a/packages/core/src/enqueue_links/shared.ts+++ b/packages/core/src/enqueue_links/shared.ts@@ -6,7 +6,7 @@ import { Minimatch } from 'minimatch';import type { RequestOptions } from '../request.js';import type { EnqueueLinksOptions } from './enqueue_links.js';-export { tryAbsoluteURL } from '@crawlee/utils';+export { tryAbsoluteURL } from '@crawlee/utils/internal';const MAX_ENQUEUE_LINKS_CACHE_SIZE = 1000;diff --git a/packages/core/src/storages/request_queue.ts b/packages/core/src/storages/request_queue.tsindex 4cad6a9d5..fbf0f3a30 100644--- a/packages/core/src/storages/request_queue.ts+++ b/packages/core/src/storages/request_queue.ts@@ -10,7 +10,8 @@ import type {RequestQueueBackend,RequestQueueInfo,} from '@crawlee/types';-import { downloadListOfUrls, isAsyncIterable, isIterable, sleep } from '@crawlee/utils';+import { isAsyncIterable, isIterable } from '@crawlee/utils/internal';+import { downloadListOfUrls, sleep } from '@crawlee/utils';import ow from 'ow';import type { ReadonlyDeep } from 'type-fest';diff --git a/packages/http-crawler/src/internals/http-crawler.ts b/packages/http-crawler/src/internals/http-crawler.tsindex d330b061e..a118efae1 100644--- a/packages/http-crawler/src/internals/http-crawler.ts+++ b/packages/http-crawler/src/internals/http-crawler.ts@@ -29,7 +29,7 @@ import {import { type LoadedRequest, getCookiesFromResponse } from '@crawlee/core';import { ResponseWithUrl } from '@crawlee/http-client';import type { Awaitable, Dictionary, ISession } from '@crawlee/types';-import { type CheerioRoot, RETRY_CSS_SELECTORS } from '@crawlee/utils';+import { type CheerioRoot, RETRY_CSS_SELECTORS } from '@crawlee/utils/internal';import type { RequestLike, ResponseLike } from 'content-type';import contentTypeParser from 'content-type';import iconv from 'iconv-lite';diff --git a/packages/http-crawler/src/internals/utils.ts b/packages/http-crawler/src/internals/utils.tsindex 3631571f1..e58422041 100644--- a/packages/http-crawler/src/internals/utils.ts+++ b/packages/http-crawler/src/internals/utils.ts@@ -2,7 +2,7 @@ import { extname } from 'node:path';import { Readable } from 'node:stream';import type { HttpRequest, HttpRequestOptions } from '@crawlee/types';-import { applySearchParams } from '@crawlee/utils';+import { applySearchParams } from '@crawlee/utils/internal';import contentTypeParser from 'content-type';import mime from 'mime-types';import ow, { ObjectPredicate } from 'ow';diff --git a/packages/jsdom-crawler/src/internals/jsdom-crawler.ts b/packages/jsdom-crawler/src/internals/jsdom-crawler.tsindex 001e806d4..23778694a 100644--- a/packages/jsdom-crawler/src/internals/jsdom-crawler.ts+++ b/packages/jsdom-crawler/src/internals/jsdom-crawler.ts@@ -24,7 +24,8 @@ import {tryAbsoluteURL,} from '@crawlee/http';import type { Dictionary } from '@crawlee/types';-import { type CheerioRoot, type RobotsTxtFile, sleep } from '@crawlee/utils';+import { type CheerioRoot } from '@crawlee/utils/internal';+import { type RobotsTxtFile, sleep } from '@crawlee/utils';import type { DOMWindow } from 'jsdom';import { JSDOM, ResourceLoader, VirtualConsole } from 'jsdom';import ow from 'ow';diff --git a/packages/linkedom-crawler/src/internals/linkedom-crawler.ts b/packages/linkedom-crawler/src/internals/linkedom-crawler.tsindex 3593b4f4b..a558e1023 100644--- a/packages/linkedom-crawler/src/internals/linkedom-crawler.ts+++ b/packages/linkedom-crawler/src/internals/linkedom-crawler.ts@@ -24,7 +24,8 @@ import {tryAbsoluteURL,} from '@crawlee/http';import type { Dictionary } from '@crawlee/types';-import { type CheerioRoot, type RobotsTxtFile, sleep } from '@crawlee/utils';+import { type CheerioRoot } from '@crawlee/utils/internal';+import { type RobotsTxtFile, sleep } from '@crawlee/utils';import * as cheerio from 'cheerio';import { DOMParser } from 'linkedom/cached';diff --git a/packages/playwright-crawler/src/internals/adaptive-playwright-crawler.ts b/packages/playwright-crawler/src/internals/adaptive-playwright-crawler.tsindex 4b62c7c1c..71d3e6af1 100644--- a/packages/playwright-crawler/src/internals/adaptive-playwright-crawler.ts+++ b/packages/playwright-crawler/src/internals/adaptive-playwright-crawler.ts@@ -37,7 +37,7 @@ import {Statistics,} from '@crawlee/core';import type { BatchAddRequestsResult, Dictionary, Awaitable } from '@crawlee/types';-import { type CheerioRoot, extractUrlsFromCheerio } from '@crawlee/utils';+import { type CheerioRoot, extractUrlsFromCheerio } from '@crawlee/utils/internal';import { type Cheerio } from 'cheerio';import type { AnyNode } from 'domhandler';import ow from 'ow';diff --git a/packages/playwright-crawler/src/internals/utils/playwright-utils.ts b/packages/playwright-crawler/src/internals/utils/playwright-utils.tsindex ec0c9a4ae..9e80d3ab1 100644--- a/packages/playwright-crawler/src/internals/utils/playwright-utils.ts+++ b/packages/playwright-crawler/src/internals/utils/playwright-utils.ts@@ -24,7 +24,8 @@ import vm from 'node:vm';import { Configuration, KeyValueStore, type Request, serviceLocator, SessionError, validators } from '@crawlee/browser';import type { BatchAddRequestsResult, Dictionary } from '@crawlee/types';-import { type CheerioRoot, expandShadowRoots, sleep } from '@crawlee/utils';+import { type CheerioRoot } from '@crawlee/utils/internal';+import { expandShadowRoots, sleep } from '@crawlee/utils';import ow from 'ow';import type { Download, Page, Response, Route } from 'playwright';diff --git a/packages/puppeteer-crawler/src/internals/utils/puppeteer_utils.ts b/packages/puppeteer-crawler/src/internals/utils/puppeteer_utils.tsindex 3de59ad7a..1a68cebdb 100644--- a/packages/puppeteer-crawler/src/internals/utils/puppeteer_utils.ts+++ b/packages/puppeteer-crawler/src/internals/utils/puppeteer_utils.ts@@ -25,7 +25,8 @@ import vm from 'node:vm';import type { Request } from '@crawlee/browser';import { Configuration, KeyValueStore, serviceLocator, validators } from '@crawlee/browser';import type { BatchAddRequestsResult, Dictionary } from '@crawlee/types';-import { type CheerioRoot, expandShadowRoots, sleep } from '@crawlee/utils';+import { type CheerioRoot } from '@crawlee/utils/internal';+import { expandShadowRoots, sleep } from '@crawlee/utils';import type { ProtocolMapping } from 'devtools-protocol/types/protocol-mapping.js';import ow from 'ow';// @ts-ignore This only throws when compiled against puppeteer 25+ (ESM only), we only import types, so its alllll gooooooddiff --git a/packages/utils/package.json b/packages/utils/package.jsonindex eede664ad..a5be83c05 100644--- a/packages/utils/package.json+++ b/packages/utils/package.json@@ -8,6 +8,7 @@"type": "module","exports": {".": "./dist/index.js",+ "./internal": "./dist/internal.js","./package.json": "./package.json"},"keywords": [diff --git a/packages/utils/src/index.ts b/packages/utils/src/index.tsindex e6129fdff..081f3a772 100644--- a/packages/utils/src/index.ts+++ b/packages/utils/src/index.ts@@ -1,10 +1,9 @@-export * from './internals/blocked.js';-export * from './internals/cheerio.js';-export * from './internals/extract-urls.js';-export * from './internals/general.js';+export { htmlToText } from './internals/cheerio.js';+export { downloadListOfUrls, extractUrls } from './internals/extract-urls.js';+export { EnqueueStrategy } from './internals/url.js';+export type { DownloadListOfUrlsOptions, ExtractUrlsOptions } from './internals/extract-urls.js';+export { sleep, expandShadowRoots } from './internals/general.js';export * as social from './internals/social.js';export * from './internals/open_graph_parser.js';export * from './internals/robots.js';export * from './internals/sitemap.js';-export * from './internals/iterables.js';-export * from './internals/url.js';diff --git a/packages/utils/src/internal.ts b/packages/utils/src/internal.tsnew file mode 100644index 000000000..fa51c0dca--- /dev/null+++ b/packages/utils/src/internal.ts@@ -0,0 +1,7 @@+export * from './internals/blocked.js';+export type { CheerioRoot, CheerioAPI, Cheerio, Element } from './internals/cheerio.js';+export { extractUrlsFromCheerio } from './internals/cheerio.js';+export { tryAbsoluteURL } from './internals/extract-urls.js';+export { URL_NO_COMMAS_REGEX, URL_WITH_COMMAS_REGEX } from './internals/general.js';+export * from './internals/iterables.js';+export * from './internals/url.js';diff --git a/test/core/crawlers/playwright_crawler.test.ts b/test/core/crawlers/playwright_crawler.test.tsindex 64a6a6a29..3b3ecabc6 100644--- a/test/core/crawlers/playwright_crawler.test.ts+++ b/test/core/crawlers/playwright_crawler.test.ts@@ -5,7 +5,7 @@ import os from 'node:os';import type { PlaywrightCrawlingContext, PlaywrightGotoOptions, Request } from '@crawlee/playwright';import { type ConcurrencySystem, MemoryStorageBackend, serviceLocator } from '@crawlee/core';import { createPlaywrightRouter, PlaywrightCrawler, RequestList, RequestValidationError } from '@crawlee/playwright';-import type { Cheerio, CheerioAPI, CheerioRoot, Element } from '@crawlee/utils';+import type { Cheerio, CheerioAPI, CheerioRoot, Element } from '@crawlee/utils/internal';import { sleep } from '@crawlee/utils';import express from 'express';import playwright from 'playwright';diff --git a/test/core/enqueue_links/enqueue_links.test.ts b/test/core/enqueue_links/enqueue_links.test.tsindex a36273801..de7372d42 100644--- a/test/core/enqueue_links/enqueue_links.test.ts+++ b/test/core/enqueue_links/enqueue_links.test.ts@@ -14,7 +14,8 @@ import {Request,RequestQueue,} from '@crawlee/puppeteer';-import { type CheerioRoot, RobotsTxtFile } from '@crawlee/utils';+import { type CheerioRoot } from '@crawlee/utils/internal';+import { RobotsTxtFile } from '@crawlee/utils';import { load } from 'cheerio';import type { Browser as PlaywrightBrowser, Page as PlaywrightPage } from 'playwright';// @ts-ignore This only throws when compiled against puppeteer 25+ (ESM only), we only import types, so its alllll gooooooddiff --git a/test/utils/cheerio.test.ts b/test/utils/cheerio.test.tsindex 65e2aeff5..af2d0352d 100644--- a/test/utils/cheerio.test.ts+++ b/test/utils/cheerio.test.ts@@ -1,4 +1,4 @@-import type { CheerioRoot } from '@crawlee/utils';+import type { CheerioRoot } from '@crawlee/utils/internal';import { htmlToText } from '@crawlee/utils';import * as cheerio from 'cheerio';diff --git a/test/utils/extract-urls.test.ts b/test/utils/extract-urls.test.tsindex b013d7cd6..f4b40eb86 100644--- a/test/utils/extract-urls.test.ts+++ b/test/utils/extract-urls.test.ts@@ -2,7 +2,8 @@ import fs from 'node:fs';import path from 'node:path';import type { BaseHttpClient } from '@crawlee/types';-import { downloadListOfUrls, extractUrls, URL_WITH_COMMAS_REGEX } from '@crawlee/utils';+import { URL_WITH_COMMAS_REGEX } from '@crawlee/utils/internal';+import { downloadListOfUrls, extractUrls } from '@crawlee/utils';const baseDataPath = path.join(import.meta.dirname, '..', 'shared', 'data');diff --git a/vitest.config.mts b/vitest.config.mtsindex 4915f6563..ee3756b18 100644--- a/vitest.config.mts+++ b/vitest.config.mts@@ -39,6 +39,7 @@ const baseConfig = defineConfig({{ find: '@crawlee/playwright', replacement: resolve(__dirname, './packages/playwright-crawler/src') },{ find: '@crawlee/puppeteer', replacement: resolve(__dirname, './packages/puppeteer-crawler/src') },{ find: '@crawlee/stagehand', replacement: resolve(__dirname, './packages/stagehand-crawler/src') },+ { find: '@crawlee/utils/internal', replacement: resolve(__dirname, './packages/utils/src/internal') },// The generic `@crawlee/*` aliases below map specifiers to workspace package sources. They// exclude `@crawlee/fs-storage-native` via a negative lookahead, since it is a real external// (npm) dependency with no `packages/fs-storage-native` source — letting it resolve normally