Convert to Monorepo for Multi-Language Support #2

Open
opened 2026-01-21 10:38:06 -08:00 by naomi · 0 comments
Owner

Summary

Convert this repository from a single TypeScript/Node.js package into a monorepo structure that supports multiple language implementations of the logger.

Motivation

Having a consistent logger across different language ecosystems (Node.js, Python, and potentially others) would allow NHCarrigan projects to maintain the same logging patterns regardless of the language used.

Proposed Structure

logger/
├── packages/
│   ├── node/                    # Current TypeScript implementation
│   │   ├── src/
│   │   │   ├── index.ts
│   │   │   └── types/
│   │   ├── package.json         # @nhcarrigan/logger
│   │   ├── tsconfig.json
│   │   └── eslint.config.js
│   │
│   └── python/                  # New Python implementation
│       ├── nhcarrigan_logger/
│       │   ├── __init__.py
│       │   └── logger.py
│       ├── pyproject.toml       # nhcarrigan-logger
│       └── tests/
│
├── .gitea/                      # Shared CI workflows
├── README.md                    # Root documentation
├── CODE_OF_CONDUCT.md
├── CONTRIBUTING.md
├── LICENSE.md
├── PRIVACY.md
├── SECURITY.md
└── TERMS.md

Tasks

Phase 1: Restructure

  • Move current Node.js implementation to packages/node/
  • Update root README to document the monorepo structure
  • Update CI workflows to handle multiple packages

Phase 2: Python Package

  • Create Python implementation in packages/python/
  • Use uv for virtual environment management
  • Use Ruff for linting and formatting
  • Publish to PyPI as nhcarrigan-logger
  • Add CI workflow for Python package

Phase 3: Documentation

  • Add usage examples for both languages
  • Document the API parity between implementations

Package Names

Language Package Name Registry
Node.js @nhcarrigan/logger npm
Python nhcarrigan-logger PyPI

Notes

  • Each package should have feature parity where possible
  • Python package should follow the same log levels and output format
  • CI should run independently for each package (only test what changed)

This issue was created with help from Hikari~ 🌸

## Summary Convert this repository from a single TypeScript/Node.js package into a monorepo structure that supports multiple language implementations of the logger. ## Motivation Having a consistent logger across different language ecosystems (Node.js, Python, and potentially others) would allow NHCarrigan projects to maintain the same logging patterns regardless of the language used. ## Proposed Structure ``` logger/ ├── packages/ │ ├── node/ # Current TypeScript implementation │ │ ├── src/ │ │ │ ├── index.ts │ │ │ └── types/ │ │ ├── package.json # @nhcarrigan/logger │ │ ├── tsconfig.json │ │ └── eslint.config.js │ │ │ └── python/ # New Python implementation │ ├── nhcarrigan_logger/ │ │ ├── __init__.py │ │ └── logger.py │ ├── pyproject.toml # nhcarrigan-logger │ └── tests/ │ ├── .gitea/ # Shared CI workflows ├── README.md # Root documentation ├── CODE_OF_CONDUCT.md ├── CONTRIBUTING.md ├── LICENSE.md ├── PRIVACY.md ├── SECURITY.md └── TERMS.md ``` ## Tasks ### Phase 1: Restructure - [ ] Move current Node.js implementation to `packages/node/` - [ ] Update root README to document the monorepo structure - [ ] Update CI workflows to handle multiple packages ### Phase 2: Python Package - [ ] Create Python implementation in `packages/python/` - [ ] Use `uv` for virtual environment management - [ ] Use `Ruff` for linting and formatting - [ ] Publish to PyPI as `nhcarrigan-logger` - [ ] Add CI workflow for Python package ### Phase 3: Documentation - [ ] Add usage examples for both languages - [ ] Document the API parity between implementations ## Package Names | Language | Package Name | Registry | |----------|--------------|----------| | Node.js | `@nhcarrigan/logger` | npm | | Python | `nhcarrigan-logger` | PyPI | ## Notes - Each package should have feature parity where possible - Python package should follow the same log levels and output format - CI should run independently for each package (only test what changed) --- ✨ This issue was created with help from Hikari~ 🌸
Sign in to join this conversation.
No Label
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: nhcarrigan/logger#2