Skip to content

chore: fix package exports, hoist types, remove stale lockfiles#3011

Merged
jamiepine merged 1 commit intospacedriveapp:mainfrom
StarbirdTech:chore/package-cleanup
Feb 6, 2026
Merged

chore: fix package exports, hoist types, remove stale lockfiles#3011
jamiepine merged 1 commit intospacedriveapp:mainfrom
StarbirdTech:chore/package-cleanup

Conversation

@StarbirdTech
Copy link
Copy Markdown
Contributor

Fixes package.json exports for monorepo consumers, hoists shared type dependencies to the root, and removes stale lockfiles. Extracted from #2988 to keep the Android PR focused on platform-specific changes.

While getting the mobile app to consume workspace packages I ran into type resolution failures and duplicate dependency issues. These are all general monorepo hygiene fixes that apply regardless of Android support.

Changes

  • Hoisted @types/react and @types/react-dom to root devDependencies + overrides to enforce a single version across the monorepo, removed redundant copy from apps/mobile
  • Added proper exports map to @sd/assets so subpath imports (@sd/assets/icons/*, etc.) resolve correctly
  • Added types.d.ts to @sd/assets with module declarations for image, SVG, video, sound, and lottie imports (React Native compatible)
  • Added granular export entries to @sd/ts-client for useClient, useNormalizedQuery, and src/generated/types
  • Moved react and @tanstack/react-query from @sd/ts-client direct dependencies to peer dependencies — they were already declared as peers but also duplicated in dependencies, causing resolution conflicts
  • Deleted stale lockfiles: packages/interface/pnpm-lock.yaml, packages/ts-client/package-lock.json, apps/mobile/modules/sd-mobile-core/package-lock.json — the monorepo uses a single root lockfile (bun.lockb)
  • Fixed i64/u64 type annotation mismatch in core/src/location/manager.rs that broke cargo check

Verification

  • cargo check — passes
  • cargo build — full build completes clean
  • bun install — 1755 packages installed, no errors
  • bun run --filter @sd/tauri typecheck and bun run --filter @sd/web build both fail identically on main (pre-existing Radix UI type compat and missing @sd/interface/platform export) — no regressions introduced by this PR

Clean up package.json files: hoist @types/react to root devDependencies
with overrides, add proper exports and type declarations to @sd/assets,
improve @sd/ts-client exports and move react/@tanstack/react-query to
peer dependencies. Fix i64/u64 type mismatch in location manager.

Delete stale lockfiles from packages/interface, packages/ts-client, and
apps/mobile/modules/sd-mobile-core that shouldn't exist in a monorepo
managed by the root lockfile.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@jamiepine jamiepine merged commit 2a2901e into spacedriveapp:main Feb 6, 2026
Comment thread packages/assets/types.d.ts
Comment thread packages/ts-client/package.json
StarbirdTech added a commit to StarbirdTech/spacedrive that referenced this pull request Feb 6, 2026
Add a mobile-dev Cargo profile for faster mobile development builds
(parallel codegen, no LTO, opt-level 2) — available opt-in via
`cargo build --profile mobile-dev`. Production builds use --release.

Fix NDK host_tag to always use darwin-x86_64 on macOS since Google
ships universal binaries under that path. Make aws-lc-sys cache
cleaning opt-in via CLEAN_AWS_LC=1 to enable incremental iOS builds.

Scope Metro file watcher to src/ and packages/ instead of the entire
monorepo (avoids watching 4.5GB+ Rust target/ dirs) and fix React
resolution to use workspace root where bun hoists packages.

Apply tembo review feedback from spacedriveapp#3011: fix SVG type declarations to
avoid DOM dependency, add sound asset type flexibility, and add public
subpath exports to ts-client.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
StarbirdTech added a commit to StarbirdTech/spacedrive that referenced this pull request Feb 6, 2026
Add a mobile-dev Cargo profile for faster mobile development builds
(parallel codegen, no LTO, opt-level 2) — available opt-in via
`cargo build --profile mobile-dev`. Production builds use --release.

Fix NDK host_tag to always use darwin-x86_64 on macOS since Google
ships universal binaries under that path. Make aws-lc-sys cache
cleaning opt-in via CLEAN_AWS_LC=1 to enable incremental iOS builds.

Scope Metro file watcher to src/ and packages/ instead of the entire
monorepo (avoids watching 4.5GB+ Rust target/ dirs) and fix React
resolution to use workspace root where bun hoists packages.

Apply tembo review feedback from spacedriveapp#3011: fix SVG type declarations to
avoid DOM dependency, add sound asset type flexibility, and add public
subpath exports to ts-client.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@StarbirdTech StarbirdTech deleted the chore/package-cleanup branch February 7, 2026 18:08
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.

2 participants