#4062·crawlee

Replace typescript-private methods with native-private

Author: janbucharCreated Aug 21, 2026Updated Aug 21, 2026
Labelst-tooling
  • #3980 and #3983 covered class properties. Methods were never in scope, but crawlee/prefer-private-fields flags them too
  • on master, there's 200+ private methods
  • until we resolve this, we cannot make prefer-private-fields an error instead of warning

Spy seams

A test asserts a private method was called, so # breaks it outright rather than needing a rewrite.

  • BrowserPool.executeHooks (8 sites), launchBrowser (2), overridePageClose, closeRetiredBrowserWithNoPages, closeInactiveRetiredBrowsers
  • ConcurrencySystem.autoscale (9) — tests step the autoscaling loop by hand. Also does this.autoscale = this.autoscale.bind(this) in the constructor, which is illegal for a # method; it would have to become a private field holding an arrow function.
  • SessionPool.ensureInitialized (3), createSession

Internals invoked directly

No public path to the behaviour under test.

  • BasicCrawler.resolveRequestHandlerTimeoutMillis — currently the only handle on the 2^31-1 clamp, see #4043

  • BasicCrawler.isTaskReadyFunction, runInStorageTransaction, isAllowedBasedOnRobotsTxtFile (2)

  • HttpCrawler.encodeResponse (2)

  • ImpitHttpClient.getClient (4) — asserts per-proxy client caching

  • BrowserLauncher.getTypicalChromeExecutablePath (3)

  • StagehandController.waitForStagehandToRegisterPage (2)

  • Dataset.bufferedJournalEntries / KeyValueStore.bufferedJournalEntries

  • Related: #3108, #3980, #3983