Skip to content

chore(deps): remove unused libsodium-wrappers dep, keep -sumo variant - #251

Merged
h4yfans merged 1 commit into
mainfrom
debt/phase-6-u2-libsodium-dedup
Apr 16, 2026
Merged

chore(deps): remove unused libsodium-wrappers dep, keep -sumo variant#251
h4yfans merged 1 commit into
mainfrom
debt/phase-6-u2-libsodium-dedup

Conversation

@h4yfans

@h4yfans h4yfans commented Apr 16, 2026

Copy link
Copy Markdown
Collaborator

Part of Phase 6 Tech Debt Remediation — see .claude/plans/tech-debt-remediation.md § 6.2.

Summary

Removes the unused libsodium-wrappers: ^0.8.0 dep from apps/desktop/package.json. All 43 crypto + sync source sites use libsodium-wrappers-sumo: ^0.8.2 (a strict superset); the plain wrapper was dead code.

Verification before removal

  • grep "from 'libsodium-wrappers'" apps/desktop/src/0 matches
  • grep "from 'libsodium-wrappers'" . (whole repo) → 0 matches
  • No @types/libsodium-wrappers (plain) declared — only @types/libsodium-wrappers-sumo, which stays.

Why

Two copies of the same crypto library in a desktop app:

  • doubles the surface area external security audit has to trace
  • doubles bundle cost for zero benefit (-sumo is a strict superset)
  • invites future drift (one version floats ahead of the other)

Delta

  • apps/desktop/package.json: 1 line removed
  • pnpm-lock.yaml: 15 lines removed (the full libsodium-wrappers@0.8.0 package entry)

Test plan

  • CI: pnpm install --frozen-lockfile green
  • CI: pnpm typecheck green (crypto path untouched — only -sumo used)
  • CI: pnpm test green (crypto tests in particular)

libsodium-wrappers (^0.8.0) was declared in apps/desktop/package.json
but imported zero times across the entire workspace. All 43 crypto +
sync call sites use libsodium-wrappers-sumo (^0.8.2), a strict
superset.

Shipping two copies of the same crypto primitive library increases
bundle size and creates ambiguity in security review. This PR drops
the unused plain-wrapper dep.

Verification before removal:
- grep 'from .libsodium-wrappers.' apps/desktop/src/ → 0
- grep 'from .libsodium-wrappers.' memry/ (whole repo) → 0
- No @types/libsodium-wrappers (plain) to remove; only
  @types/libsodium-wrappers-sumo is declared.

Delta:
- apps/desktop/package.json: 1 line removed
- pnpm-lock.yaml: 15 lines removed (package entry + refs)

No code changes. No behavior change.

Plan: .claude/plans/tech-debt-remediation.md § 6.2
@h4yfans
h4yfans merged commit 6183f3d into main Apr 16, 2026
4 checks passed
@h4yfans
h4yfans deleted the debt/phase-6-u2-libsodium-dedup branch April 16, 2026 22:22
h4yfans added a commit that referenced this pull request May 6, 2026
…#251)

libsodium-wrappers (^0.8.0) was declared in apps/desktop/package.json
but imported zero times across the entire workspace. All 43 crypto +
sync call sites use libsodium-wrappers-sumo (^0.8.2), a strict
superset.

Shipping two copies of the same crypto primitive library increases
bundle size and creates ambiguity in security review. This PR drops
the unused plain-wrapper dep.

Verification before removal:
- grep 'from .libsodium-wrappers.' apps/desktop/src/ → 0
- grep 'from .libsodium-wrappers.' memry/ (whole repo) → 0
- No @types/libsodium-wrappers (plain) to remove; only
  @types/libsodium-wrappers-sumo is declared.

Delta:
- apps/desktop/package.json: 1 line removed
- pnpm-lock.yaml: 15 lines removed (package entry + refs)

No code changes. No behavior change.

Plan: .claude/plans/tech-debt-remediation.md § 6.2
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