This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.
This is a TypeScript monorepo for AlienFast logger packages, managed with Lerna and built with tsdown. The project provides logging functionality across three main packages:
@alienfast/logger- Core logging interfaces and functionality@alienfast/logger-browser- Browser-specific logging implementation@alienfast/logger-node- Node.js-specific logging implementation with colored output
yarn build- Build all packages (clean → prep → individual builds)yarn check-types- TypeScript type-checking only (tsc -p tsconfig.json --pretty)yarn test- Run all tests across packages (type-checks first, then runs tests in parallel)yarn lint-fix- Run Biome with auto-fix for code formatting and linting
yarn check- Run all quality checks (types, Biome, circular dependencies, markdown)yarn check-types- TypeScript type-checking without emitting filesyarn check-biome- Run Biome checks with auto-fixingyarn check-circular- Detect circular dependencies using madgeyarn check-markdown- Lint markdown files with markdownlint
yarn clean- Clean build artifacts across all packagesyarn reset- Complete reset (clean + yarn cache clear)
All packages support these commands (run from package directory or with lerna exec):
yarn build- Build individual package using shared tsdown configyarn test- Run package-specific tests with Vitest
- Workspace Root: Contains shared configuration and build tools
- packages/logger: Core logging abstractions (
Logger,Log,LogWriter, etc.)- Includes
diagnostics.tsmodule for circular dependency diagnostic utilities
- Includes
- packages/logger-browser: Browser-specific implementations (
BrowserLogWriter) - packages/logger-node: Node.js implementations with colored console output (
NodeLogWriter)
- tsdown for library builds with TypeScript declaration generation
- Shared configuration in
tsdown.config.base.tsused by all packages - ESM-only unbundled output format with automatic exports generation
- Type preservation with source maps for debugging
- Vite still used for testing via Vitest
- Each package has
tsconfig.build.jsonfor build-specific configuration - Root
tsconfig.jsonhasnoEmit: truefor type-checking only
- Core package has minimal dependencies (
@types/nodeonly) - Browser package has peer dependency on core logger
- Node package adds
chalkfor colored output - All packages use
clean-packagefor publishing optimizations
- Biome for code formatting and linting (replaces ESLint/Prettier)
- markdownlint for markdown file linting
- madge for circular dependency detection
- TypeScript strict mode with comprehensive type-checking
- Vitest for unit testing across all packages
- Tests run in parallel after TypeScript type-checking
- Individual package testing supported
- Auto for automated releases with conventional commits
- Lerna for coordinated package versioning
- GitHub Packages registry for publishing
- Pre-commit hooks with lint-staged running Biome checks
- Make changes in relevant package(s) under
packages/ - Run
yarn check-typesfor quick type checking - Run
yarn testto ensure all tests pass (includes type-checking) - Use
yarn lint-fixto format code with Biome - Run
yarn checkto verify all quality checks pass - Commit follows conventional commit format for auto-releases