fix(ts-empty): stop deprecated lodash.isequal warning on npm install#835
Draft
DaveHanns wants to merge 1 commit into
Draft
fix(ts-empty): stop deprecated lodash.isequal warning on npm install#835DaveHanns wants to merge 1 commit into
DaveHanns wants to merge 1 commit into
Conversation
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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Every
npm installin a freshly-scaffoldedts-emptyActor prints alodash.isequaldeprecation warning. This PR silences it by pinning the transitiveowdependency to^2.0.0(which droppedlodash.isequalin favor offast-equals) via npmoverrides.Reproducer
Trace
lodash.isequalarrives transitively viaow, from two paths:owdroppedlodash.isequalstarting in v2 (usesfast-equalsinstead). Bothow@2.xandow@3.xdeclarenode: >=18engines, matching this template'sengines.node.Fix
Add an npm
overridesblock pinningowto^2.0.0:"dependencies": { "apify": "^3.7.0", "@crawlee/cheerio": "^3.15.3" }, + "overrides": { + "ow": "^2.0.0" + },Verification
Install + build + run all succeed cleanly.
Scope
This PR patches only
ts-emptyas the canonical minimal scaffold. The same warning shows up in every otherts-*template that pulls inapifyand/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(bumpowinapify) and incrawlee(bumpowingot-scraping); those are out of scope for this repo.Test plan
npm installonts-emptyscaffold produces nolodash.isequalwarning.npm ls lodash.isequal --allreturns(empty).npm run build+node dist/main.jsstill succeed against the Apify + Crawlee runtime.Surfaced during an evaluation of Apify surfaces for agent-driven Actor development.