-
Notifications
You must be signed in to change notification settings - Fork 0
task: add CHANGELOG, LLMS docs, and enhance type definitions #22
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
5 commits
Select commit
Hold shift + click to select a range
ed81cfb
Add CHANGELOG, LLMS documentation, and enhance type definitions
bombillazo d2fec21
Bump version to 0.6.1 in package.json
bombillazo 380fe0f
Update LLMS.md
bombillazo 42f7255
Update src/presets/index.ts
bombillazo 4044ed8
Update LLMS.md to use scoped package imports and enhance configuratio…
bombillazo File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,3 @@ | ||
|
|
||
| # Use bd merge for beads JSONL files | ||
| .beads/issues.jsonl merge=beads | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -2,4 +2,7 @@ node_modules | |
|
|
||
| .git | ||
| .claude | ||
| .beads | ||
| .ralph-tui | ||
| AGENTS.md | ||
| dist | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,223 @@ | ||
| # 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.1.0/), | ||
| and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). | ||
|
|
||
| ## [Unreleased] | ||
|
|
||
| ## [0.6.0] - 2026-01-20 | ||
|
|
||
| ### Added | ||
|
|
||
| - `ErrorXResolver` class for resolving ErrorX instances to enhanced presentation objects | ||
| - Type-safe error type determination via `onResolveType` callback | ||
| - i18n integration with custom resolver functions | ||
| - Documentation URL building with `docs.baseUrl` and `docsPath` options | ||
| - Custom config properties support for domain-specific needs | ||
| - Config hierarchy: defaults → type config → preset config | ||
| - Custom result type transformation via `onTransformResult` | ||
| - New type definitions in `types/resolver.types.ts` for resolver functionality | ||
|
|
||
| ### Changed | ||
|
|
||
| - Refactored UI message exports for better organization | ||
| - `httpErrorUiMessages` now keyed by status code | ||
| - `dbErrorUiMessages` keyed by preset name | ||
| - `validationErrorUiMessage` for default validation message | ||
| - Split type definitions into separate files for better maintainability: | ||
| - `types/core.types.ts` - Core type definitions | ||
| - `types/resolver.types.ts` - Resolver-specific types | ||
| - `types/serialization.types.ts` - Serialization types | ||
| - `types/transform.types.ts` - Transform types | ||
|
|
||
| ### Removed | ||
|
|
||
| - `uiMessage` property from ErrorX class (use `ErrorXResolver` instead) | ||
|
|
||
| ## [0.5.1] - 2026-01-19 | ||
|
|
||
| ### Changed | ||
|
|
||
| - Enhanced serialization and deserialization to preserve all properties in error chains | ||
| - Improved chain restoration from JSON with full property preservation | ||
| - Renamed `ErrorXCause` type to `ErrorXSnapshot` for clarity | ||
|
|
||
| ## [0.5.0] - 2026-01-19 | ||
|
|
||
| ### Added | ||
|
|
||
| - `DBErrorX` class with presets for common database errors: | ||
| - `CONNECTION_FAILED`, `QUERY_FAILED`, `UNIQUE_VIOLATION`, `FOREIGN_KEY_VIOLATION` | ||
| - `NOT_NULL_VIOLATION`, `CHECK_VIOLATION`, `TIMEOUT`, `DEADLOCK` | ||
| - `TRANSACTION_FAILED`, `SERIALIZATION_FAILURE` | ||
| - `ValidationErrorX` class with: | ||
| - `fromZodError()` static method for Zod integration | ||
| - `forField()` static method for field-specific validation errors | ||
| - Presets: `INVALID_FORMAT`, `REQUIRED_FIELD`, `OUT_OF_RANGE`, `INVALID_TYPE` | ||
|
|
||
| ### Changed | ||
|
|
||
| - Major internal refactoring for improved code organization | ||
| - Updated format script configuration | ||
|
|
||
| ## [0.4.6] - 2025-10-06 | ||
|
|
||
| ### Added | ||
|
|
||
| - Documentation section in README | ||
| - GitHub Pages configuration for API documentation | ||
|
|
||
| ### Changed | ||
|
|
||
| - Improved documentation generation scripts | ||
|
|
||
| ## [0.4.5] - 2025-10-06 | ||
|
|
||
| ### Changed | ||
|
|
||
| - Enhanced ErrorX metadata extraction from source errors | ||
| - Updated documentation with improved examples | ||
|
|
||
| ### Fixed | ||
|
|
||
| - Homepage URL in package.json to reflect correct repository | ||
|
|
||
| ## [0.4.4] - 2025-10-06 | ||
|
|
||
| ### Changed | ||
|
|
||
| - `timestamp` property now uses Unix epoch (milliseconds) instead of ISO string | ||
| - `withMetadata()` signature updated to support additional metadata type parameter | ||
| - Improved `toString()` output format for better readability | ||
|
|
||
| ## [0.4.3] - 2025-10-06 | ||
|
|
||
| ### Changed | ||
|
|
||
| - HTTP presets now indexed by status code (e.g., `HTTPErrorX.create(404)`) | ||
| - Improved consistency in preset usage patterns | ||
|
|
||
| ## [0.4.2] - 2025-10-06 | ||
|
|
||
| ### Added | ||
|
|
||
| - `cleanStackDelimiter` configuration option for trimming stack traces at a specific line | ||
|
|
||
| ### Changed | ||
|
|
||
| - Renamed stack cleaning configuration for clarity | ||
|
|
||
| ## [0.4.1] - 2025-10-05 | ||
|
|
||
| ### Changed | ||
|
|
||
| - Updated ErrorX cause type to `ErrorXCause` for improved type safety | ||
| - Refactored error handling to use `ErrorXCause` format for cause property | ||
|
|
||
| ## [0.4.0] - 2025-10-05 | ||
|
|
||
| ### Added | ||
|
|
||
| - `HTTPErrorX` class with presets for all standard HTTP status codes (400-511) | ||
| - Type-safe metadata support with generics | ||
| - `ErrorX.configure()` static method for global configuration | ||
| - `cleanStack` configuration option with customizable patterns | ||
| - Frozen HTTP presets for immutability | ||
|
|
||
| ### Changed | ||
|
|
||
| - `code` field in `ErrorXOptions` now accepts both string and number types | ||
| - Improved HTTP error preset messages for consistency | ||
|
|
||
| ### Fixed | ||
|
|
||
| - Message casing for HTTP error presets | ||
|
|
||
| ## [0.3.0] - 2025-09-30 | ||
|
|
||
| ### Added | ||
|
|
||
| - Preset support integrated directly into ErrorX class | ||
| - `ErrorX.create()` factory method for preset-based creation | ||
|
|
||
| ### Changed | ||
|
|
||
| - Refactored actions structure for consistency | ||
| - Removed separate presets module in favor of integrated approach | ||
|
|
||
| ## [0.2.2] - 2025-09-30 | ||
|
|
||
| ### Added | ||
|
|
||
| - Enhanced README with error presets documentation | ||
| - API documentation improvements with usage patterns | ||
|
|
||
| ## [0.2.1] - 2025-09-30 | ||
|
|
||
| ### Added | ||
|
|
||
| - `httpStatus` field for HTTP error status codes | ||
| - `type` field for error categorization | ||
| - Presets for common HTTP error configurations | ||
|
|
||
| ### Fixed | ||
|
|
||
| - Metadata access using optional chaining for safety | ||
| - Validation for `httpStatus` and `type` in constructor | ||
|
|
||
| ## [0.2.0] - 2025-09-29 | ||
|
|
||
| ### Added | ||
|
|
||
| - `ERROR_X_OPTION_FIELDS` constant for centralized validation | ||
| - Smart conversion in constructor (supports string messages directly) | ||
|
|
||
| ### Changed | ||
|
|
||
| - Enhanced `ErrorXOptions` type for improved flexibility and ergonomics | ||
| - Streamlined options conversion logic in constructor | ||
| - Updated documentation links to use scoped package name | ||
|
|
||
| ## [0.1.1] - 2025-08-18 | ||
|
|
||
|
bombillazo marked this conversation as resolved.
|
||
| ### Added | ||
|
|
||
| - Initial release of error-x | ||
| - `ErrorX` class extending native `Error` with: | ||
| - `code` property with automatic generation from name (UPPER_SNAKE_CASE) | ||
| - `message` for technical error descriptions | ||
| - `name` for error type identification | ||
| - `metadata` for additional context | ||
| - `timestamp` for error occurrence tracking | ||
| - `chain` property for full error sequence access | ||
| - `parent` and `root` properties for error chain navigation | ||
| - `original` property for non-ErrorX wrapped entities | ||
| - `ErrorX.from()` static method for converting any value to ErrorX | ||
| - `ErrorX.fromJSON()` for deserialization | ||
| - `ErrorX.isErrorX()` type guard | ||
| - `ErrorX.cleanStack()` for removing internal frames from stack traces | ||
| - `withMetadata()` instance method for creating errors with merged metadata | ||
| - `toJSON()` for serialization | ||
| - `toString()` for detailed string representation | ||
| - Safe JSON serialization handling circular references | ||
| - Comprehensive test suite | ||
| - Initial documentation | ||
|
|
||
| [Unreleased]: https://github.com/bombillazo/error-x/compare/v0.6.0...HEAD | ||
| [0.6.0]: https://github.com/bombillazo/error-x/compare/v0.5.1...v0.6.0 | ||
| [0.5.1]: https://github.com/bombillazo/error-x/compare/v0.5.0...v0.5.1 | ||
| [0.5.0]: https://github.com/bombillazo/error-x/compare/v0.4.6...v0.5.0 | ||
| [0.4.6]: https://github.com/bombillazo/error-x/compare/v0.4.5...v0.4.6 | ||
| [0.4.5]: https://github.com/bombillazo/error-x/compare/v0.4.4...v0.4.5 | ||
| [0.4.4]: https://github.com/bombillazo/error-x/compare/v0.4.3...v0.4.4 | ||
| [0.4.3]: https://github.com/bombillazo/error-x/compare/v0.4.2...v0.4.3 | ||
| [0.4.2]: https://github.com/bombillazo/error-x/compare/v0.4.1...v0.4.2 | ||
| [0.4.1]: https://github.com/bombillazo/error-x/compare/v0.4.0...v0.4.1 | ||
| [0.4.0]: https://github.com/bombillazo/error-x/compare/v0.3.0...v0.4.0 | ||
| [0.3.0]: https://github.com/bombillazo/error-x/compare/v0.2.2...v0.3.0 | ||
| [0.2.2]: https://github.com/bombillazo/error-x/compare/v0.2.1...v0.2.2 | ||
| [0.2.1]: https://github.com/bombillazo/error-x/compare/v0.2.0...v0.2.1 | ||
| [0.2.0]: https://github.com/bombillazo/error-x/compare/v0.1.1...v0.2.0 | ||
| [0.1.1]: https://github.com/bombillazo/error-x/releases/tag/v0.1.1 | ||
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.