Skip to content

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.

chore: rename source and test files to kebab-case (#4234)

Martin Adámek9c9e7a59406f
diff --git a/oxlint.config.ts b/oxlint.config.ts
index 7128ccac9..2600e2f9d 100644
--- a/oxlint.config.ts
+++ b/oxlint.config.ts
@@ -144,6 +144,13 @@ export default defineConfig({
'vitest/hoisted-apis-on-top': 'off',
},
},
+ {
+ // docs are not migrated to kebab-case yet (#3113)
+ files: ['packages/**/*', 'test/**/*', 'scripts/**/*'],
+ rules: {
+ 'unicorn/filename-case': ['error', { case: 'kebabCase' }],
+ },
+ },
{
files: ['packages/templates/**/*'],
rules: {
diff --git a/package.json b/package.json
index fad077d32..5dc9141f1 100644
--- a/package.json
+++ b/package.json
@@ -33,8 +33,8 @@
"scripts": {
"prepublishOnly": "turbo run copy --filter=./packages/*",
"clean": "turbo run clean --filter=./packages/* && rimraf .turbo packages/*/.turbo packages/*/*.tsbuildinfo",
- "build": "turbo run build --filter=./packages/* && node ./scripts/typescript_fixes.mjs",
- "ci:build": "turbo run build --filter=./packages/* --cache-dir=\".turbo\" && node ./scripts/typescript_fixes.mjs",
+ "build": "turbo run build --filter=./packages/* && node ./scripts/typescript-fixes.mjs",
+ "ci:build": "turbo run build --filter=./packages/* --cache-dir=\".turbo\" && node ./scripts/typescript-fixes.mjs",
"test": "vitest run --silent",
"test:e2e": "node test/e2e/run.mjs",
"test:integration": "cross-env CRAWLEE_DIFFICULT_TESTS=1 vitest run --silent=true test/integration",
diff --git a/packages/basic-crawler/src/index.ts b/packages/basic-crawler/src/index.ts
index d974669fc..5170cd071 100644
--- a/packages/basic-crawler/src/index.ts
+++ b/packages/basic-crawler/src/index.ts
@@ -1,13 +1,13 @@
export * from '@crawlee/core';
export * from './internals/autoscaling/index.js';
export * from './internals/basic-crawler.js';
-export * from './internals/cookie_utils.js';
+export * from './internals/cookie-utils.js';
export * from './internals/crawlers/index.js';
-export * from './internals/crawling_request.js';
-export * from './internals/enqueue_links/index.js';
+export * from './internals/crawling-request.js';
+export * from './internals/enqueue-links/index.js';
export * from './internals/errors.js';
export * from './internals/http.js';
export * from './internals/router.js';
-export * from './internals/session_pool/index.js';
-export * from './internals/sitemap_request_loader.js';
-export * from './internals/throttling_request_manager.js';
+export * from './internals/session-pool/index.js';
+export * from './internals/sitemap-request-loader.js';
+export * from './internals/throttling-request-manager.js';
diff --git a/packages/basic-crawler/src/internals/autoscaling/autoscaled_pool.ts b/packages/basic-crawler/src/internals/autoscaling/autoscaled-pool.ts
similarity index 99%
rename from packages/basic-crawler/src/internals/autoscaling/autoscaled_pool.ts
rename to packages/basic-crawler/src/internals/autoscaling/autoscaled-pool.ts
index 711f73e5b..de9148564 100644
--- a/packages/basic-crawler/src/internals/autoscaling/autoscaled_pool.ts
+++ b/packages/basic-crawler/src/internals/autoscaling/autoscaled-pool.ts
@@ -7,7 +7,7 @@ import { addTimeoutToPromise } from '@apify/timeout';
import type { BetterIntervalID } from '@apify/utilities';
import { betterClearInterval, betterSetInterval } from '@apify/utilities';
-import type { ConcurrencyConsumer, IConcurrencySystem } from './concurrency_system.js';
+import type { ConcurrencyConsumer, IConcurrencySystem } from './concurrency-system.js';
// `schemas.anyObject` and `objectWithKeys`-based validators pass values through by reference
// (object schemas return a pruned plain copy), so class instances like loggers and the
diff --git a/packages/basic-crawler/src/internals/autoscaling/concurrency_system.ts b/packages/basic-crawler/src/internals/autoscaling/concurrency-system.ts
similarity index 99%
rename from packages/basic-crawler/src/internals/autoscaling/concurrency_system.ts
rename to packages/basic-crawler/src/internals/autoscaling/concurrency-system.ts
index 225ca8a58..e2d557e57 100644
--- a/packages/basic-crawler/src/internals/autoscaling/concurrency_system.ts
+++ b/packages/basic-crawler/src/internals/autoscaling/concurrency-system.ts
@@ -6,10 +6,10 @@ import { z } from 'zod';
import type { BetterIntervalID } from '@apify/utilities';
import { betterClearInterval, betterSetInterval } from '@apify/utilities';
-import type { LoadSignal } from './load_signal.js';
+import type { LoadSignal } from './load-signal.js';
import { Snapshotter } from './snapshotter.js';
import type { LoadSignalsOptions } from './snapshotter.js';
-import { SystemStatus } from './system_status.js';
+import { SystemStatus } from './system-status.js';
const concurrencySchema = z.number().int().gte(1).optional();
diff --git a/packages/basic-crawler/src/internals/autoscaling/cpu_load_signal.ts b/packages/basic-crawler/src/internals/autoscaling/cpu-load-signal.ts
similarity index 97%
rename from packages/basic-crawler/src/internals/autoscaling/cpu_load_signal.ts
rename to packages/basic-crawler/src/internals/autoscaling/cpu-load-signal.ts
index ea9275f32..a6d6cc6ad 100644
--- a/packages/basic-crawler/src/internals/autoscaling/cpu_load_signal.ts
+++ b/packages/basic-crawler/src/internals/autoscaling/cpu-load-signal.ts
@@ -1,8 +1,8 @@
import type { EventManager, SystemInfo } from '@crawlee/core';
import { EventType, serviceLocator } from '@crawlee/core';
-import type { LoadSignal, LoadSignalStartContext, LoadSnapshot } from './load_signal.js';
-import { SnapshotStore } from './load_signal.js';
+import type { LoadSignal, LoadSignalStartContext, LoadSnapshot } from './load-signal.js';
+import { SnapshotStore } from './load-signal.js';
/**
* A snapshot produced by the built-in CPU signal.
diff --git a/packages/basic-crawler/src/internals/autoscaling/event_loop_load_signal.ts b/packages/basic-crawler/src/internals/autoscaling/event-loop-load-signal.ts
similarity index 97%
rename from packages/basic-crawler/src/internals/autoscaling/event_loop_load_signal.ts
rename to packages/basic-crawler/src/internals/autoscaling/event-loop-load-signal.ts
index ac90277d7..6b9650fa6 100644
--- a/packages/basic-crawler/src/internals/autoscaling/event_loop_load_signal.ts
+++ b/packages/basic-crawler/src/internals/autoscaling/event-loop-load-signal.ts
@@ -1,8 +1,8 @@
import type { BetterIntervalID } from '@apify/utilities';
import { betterClearInterval, betterSetInterval } from '@apify/utilities';
-import type { LoadSignal, LoadSignalStartContext, LoadSnapshot } from './load_signal.js';
-import { SnapshotStore } from './load_signal.js';
+import type { LoadSignal, LoadSignalStartContext, LoadSnapshot } from './load-signal.js';
+import { SnapshotStore } from './load-signal.js';
/**
* A snapshot produced by the built-in event loop signal.
diff --git a/packages/basic-crawler/src/internals/autoscaling/index.ts b/packages/basic-crawler/src/internals/autoscaling/index.ts
index e7d5ed1c5..5bc3c9aeb 100644
--- a/packages/basic-crawler/src/internals/autoscaling/index.ts
+++ b/packages/basic-crawler/src/internals/autoscaling/index.ts
@@ -1,9 +1,9 @@
-export * from './autoscaled_pool.js';
-export * from './concurrency_system.js';
-export * from './cpu_load_signal.js';
-export * from './event_loop_load_signal.js';
-export * from './load_signal.js';
-export * from './memory_load_signal.js';
+export * from './autoscaled-pool.js';
+export * from './concurrency-system.js';
+export * from './cpu-load-signal.js';
+export * from './event-loop-load-signal.js';
+export * from './load-signal.js';
+export * from './memory-load-signal.js';
export * from './snapshotter.js';
-export * from './storage_backend_load_signal.js';
-export * from './system_status.js';
+export * from './storage-backend-load-signal.js';
+export * from './system-status.js';
diff --git a/packages/basic-crawler/src/internals/autoscaling/load_signal.ts b/packages/basic-crawler/src/internals/autoscaling/load-signal.ts
similarity index 99%
rename from packages/basic-crawler/src/internals/autoscaling/load_signal.ts
rename to packages/basic-crawler/src/internals/autoscaling/load-signal.ts
index bab1b9bdc..f3bd6fcd0 100644
--- a/packages/basic-crawler/src/internals/autoscaling/load_signal.ts
+++ b/packages/basic-crawler/src/internals/autoscaling/load-signal.ts
@@ -1,6 +1,6 @@
import type { LoadSignalInfo } from '@crawlee/core';
-import { weightedAvg } from './weighted_avg.js';
+import { weightedAvg } from './weighted-avg.js';
/**
* A snapshot of a resource's overload state at a point in time.
diff --git a/packages/basic-crawler/src/internals/autoscaling/memory_load_signal.ts b/packages/basic-crawler/src/internals/autoscaling/memory-load-signal.ts
similarity index 98%
rename from packages/basic-crawler/src/internals/autoscaling/memory_load_signal.ts
rename to packages/basic-crawler/src/internals/autoscaling/memory-load-signal.ts
index 91417f3a3..4f21f9bc1 100644
--- a/packages/basic-crawler/src/internals/autoscaling/memory_load_signal.ts
+++ b/packages/basic-crawler/src/internals/autoscaling/memory-load-signal.ts
@@ -2,8 +2,8 @@ import type { Configuration, CrawleeLogger, EventManager, SystemInfo } from '@cr
import { EventType, serviceLocator } from '@crawlee/core';
import { getMemoryInfo, isContainerized } from '@crawlee/core/internal';
-import type { LoadSignal, LoadSignalStartContext, LoadSnapshot } from './load_signal.js';
-import { SnapshotStore } from './load_signal.js';
+import type { LoadSignal, LoadSignalStartContext, LoadSnapshot } from './load-signal.js';
+import { SnapshotStore } from './load-signal.js';
const RESERVE_MEMORY_RATIO = 0.5;
const CRITICAL_OVERLOAD_RATE_LIMIT_MILLIS = 10_000;
diff --git a/packages/basic-crawler/src/internals/autoscaling/snapshotter.ts b/packages/basic-crawler/src/internals/autoscaling/snapshotter.ts
index c286428ea..b210fdaf2 100644
--- a/packages/basic-crawler/src/internals/autoscaling/snapshotter.ts
+++ b/packages/basic-crawler/src/internals/autoscaling/snapshotter.ts
@@ -1,12 +1,12 @@
-import type { CpuLoadSignalOptions } from './cpu_load_signal.js';
-import { CpuLoadSignal } from './cpu_load_signal.js';
-import type { EventLoopLoadSignalOptions } from './event_loop_load_signal.js';
-import { EventLoopLoadSignal } from './event_loop_load_signal.js';
-import type { LoadSignal, LoadSignalStartContext } from './load_signal.js';
-import type { MemoryLoadSignalOptions } from './memory_load_signal.js';
-import { MemoryLoadSignal } from './memory_load_signal.js';
-import type { StorageBackendLoadSignalOptions } from './storage_backend_load_signal.js';
-import { StorageBackendLoadSignal } from './storage_backend_load_signal.js';
+import type { CpuLoadSignalOptions } from './cpu-load-signal.js';
+import { CpuLoadSignal } from './cpu-load-signal.js';
+import type { EventLoopLoadSignalOptions } from './event-loop-load-signal.js';
+import { EventLoopLoadSignal } from './event-loop-load-signal.js';
+import type { LoadSignal, LoadSignalStartContext } from './load-signal.js';
+import type { MemoryLoadSignalOptions } from './memory-load-signal.js';
+import { MemoryLoadSignal } from './memory-load-signal.js';
+import type { StorageBackendLoadSignalOptions } from './storage-backend-load-signal.js';
+import { StorageBackendLoadSignal } from './storage-backend-load-signal.js';
/**
* The load signals a {@apilink ConcurrencySystem} watches to decide whether the machine is overloaded.
diff --git a/packages/basic-crawler/src/internals/autoscaling/storage_backend_load_signal.ts b/packages/basic-crawler/src/internals/autoscaling/storage-backend-load-signal.ts
similarity index 98%
rename from packages/basic-crawler/src/internals/autoscaling/storage_backend_load_signal.ts
rename to packages/basic-crawler/src/internals/autoscaling/storage-backend-load-signal.ts
index 88af7e825..b6040bb35 100644
--- a/packages/basic-crawler/src/internals/autoscaling/storage_backend_load_signal.ts
+++ b/packages/basic-crawler/src/internals/autoscaling/storage-backend-load-signal.ts
@@ -4,8 +4,8 @@ import type { StorageBackend } from '@crawlee/types';
import type { BetterIntervalID } from '@apify/utilities';
import { betterClearInterval, betterSetInterval } from '@apify/utilities';
-import type { LoadSignal, LoadSignalStartContext, LoadSnapshot } from './load_signal.js';
-import { SnapshotStore } from './load_signal.js';
+import type { LoadSignal, LoadSignalStartContext, LoadSnapshot } from './load-signal.js';
+import { SnapshotStore } from './load-signal.js';
const RATE_LIMIT_ERROR_RETRY_COUNT = 2;
diff --git a/packages/basic-crawler/src/internals/autoscaling/system_status.ts b/packages/basic-crawler/src/internals/autoscaling/system-status.ts
similarity index 98%
rename from packages/basic-crawler/src/internals/autoscaling/system_status.ts
rename to packages/basic-crawler/src/internals/autoscaling/system-status.ts
index ed6655f24..b36732d7f 100644
--- a/packages/basic-crawler/src/internals/autoscaling/system_status.ts
+++ b/packages/basic-crawler/src/internals/autoscaling/system-status.ts
@@ -1,7 +1,7 @@
import type { LoadSignalInfo, SystemInfo } from '@crawlee/core';
-import type { LoadSignal } from './load_signal.js';
-import { evaluateLoadSignalSample } from './load_signal.js';
+import type { LoadSignal } from './load-signal.js';
+import { evaluateLoadSignalSample } from './load-signal.js';
import type { LoadSignalsOptions, Snapshotter } from './snapshotter.js';
/**
diff --git a/packages/basic-crawler/src/internals/autoscaling/weighted_avg.ts b/packages/basic-crawler/src/internals/autoscaling/weighted-avg.ts
similarity index 100%
rename from packages/basic-crawler/src/internals/autoscaling/weighted_avg.ts
rename to packages/basic-crawler/src/internals/autoscaling/weighted-avg.ts
diff --git a/packages/basic-crawler/src/internals/basic-crawler.ts b/packages/basic-crawler/src/internals/basic-crawler.ts
index 70532c505..afbc8e636 100644
--- a/packages/basic-crawler/src/internals/basic-crawler.ts
+++ b/packages/basic-crawler/src/internals/basic-crawler.ts
@@ -60,16 +60,16 @@ import { LruCache } from '@apify/datastructures';
import { addTimeoutToPromise, extendTimeout, storage as timeoutStorage, TimeoutError, tryCancel } from '@apify/timeout';
import { cryptoRandomObjectId } from '@apify/utilities';
-import type { AutoscaledPoolOptions, TaskLoopOptions } from './autoscaling/autoscaled_pool.js';
-import type { ConcurrencySystemOptions, IConcurrencySystem } from './autoscaling/concurrency_system.js';
-import { ConcurrencySystem } from './autoscaling/concurrency_system.js';
-import type { FinalStatistics } from './autoscaling/system_status.js';
-import { mergeCookies } from './cookie_utils.js';
-import type { CleanupRegistrar } from './crawlers/context_pipeline.js';
-import { ContextPipeline } from './crawlers/context_pipeline.js';
-import type { CrawlingContext, TypedRequestsLike } from './crawlers/crawler_commons.js';
-import type { CrawlingRequestData, SkippedRequestReason } from './crawling_request.js';
-import { CrawlingRequest, RequestState } from './crawling_request.js';
+import type { AutoscaledPoolOptions, TaskLoopOptions } from './autoscaling/autoscaled-pool.js';
+import type { ConcurrencySystemOptions, IConcurrencySystem } from './autoscaling/concurrency-system.js';
+import { ConcurrencySystem } from './autoscaling/concurrency-system.js';
+import type { FinalStatistics } from './autoscaling/system-status.js';
+import { mergeCookies } from './cookie-utils.js';
+import type { CleanupRegistrar } from './crawlers/context-pipeline.js';
+import { ContextPipeline } from './crawlers/context-pipeline.js';
+import type { CrawlingContext, TypedRequestsLike } from './crawlers/crawler-commons.js';
+import type { CrawlingRequestData, SkippedRequestReason } from './crawling-request.js';
+import { CrawlingRequest, RequestState } from './crawling-request.js';
import {
ContextPipelineCleanupError,
ContextPipelineInterruptedError,
@@ -83,7 +83,7 @@ import {
} from './errors.js';
import type { IStatistics, StatisticState } from './crawlers/statistics.js';
import { Statistics } from './crawlers/statistics.js';
-import type { EnqueueUrlsOptions, SkippedRequestCallback } from './enqueue_links/index.js';
+import type { EnqueueUrlsOptions, SkippedRequestCallback } from './enqueue-links/index.js';
import {
applyRequestTransform,
buildEnqueueStrategyPatterns,
@@ -91,7 +91,7 @@ import {
createRequestOptions,
createSkippedRequestArgs,
filterRequestOptionsByPatterns,
-} from './enqueue_links/index.js';
+} from './enqueue-links/index.js';
import { parseRetryAfterHeader } from './http.js';
import { CrawlerRun } from './crawler-run.js';
import {
@@ -105,10 +105,10 @@ import {
import { createSendRequest } from './send-request.js';
import type { GetUserDataFromRequest, RouterHandler, RouterRoutes } from './router.js';
import { Router, validateUserData } from './router.js';
-import { BLOCKED_STATUS_CODES } from './session_pool/consts.js';
-import { Session } from './session_pool/session.js';
-import { SessionPool } from './session_pool/session_pool.js';
-import { ThrottlingRequestManager } from './throttling_request_manager.js';
+import { BLOCKED_STATUS_CODES } from './session-pool/consts.js';
+import { Session } from './session-pool/session.js';
+import { SessionPool } from './session-pool/session-pool.js';
+import { ThrottlingRequestManager } from './throttling-request-manager.js';
class LazyDefaultHttpClient extends BaseHttpClient {
readonly #delegatePromise: Promise<BaseHttpClient>;
@@ -1325,7 +1325,7 @@ export class BasicCrawler<
return true;
}
- // `maybeFinish()` calls this only once nothing is in flight (`autoscaled_pool.ts`) - the point
+ // `maybeFinish()` calls this only once nothing is in flight (`autoscaled-pool.ts`) - the point
// where a crawl that cannot progress becomes distinguishable from one that is merely waiting,
// and the only place where throwing does not abandon requests mid-processing.
const state = await this.requestManager?.checkReadiness();
diff --git a/packages/basic-crawler/src/internals/cookie_utils.ts b/packages/basic-crawler/src/internals/cookie-utils.ts
similarity index 98%
rename from packages/basic-crawler/src/internals/cookie_utils.ts
rename to packages/basic-crawler/src/internals/cookie-utils.ts
index d4559f376..871caaa18 100644
--- a/packages/basic-crawler/src/internals/cookie_utils.ts
+++ b/packages/basic-crawler/src/internals/cookie-utils.ts
@@ -2,7 +2,7 @@ import { serviceLocator } from '@crawlee/core';
import type { Cookie as CookieObject } from '@crawlee/types';
import { Cookie, CookieJar } from 'tough-cookie';
-import { CookieParseError } from './session_pool/errors.js';
+import { CookieParseError } from './session-pool/errors.js';
/**
* @internal
diff --git a/packages/basic-crawler/src/internals/crawler-run.ts b/packages/basic-crawler/src/internals/crawler-run.ts
index 3945eeadd..1c5920133 100644
--- a/packages/basic-crawler/src/internals/crawler-run.ts
+++ b/packages/basic-crawler/src/internals/crawler-run.ts
@@ -1,8 +1,8 @@
import type { CrawleeLogger } from '@crawlee/core';
-import type { AutoscaledPoolOptions } from './autoscaling/autoscaled_pool.js';
-import { AutoscaledPool } from './autoscaling/autoscaled_pool.js';
-import type { IConcurrencySystem } from './autoscaling/concurrency_system.js';
+import type { AutoscaledPoolOptions } from './autoscaling/autoscaled-pool.js';
+import { AutoscaledPool } from './autoscaling/autoscaled-pool.js';
+import type { IConcurrencySystem } from './autoscaling/concurrency-system.js';
/** Everything a run needs to exist. Whatever a crawler resolves per run is resolved before the run is built. */
export interface CrawlerRunSetup {
diff --git a/packages/basic-crawler/src/internals/crawlers/context_pipeline.ts b/packages/basic-crawler/src/internals/crawlers/context-pipeline.ts
similarity index 100%
rename from packages/basic-crawler/src/internals/crawlers/context_pipeline.ts
rename to packages/basic-crawler/src/internals/crawlers/context-pipeline.ts
diff --git a/packages/basic-crawler/src/internals/crawlers/crawler_commons.ts b/packages/basic-crawler/src/internals/crawlers/crawler-commons.ts
similarity index 98%
rename from packages/basic-crawler/src/internals/crawlers/crawler_commons.ts
rename to packages/basic-crawler/src/internals/crawlers/crawler-commons.ts
index 6614b5458..3bd891393 100644
--- a/packages/basic-crawler/src/internals/crawlers/crawler_commons.ts
+++ b/packages/basic-crawler/src/internals/crawlers/crawler-commons.ts
@@ -19,8 +19,8 @@ import type {
StorageIdentifier,
} from '@crawlee/core';
-import type { EnqueueUrlsOptions } from '../enqueue_links/index.js';
-import type { CrawlingRequest } from '../crawling_request.js';
+import type { EnqueueUrlsOptions } from '../enqueue-links/index.js';
+import type { CrawlingRequest } from '../crawling-request.js';
/** @internal */
export type IsAny<T> = 0 extends 1 & T ? true : false;
diff --git a/packages/basic-crawler/src/internals/crawlers/error_snapshotter.ts b/packages/basic-crawler/src/internals/crawlers/error-snapshotter.ts
similarity index 97%
rename from packages/basic-crawler/src/internals/crawlers/error_snapshotter.ts
rename to packages/basic-crawler/src/internals/crawlers/error-snapshotter.ts
index 04ad63ce4..fd4076c95 100644
--- a/packages/basic-crawler/src/internals/crawlers/error_snapshotter.ts
+++ b/packages/basic-crawler/src/internals/crawlers/error-snapshotter.ts
@@ -2,8 +2,8 @@ import crypto from 'node:crypto';
import type { KeyValueStore } from '@crawlee/core';
-import type { CrawlingContext } from '../crawlers/crawler_commons.js';
-import type { ErrnoException } from './error_tracker.js';
+import type { CrawlingContext } from './crawler-commons.js';
+import type { ErrnoException } from './error-tracker.js';
import type { SnapshottableProperties } from './internals/types.js';
// Define the following types as we cannot import the complete types from the respective packages
diff --git a/packages/basic-crawler/src/internals/crawlers/error_tracker.ts b/packages/basic-crawler/src/internals/crawlers/error-tracker.ts
similarity index 98%
rename from packages/basic-crawler/src/internals/crawlers/error_tracker.ts
rename to packages/basic-crawler/src/internals/crawlers/error-tracker.ts
index 76281d37d..ca9502667 100644
--- a/packages/basic-crawler/src/internals/crawlers/error_tracker.ts
+++ b/packages/basic-crawler/src/internals/crawlers/error-tracker.ts
@@ -1,7 +1,7 @@
import { inspect } from 'node:util';
-import type { CrawlingContext } from '../crawlers/crawler_commons.js';
-import { ErrorSnapshotter } from './error_snapshotter.js';
+import type { CrawlingContext } from './crawler-commons.js';
+import { ErrorSnapshotter } from './error-snapshotter.js';
import type { SnapshottableProperties } from './internals/types.js';
/**
diff --git a/packages/basic-crawler/src/internals/crawlers/index.ts b/packages/basic-crawler/src/internals/crawlers/index.ts
index ad002da10..6105c7662 100644
--- a/packages/basic-crawler/src/internals/crawlers/index.ts
+++ b/packages/basic-crawler/src/internals/crawlers/index.ts
@@ -1,4 +1,4 @@
-export * from './context_pipeline.js';
-export type * from './crawler_commons.js';
+export * from './context-pipeline.js';
+export type * from './crawler-commons.js';
export * from './statistics.js';
-export * from './error_tracker.js';
+export * from './error-tracker.js';
diff --git a/packages/basic-crawler/src/internals/crawlers/statistics.ts b/packages/basic-crawler/src/internals/crawlers/statistics.ts
index 69131be86..09a322e04 100644
--- a/packages/basic-crawler/src/internals/crawlers/statistics.ts
+++ b/packages/basic-crawler/src/internals/crawlers/statistics.ts
@@ -3,7 +3,7 @@ import { convertStateSync, KeyValueStore, RecoverableState, serviceLocator, vali
import { parseArgument, schemas } from '@crawlee/utils/internal';
import { z } from 'zod';
-import { ErrorTracker } from './error_tracker.js';
+import { ErrorTracker } from './error-tracker.js';
/**
* @ignore
diff --git a/packages/basic-crawler/src/internals/crawling_request.ts b/packages/basic-crawler/src/internals/crawling-request.ts
similarity index 100%
rename from packages/basic-crawler/src/internals/crawling_request.ts
rename to packages/basic-crawler/src/internals/crawling-request.ts
diff --git a/packages/basic-crawler/src/internals/enqueue_links/enqueue_links.ts b/packages/basic-crawler/src/internals/enqueue-links/enqueue-links.ts
similarity index 100%
rename from packages/basic-crawler/src/internals/enqueue_links/enqueue_links.ts
rename to packages/basic-crawler/src/internals/enqueue-links/enqueue-links.ts
diff --git a/packages/basic-crawler/src/internals/enqueue_links/index.ts b/packages/basic-crawler/src/internals/enqueue-links/index.ts
similarity index 94%
rename from packages/basic-crawler/src/internals/enqueue_links/index.ts
rename to packages/basic-crawler/src/internals/enqueue-links/index.ts
index 14bd4ecf2..4c7cf29eb 100644
--- a/packages/basic-crawler/src/internals/enqueue_links/index.ts
+++ b/packages/basic-crawler/src/internals/enqueue-links/index.ts
@@ -1,4 +1,4 @@
-export * from './enqueue_links.js';
+export * from './enqueue-links.js';
// Not `export *`: keeps the internal `UrlPatternObject` off the public surface.
export {
applyRequestTransform,
diff --git a/packages/basic-crawler/src/internals/enqueue_links/shared.ts b/packages/basic-crawler/src/internals/enqueue-links/shared.ts
similarity index 99%
rename from packages/basic-crawler/src/internals/enqueue_links/shared.ts
rename to packages/basic-crawler/src/internals/enqueue-links/shared.ts
index 8f8c12dbd..e88fce0c7 100644
--- a/packages/basic-crawler/src/internals/enqueue_links/shared.ts
+++ b/packages/basic-crawler/src/internals/enqueue-links/shared.ts
@@ -8,7 +8,7 @@ import type { EnqueueStrategyOption, RequestOptions, Source } from '@crawlee/cor
import { Request } from '@crawlee/core';
import { schemas } from '@crawlee/utils/internal';
-import type { SkippedRequestReason } from '../crawling_request.js';
+import type { SkippedRequestReason } from '../crawling-request.js';
const MAX_ENQUEUE_LINKS_CACHE_SIZE = 1000;
diff --git a/packages/basic-crawler/src/internals/errors.ts b/packages/basic-crawler/src/internals/errors.ts
index 493d5793c..c0f92faf6 100644
--- a/packages/basic-crawler/src/internals/errors.ts
+++ b/packages/basic-crawler/src/internals/errors.ts
@@ -1,6 +1,6 @@
import { CriticalError, NonRetryableError } from '@crawlee/core';
-import type { SkippedRequestReason } from './crawling_request.js';
+import type { SkippedRequestReason } from './crawling-request.js';
/**
* @ignore
diff --git a/packages/basic-crawler/src/internals/router.ts b/packages/basic-crawler/src/internals/router.ts
index d413af6e6..4099e7bd4 100644
--- a/packages/basic-crawler/src/internals/router.ts
+++ b/packages/basic-crawler/src/internals/router.ts
@@ -1,4 +1,4 @@
-import type { CrawlingRequest } from './crawling_request.js';
+import type { CrawlingRequest } from './crawling-request.js';
import { RequestValidationError } from '@crawlee/core';
import type { Awaitable, Dictionary } from '@crawlee/types';
import type { StandardSchemaV1 } from '@standard-schema/spec';
@@ -10,7 +10,7 @@ import type {
RestrictedCrawlingContext,
TypedContextAddRequests,
TypedContextEnqueueLinks,
-} from './crawlers/crawler_commons.js';
+} from './crawlers/crawler-commons.js';
/**
* The key of the default route — the fallback handler registered via {@apilink Router.addDefaultHandler}.
diff --git a/packages/basic-crawler/src/internals/session_pool/consts.ts b/packages/basic-crawler/src/internals/session-pool/consts.ts
similarity index 100%
rename from packages/basic-crawler/src/internals/session_pool/consts.ts
rename to packages/basic-crawler/src/internals/session-pool/consts.ts
diff --git a/packages/basic-crawler/src/internals/session_pool/errors.ts b/packages/basic-crawler/src/internals/session-pool/errors.ts
similarity index 100%
rename from packages/basic-crawler/src/internals/session_pool/errors.ts
rename to packages/basic-crawler/src/internals/session-pool/errors.ts
diff --git a/packages/basic-crawler/src/internals/session_pool/fingerprint.ts b/packages/basic-crawler/src/internals/session-pool/fingerprint.ts
similarity index 100%
rename from packages/basic-crawler/src/internals/session_pool/fingerprint.ts
rename to packages/basic-crawler/src/internals/session-pool/fingerprint.ts
diff --git a/packages/basic-crawler/src/internals/session_pool/index.ts b/packages/basic-crawler/src/internals/session-pool/index.ts
similarity index 71%
rename from packages/basic-crawler/src/internals/session_pool/index.ts
rename to packages/basic-crawler/src/internals/session-pool/index.ts
index e158567a4..e61ec5831 100644
--- a/packages/basic-crawler/src/internals/session_pool/index.ts
+++ b/packages/basic-crawler/src/internals/session-pool/index.ts
@@ -1,4 +1,4 @@
export * from './errors.js';
export * from './session.js';
-export * from './session_pool.js';
+export * from './session-pool.js';
export * from './consts.js';
diff --git a/packages/basic-crawler/src/internals/session_pool/session_pool.ts b/packages/basic-crawler/src/internals/session-pool/session-pool.ts
similarity index 100%
rename from packages/basic-crawler/src/internals/session_pool/session_pool.ts
rename to packages/basic-crawler/src/internals/session-pool/session-pool.ts
diff --git a/packages/basic-crawler/src/internals/session_pool/session.ts b/packages/basic-crawler/src/internals/session-pool/session.ts
similarity index 100%
rename from packages/basic-crawler/src/internals/session_pool/session.ts
rename to packages/basic-crawler/src/internals/session-pool/session.ts
diff --git a/packages/basic-crawler/src/internals/sitemap_request_loader.ts b/packages/basic-crawler/src/internals/sitemap-request-loader.ts
similarity index 99%
rename from packages/basic-crawler/src/internals/sitemap_request_loader.ts
rename to packages/basic-crawler/src/internals/sitemap-request-loader.ts
index 08b3e9e86..ad530e6b7 100644
--- a/packages/basic-crawler/src/internals/sitemap_request_loader.ts
+++ b/packages/basic-crawler/src/internals/sitemap-request-loader.ts
@@ -19,9 +19,9 @@ import {
serviceLocator,
} from '@crawlee/core';
-import type { UrlPatternInput } from './enqueue_links/index.js';
-import type { UrlPatternObject } from './enqueue_links/shared.js';
-import { constructUrlPatternObjects, urlPatternSchema } from './enqueue_links/index.js';
+import type { UrlPatternInput } from './enqueue-links/index.js';
+import type { UrlPatternObject } from './enqueue-links/shared.js';
+import { constructUrlPatternObjects, urlPatternSchema } from './enqueue-links/index.js';
const sitemapRequestLoaderOptionsSchema = z.strictObject({
sitemapUrls: schemas.arrayOf(z.string(), 'strings'),
diff --git a/packages/basic-crawler/src/internals/throttling_request_manager.ts b/packages/basic-crawler/src/internals/throttling-request-manager.ts
similarity index 100%
rename from packages/basic-crawler/src/internals/throttling_request_manager.ts
rename to packages/basic-crawler/src/internals/throttling-request-manager.ts
diff --git a/packages/basic-crawler/test/enqueue_links/add-enqueue-strategy-to-requests.test.ts b/packages/basic-crawler/test/enqueue-links/add-enqueue-strategy-to-requests.test.ts
similarity index 100%
rename from packages/basic-crawler/test/enqueue_links/add-enqueue-strategy-to-requests.test.ts
rename to packages/basic-crawler/test/enqueue-links/add-enqueue-strategy-to-requests.test.ts
diff --git a/packages/basic-crawler/test/enqueue_links/protocol-matching-based-on-strategy.test.ts b/packages/basic-crawler/test/enqueue-links/protocol-matching-based-on-strategy.test.ts
similarity index 100%
rename from packages/basic-crawler/test/enqueue_links/protocol-matching-based-on-strategy.test.ts
rename to packages/basic-crawler/test/enqueue-links/protocol-matching-based-on-strategy.test.ts
diff --git a/packages/basic-crawler/test/enqueue_links/userData.test.ts b/packages/basic-crawler/test/enqueue-links/user-data.test.ts
similarity index 100%
rename from packages/basic-crawler/test/enqueue_links/userData.test.ts
rename to packages/basic-crawler/test/enqueue-links/user-data.test.ts
diff --git a/packages/basic-crawler/test/enqueue_links/user-provided-patterns-with-enqueue-strategy.test.ts b/packages/basic-crawler/test/enqueue-links/user-provided-patterns-with-enqueue-strategy.test.ts
similarity index 100%
rename from packages/basic-crawler/test/enqueue_links/user-provided-patterns-with-enqueue-strategy.test.ts
rename to packages/basic-crawler/test/enqueue-links/user-provided-patterns-with-enqueue-strategy.test.ts
diff --git a/packages/basic-crawler/test/sitemap_request_loader.test.ts b/packages/basic-crawler/test/sitemap-request-loader.test.ts
similarity index 100%
rename from packages/basic-crawler/test/sitemap_request_loader.test.ts
rename to packages/basic-crawler/test/sitemap-request-loader.test.ts
diff --git a/packages/basic-crawler/test/throttling_request_manager.test.ts b/packages/basic-crawler/test/throttling-request-manager.test.ts
similarity index 100%
rename from packages/basic-crawler/test/throttling_request_manager.test.ts
rename to packages/basic-crawler/test/throttling-request-manager.test.ts
diff --git a/packages/cli/src/commands/CreateProjectCommand.ts b/packages/cli/src/commands/create-project-command.ts
similarity index 100%
rename from packages/cli/src/commands/CreateProjectCommand.ts
rename to packages/cli/src/commands/create-project-command.ts
diff --git a/packages/cli/src/commands/InstallPlaywrightBrowsersCommand.ts b/packages/cli/src/commands/install-playwright-browsers-command.ts
similarity index 100%
rename from packages/cli/src/commands/InstallPlaywrightBrowsersCommand.ts
rename to packages/cli/src/commands/install-playwright-browsers-command.ts
diff --git a/packages/cli/src/commands/RunProjectCommand.ts b/packages/cli/src/commands/run-project-command.ts
similarity index 100%
rename from packages/cli/src/commands/RunProjectCommand.ts
rename to packages/cli/src/commands/run-project-command.ts
diff --git a/packages/cli/src/index.ts b/packages/cli/src/index.ts
index 168b6f786..2d555d3f4 100755
--- a/packages/cli/src/index.ts
+++ b/packages/cli/src/index.ts
@@ -1,11 +1,11 @@
#!/usr/bin/env node
// eslint-disable-next-line
-import { CreateProjectCommand } from './commands/CreateProjectCommand.js';
+import { CreateProjectCommand } from './commands/create-project-command.js';
-import { InstallPlaywrightBrowsersCommand } from './commands/InstallPlaywrightBrowsersCommand.js';
+import { InstallPlaywrightBrowsersCommand } from './commands/install-playwright-browsers-command.js';
-import { RunProjectCommand } from './commands/RunProjectCommand.js';
+import { RunProjectCommand } from './commands/run-project-command.js';
import { createRequire } from 'node:module';
import yargs from 'yargs';
diff --git a/packages/core/src/byte_utils.ts b/packages/core/src/byte-utils.ts
similarity index 100%
rename from packages/core/src/byte_utils.ts
rename to packages/core/src/byte-utils.ts
diff --git a/packages/core/src/configuration.ts b/packages/core/src/configuration.ts
index 613caabe0..b118069d8 100644
--- a/packages/core/src/configuration.ts
+++ b/packages/core/src/configuration.ts
@@ -5,7 +5,7 @@ import { join } from 'node:path';
import { z } from 'zod';
import { log, LogLevel } from './log.js';
-import { serviceLocator } from './service_locator.js';
+import { serviceLocator } from './service-locator.js';
// Crawlee attaches many listeners to shared EventEmitters (one per crawler/session/autoscaled pool),
// which can exceed Node's default limit of 10 and trigger spurious MaxListenersExceededWarning logs.
diff --git a/packages/core/src/events/event_manager.ts b/packages/core/src/events/event-manager.ts
similarity index 98%
rename from packages/core/src/events/event_manager.ts
rename to packages/core/src/events/event-manager.ts
index dfcf45138..7c7ad3562 100644
--- a/packages/core/src/events/event_manager.ts
+++ b/packages/core/src/events/event-manager.ts
@@ -3,7 +3,7 @@ import { AsyncEventEmitter } from '@vladfrangu/async_event_emitter';
import type { BetterIntervalID } from '@apify/utilities';
import { betterClearInterval, betterSetInterval } from '@apify/utilities';
-import { serviceLocator } from '../service_locator.js';
+import { serviceLocator } from '../service-locator.js';
export interface EventManagerOptions {
/** Interval between emitted `persistState` events in milliseconds. */
diff --git a/packages/core/src/events/index.ts b/packages/core/src/events/index.ts
index d2fc8c735..a1b5e179e 100644
--- a/packages/core/src/events/index.ts
+++ b/packages/core/src/events/index.ts
@@ -1,3 +1,3 @@
-export * from './event_manager.js';
-export * from './local_event_manager.js';
-export type * from './system_info.js';
+export * from './event-manager.js';
+export * from './local-event-manager.js';
+export type * from './system-info.js';
diff --git a/packages/core/src/events/local_event_manager.ts b/packages/core/src/events/local-event-manager.ts
similarity index 96%
rename from packages/core/src/events/local_event_manager.ts
rename to packages/core/src/events/local-event-manager.ts
index 73cf30c97..04f579485 100644
--- a/packages/core/src/events/local_event_manager.ts
+++ b/packages/core/src/events/local-event-manager.ts
@@ -1,9 +1,9 @@
import { betterClearInterval, betterSetInterval } from '@apify/utilities';
import type { Configuration } from '../configuration.js';
-import { serviceLocator } from '../service_locator.js';
-import { EventManager, type EventManagerOptions, EventType } from './event_manager.js';
-import type { SystemInfo } from './system_info.js';
+import { serviceLocator } from '../service-locator.js';
+import { EventManager, type EventManagerOptions, EventType } from './event-manager.js';
+import type { SystemInfo } from './system-info.js';
export interface LocalEventManagerOptions extends EventManagerOptions {
/** Interval between emitted `systemInfo` events in milliseconds. */
diff --git a/packages/core/src/events/system_info.ts b/packages/core/src/events/system-info.ts
similarity index 100%
rename from packages/core/src/events/system_info.ts
rename to packages/core/src/events/system-info.ts
diff --git a/packages/core/src/index.ts b/packages/core/src/index.ts
index e81b26a05..7abbd73ea 100644
--- a/packages/core/src/index.ts
+++ b/packages/core/src/index.ts
@@ -1,11 +1,11 @@
export * from './debug.js';
export * from './errors.js';
export * from './configuration.js';
-export * from './service_locator.js';
+export * from './service-locator.js';
export * from './events/index.js';
export * from './log.js';
-export * from './owned_or_injected.js';
-export * from './proxy_configuration.js';
+export * from './owned-or-injected.js';
+export * from './proxy-configuration.js';
export * from './request.js';
export * from './serialization.js';
export * from './storages/index.js';
@@ -13,6 +13,6 @@ export * from './memory-storage/index.js';
// Not `export *`: the rest of the module re-exports `@crawlee/utils/internal` symbols, which carry no
// semver guarantees and must not reach the public surface. Internal consumers import them directly.
export { ArgumentValidationError, validators } from './validators.js';
-export * from './recoverable_state.js';
+export * from './recoverable-state.js';
export type { StorageBackend } from '@crawlee/types';
export { EnqueueStrategy } from '@crawlee/utils';
diff --git a/packages/core/src/internal.ts b/packages/core/src/internal.ts
index fdd94a88b..fe16e1b8c 100644
--- a/packages/core/src/internal.ts
+++ b/packages/core/src/internal.ts
@@ -1,7 +1,7 @@
// Not part of the public API: internals that other Crawlee packages need but that carry no semver guarantees.
export * from './iterables.js';
-export * from './storages/batched_adds.js';
-export { joinRequestSourceStatuses } from './storages/request_loader.js';
+export * from './storages/batched-adds.js';
+export { joinRequestSourceStatuses } from './storages/request-loader.js';
export * from './system-info/cpu-info.js';
export * from './system-info/memory-info.js';
export * from './system-info/ps-tree.js';
diff --git a/packages/core/src/memory-storage/utils.ts b/packages/core/src/memory-storage/utils.ts
index a87dddd6c..a8194b4db 100644
--- a/packages/core/src/memory-storage/utils.ts
+++ b/packages/core/src/memory-storage/utils.ts
@@ -48,4 +48,4 @@ export function uniqueKeyToRequestId(uniqueKey: string): string {
return str.length > REQUEST_ID_LENGTH ? str.slice(0, REQUEST_ID_LENGTH) : str;
}
-export { isBuffer, isStream, toBuffer } from '../byte_utils.js';
+export { isBuffer, isStream, toBuffer } from '../byte-utils.js';
diff --git a/packages/core/src/owned_or_injected.ts b/packages/core/src/owned-or-injected.ts
similarity index 100%
rename from packages/core/src/owned_or_injected.ts
rename to packages/core/src/owned-or-injected.ts
diff --git a/packages/core/src/proxy_configuration.ts b/packages/core/src/proxy-configuration.ts
similarity index 100%
rename from packages/core/src/proxy_configuration.ts
rename to packages/core/src/proxy-configuration.ts
diff --git a/packages/core/src/recoverable_state.ts b/packages/core/src/recoverable-state.ts
similarity index 99%
rename from packages/core/src/recoverable_state.ts
rename to packages/core/src/recoverable-state.ts
index f177f30fa..cd1254c8c 100644
--- a/packages/core/src/recoverable_state.ts
+++ b/packages/core/src/recoverable-state.ts
@@ -3,10 +3,10 @@ import { Readable } from 'node:stream';
import { addTimeoutToPromise, storage as timeoutStorage } from '@apify/timeout';
import type { Configuration } from './configuration.js';
import { StateValidationError } from './errors.js';
-import { EventType } from './events/event_manager.js';
+import { EventType } from './events/event-manager.js';
import type { CrawleeLogger } from './log.js';
-import { serviceLocator } from './service_locator.js';
-import { KeyValueStore } from './storages/key_value_store.js';
+import { serviceLocator } from './service-locator.js';
+import { KeyValueStore } from './storages/key-value-store.js';
import type { Awaitable } from '@crawlee/types';
import type { StandardSchemaV1 } from '@standard-schema/spec';
diff --git a/packages/core/src/request.ts b/packages/core/src/request.ts
index da68e1383..c9eaea5bb 100644
--- a/packages/core/src/request.ts
+++ b/packages/core/src/request.ts
@@ -7,7 +7,7 @@ import { z } from 'zod';
import { cryptoRandomObjectId, normalizeUrl } from '@apify/utilities';
-import { serviceLocator } from './service_locator.js';
+import { serviceLocator } from './service-locator.js';
import { parseArgument, schemas } from './validators.js';
/** The `strategy` option accepted by {@apilink ExtractLinksOptions} and {@apilink EnqueueUrlsOptions}. */
diff --git a/packages/core/src/service_locator.ts b/packages/core/src/service-locator.ts
similarity index 98%
rename from packages/core/src/service_locator.ts
rename to packages/core/src/service-locator.ts
index 89875b1c3..e6514d8fe 100644
--- a/packages/core/src/service_locator.ts
+++ b/packages/core/src/service-locator.ts
@@ -7,12 +7,12 @@ import log from '@apify/log';
import { Configuration } from './configuration.js';
import { ServiceConflictError } from './errors.js';
-import type { EventManager } from './events/event_manager.js';
-import { LocalEventManager } from './events/local_event_manager.js';
+import type { EventManager } from './events/event-manager.js';
+import { LocalEventManager } from './events/local-event-manager.js';
import type { CrawleeLogger } from './log.js';
import { ApifyLogAdapter } from './log.js';
import { MemoryStorageBackend } from './memory-storage/index.js';
-import { StorageInstanceManager } from './storages/storage_instance_manager.js';
+import { StorageInstanceManager } from './storages/storage-instance-manager.js';
interface ServiceLocatorInterface {
/**
diff --git a/packages/core/src/storages/batched_adds.ts b/packages/core/src/storages/batched-adds.ts
similarity index 98%
rename from packages/core/src/storages/batched_adds.ts
rename to packages/core/src/storages/batched-adds.ts
index ecc51ffb8..8719c41dd 100644
--- a/packages/core/src/storages/batched_adds.ts
+++ b/packages/core/src/storages/batched-adds.ts
@@ -3,7 +3,7 @@ import type { ProcessedRequest } from '@crawlee/types';
import { chunkedAsyncIterable, peekableAsyncIterable } from '../iterables.js';
import type { Source } from '../request.js';
-import type { AddRequestsBatchedResult } from './request_queue.js';
+import type { AddRequestsBatchedResult } from './request-queue.js';
import { activeStorageTransaction, withDirectStorageAccess } from './transaction.js';
export interface DrainRequestBatchesOptions<TItem extends Source> {
diff --git a/packages/core/src/storages/dataset.ts b/packages/core/src/storages/dataset.ts
index 89e3adce1..4a7084279 100644
--- a/packages/core/src/storages/dataset.ts
+++ b/packages/core/src/storages/dataset.ts
@@ -4,16 +4,16 @@ import { z } from 'zod';
import { tryCancel } from '@apify/timeout';
import { Configuration } from '../configuration.js';
-import { serviceLocator } from '../service_locator.js';
+import { serviceLocator } from '../service-locator.js';
import { parseArgument, schemas, validators } from '../validators.js';
import type { DatasetJournalEntry, JournalEntry } from './transaction.js';
import { activeStorageTransaction, rejectOperationInTransaction, snapshotValue } from './transaction.js';
-import { KeyValueStore } from './key_value_store.js';
-import type { DatasetStats } from './storage_stats.js';
-import { StorageStatsTracker } from './storage_stats.js';
+import { KeyValueStore } from './key-value-store.js';
+import type { DatasetStats } from './storage-stats.js';
+import { StorageStatsTracker } from './storage-stats.js';
import type { StorageOpenOptions } from './utils.js';
-import type { StorageIdentifier } from './storage_instance_manager.js';
-import { resolveStorageIdentifier } from './storage_instance_manager.js';
+import type { StorageIdentifier } from './storage-instance-manager.js';
+import { resolveStorageIdentifier } from './storage-instance-manager.js';
import { createDualIterable, purgeDefaultStorages } from './utils.js';
const openOptionsSchema = z.strictObject({
diff --git a/packages/core/src/storages/index.ts b/packages/core/src/storages/index.ts
index 05dcca6e2..4c4760804 100644
--- a/packages/core/src/storages/index.ts
+++ b/packages/core/src/storages/index.ts
@@ -1,20 +1,20 @@
export * from './dataset.js';
-export * from './key_value_store.js';
-export * from './key_value_store_codec.js';
-export * from './request_list.js';
-export type * from './request_loader.js';
-export type * from './request_manager.js';
-export * from './request_queue.js';
+export * from './key-value-store.js';
+export * from './key-value-store-codec.js';
+export * from './request-list.js';
+export type * from './request-loader.js';
+export type * from './request-manager.js';
+export * from './request-queue.js';
// `resolveStorageIdentifier` is deliberately absent: it is an internal helper of the storage frontends.
export type {
DefaultStorageIdentifier,
ExplicitStorageIdentifier,
IStorage,
StorageIdentifier,
-} from './storage_instance_manager.js';
-export { StorageInstanceManager } from './storage_instance_manager.js';
+} from './storage-instance-manager.js';
+export { StorageInstanceManager } from './storage-instance-manager.js';
// `StorageStatsTracker` is deliberately absent: it is the mutable counter backing the `stats` getters.
-export type { DatasetStats, KeyValueStoreStats, RequestQueueStats } from './storage_stats.js';
+export type { DatasetStats, KeyValueStoreStats, RequestQueueStats } from './storage-stats.js';
export * from './utils.js';
export * from './transaction.js';
-export * from './request_manager_tandem.js';
+export * from './request-manager-tandem.js';
diff --git a/packages/core/src/storages/key_value_store_codec.ts b/packages/core/src/storages/key-value-store-codec.ts
similarity index 98%
rename from packages/core/src/storages/key_value_store_codec.ts
rename to packages/core/src/storages/key-value-store-codec.ts
index efc1c91ad..2c3465314 100644
--- a/packages/core/src/storages/key_value_store_codec.ts
+++ b/packages/core/src/storages/key-value-store-codec.ts
@@ -4,7 +4,7 @@ import JSON5 from 'json5';
import { jsonStringifyExtended } from '@apify/utilities';
-import { isBuffer, isStream } from '../byte_utils.js';
+import { isBuffer, isStream } from '../byte-utils.js';
const CONTENT_TYPE_JSON = 'application/json';
const STRINGIFIABLE_CONTENT_TYPE_RXS = [new RegExp(`^${CONTENT_TYPE_JSON}$`, 'i'), /^application\/.*xml$/i, /^text\//i];
diff --git a/packages/core/src/storages/key_value_store.ts b/packages/core/src/storages/key-value-store.ts
similarity index 99%
rename from packages/core/src/storages/key_value_store.ts
rename to packages/core/src/storages/key-value-store.ts
index 5c5aaba68..f89863644 100644
--- a/packages/core/src/storages/key_value_store.ts
+++ b/packages/core/src/storages/key-value-store.ts
@@ -11,7 +11,7 @@ import { KEY_VALUE_STORE_KEY_REGEX } from '@apify/consts';
import { tryCancel } from '@apify/timeout';
import { Configuration } from '../configuration.js';
-import { serviceLocator } from '../service_locator.js';
+import { serviceLocator } from '../service-locator.js';
import { parseArgument, schemas, validators } from '../validators.js';
import type { JournalEntry, KeyValueStoreJournalEntry } from './transaction.js';
import {
@@ -21,14 +21,14 @@ import {
snapshotValue,
withDirectStorageAccess,
} from './transaction.js';
-import { parseValue, serializeValue } from './key_value_store_codec.js';
-import type { KeyValueStoreStats } from './storage_stats.js';
-import { StorageStatsTracker } from './storage_stats.js';
+import { parseValue, serializeValue } from './key-value-store-codec.js';
+import type { KeyValueStoreStats } from './storage-stats.js';
+import { StorageStatsTracker } from './storage-stats.js';
import type { StorageOpenOptions } from './utils.js';
-import type { StorageIdentifier } from './storage_instance_manager.js';
-import { resolveStorageIdentifier } from './storage_instance_manager.js';
+import type { StorageIdentifier } from './storage-instance-manager.js';
+import { resolveStorageIdentifier } from './storage-instance-manager.js';
import { createDualIterable, purgeDefaultStorages } from './utils.js';
-import { isBuffer, isStream } from '../byte_utils.js';
+import { isBuffer, isStream } from '../byte-utils.js';
/** @internal */
const KVS_KEYS_DEFAULT_LIMIT = 1000;
diff --git a/packages/core/src/storages/request_dedup_cache.ts b/packages/core/src/storages/request-dedup-cache.ts
similarity index 100%
rename from packages/core/src/storages/request_dedup_cache.ts
rename to packages/core/src/storages/request-dedup-cache.ts
diff --git a/packages/core/src/storages/request_list.ts b/packages/core/src/storages/request-list.ts
similarity index 99%
rename from packages/core/src/storages/request_list.ts
rename to packages/core/src/storages/request-list.ts
index 7d194fc1b..9ced26e30 100644
--- a/packages/core/src/storages/request_list.ts
+++ b/packages/core/src/storages/request-list.ts
@@ -5,15 +5,15 @@ import { z } from 'zod';
import type { Configuration } from '../configuration.js';
import type { CrawleeLogger } from '../log.js';
-import type { IProxyConfiguration } from '../proxy_configuration.js';
-import { convertStateSync, RecoverableState } from '../recoverable_state.js';
+import type { IProxyConfiguration } from '../proxy-configuration.js';
+import { convertStateSync, RecoverableState } from '../recoverable-state.js';
import { type InternalSource, Request, type RequestOptions, type Source } from '../request.js';
import { createDeserialize, serializeArray } from '../serialization.js';
-import { serviceLocator } from '../service_locator.js';
+import { serviceLocator } from '../service-locator.js';
import { parseArgument, schemas, validators } from '../validators.js';
-import { KeyValueStore } from './key_value_store.js';
-import type { IRequestLoader, RequestLoaderStatus } from './request_loader.js';
-import type { IRequestManager } from './request_manager.js';
+import { KeyValueStore } from './key-value-store.js';
+import type { IRequestLoader, RequestLoaderStatus } from './request-loader.js';
+import type { IRequestManager } from './request-manager.js';
import { purgeDefaultStorages } from './utils.js';
/** @internal */
@@ -833,8 +833,8 @@ export class RequestList implements IRequestLoader {
*/
async toTandem(requestManager?: IRequestManager): Promise<IRequestManager> {
// Import here to avoid circular imports.
- const { RequestManagerTandem } = await import('./request_manager_tandem.js');
- const { RequestQueue } = await import('./request_queue.js');
+ const { RequestManagerTandem } = await import('./request-manager-tandem.js');
+ const { RequestQueue } = await import('./request-queue.js');
return new RequestManagerTandem(this, requestManager ?? (await RequestQueue.open()));
}
diff --git a/packages/core/src/storages/request_loader.ts b/packages/core/src/storages/request-loader.ts
similarity index 98%
rename from packages/core/src/storages/request_loader.ts
rename to packages/core/src/storages/request-loader.ts
index 5f2ecfba8..107e61b40 100644
--- a/packages/core/src/storages/request_loader.ts
+++ b/packages/core/src/storages/request-loader.ts
@@ -1,8 +1,8 @@
import type { Dictionary } from '@crawlee/types';
import type { Request } from '../request.js';
-import type { IRequestManager } from './request_manager.js';
-import type { RequestQueueOperationInfo } from './request_queue.js';
+import type { IRequestManager } from './request-manager.js';
+import type { RequestQueueOperationInfo } from './request-queue.js';
/**
* A request source's own availability, in a single answer.
diff --git a/packages/core/src/storages/request_manager_tandem.ts b/packages/core/src/storages/request-manager-tandem.ts
similarity index 98%
rename from packages/core/src/storages/request_manager_tandem.ts
rename to packages/core/src/storages/request-manager-tandem.ts
index d707a0ff5..b514037cd 100644
--- a/packages/core/src/storages/request_manager_tandem.ts
+++ b/packages/core/src/storages/request-manager-tandem.ts
@@ -2,16 +2,16 @@ import type { Dictionary } from '@crawlee/types';
import type { CrawleeLogger } from '../log.js';
import type { Request, Source } from '../request.js';
-import { serviceLocator } from '../service_locator.js';
-import type { IRequestLoader, RequestSourceStatus } from './request_loader.js';
-import { joinRequestSourceStatuses } from './request_loader.js';
-import type { IRequestManager, PacingSignal, RequestsLike } from './request_manager.js';
+import { serviceLocator } from '../service-locator.js';
+import type { IRequestLoader, RequestSourceStatus } from './request-loader.js';
+import { joinRequestSourceStatuses } from './request-loader.js';
+import type { IRequestManager, PacingSignal, RequestsLike } from './request-manager.js';
import type {
AddRequestsBatchedOptions,
AddRequestsBatchedResult,
RequestQueueOperationInfo,
RequestQueueOperationOptions,
-} from './request_queue.js';
+} from './request-queue.js';
/**
* A request manager that combines a {@apilink IRequestLoader} (such as a `RequestList`) with a writable
diff --git a/packages/core/src/storages/request_manager.ts b/packages/core/src/storages/request-manager.ts
similarity index 98%
rename from packages/core/src/storages/request_manager.ts
rename to packages/core/src/storages/request-manager.ts
index 6c3c80f72..abb524f26 100644
--- a/packages/core/src/storages/request_manager.ts
+++ b/packages/core/src/storages/request-manager.ts
@@ -1,13 +1,13 @@
import type { LiteralUnion } from 'type-fest';
import type { Request, Source } from '../request.js';
-import type { IRequestLoader } from './request_loader.js';
+import type { IRequestLoader } from './request-loader.js';
import type {
AddRequestsBatchedOptions,
AddRequestsBatchedResult,
RequestQueueOperationInfo,
RequestQueueOperationOptions,
-} from './request_queue.js';
+} from './request-queue.js';
export type RequestsLike = AsyncIterable<Source | string> | Iterable<Source | string> | (Source | string)[];
diff --git a/packages/core/src/storages/request_queue.ts b/packages/core/src/storages/request-queue.ts
similarity index 98%
rename from packages/core/src/storages/request_queue.ts
rename to packages/core/src/storages/request-queue.ts
index 14e67cba3..a4a9370fe 100644
--- a/packages/core/src/storages/request_queue.ts
+++ b/packages/core/src/storages/request-queue.ts
@@ -21,26 +21,26 @@ import { tryCancel } from '@apify/timeout';
import { Configuration } from '../configuration.js';
import { getObjectType } from '../debug.js';
-import type { EventManager } from '../events/event_manager.js';
-import { EventType } from '../events/event_manager.js';
+import type { EventManager } from '../events/event-manager.js';
+import { EventType } from '../events/event-manager.js';
import type { CrawleeLogger } from '../log.js';
-import type { IProxyConfiguration } from '../proxy_configuration.js';
+import type { IProxyConfiguration } from '../proxy-configuration.js';
import type { InternalSource, RequestOptions, Source } from '../request.js';
import { Request } from '../request.js';
-import { serviceLocator } from '../service_locator.js';
+import { serviceLocator } from '../service-locator.js';
import { parseArgument, schemas, validators } from '../validators.js';
import type { JournalEntry, StorageTransaction } from './transaction.js';
import { activeStorageTransaction, rejectOperationInTransaction } from './transaction.js';
-import { drainRequestBatches } from './batched_adds.js';
-import type { RequestLoaderStatus } from './request_loader.js';
-import type { IRequestManager, PacingSignal, RequestsLike } from './request_manager.js';
-import type { RequestQueueStats } from './storage_stats.js';
-import { StorageStatsTracker } from './storage_stats.js';
-import type { IStorage, StorageIdentifier } from './storage_instance_manager.js';
+import { drainRequestBatches } from './batched-adds.js';
+import type { RequestLoaderStatus } from './request-loader.js';
+import type { IRequestManager, PacingSignal, RequestsLike } from './request-manager.js';
+import type { RequestQueueStats } from './storage-stats.js';
+import { StorageStatsTracker } from './storage-stats.js';
+import type { IStorage, StorageIdentifier } from './storage-instance-manager.js';
import type { StorageOpenOptions } from './utils.js';
-import { resolveStorageIdentifier } from './storage_instance_manager.js';
+import { resolveStorageIdentifier } from './storage-instance-manager.js';
import { getRequestId, purgeDefaultStorages } from './utils.js';
-import { RequestDeduplicationCache } from './request_dedup_cache.js';
+import { RequestDeduplicationCache } from './request-dedup-cache.js';
/**
* The maximum number of requests cached locally to avoid redundant calls to the storage backend.
diff --git a/packages/core/src/storages/storage_instance_manager.ts b/packages/core/src/storages/storage-instance-manager.ts
similarity index 100%
rename from packages/core/src/storages/storage_instance_manager.ts
rename to packages/core/src/storages/storage-instance-manager.ts
diff --git a/packages/core/src/storages/storage_stats.ts b/packages/core/src/storages/storage-stats.ts
similarity index 100%
rename from packages/core/src/storages/storage_stats.ts
rename to packages/core/src/storages/storage-stats.ts
diff --git a/packages/core/src/storages/transaction.ts b/packages/core/src/storages/transaction.ts
index 8eb5965d6..c77c3de30 100644
--- a/packages/core/src/storages/transaction.ts
+++ b/packages/core/src/storages/transaction.ts
@@ -4,9 +4,9 @@ import type { Awaitable, Dictionary, RequestSchema } from '@crawlee/types';
import { addTimeoutToPromise, storage as timeoutStorage, tryCancel } from '@apify/timeout';
-import { serviceLocator } from '../service_locator.js';
+import { serviceLocator } from '../service-locator.js';
import { AfterCommitError, NonRetryableError } from '../errors.js';
-import type { RecordOptions } from './key_value_store.js';
+import type { RecordOptions } from './key-value-store.js';
/**
* Governs whether writes of a given storage type performed inside a {@apilink StorageTransaction} are
diff --git a/packages/core/src/storages/utils.ts b/packages/core/src/storages/utils.ts
index 7a77fc84d..7002118b0 100644
--- a/packages/core/src/storages/utils.ts
+++ b/packages/core/src/storages/utils.ts
@@ -4,9 +4,9 @@ import type { BaseHttpClient } from '@crawlee/http-client';
import type { Dictionary, StorageBackend } from '@crawlee/types';
import { Configuration } from '../configuration.js';
-import type { IProxyConfiguration } from '../proxy_configuration.js';
-import { serviceLocator } from '../service_locator.js';
-import { KeyValueStore } from './key_value_store.js';
+import type { IProxyConfiguration } from '../proxy-configuration.js';
+import { serviceLocator } from '../service-locator.js';
+import { KeyValueStore } from './key-value-store.js';
/**
* Options for purging default storage.
diff --git a/packages/core/test/core/service_locator.test.ts b/packages/core/test/core/service-locator.test.ts
similarity index 100%
rename from packages/core/test/core/service_locator.test.ts
rename to packages/core/test/core/service-locator.test.ts
diff --git a/packages/core/test/memory-storage/request-queue/handledRequestCount-should-update.test.ts b/packages/core/test/memory-storage/request-queue/handled-request-count-should-update.test.ts
similarity index 100%
rename from packages/core/test/memory-storage/request-queue/handledRequestCount-should-update.test.ts
rename to packages/core/test/memory-storage/request-queue/handled-request-count-should-update.test.ts
diff --git a/packages/otel/src/index.ts b/packages/otel/src/index.ts
index 5b04f3c8a..f33ee199d 100644
--- a/packages/otel/src/index.ts
+++ b/packages/otel/src/index.ts
@@ -1,3 +1,3 @@
export { CrawleeInstrumentation } from './instrumentation.js';
export type * from './types.js';
-export { wrapWithSpan } from './wrapWithSpan.js';
+export { wrapWithSpan } from './wrap-with-span.js';
diff --git a/packages/otel/src/instrumentation.ts b/packages/otel/src/instrumentation.ts
index e928b1697..e2d302c28 100644
--- a/packages/otel/src/instrumentation.ts
+++ b/packages/otel/src/instrumentation.ts
@@ -17,7 +17,7 @@ import {
import type { ClassMethodPatchDefinition, LoggerMethodDefinition, ModuleDefinition } from './internal-types.js';
import type { CrawleeInstrumentationConfig } from './types.js';
import { buildLogAttributes, buildModuleDefinitions, getPackageVersion } from './utilities.js';
-import { resolveSpanName, resolveSpanOptions, setSharedTracer, wrapWithSpan } from './wrapWithSpan.js';
+import { resolveSpanName, resolveSpanOptions, setSharedTracer, wrapWithSpan } from './wrap-with-span.js';
/**
* Builds a module definition for one of the instrumented Crawlee packages.
diff --git a/packages/otel/src/wrapWithSpan.ts b/packages/otel/src/wrap-with-span.ts
similarity index 100%
rename from packages/otel/src/wrapWithSpan.ts
rename to packages/otel/src/wrap-with-span.ts
diff --git a/packages/otel/test/wrap-with-span.test.ts b/packages/otel/test/wrap-with-span.test.ts
index 8d8ba9066..48264a8c5 100644
--- a/packages/otel/test/wrap-with-span.test.ts
+++ b/packages/otel/test/wrap-with-span.test.ts
@@ -3,7 +3,7 @@ import type { ReadableSpan } from '@opentelemetry/sdk-trace-base';
import { InMemorySpanExporter, SimpleSpanProcessor } from '@opentelemetry/sdk-trace-base';
import { NodeTracerProvider } from '@opentelemetry/sdk-trace-node';
-import { setSharedTracer, wrapWithSpan } from '../src/wrapWithSpan';
+import { setSharedTracer, wrapWithSpan } from '../src/wrap-with-span';
describe('wrapWithSpan', () => {
let provider: NodeTracerProvider;
diff --git a/packages/puppeteer-crawler/src/index.ts b/packages/puppeteer-crawler/src/index.ts
index d75688df5..b50dfeb04 100644
--- a/packages/puppeteer-crawler/src/index.ts
+++ b/packages/puppeteer-crawler/src/index.ts
@@ -3,9 +3,9 @@ export * from './internals/puppeteer-browser-pool.js';
export * from './internals/puppeteer-crawler.js';
export * from './internals/puppeteer-launcher.js';
-export type { InterceptHandler } from './internals/utils/puppeteer_request_interception.js';
+export type { InterceptHandler } from './internals/utils/puppeteer-request-interception.js';
-export * as puppeteerUtils from './internals/utils/puppeteer_utils.js';
-export type { DirectNavigationOptions as PuppeteerDirectNavigationOptions } from './internals/utils/puppeteer_utils.js';
+export * as puppeteerUtils from './internals/utils/puppeteer-utils.js';
+export type { DirectNavigationOptions as PuppeteerDirectNavigationOptions } from './internals/utils/puppeteer-utils.js';
export type { EnqueueLinksByClickingElementsOptions } from './internals/enqueue-links/click-elements.js';
diff --git a/packages/puppeteer-crawler/src/internals/enqueue-links/click-elements.ts b/packages/puppeteer-crawler/src/internals/enqueue-links/click-elements.ts
index 7c5bb0725..b681f921a 100644
--- a/packages/puppeteer-crawler/src/internals/enqueue-links/click-elements.ts
+++ b/packages/puppeteer-crawler/src/internals/enqueue-links/click-elements.ts
@@ -22,7 +22,7 @@ import { parseArgument, schemas } from '@crawlee/utils/internal';
import type { ClickOptions, Frame, HTTPRequest as PuppeteerRequest, Page, Target } from 'puppeteer';
import { z } from 'zod';
-import { addInterceptRequestHandler, removeInterceptRequestHandler } from '../utils/puppeteer_request_interception.js';
+import { addInterceptRequestHandler, removeInterceptRequestHandler } from '../utils/puppeteer-request-interception.js';
const STARTING_Z_INDEX = 2147400000;
const getLog = () => serviceLocator.getChildLog('Puppeteer Click Elements');
diff --git a/packages/puppeteer-crawler/src/internals/puppeteer-crawler.ts b/packages/puppeteer-crawler/src/internals/puppeteer-crawler.ts
index 175964e36..5c8bbf315 100644
--- a/packages/puppeteer-crawler/src/internals/puppeteer-crawler.ts
+++ b/packages/puppeteer-crawler/src/internals/puppeteer-crawler.ts
@@ -20,7 +20,7 @@ import { z } from 'zod';
import type { EnqueueLinksByClickingElementsOptions } from './enqueue-links/click-elements.js';
import { puppeteerBrowserPool } from './puppeteer-browser-pool.js';
import type { PuppeteerLaunchContext } from './puppeteer-launcher.js';
-import type { InterceptHandler } from './utils/puppeteer_request_interception.js';
+import type { InterceptHandler } from './utils/puppeteer-request-interception.js';
import type {
BlockRequestsOptions,
DirectNavigationOptions,
@@ -28,8 +28,8 @@ import type {
InjectFileOptions,
PuppeteerContextUtils,
SaveSnapshotOptions,
-} from './utils/puppeteer_utils.js';
-import * as puppeteerUtils from './utils/puppeteer_utils.js';
+} from './utils/puppeteer-utils.js';
+import * as puppeteerUtils from './utils/puppeteer-utils.js';
export type PuppeteerGoToOptions = NonNullable<Parameters<Page['goto']>[1]>;
diff --git a/packages/puppeteer-crawler/src/internals/utils/puppeteer_request_interception.ts b/packages/puppeteer-crawler/src/internals/utils/puppeteer-request-interception.ts
similarity index 100%
rename from packages/puppeteer-crawler/src/internals/utils/puppeteer_request_interception.ts
rename to packages/puppeteer-crawler/src/internals/utils/puppeteer-request-interception.ts
diff --git a/packages/puppeteer-crawler/src/internals/utils/puppeteer_utils.ts b/packages/puppeteer-crawler/src/internals/utils/puppeteer-utils.ts
similarity index 99%
rename from packages/puppeteer-crawler/src/internals/utils/puppeteer_utils.ts
rename to packages/puppeteer-crawler/src/internals/utils/puppeteer-utils.ts
index d15ee2418..4cf6eee58 100644
--- a/packages/puppeteer-crawler/src/internals/utils/puppeteer_utils.ts
+++ b/packages/puppeteer-crawler/src/internals/utils/puppeteer-utils.ts
@@ -36,8 +36,8 @@ import { LruCache } from '@apify/datastructures';
import type { EnqueueLinksByClickingElementsOptions } from '../enqueue-links/click-elements.js';
import { enqueueLinksByClickingElements } from '../enqueue-links/click-elements.js';
-import type { InterceptHandler } from './puppeteer_request_interception.js';
-import { addInterceptRequestHandler, removeInterceptRequestHandler } from './puppeteer_request_interception.js';
+import type { InterceptHandler } from './puppeteer-request-interception.js';
+import { addInterceptRequestHandler, removeInterceptRequestHandler } from './puppeteer-request-interception.js';
const require = createRequire(import.meta.url);
const jqueryPath = require.resolve('jquery');
diff --git a/packages/utils/src/index.ts b/packages/utils/src/index.ts
index 648de9933..d7f1feb65 100644
--- a/packages/utils/src/index.ts
+++ b/packages/utils/src/index.ts
@@ -5,7 +5,7 @@ export type { DownloadListOfUrlsOptions, ExtractUrlsOptions } from './internals/
export { sleep } from './internals/general.js';
export * as social from './internals/social.js';
export * from './internals/extract-microdata.js';
-export * from './internals/open_graph_parser.js';
+export * from './internals/open-graph-parser.js';
export * from './internals/robots.js';
export { discoverValidSitemaps, Sitemap } from './internals/sitemap.js';
export type { ParseSitemapOptions } from './internals/sitemap.js';
diff --git a/packages/utils/src/internals/open_graph_parser.ts b/packages/utils/src/internals/open-graph-parser.ts
similarity index 100%
rename from packages/utils/src/internals/open_graph_parser.ts
rename to packages/utils/src/internals/open-graph-parser.ts
diff --git a/packages/utils/src/internals/url.ts b/packages/utils/src/internals/url.ts
index 3c5fe8db0..ecf73e3a1 100644
--- a/packages/utils/src/internals/url.ts
+++ b/packages/utils/src/internals/url.ts
@@ -82,8 +82,8 @@ function normalizeHostname(hostname: string): string {
* Check whether `target` matches `origin` under the given enqueue `strategy`. The URL scheme is not
* considered here (use {@apilink filterUrl} for the combined scheme + strategy check).
*
- * The `enqueueLinks` implementation in `@crawlee/core` matches the same strategies via glob patterns
- * (see `packages/core/src/enqueue_links/enqueue_links.ts`) — keep the two in sync when changing either.
+ * The `enqueueLinks` implementation in `@crawlee/basic` matches the same strategies via glob patterns
+ * (see `packages/basic-crawler/src/internals/enqueue-links/enqueue-links.ts`) — keep the two in sync when changing either.
*/
export function matchesEnqueueStrategy(
strategy: EnqueueStrategy | `${EnqueueStrategy}`,
diff --git a/packages/utils/test/non-error-objects-working.test.ts b/packages/utils/test/non-error-objects-working.test.ts
index cad6c2847..b6d848d1a 100644
--- a/packages/utils/test/non-error-objects-working.test.ts
+++ b/packages/utils/test/non-error-objects-working.test.ts
@@ -1,4 +1,4 @@
-import { ErrorTracker } from '../../basic-crawler/src/internals/crawlers/error_tracker.js';
+import { ErrorTracker } from '../../basic-crawler/src/internals/crawlers/error-tracker.js';
describe('ErrorTracker', () => {
test('processing a non-error error should not crash', () => {
diff --git a/scripts/temp_fix_apify_exports.ts b/scripts/temp-fix-apify-exports.ts
similarity index 100%
rename from scripts/temp_fix_apify_exports.ts
rename to scripts/temp-fix-apify-exports.ts
diff --git a/scripts/typescript_fixes.mjs b/scripts/typescript-fixes.mjs
similarity index 100%
rename from scripts/typescript_fixes.mjs
rename to scripts/typescript-fixes.mjs
diff --git a/test/core/autoscaling/autoscaled_pool.test.ts b/test/core/autoscaling/autoscaled-pool.test.ts
similarity index 100%
rename from test/core/autoscaling/autoscaled_pool.test.ts
rename to test/core/autoscaling/autoscaled-pool.test.ts
diff --git a/test/core/autoscaling/concurrency_system.test.ts b/test/core/autoscaling/concurrency-system.test.ts
similarity index 100%
rename from test/core/autoscaling/concurrency_system.test.ts
rename to test/core/autoscaling/concurrency-system.test.ts
diff --git a/test/core/autoscaling/cpu-infoV2.test.ts b/test/core/autoscaling/cpu-info-v2.test.ts
similarity index 100%
rename from test/core/autoscaling/cpu-infoV2.test.ts
rename to test/core/autoscaling/cpu-info-v2.test.ts
diff --git a/test/core/autoscaling/memory-infoV2.test.ts b/test/core/autoscaling/memory-info-v2.test.ts
similarity index 100%
rename from test/core/autoscaling/memory-infoV2.test.ts
rename to test/core/autoscaling/memory-info-v2.test.ts
diff --git a/test/core/autoscaling/psTree.test.ts b/test/core/autoscaling/ps-tree.test.ts
similarity index 100%
rename from test/core/autoscaling/psTree.test.ts
rename to test/core/autoscaling/ps-tree.test.ts
diff --git a/test/core/autoscaling/system_status.test.ts b/test/core/autoscaling/system-status.test.ts
similarity index 100%
rename from test/core/autoscaling/system_status.test.ts
rename to test/core/autoscaling/system-status.test.ts
diff --git a/test/core/autoscaling/weighted_avg.test.ts b/test/core/autoscaling/weighted-avg.test.ts
similarity index 93%
rename from test/core/autoscaling/weighted_avg.test.ts
rename to test/core/autoscaling/weighted-avg.test.ts
index 868adb085..1bed02e0e 100644
--- a/test/core/autoscaling/weighted_avg.test.ts
+++ b/test/core/autoscaling/weighted-avg.test.ts
@@ -1,4 +1,4 @@
-import { weightedAvg } from '../../../packages/basic-crawler/src/internals/autoscaling/weighted_avg.js';
+import { weightedAvg } from '../../../packages/basic-crawler/src/internals/autoscaling/weighted-avg.js';
describe('weightedAvg()', () => {
test('works', () => {
diff --git a/test/core/browser_launchers/playwright_launcher.test.ts b/test/core/browser-launchers/playwright-launcher.test.ts
similarity index 100%
rename from test/core/browser_launchers/playwright_launcher.test.ts
rename to test/core/browser-launchers/playwright-launcher.test.ts
diff --git a/test/core/browser_launchers/puppeteer_launcher.test.ts b/test/core/browser-launchers/puppeteer-launcher.test.ts
similarity index 100%
rename from test/core/browser_launchers/puppeteer_launcher.test.ts
rename to test/core/browser-launchers/puppeteer-launcher.test.ts
diff --git a/test/core/crawlers/adaptive_playwright_crawler.test.ts b/test/core/crawlers/adaptive-playwright-crawler.test.ts
similarity index 100%
rename from test/core/crawlers/adaptive_playwright_crawler.test.ts
rename to test/core/crawlers/adaptive-playwright-crawler.test.ts
diff --git a/test/core/crawlers/adaptive_playwright_types.test.ts b/test/core/crawlers/adaptive-playwright-types.test.ts
similarity index 100%
rename from test/core/crawlers/adaptive_playwright_types.test.ts
rename to test/core/crawlers/adaptive-playwright-types.test.ts
diff --git a/test/core/crawlers/basic_browser_crawler.ts b/test/core/crawlers/basic-browser-crawler.ts
similarity index 100%
rename from test/core/crawlers/basic_browser_crawler.ts
rename to test/core/crawlers/basic-browser-crawler.ts
diff --git a/test/core/crawlers/basic_crawler.test.ts b/test/core/crawlers/basic-crawler.test.ts
similarity index 100%
rename from test/core/crawlers/basic_crawler.test.ts
rename to test/core/crawlers/basic-crawler.test.ts
diff --git a/test/core/crawlers/browser_crawler.test.ts b/test/core/crawlers/browser-crawler.test.ts
similarity index 99%
rename from test/core/crawlers/browser_crawler.test.ts
rename to test/core/crawlers/browser-crawler.test.ts
index de8ccde1a..8d152299b 100644
--- a/test/core/crawlers/browser_crawler.test.ts
+++ b/test/core/crawlers/browser-crawler.test.ts
@@ -26,8 +26,8 @@ import { runExampleComServer } from '../../shared/_helper.js';
import { ENV_VARS } from '@apify/consts';
import log from '@apify/log';
-import type { TestCrawlingContext } from './basic_browser_crawler.js';
-import { BrowserCrawlerTest } from './basic_browser_crawler.js';
+import type { TestCrawlingContext } from './basic-browser-crawler.js';
+import { BrowserCrawlerTest } from './basic-browser-crawler.js';
import { ISession } from '@crawlee/types';
describe('BrowserCrawler', () => {
diff --git a/test/core/crawlers/cheerio_crawler.test.ts b/test/core/crawlers/cheerio-crawler.test.ts
similarity index 100%
rename from test/core/crawlers/cheerio_crawler.test.ts
rename to test/core/crawlers/cheerio-crawler.test.ts
diff --git a/test/core/crawlers/context_pipeline.test.ts b/test/core/crawlers/context-pipeline.test.ts
similarity index 100%
rename from test/core/crawlers/context_pipeline.test.ts
rename to test/core/crawlers/context-pipeline.test.ts
diff --git a/test/core/crawlers/dom_crawler.test.ts b/test/core/crawlers/dom-crawler.test.ts
similarity index 100%
rename from test/core/crawlers/dom_crawler.test.ts
rename to test/core/crawlers/dom-crawler.test.ts
diff --git a/test/core/crawlers/error_handler_types.test.ts b/test/core/crawlers/error-handler-types.test.ts
similarity index 100%
rename from test/core/crawlers/error_handler_types.test.ts
rename to test/core/crawlers/error-handler-types.test.ts
diff --git a/test/core/crawlers/file_download.test.ts b/test/core/crawlers/file-download.test.ts
similarity index 100%
rename from test/core/crawlers/file_download.test.ts
rename to test/core/crawlers/file-download.test.ts
diff --git a/test/core/crawlers/http_crawler.test.ts b/test/core/crawlers/http-crawler.test.ts
similarity index 100%
rename from test/core/crawlers/http_crawler.test.ts
rename to test/core/crawlers/http-crawler.test.ts
diff --git a/test/core/crawlers/navigation_hook_types.test.ts b/test/core/crawlers/navigation-hook-types.test.ts
similarity index 100%
rename from test/core/crawlers/navigation_hook_types.test.ts
rename to test/core/crawlers/navigation-hook-types.test.ts
diff --git a/test/core/crawlers/playwright_crawler.test.ts b/test/core/crawlers/playwright-crawler.test.ts
similarity index 100%
rename from test/core/crawlers/playwright_crawler.test.ts
rename to test/core/crawlers/playwright-crawler.test.ts
diff --git a/test/core/crawlers/puppeteer_crawler.test.ts b/test/core/crawlers/puppeteer-crawler.test.ts
similarity index 100%
rename from test/core/crawlers/puppeteer_crawler.test.ts
rename to test/core/crawlers/puppeteer-crawler.test.ts
diff --git a/test/core/crawlers/rendering_type_predictor.test.ts b/test/core/crawlers/rendering-type-predictor.test.ts
similarity index 100%
rename from test/core/crawlers/rendering_type_predictor.test.ts
rename to test/core/crawlers/rendering-type-predictor.test.ts
diff --git a/test/core/enqueue_links/click_elements.test.ts b/test/core/enqueue-links/click-elements.test.ts
similarity index 100%
rename from test/core/enqueue_links/click_elements.test.ts
rename to test/core/enqueue-links/click-elements.test.ts
diff --git a/test/core/enqueue_links/enqueue_links.test.ts b/test/core/enqueue-links/enqueue-links.test.ts
similarity index 100%
rename from test/core/enqueue_links/enqueue_links.test.ts
rename to test/core/enqueue-links/enqueue-links.test.ts
diff --git a/test/core/enqueue_links/shared.test.ts b/test/core/enqueue-links/shared.test.ts
similarity index 100%
rename from test/core/enqueue_links/shared.test.ts
rename to test/core/enqueue-links/shared.test.ts
diff --git a/test/core/error_snapshotter.test.ts b/test/core/error-snapshotter.test.ts
similarity index 100%
rename from test/core/error_snapshotter.test.ts
rename to test/core/error-snapshotter.test.ts
diff --git a/test/core/error_tracker.test.ts b/test/core/error-tracker.test.ts
similarity index 99%
rename from test/core/error_tracker.test.ts
rename to test/core/error-tracker.test.ts
index 23341c28b..d6c4e011f 100644
--- a/test/core/error_tracker.test.ts
+++ b/test/core/error-tracker.test.ts
@@ -1,4 +1,4 @@
-import { ErrorTracker } from '../../packages/basic-crawler/src/internals/crawlers/error_tracker.js';
+import { ErrorTracker } from '../../packages/basic-crawler/src/internals/crawlers/error-tracker.js';
const random = () => Math.random().toString(36).slice(2);
diff --git a/test/core/got_scraping_http_client.test.ts b/test/core/got-scraping-http-client.test.ts
similarity index 100%
rename from test/core/got_scraping_http_client.test.ts
rename to test/core/got-scraping-http-client.test.ts
diff --git a/test/core/impit_http_client.test.ts b/test/core/impit-http-client.test.ts
similarity index 100%
rename from test/core/impit_http_client.test.ts
rename to test/core/impit-http-client.test.ts
diff --git a/test/core/owned_or_injected.test.ts b/test/core/owned-or-injected.test.ts
similarity index 98%
rename from test/core/owned_or_injected.test.ts
rename to test/core/owned-or-injected.test.ts
index e81a1b964..aae821f2a 100644
--- a/test/core/owned_or_injected.test.ts
+++ b/test/core/owned-or-injected.test.ts
@@ -1,4 +1,4 @@
-import { OwnedOrInjected } from '../../packages/core/src/owned_or_injected.js';
+import { OwnedOrInjected } from '../../packages/core/src/owned-or-injected.js';
describe('OwnedOrInjected', () => {
describe('resolve() with an injected instance', () => {
diff --git a/test/core/playwright_utils.test.ts b/test/core/playwright-utils.test.ts
similarity index 100%
rename from test/core/playwright_utils.test.ts
rename to test/core/playwright-utils.test.ts
diff --git a/test/core/base_http_client.test.ts b/test/core/process-http-request-options.test.ts
similarity index 100%
rename from test/core/base_http_client.test.ts
rename to test/core/process-http-request-options.test.ts
diff --git a/test/core/proxy_configuration.test.ts b/test/core/proxy-configuration.test.ts
similarity index 100%
rename from test/core/proxy_configuration.test.ts
rename to test/core/proxy-configuration.test.ts
diff --git a/test/core/puppeteer_request_interception.test.ts b/test/core/puppeteer-request-interception.test.ts
similarity index 100%
rename from test/core/puppeteer_request_interception.test.ts
rename to test/core/puppeteer-request-interception.test.ts
diff --git a/test/core/puppeteer_utils.test.ts b/test/core/puppeteer-utils.test.ts
similarity index 100%
rename from test/core/puppeteer_utils.test.ts
rename to test/core/puppeteer-utils.test.ts
diff --git a/test/core/recoverable_state.test.ts b/test/core/recoverable-state.test.ts
similarity index 99%
rename from test/core/recoverable_state.test.ts
rename to test/core/recoverable-state.test.ts
index dae193811..2aa233fc4 100644
--- a/test/core/recoverable_state.test.ts
+++ b/test/core/recoverable-state.test.ts
@@ -12,7 +12,7 @@ import {
serviceLocator,
StateValidationError,
} from '../../packages/core/src/index.js';
-import { RecoverableState } from '../../packages/core/src/recoverable_state.js';
+import { RecoverableState } from '../../packages/core/src/recoverable-state.js';
interface TestState {
counter: number;
diff --git a/test/core/request_list.test.ts b/test/core/request-list.test.ts
similarity index 100%
rename from test/core/request_list.test.ts
rename to test/core/request-list.test.ts
diff --git a/test/core/request_manager_tandem.test.ts b/test/core/request-manager-tandem.test.ts
similarity index 100%
rename from test/core/request_manager_tandem.test.ts
rename to test/core/request-manager-tandem.test.ts
diff --git a/test/core/session_pool/session_pool.test.ts b/test/core/session-pool/session-pool.test.ts
similarity index 100%
rename from test/core/session_pool/session_pool.test.ts
rename to test/core/session-pool/session-pool.test.ts
diff --git a/test/core/session_pool/session_utils.test.ts b/test/core/session-pool/session-utils.test.ts
similarity index 100%
rename from test/core/session_pool/session_utils.test.ts
rename to test/core/session-pool/session-utils.test.ts
diff --git a/test/core/session_pool/session.test.ts b/test/core/session-pool/session.test.ts
similarity index 100%
rename from test/core/session_pool/session.test.ts
rename to test/core/session-pool/session.test.ts
diff --git a/test/core/storages/key_value_store_codec.test.ts b/test/core/storages/key-value-store-codec.test.ts
similarity index 99%
rename from test/core/storages/key_value_store_codec.test.ts
rename to test/core/storages/key-value-store-codec.test.ts
index bb10d41a1..eaeb5c2ab 100644
--- a/test/core/storages/key_value_store_codec.test.ts
+++ b/test/core/storages/key-value-store-codec.test.ts
@@ -2,7 +2,7 @@ import { Readable } from 'node:stream';
import { parseValue, serializeValue } from '@crawlee/core';
-describe('key_value_store_codec', () => {
+describe('key-value-store-codec', () => {
describe('serializeValue()', () => {
test('no content type → JSON-serializes object and infers json content type', () => {
const { value, contentType } = serializeValue({ foo: 'bar' });
diff --git a/test/core/storages/key_value_store_fs_roundtrip.test.ts b/test/core/storages/key-value-store-fs-roundtrip.test.ts
similarity index 100%
rename from test/core/storages/key_value_store_fs_roundtrip.test.ts
rename to test/core/storages/key-value-store-fs-roundtrip.test.ts
diff --git a/test/core/storages/key_value_store_public_url_transaction.test.ts b/test/core/storages/key-value-store-public-url-transaction.test.ts
similarity index 100%
rename from test/core/storages/key_value_store_public_url_transaction.test.ts
rename to test/core/storages/key-value-store-public-url-transaction.test.ts
diff --git a/test/core/storages/key_value_store.test.ts b/test/core/storages/key-value-store.test.ts
similarity index 99%
rename from test/core/storages/key_value_store.test.ts
rename to test/core/storages/key-value-store.test.ts
index 7090dc005..ff8f67c14 100644
--- a/test/core/storages/key_value_store.test.ts
+++ b/test/core/storages/key-value-store.test.ts
@@ -3,7 +3,7 @@ import { PassThrough } from 'node:stream';
import { ArgumentValidationError, KeyValueStore, MemoryStorageBackend, serviceLocator } from '@crawlee/core';
import type { Dictionary } from '@crawlee/types';
-import { toBuffer } from '../../../packages/core/src/byte_utils.js';
+import { toBuffer } from '../../../packages/core/src/byte-utils.js';
beforeEach(async () => {
serviceLocator.setStorageBackend(new MemoryStorageBackend());
diff --git a/test/core/storages/request_queue.test.ts b/test/core/storages/request-queue.test.ts
similarity index 100%
rename from test/core/storages/request_queue.test.ts
rename to test/core/storages/request-queue.test.ts
diff --git a/test/core/storages/request_source_status.test.ts b/test/core/storages/request-source-status.test.ts
similarity index 98%
rename from test/core/storages/request_source_status.test.ts
rename to test/core/storages/request-source-status.test.ts
index cdcda4256..26c8f239b 100644
--- a/test/core/storages/request_source_status.test.ts
+++ b/test/core/storages/request-source-status.test.ts
@@ -2,7 +2,7 @@ import type { RequestSourceStatus } from '@crawlee/core';
import { describe, expect, test } from 'vitest';
// Not part of the public surface, so it is reached the way the other internal helpers are tested.
-import { joinRequestSourceStatuses } from '../../../packages/core/src/storages/request_loader.js';
+import { joinRequestSourceStatuses } from '../../../packages/core/src/storages/request-loader.js';
describe('joinRequestSourceStatuses', () => {
const ready = { status: 'ready' } as const satisfies RequestSourceStatus;
diff --git a/test/core/storages/storage_aliases.test.ts b/test/core/storages/storage-aliases.test.ts
similarity index 100%
rename from test/core/storages/storage_aliases.test.ts
rename to test/core/storages/storage-aliases.test.ts
diff --git a/test/core/storages/storage_manager.test.ts b/test/core/storages/storage-manager.test.ts
similarity index 100%
rename from test/core/storages/storage_manager.test.ts
rename to test/core/storages/storage-manager.test.ts
diff --git a/test/core/storages/storage_purge.test.ts b/test/core/storages/storage-purge.test.ts
similarity index 100%
rename from test/core/storages/storage_purge.test.ts
rename to test/core/storages/storage-purge.test.ts
diff --git a/test/core/storages/storage_transaction.test.ts b/test/core/storages/storage-transaction.test.ts
similarity index 100%
rename from test/core/storages/storage_transaction.test.ts
rename to test/core/storages/storage-transaction.test.ts
diff --git a/test/otel/tracer-wiring.test.ts b/test/otel/tracer-wiring.test.ts
index b3360d700..eb0adf6dc 100644
--- a/test/otel/tracer-wiring.test.ts
+++ b/test/otel/tracer-wiring.test.ts
@@ -5,7 +5,7 @@ import { InMemorySpanExporter, SimpleSpanProcessor } from '@opentelemetry/sdk-tr
import { NodeTracerProvider } from '@opentelemetry/sdk-trace-node';
// Reached directly rather than through the package entry point: resetting the shared tracer is not public API.
-import { setSharedTracer } from '../../packages/otel/src/wrapWithSpan.js';
+import { setSharedTracer } from '../../packages/otel/src/wrap-with-span.js';
/**
* The instrumentation is always constructed before the SDK is configured, so these tests cover that ordering for
diff --git a/test/shared/data/html_to_text_test_data.ts b/test/shared/data/html-to-text-test-data.ts
similarity index 100%
rename from test/shared/data/html_to_text_test_data.ts
rename to test/shared/data/html-to-text-test-data.ts
diff --git a/test/utils/cheerio.test.ts b/test/utils/cheerio.test.ts
index 83870daa3..7075aa9c0 100644
--- a/test/utils/cheerio.test.ts
+++ b/test/utils/cheerio.test.ts
@@ -2,7 +2,7 @@ import { htmlToText } from '@crawlee/utils';
import type { CheerioAPI } from 'cheerio';
import * as cheerio from 'cheerio';
-import * as htmlToTextData from '../shared/data/html_to_text_test_data.js';
+import * as htmlToTextData from '../shared/data/html-to-text-test-data.js';
const checkHtmlToText = async (html: string | CheerioAPI, expectedText: string, hasBody = false) => {
const text1 = await htmlToText(html);
diff --git a/test/utils/open_graph_parser.test.ts b/test/utils/open-graph-parser.test.ts
similarity index 100%
rename from test/utils/open_graph_parser.test.ts
rename to test/utils/open-graph-parser.test.ts
diff --git a/test/vitest.setup.ts b/test/vitest.setup.ts
index a73759301..43c58defc 100644
--- a/test/vitest.setup.ts
+++ b/test/vitest.setup.ts
@@ -1,6 +1,6 @@
import { beforeEach } from 'vitest';
beforeEach(async () => {
- const { serviceLocator } = await import('../packages/core/src/service_locator.js');
+ const { serviceLocator } = await import('../packages/core/src/service-locator.js');
serviceLocator.reset();
});
diff --git a/vitest.config.mts b/vitest.config.mts
index 0f4778cc0..72adf1051 100644
--- a/vitest.config.mts
+++ b/vitest.config.mts
@@ -10,17 +10,17 @@ import { defaultExclude, defineConfig, mergeConfig } from 'vitest/config';
const browserTests = [
'packages/browser-pool/test/**/*.test.ts',
'test/browser-pool/**/*.test.ts',
- 'test/core/autoscaling/memory-infoV2.test.ts',
- 'test/core/browser_launchers/*.test.ts',
- 'test/core/crawlers/adaptive_playwright_crawler.test.ts',
- 'test/core/crawlers/browser_crawler.test.ts',
- 'test/core/crawlers/playwright_crawler.test.ts',
- 'test/core/crawlers/puppeteer_crawler.test.ts',
- 'test/core/enqueue_links/click_elements.test.ts',
- 'test/core/enqueue_links/enqueue_links.test.ts',
- 'test/core/playwright_utils.test.ts',
- 'test/core/puppeteer_request_interception.test.ts',
- 'test/core/puppeteer_utils.test.ts',
+ 'test/core/autoscaling/memory-info-v2.test.ts',
+ 'test/core/browser-launchers/*.test.ts',
+ 'test/core/crawlers/adaptive-playwright-crawler.test.ts',
+ 'test/core/crawlers/browser-crawler.test.ts',
+ 'test/core/crawlers/playwright-crawler.test.ts',
+ 'test/core/crawlers/puppeteer-crawler.test.ts',
+ 'test/core/enqueue-links/click-elements.test.ts',
+ 'test/core/enqueue-links/enqueue-links.test.ts',
+ 'test/core/playwright-utils.test.ts',
+ 'test/core/puppeteer-request-interception.test.ts',
+ 'test/core/puppeteer-utils.test.ts',
];
// vitest's default of one worker per core (minus one) is fine for cheap tests but not for tests