Skip to content

refactor!: Continued public surface minimization - #4060

Draft
janbuchar wants to merge 5 commits into
masterfrom
continued-public-surface-minimization
Draft

refactor!: Continued public surface minimization#4060
janbuchar wants to merge 5 commits into
masterfrom
continued-public-surface-minimization

Conversation

@janbuchar

@janbuchar janbuchar commented Aug 20, 2026

Copy link
Copy Markdown
Contributor
  • follows refactor!: Continue public API minimization #4036

  • related to Minimize public interface of Crawlee components #3109

  • Visibility — members that were never extension points become #private, TS private or @internal. A few exports go too: @crawlee/browser-pool is no longer re-exported from crawlee, the utils bag is gone, and @crawlee/types' utility types (Dictionary, Awaitable, Constructor, …) are no longer re-exported from @crawlee/core.

  • Context pipelineBasicCrawler.buildContextPipeline only ever returned an empty pipeline, so it is gone. HttpCrawler and BrowserCrawler keep theirs protected as the two supported override points; the remaining subclass builders are #private. FileDownload also stops silently discarding a user-supplied contextPipelineBuilder — which is what the guide had been telling people to use.

  • BasicCrawler.requestManager — a getter over a # field. The crawler owns the manager's lifecycle (resolving the requestManager/requestList/requestQueue options, opening a default queue, wrapping for sameDomainDelaySecs), and subclass assignment skipped all of it.

Left untagged on purpose: BrowserPlugin's _launch / addProxyToLaunchOptions / isChromiumBasedBrowser and BrowserController's _close / _kill / _newPage / _getCookies / _setCookies. The upgrading guide tells custom plugins and controllers to override exactly these, so tagging them would only shorten the report while claiming something false.

Worth knowing while reviewing: @internal here records "not promised" and drops the member from the surface map. It is not enforced — there is no stripInternal, so tagged members still ship in the .d.ts, and that is intended.

@janbuchar janbuchar added adhoc Ad-hoc unplanned task added during the sprint. t-tooling Issues with this label are in the ownership of the tooling team. labels Aug 20, 2026
@janbuchar
janbuchar requested review from B4nan and barjin August 20, 2026 16:33
@janbuchar
janbuchar force-pushed the continued-public-surface-minimization branch from 25f8610 to 994808a Compare August 20, 2026 18:43
@github-actions github-actions Bot added this to the 147th sprint - Tooling team milestone Aug 20, 2026
… changes

`@internal` is only applied where the member genuinely is not promised surface.
Overrides of a documented extension point are deliberately left untagged: the
concrete `_launch`/`addProxyToLaunchOptions`/`isChromiumBasedBrowser` and
`_close`/`_kill`/`_newPage`/`_getCookies`/`_setCookies` implementations restate a
contract that `upgrading_v4.md` tells custom plugins and controllers to override,
so tagging them would only shorten the report while claiming something false.
`normalizeProxyOptions` and the `useRemoteConnection` overrides stay tagged --
their base declarations are internal too.
…ilder`

`BasicCrawler.buildContextPipeline` only ever returned an empty pipeline, so it is gone and the eight subclasses that extended it now keep their builders `#private` — `HttpCrawler` and `BrowserCrawler` stay `protected`, being the only levels that genuinely compose stages. `FileDownload` also stops silently discarding a user-supplied `contextPipelineBuilder`.
@janbuchar
janbuchar force-pushed the continued-public-surface-minimization branch from f13057d to aae01ca Compare August 21, 2026 16:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

adhoc Ad-hoc unplanned task added during the sprint. t-tooling Issues with this label are in the ownership of the tooling team.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants