Skip to content

fix(gteam-internal): widen @crawlee/core peer range, fix subpath type resolution - #8

Merged
yaroslav-tykhovetskyi-apify merged 1 commit into
masterfrom
fix/crawlee-core-peer-range
Jul 27, 2026
Merged

fix(gteam-internal): widen @crawlee/core peer range, fix subpath type resolution#8
yaroslav-tykhovetskyi-apify merged 1 commit into
masterfrom
fix/crawlee-core-peer-range

Conversation

@yaroslav-tykhovetskyi-apify

Copy link
Copy Markdown
Contributor

Why?

Testing the gteam-internal subpath in a real consumer (tripadvisor) surfaced two problems. The @crawlee/core peer range of ~3.16 conflicts with @crawlee/basic's exact 3.17.0 dependency, which gets pulled in transitively through @crawlee/cheerio. npm ends up installing two separate @crawlee/core copies, and instanceof checks on NonRetryableError (and other cross-package types like ProxyConfiguration) silently break across the duplicated classes. Separately, importing @apify/actor-utils/gteam-internal failed to type-check under TypeScript's classic "Node" module resolution, which predates and ignores the package.json exports map.

What?

Widens the @crawlee/core peer range to ^3.16.0 so npm's resolver can converge on a single shared instance — verified by packing the library locally, installing it into tripadvisor with a fresh lockfile, and confirming npm ls @crawlee/core shows one deduped version and the build passes. Also adds a typesVersions field so the gteam-internal, qc-logger, and type-utils subpath exports resolve their types under classic "Node" resolution without requiring consumers to change their tsconfig.

Further notes

Consumers need a fresh npm install (regenerating package-lock.json) to actually pick up the dedup — bumping the version with an existing lockfile in place won't trigger the re-resolution.

…s for subpath imports

@crawlee/core's peer range was ~3.16, which conflicts with @crawlee/basic's
exact 3.17.0 dependency pulled in transitively by @crawlee/cheerio — this
forced npm to install two separate @crawlee/core copies, breaking
instanceof checks on NonRetryableError and other cross-package types.
Widening to ^3.16.0 lets npm's resolver converge on one shared instance
(confirmed via a fresh install against a locally packed tarball).

Also adds typesVersions so `@apify/actor-utils/gteam-internal` (and the
other subpath exports) resolve under TypeScript's classic "Node" module
resolution, which predates and ignores the package.json exports map.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
@yaroslav-tykhovetskyi-apify
yaroslav-tykhovetskyi-apify merged commit f8e1f40 into master Jul 27, 2026
8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants