Drop expo-sqlite from peerDependencies - #6219
Open
hknakn wants to merge 1 commit into
Open
Conversation
expo-sqlite is an optional peer, so the entry only produces a version warning. pnpm resolves optional peers workspace-wide and shares one resolved variant, so a single Expo app using drizzle-orm/expo-sqlite makes every other consumer in the workspace resolve drizzle-orm(expo-sqlite(expo)(react-native)). That pulls @expo/cli and the rest of the Expo toolchain into Node server installs that never use it. Consumers of drizzle-orm/expo-sqlite install expo-sqlite themselves, so the declaration is not what makes the driver resolve. The devDependency is kept, so build-time types are unchanged.
hknakn
force-pushed
the
drop-expo-sqlite-peer
branch
from
September 1, 2026 15:48
2a496f7 to
ba77b8e
Compare
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.
From #6115. Same shape as #6116, for the peer with the widest blast radius.
Why
expo-sqliteis an optional peer, so the entry only gives a version warning. But pnpm resolves optional peers workspace-wide and shares one variant, so a single Expo app usingdrizzle-orm/expo-sqlitemakes every other consumer resolvedrizzle-orm(...)(expo-sqlite(expo)(react-native)).expo→@expo/clipulls the whole SDK toolchain in.In our monorepo that put 76 Expo/RN packages into Node server images:
node_modules1.3 GB → 867 MB once the entry is dropped.Unlike #6116 this peer is used —
src/expo-sqlite/query.tsimportsaddDatabaseChangeListenerat runtime. But anyone importing the subpath installsexpo-sqlitethemselves, since it's a native module that has to be autolinked. The declaration isn't what makes the driver resolve; it just makes unrelated consumers pay for it.What changed
Removed
expo-sqlitefrompeerDependenciesandpeerDependenciesMeta. Kept thedevDependenciesentry, so build-time types are unchanged —peerDependenciesdoesn't participate in TypeScript resolution.No tests: package metadata, no runtime or type surface. Verified the driver still resolves and typechecks in an Expo app with the entry removed.
Related: #6115, #6116, pnpm/pnpm#10046.
cc @AndriiSherman @AlexBlokh @dankochetov @Sukairo-02 @candrewlee14