Skip to content

fix(whatsapp-gateway): resolve link-preview-js peer conflict and commit lockfile#6192

Merged
houko merged 1 commit into
mainfrom
fix/6180-whatsapp-gateway-lockfile
Jun 18, 2026
Merged

fix(whatsapp-gateway): resolve link-preview-js peer conflict and commit lockfile#6192
houko merged 1 commit into
mainfrom
fix/6180-whatsapp-gateway-lockfile

Conversation

@houko

@houko houko commented Jun 18, 2026

Copy link
Copy Markdown
Contributor

Summary

Fixes #6180. npm install in packages/whatsapp-gateway/ failed with ERESOLVE unless --legacy-peer-deps was passed, and the package shipped no lockfile.

Root cause: the gateway declared link-preview-js@^4.0.1 as a direct dependency, while @whiskeysockets/[email protected] lists link-preview-js@^3.0.0 as peerOptional. A direct declaration at a conflicting range defeats the optional flag, so npm hard-fails resolution and writes no lockfile.

link-preview-js is never imported anywhere in the gateway code (verified: zero require/import across index.js, lib/, test/).

Changes

  • packages/whatsapp-gateway/package.json
  • packages/whatsapp-gateway/package-lock.json — committed for the first time, so installs are reproducible and CI can run npm audit against a locked graph.
  • CHANGELOG.md — entry under [Unreleased] → Fixed.

Verification

$ cd packages/whatsapp-gateway && npm install --package-lock-only
...
found 0 vulnerabilities
$ echo $?
0

Clean resolution with no --legacy-peer-deps, lockfile written (156 packages, 0 vulnerabilities).

Out of scope

Wiring an actual npm audit / install CI job for packages/whatsapp-gateway (no workflow installs this package today; supply-chain-audit.yml scans only Python skills/hands/extensions). That is a separate .github/workflows/ change and should be its own issue/PR.

…it lockfile

npm install in packages/whatsapp-gateway failed with ERESOLVE without
--legacy-peer-deps: the gateway declared link-preview-js@^4.0.1 as a direct
dependency while @whiskeysockets/[email protected] lists it as peerOptional
^3.0.0. The direct declaration defeated the optional flag, so resolution
hard-failed and no lockfile could be generated.

link-preview-js is never require()d in the gateway, so the direct dependency
is dropped. An overrides pin to ^4.0.1 keeps the #5934 SSRF fix
(GHSA-4gp8-rjrq-ch6q) in force if baileys ever pulls it in transitively. A
package-lock.json is now committed so installs are reproducible and CI can run
npm audit against a locked graph.

Closes #6180
@github-actions github-actions Bot added size/XL 1000+ lines changed area/docs Documentation and guides area/sdk JavaScript and Python SDKs labels Jun 18, 2026
@houko
houko merged commit 98c9bb0 into main Jun 18, 2026
29 checks passed
@houko
houko deleted the fix/6180-whatsapp-gateway-lockfile branch June 18, 2026 02:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/docs Documentation and guides area/sdk JavaScript and Python SDKs size/XL 1000+ lines changed

Projects

None yet

Development

Successfully merging this pull request may close these issues.

bug(whatsapp-gateway): link-preview-js peer conflict prevents clean npm install; no lockfile committed

1 participant