Skip to content

Release Notes - v2.2.0

Choose a tag to compare

@hideokamoto hideokamoto released this 25 Aug 14:18
· 25 commits to main since this release

πŸ”§ Fallback Handler Improvements

This release focuses on improving the fallback handler functionality and error message formatting for better debugging experience.

πŸ”„ Migration Guide

From v2.1.x

No breaking changes! This release is fully backward compatible. You can continue using your existing code without modifications.

What's Different

  • Error messages for unsupported object types will now show detailed object information
  • Fallback handler integration is more robust

πŸš€ Getting Started

Installation

npm install class-resolver@2.2.0

Basic Usage (Unchanged)

import Resolver from 'class-resolver';

const resolver = new Resolver<string, string>();
resolver.addUpdater({
  supports: (type: string) => type === 'test',
  handle: (input: string) => `Processed: ${input}`
});

// Set fallback handler
resolver.setFallbackHandler((type: string) => `Fallback: ${type}`);

// Enhanced error handling for unsupported types
try {
  const result = resolver.resolve('unsupported');
} catch (error) {
  // Now provides more detailed error information for objects
  console.log(error.message);
}

Thank you for using class-resolver! πŸŽ‰

If you find this release helpful, please consider giving us a ⭐ on GitHub.