Skip to content

feat(platform): Add Windows support for session storage paths #6

Description

@sunilp

Summary

Ensure session/history storage paths work correctly on Windows.

Current State

src/storage/history.ts handles macOS (~/Library/Application Support/jam/) and Linux (~/.local/share/jam/) with a Windows fallback to %APPDATA%/jam/, but this path handling needs testing and may need adjustments.

Tasks

  • Verify getSessionDir() works correctly on Windows
  • Ensure path separators are handled correctly (path.join should handle this)
  • Test that ensureDir() creates directories correctly on Windows
  • Add unit tests with mocked process.platform values
  • Test with actual Windows environment if possible
  • Update README if any Windows-specific notes are needed

Files

  • src/storage/history.tsgetSessionDir() function
  • src/storage/history.test.ts — add platform-specific tests

Acceptance Criteria

  • Session storage works on Windows
  • Tests cover all three platforms (macOS, Linux, Windows)
  • No regressions on macOS/Linux

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions