Skip to content

fix(ts-empty): stop deprecated lodash.isequal warning on npm install#835

Draft
DaveHanns wants to merge 1 commit into
masterfrom
fix/f75-lodash-isequal-deprecation
Draft

fix(ts-empty): stop deprecated lodash.isequal warning on npm install#835
DaveHanns wants to merge 1 commit into
masterfrom
fix/f75-lodash-isequal-deprecation

Conversation

@DaveHanns

Copy link
Copy Markdown
Contributor

Summary

Every npm install in a freshly-scaffolded ts-empty Actor prints a lodash.isequal deprecation warning. This PR silences it by pinning the transitive ow dependency to ^2.0.0 (which dropped lodash.isequal in favor of fast-equals) via npm overrides.

Reproducer

$ apify create my-actor -t ts-empty
$ cd my-actor
$ npm install
...
npm warn deprecated lodash.isequal@4.5.0: This package is deprecated. Use require('node:util').isDeepStrictEqual instead.

Trace

lodash.isequal arrives transitively via ow, from two paths:

$ npm ls lodash.isequal --all
ts-empty@0.0.1
+-- @crawlee/cheerio@3.17.0
| `-- @crawlee/http@3.17.0
|   `-- got-scraping@4.2.1
|     `-- ow@1.1.1
|       `-- lodash.isequal@4.5.0 deduped
`-- apify@3.7.2
  `-- ow@0.28.2
    `-- lodash.isequal@4.5.0

ow dropped lodash.isequal starting in v2 (uses fast-equals instead). Both ow@2.x and ow@3.x declare node: >=18 engines, matching this template's engines.node.

Fix

Add an npm overrides block pinning ow to ^2.0.0:

     "dependencies": {
         "apify": "^3.7.0",
         "@crawlee/cheerio": "^3.15.3"
     },
+    "overrides": {
+        "ow": "^2.0.0"
+    },

Verification

$ rm -rf node_modules package-lock.json
$ npm install
# no lodash.isequal deprecation warning

$ npm ls lodash.isequal --all
ts-empty@0.0.1 /private/tmp/f75-repro
`-- (empty)

$ npm ls ow --all
ts-empty@0.0.1
+-- @crawlee/cheerio@3.17.0
| `-- @crawlee/http@3.17.0
|   `-- ... `-- ow@2.0.0
`-- apify@3.7.2 `-- ow@2.0.0

$ npm run build && node dist/main.js
INFO  System info {"apifyVersion":"3.7.2","crawleeVersion":"3.17.0", ...}
INFO  Hello from the Actor!

Install + build + run all succeed cleanly.

Scope

This PR patches only ts-empty as the canonical minimal scaffold. The same warning shows up in every other ts-* template that pulls in apify and/or @crawlee/* (i.e. essentially all of them). Happy to fan the same three-line override across the other templates in a follow-up if maintainers agree with the shape.

The permanent upstream fix is in apify-sdk-js (bump ow in apify) and in crawlee (bump ow in got-scraping); those are out of scope for this repo.

Test plan

  • Fresh npm install on ts-empty scaffold produces no lodash.isequal warning.
  • npm ls lodash.isequal --all returns (empty).
  • npm run build + node dist/main.js still succeed against the Apify + Crawlee runtime.

Surfaced during an evaluation of Apify surfaces for agent-driven Actor development.

Every `npm install` in a freshly-scaffolded `ts-empty` Actor prints:

  npm warn deprecated lodash.isequal@4.5.0: This package is deprecated.
  Use require('node:util').isDeepStrictEqual instead.

The dependency arrives transitively via `ow`:

  apify@3.7.2 → ow@0.28.2 → lodash.isequal@4.5.0
  @crawlee/cheerio → @crawlee/http → got-scraping@4.2.1 → ow@1.1.1
    → lodash.isequal@4.5.0

`ow` dropped `lodash.isequal` in favor of `fast-equals` starting in v2
(v2/v3 both have `node: >=18` engines, matching this template).
Pinning `ow` to `^2.0.0` via npm `overrides` removes the deprecated
package from the tree and silences the warning without any code change.

Verified locally:

  $ npm install
  # no lodash.isequal deprecation warning
  $ npm run build && node dist/main.js
  INFO  System info {"apifyVersion":"3.7.2", ...}
  INFO  Hello from the Actor!

The same override applies to every other ts-* template that pulls in
`apify` and/or `@crawlee/*` — this PR only patches `ts-empty` as the
canonical minimal scaffold; a follow-up sweep across the other ts-*
templates makes sense once maintainers agree the shape is right.
The permanent fix is upstream in `apify-sdk-js` and `crawlee` (bump
`ow` in `apify` and in `got-scraping`); that is out of scope here.

Surfaced during an evaluation of Apify surfaces for agent-driven Actor development.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
@DaveHanns DaveHanns requested a review from l2ysho as a code owner July 4, 2026 23:03
@DaveHanns DaveHanns marked this pull request as draft July 5, 2026 11:21
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