Skip to content

Drop expo-sqlite from peerDependencies - #6219

Open
hknakn wants to merge 1 commit into
drizzle-team:mainfrom
hknakn:drop-expo-sqlite-peer
Open

Drop expo-sqlite from peerDependencies#6219
hknakn wants to merge 1 commit into
drizzle-team:mainfrom
hknakn:drop-expo-sqlite-peer

Conversation

@hknakn

@hknakn hknakn commented Sep 1, 2026

Copy link
Copy Markdown

From #6115. Same shape as #6116, for the peer with the widest blast radius.

Why

expo-sqlite is 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 using drizzle-orm/expo-sqlite makes every other consumer resolve drizzle-orm(...)(expo-sqlite(expo)(react-native)). expo@expo/cli pulls the whole SDK toolchain in.

In our monorepo that put 76 Expo/RN packages into Node server images: node_modules 1.3 GB → 867 MB once the entry is dropped.

Unlike #6116 this peer is used — src/expo-sqlite/query.ts imports addDatabaseChangeListener at runtime. But anyone importing the subpath installs expo-sqlite themselves, 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-sqlite from peerDependencies and peerDependenciesMeta. Kept the devDependencies entry, so build-time types are unchanged — peerDependencies doesn'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

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
hknakn force-pushed the drop-expo-sqlite-peer branch from 2a496f7 to ba77b8e Compare September 1, 2026 15:48
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.

1 participant