Skip to content

Move internal domain packages to pkg/ for public import - #36

Merged
polymorcodeus merged 1 commit into
mainfrom
move-internals
Sep 25, 2026
Merged

polymorcodeus merged 1 commit into
mainfrom
move-internals

Conversation

@polymorcodeus

Copy link
Copy Markdown
Owner

Summary

Adds the public pkg/ tree by moving internal/book, internal/catalog, and internal/web to pkg/book,
pkg/catalog, and pkg/web, with repo-wide import rewrites. Phase 1 of the importable-library workstream, following
the in-place decouple and ahead of the public API polish.

What's new

  • Public packages - pkg/book (domain types and pure logic), pkg/catalog (TOML storage, schema migration,
    SQLite index), and pkg/web (title fetch, URL open) are importable by external modules.
  • Pure movement - 17 git mv renames plus 44 one-line import swaps across 18 files; zero logic edits.
  • Import boundary - no pkg/ package imports bubbletea, huh, lipgloss, urfave, or internal/*.

Behavior changes / guardrails

  • CLI behavior is unchanged; every changed Go line is an import path, so the diff reviews as pure movement.
  • internal/theme and internal/model stay internal; cmd keeps owning flag layering, spinners, and styled errors.
  • The pkg/ API follows module semver but may break on minor releases until the tool cuts v2.0.0.

Testing

  • go list -deps ./pkg/... is free of TUI and CLI framework imports.
  • Smoke matrix against a temp config: shelf/collection/mark add, list, get, search, index rebuild, catalog config,
    trash, restore, doctor, gc.
  • make check runs fmt, vet, lint, and tests; all green.

@polymorcodeus polymorcodeus self-assigned this Sep 25, 2026
@polymorcodeus
polymorcodeus merged commit 0918672 into main Sep 25, 2026
3 checks passed
@polymorcodeus
polymorcodeus deleted the move-internals branch September 25, 2026 04:11
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