Skip to content

feat: Establish I-prefixed types as recommended pattern#26

Merged
JoshuaWink merged 14 commits intomainfrom
fix-ts-detection
Sep 11, 2025
Merged

feat: Establish I-prefixed types as recommended pattern#26
JoshuaWink merged 14 commits intomainfrom
fix-ts-detection

Conversation

@JoshuaWink
Copy link
Contributor

This PR establishes I-prefixed types as the recommended pattern for CodeUChain TypeScript integration while maintaining full backward compatibility.

Changes Made

✅ Type System Migration

  • Added @deprecated notices to original , , , classes
  • Introduced I-prefixed type aliases (, , etc.) as the preferred pattern
  • Updated utilities export to use I-prefixed middleware types

✅ Testing & Configuration

  • Added comprehensive TypeScript integration tests (440+ lines)
  • Created proper with strict TypeScript configuration
  • Updated Jest configuration for TypeScript support

✅ Backward Compatibility

  • No breaking changes - all existing code continues to work
  • Runtime behavior remains identical
  • Deprecation warnings guide developers toward new pattern

Migration Strategy

This is a non-breaking change that:

  • Guides developers toward I-prefixed types via deprecation warnings
  • Maintains 100% backward compatibility
  • Sets up future-proofing for potential removal in major versions
  • Provides comprehensive test coverage for the new type system

Testing

  • ✅ TypeScript compilation passes
  • ✅ All existing tests pass (128/128)
  • ✅ New TypeScript integration tests validate type safety
  • ✅ Runtime compatibility confirmed

Closes #TBD

- Add 404.html router that handles clean URLs without index.html
- Update navigation links to use clean URLs (e.g., /docs/go instead of /docs/go/index.html)
- Support all language routes with aliases (c#, c++, js, etc.)
- Handle section anchors and sub-routes
- Preserve query parameters and hash fragments
- Add comprehensive router test suite
- Update main index.html and go/index.html with clean URLs
- Fix async/await handling in build.js for proper template processing
- Update json-reader.js to async RuntimeJSONReader with caching
- Add 'is_homepage': false to all language data files for proper conditional logic
- Fix language-navigation.html template variables (relative paths, highlighting, conditionals)
- Ensure all template variables are properly replaced in generated HTML pages
- Verify build process works correctly for all 11 pages (main + 10 languages)
- Remove all 'index.html' references from footer and navigation links
- Update footer.html with conditional logic for clean directory paths
- Update language-navigation.html with proper URL conditionals
- Generate all HTML pages with clean URLs (pseudo/, python/, etc.)
- All navigation links now use directory paths without index.html suffix
- Maintains proper routing for both homepage and language-specific pages
… better key-value structure

- Update Context<T> and MutableContext<T> default to Record<string, any>
- Add comprehensive JavaScript examples demonstrating pipeline patterns
- Include TypeScript example for type evolution
- Maintains runtime flexibility while providing better type structure
- Add packages/javascript/core/index.d.ts for proper TypeScript support
- Enables TypeScript consumers to import types from core module
- Resolves TypeScript detection issues when importing from ../core
- Provides re-exports of all public types from parent types.d.ts
- Add @deprecated notices to original Context, Link, Chain, Middleware classes
- Introduce I-prefixed type aliases (IContext, ILink, etc.) as preferred pattern
- Update utilities export to use I-prefixed middleware types
- Add comprehensive TypeScript integration tests for type safety
- Create tsconfig.json with proper TypeScript configuration
- Maintain full backward compatibility - no breaking changes

This is a non-breaking change that guides developers toward the new
I-prefixed type pattern while preserving all existing functionality.
Future major versions may remove deprecated types.
@JoshuaWink JoshuaWink self-assigned this Sep 11, 2025
@JoshuaWink JoshuaWink merged commit 36dedb2 into main Sep 11, 2025
@JoshuaWink JoshuaWink deleted the fix-ts-detection branch September 11, 2025 15:43
JoshuaWink added a commit that referenced this pull request Jan 19, 2026
* codeuchain site + buf-json demo

* rm buf-json and sent to github,com/orchestrate-solutions/buf-json

* feat: Add clean URL router for docs site

- Add 404.html router that handles clean URLs without index.html
- Update navigation links to use clean URLs (e.g., /docs/go instead of /docs/go/index.html)
- Support all language routes with aliases (c#, c++, js, etc.)
- Handle section anchors and sub-routes
- Preserve query parameters and hash fragments
- Add comprehensive router test suite
- Update main index.html and go/index.html with clean URLs

* fix: Add missing json-reader.js and rebuild HTML pages

* Fix logo links for clean URL routing - update base.json to use '../' instead of '../index.html'

* fix: Resolve codeuchain.com routing build issues with template variables

- Fix async/await handling in build.js for proper template processing
- Update json-reader.js to async RuntimeJSONReader with caching
- Add 'is_homepage': false to all language data files for proper conditional logic
- Fix language-navigation.html template variables (relative paths, highlighting, conditionals)
- Ensure all template variables are properly replaced in generated HTML pages
- Verify build process works correctly for all 11 pages (main + 10 languages)

* feat: Implement clean URL routing for docs site

- Remove all 'index.html' references from footer and navigation links
- Update footer.html with conditional logic for clean directory paths
- Update language-navigation.html with proper URL conditionals
- Generate all HTML pages with clean URLs (pseudo/, python/, etc.)
- All navigation links now use directory paths without index.html suffix
- Maintains proper routing for both homepage and language-specific pages

* codeuchain story

* reworked homepage codeuchain.com

* Fix Context types: change default from any to Record<string, any> for better key-value structure

- Update Context<T> and MutableContext<T> default to Record<string, any>
- Add comprehensive JavaScript examples demonstrating pipeline patterns
- Include TypeScript example for type evolution
- Maintains runtime flexibility while providing better type structure

* Fix TypeScript detection: Add core module type declarations

- Add packages/javascript/core/index.d.ts for proper TypeScript support
- Enables TypeScript consumers to import types from core module
- Resolves TypeScript detection issues when importing from ../core
- Provides re-exports of all public types from parent types.d.ts

* feat: establish I-prefixed types as recommended pattern

- Add @deprecated notices to original Context, Link, Chain, Middleware classes
- Introduce I-prefixed type aliases (IContext, ILink, etc.) as preferred pattern
- Update utilities export to use I-prefixed middleware types
- Add comprehensive TypeScript integration tests for type safety
- Create tsconfig.json with proper TypeScript configuration
- Maintain full backward compatibility - no breaking changes

This is a non-breaking change that guides developers toward the new
I-prefixed type pattern while preserving all existing functionality.
Future major versions may remove deprecated types.
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