fix(ts-sdk): externalize all peerDependencies in tsup config#4408
Merged
whysosaket merged 2 commits intomainfrom Mar 18, 2026
Merged
fix(ts-sdk): externalize all peerDependencies in tsup config#4408whysosaket merged 2 commits intomainfrom
whysosaket merged 2 commits intomainfrom
Conversation
3 tasks
… tests Add dbPath: ":memory:" to prevent shared SQLite file conflicts when jest runs all test files concurrently in CI.
whysosaket
approved these changes
Mar 18, 2026
jamebobob
pushed a commit
to jamebobob/mem0-vigil-recall
that referenced
this pull request
Mar 29, 2026
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.
Description
The TypeScript SDK (
mem0ai/oss) crashes at load time withCannot find module 'ollama'when users don't have theollamapackage installed, even when using a completely different provider (e.g., Gemini, OpenAI). This happens becauseollamaand 9 other peerDependencies were missing fromtsup.config.ts'sexternalarray, causing tsup to bundle them inline instead of treating them as external requires.This PR adds all missing peerDependencies to the
externalarray and includes a drift-prevention test that will fail if a new peerDep is added topackage.jsonwithout being externalized intsup.config.ts.Fixes #3857
Type of change
How Has This Been Tested?
Verified
npm run buildpasses and bundle compiles cleanlyInspected
dist/oss/index.jsto confirmrequire("ollama")is a simple external require (2 lines), not the entire inlined packageConfirmed all other newly externalized deps (
@google/genai,@mistralai/mistralai,@supabase/supabase-js, etc.) are also externalized correctlyDrift-prevention test validates every runtime peerDependency is present in the external array
Reverse staleness test validates no orphaned entries exist in the external array
Unit Test
Checklist:
Maintainer Checklist