# Changelog

All notable changes to this project will be documented in this file.

The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [1.0.2] - 2025-07-20

### Fixed

- Fixed critical export issue in `mounter.js`
- Fixed route validation to check for `route` property instead of incorrect `router` property
- Fixed path validation logic - paths now correctly allow routes starting with `/`
- Fixed options parameter handling to be truly optional with proper defaults
- Fixed duplicate detection timing - now runs after route normalization
- Fixed ES module imports and exports throughout the project
- Updated TypeScript definitions to match actual implementation

### Changed

- Converted entire project to use ES modules consistently
- Updated `index.js` to use proper ES module syntax with named and default exports
- Enhanced TypeScript definitions with complete interfaces for all return types
- Updated test files to match new functionality and exports
- Improved example files with better error handling and clearer usage patterns
- Updated README.md with accurate API documentation and examples

### Added

- Complete TypeScript interface definitions for all return types
- Better error handling in example files
- Comprehensive API documentation in README

## [1.0.1] - 2025-07-20

### Fixed

- Changed the package name from `express-route-composer` to `express-route-mounter` for clarity and consistency.
- Corrected documentation to reflect accurate function names and error types.
- Updated test cases to ensure compatibility with the latest changes.

### Changed

- Updated the README to remove outdated sections and clarify usage examples.
- Improved the `mountRoutes` function documentation to include detailed examples and options.
- Enhanced the test suite to cover the new package name and functionality.
- Refactored the test script to ensure it works correctly with CommonJS and ES module imports.

## [1.0.0] - 2025-07-19

### Added

- **Core Functionality**

- Route handling with validation and duplicate detection
- Custom error handling with specific error types (`MounterError`)
- Flexible logging system with custom logger support
- Path sanitization utilities (`sanitizePath`)
- Comprehensive test suite with Jest

- **TypeScript Support**

- Full TypeScript type definitions (`.d.ts` files)
- Complete type safety and IntelliSense support
- Proper ES module exports with TypeScript compatibility
- JSDoc comments for JavaScript users

- **Developer Experience**

- ES module support with modern `package.json` configuration
- Comprehensive documentation with usage examples
- ESLint configuration for code quality
- Prettier configuration for consistent formatting
- Husky git hooks for pre-commit quality checks

- **Testing & Quality**

- Jest testing framework with CommonJS compatibility
- Integration tests covering all main functionality
- ESLint rules for code quality and consistency
- Prettier for automated code formatting
- TypeScript type checking
