Commit Graph

7 Commits

Author SHA1 Message Date
Chris Daßler
a7bb65de4f Fix TypeScript type declarations and bump version to 1.0.1-beta.4
- Remove nested declare module wrapper from logger.d.ts to fix double-nesting issue
- Add types field to package.json
- Update version to 1.0.1-beta.4
- Update IOR identifier to com.metatrom.universal-components.logger@1.0.1-beta.4

This fixes TypeScript import errors where the Rollup IOR plugin was wrapping
already-wrapped types, causing a nested module structure that prevented proper imports.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
v1.0.1-beta.4
2025-10-30 21:31:32 +01:00
Chris Daßler
f5b9bc7b69 Fix getLogger() singleton bug causing all loggers to share the same context
The getLogger() function was using a single defaultLogger variable that
would only be initialized once with the first context. All subsequent
calls with different contexts would return the same logger instance,
causing all logs to show the same context prefix.

Changed to use a Map-based cache that stores separate logger instances
per context, ensuring each context gets its own logger with the correct
context name.

Bump version to 1.0.1-beta.3

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
v1.0.1-beta.3
2025-10-12 23:51:24 +02:00
Chris Daßler
8e3a6f0ccd Fix package.json entry point to use index.ts
- Changed main field from "logger.ts" to "index.ts"
- Bumped version to 1.0.1-beta.2
- Updated IOR identifier to match new version

This fixes the LogLevel export issue where importing from the
resolved module couldn't access LogLevel because the entry point
was bypassing the proper index.ts re-exports.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
v1.0.1-beta.2
2025-10-12 23:26:09 +02:00
Chris Daßler
7f874b4756 fix: add defensive checks for undefined args parameter
- Add check for args being undefined or not an array in formatMessage
- Add default empty array parameter to log method
- Prevents 'Cannot read property length of undefined' error
- Fixes issue when logger is called from async callbacks in React Native
v1.0.1-beta.1
2025-10-05 06:38:05 +02:00
Chris Daßler
0384b45e64 Add nodejs template to .gitignore 1.0.0 2025-08-29 14:25:11 +02:00
Chris Daßler
b608f18eba Update namespace 2025-08-28 17:06:50 +02:00
Chris Daßler
14b537fd95 Initial commit 2025-08-28 17:05:01 +02:00