Skip to content

Convert package manager from npm to pnpm #36

@phrazzld

Description

@phrazzld

Summary

Convert the project from npm to pnpm for improved performance, disk space efficiency, and dependency safety.

Benefits

  • Performance: 2-3x faster installs through content-addressable storage
  • Disk Space: Significant savings via shared dependency store across projects
  • Dependency Safety: Stricter resolution prevents phantom dependencies
  • Better Monorepo Support: Future-proofing for potential monorepo structure

Tasks

Core Package Management

  • Remove package-lock.json
  • Generate pnpm-lock.yaml via pnpm install
  • Update .gitignore for pnpm-specific files
  • Add pnpm installation instructions to README

Git Hooks Updates

  • Update .husky/pre-push (npm commands: lint, typecheck, build, build-storybook, test:coverage)
  • Update .husky/pre-commit (likely contains npm commands)
  • Update .husky/post-commit (may reference npm)
  • Update .husky/pre-push-security (npm audit commands)

Scripts & Tooling

  • Update scripts/audit-filter*.ts (contains npm audit references)
  • Update scripts/validate-structured-logging.sh (may contain npm commands)
  • Verify all build/deployment scripts work with pnpm
  • Test security audit filtering with pnpm audit

Testing & Validation

  • Full test suite passes with pnpm
  • All builds work (main app, Storybook)
  • Pre-commit/pre-push hooks work correctly
  • Security scanning still functions properly
  • Edge Runtime compatibility maintained

Documentation

  • Update CLAUDE.md with pnpm commands
  • Update any development setup documentation
  • Add team migration instructions

Acceptance Criteria

  • All npm references replaced with pnpm equivalents
  • Full CI/CD pipeline works with pnpm
  • Git hooks and security scripts function properly
  • Team can successfully develop using pnpm
  • Performance improvement is measurable

Notes

  • Estimated effort: 4-6 hours for careful, tested conversion
  • Should be done on a separate branch first for validation
  • Team will need to install pnpm (via npm install -g pnpm or corepack)
  • Drop-in replacement - same registry, similar commands

Related

  • Consider enabling corepack for automatic pnpm version management
  • May want to add .npmrc with pnpm-specific optimizations

Metadata

Metadata

Assignees

No one assigned

    Labels

    dependenciesPull requests that update a dependency fileenhancementNew feature or requestsize:MMedium: 3 points - Feature enhancements, refactoringtype:refactorCode refactoring and architecture improvements

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions