-
Notifications
You must be signed in to change notification settings - Fork 5.3k
chore: v1.2.12 #5630
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
chore: v1.2.12 #5630
Conversation
Replace Node.js EventEmitter with Bun's native EventTarget implementation to align with the project's Bun-first approach and reduce Node.js dependencies. Changes: - Convert InternalMessageBus to use EventTarget with EventEmitter-like API - Update SimpleMigrationAgent to extend EventTarget instead of EventEmitter - Maintain backward compatibility with existing event handling interfaces - Add wrapper methods (on/off/emit) to preserve existing API contracts This migration supports the project's goal of eliminating Node.js-specific dependencies in favor of Bun's native APIs. 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <[email protected]>
Document that EventEmitter should never be used due to Bun compatibility issues. Add migration guidelines and examples for using Bun's native EventTarget API instead. This ensures future development maintains Bun compatibility and avoids Node.js-specific APIs that may cause issues. 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <[email protected]>
Implemented off, removeListener, removeAllListeners, listenerCount, and listeners methods in SimpleMigrationAgent for improved event handler management and EventEmitter compatibility. Also updated InternalMessageBus to prevent duplicate event handler registration.
Updated the emit methods in SimpleMigrationAgent and InternalMessageBus to return the result of dispatchEvent. This change improves consistency and allows callers to know if the event was canceled.
Updated event handler wrappers in SimpleMigrationAgent and InternalMessageBus to check if the event is a CustomEvent before accessing the detail property. This prevents potential runtime errors when non-CustomEvent objects are passed to the handler.
feat: migrate from EventEmitter to Bun native EventTarget API
Removed dependencies and lockfile entries for @elizaos/plugin-anthropic, @elizaos/plugin-discord, @elizaos/plugin-openai, and @elizaos/plugin-coinmarketcap, along with their related packages. This reduces the project footprint and eliminates unused or deprecated plugins.
- Replace 'any' with 'unknown' in simple-migration-agent.ts and bus.ts - Replace generic Function type with explicit function signatures - Fixes CodeFactor maintainability issues 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <[email protected]>
fix: replace 'any' types with 'unknown' and explicit function types
- SimpleMigrationAgent.on() now returns 'this' for method chaining - InternalMessageBus.on() now returns 'this' for method chaining - Maintains backward compatibility with EventEmitter-style chaining
fix: add method chaining support to EventTarget-based on() methods
…get implementations - Add unit tests for bus.ts EventEmitter compatibility in server package - Add unit tests for SimpleMigrationAgent EventEmitter compatibility in CLI package - Test all EventEmitter-like methods (emit, on, off, removeListener, etc.) - Verify proper memory management and handler cleanup - Test edge cases like duplicate handlers, undefined data, and error handling - Add documentation explaining the compatibility pattern and test coverage These tests ensure that EventTarget-based implementations maintain backward compatibility with existing code expecting EventEmitter APIs while following ElizaOS guidelines. 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <[email protected]>
Introduces a removeAllListeners method to InternalMessageBus for removing all or specific event listeners, improving test isolation and API compatibility. Updates tests to use this method and enhances error handling verification for event listeners that throw exceptions.
test: add EventEmitter compatibility tests for EventTarget implementations
Refactors test files for EventEmitter compatibility to use consistent code formatting, including multi-line arrow functions and improved spacing. Updates the EventEmitter-Compatibility-README.md for clarity and formatting. No functional changes to test logic.
- Add null safety check in InternalMessageBus off() method - Add documentation explaining why classes are used (EventTarget requirement) - Document intentional EventEmitter behavior deviation (duplicate prevention) - Improve type safety with optional chaining in cleanup logic
fix: address EventTarget migration PR review issues
Standardized whitespace in doc comments for consistency in simple-migration-agent.ts and bus.ts. No functional changes were made.
Updated all internal @elizaos/* dependencies in package.json files to use the "workspace:*" protocol for better monorepo management and consistency. Also added 'bun' as a dependency in plugin-bootstrap. This change helps ensure local packages are always resolved from the workspace.
- Remove KNAP_WORKFLOW_FIX_SUMMARY.md as the Knip workflow has been fixed - Remove docs/code-quality-analysis.md as it's no longer relevant
…250717-215958 chore: remove obsolete documentation files
Co-authored-by: sayonara <[email protected]>
Added ELIZA_SKIP_LOCAL_CLI_DELEGATION env var to test/CI detection in local-cli-delegation. Enhanced local-cli-delegation and server-manager unit tests to cover more scenarios, including update command detection, local CLI usage, argument passing, process event handling, and error cases. Updated log messages for clarity.
…thub.com/elizaOS/eliza into feature/improve-server-module-resolution
Replaces Node.js ChildProcess with Bun's Subprocess for server management in dev commands. Refactors the server manager to a functional pattern, updates the ServerProcess interface, and adds utility functions for process state and management. Improves environment setup and process lifecycle handling for Bun compatibility.
Converted deprecated sync functions in loader.ts to async, updating their signatures and internal module loading. Rewrote server-manager.test.ts to use a fully mocked, functional server manager interface, replacing child_process mocks with Bun.spawn mocks and improving test coverage for process lifecycle, environment setup, and utility functions.
Rewrites server-manager.test.ts to use custom in-memory mocks for process management, removing reliance on Bun.spawn and real process state. This improves test isolation, reliability, and clarity by simulating server lifecycle and behaviors directly. Also adds more comprehensive test coverage for edge cases and error handling.
Refactored local CLI delegation logic to add explicit environment variable checks, delegation depth tracking, and improved debug logging. Renamed process variable in server-manager.ts for clarity. Minor formatting updates in lerna.json.
Eliminates unnecessary debug logging and the ELIZA_DISABLE_LOCAL_CLI_DELEGATION environment variable check from local CLI delegation logic to simplify the code.
Co-authored-by: sayonara <[email protected]>
Co-authored-by: sayonara <[email protected]>
Co-authored-by: sayonara <[email protected]>
Updated test imports to use 'bun:test' instead of 'vitest' and improved formatting in test files for readability. Simplified logger.info statements in module-loader.ts for consistency. No functional changes to loader logic.
…esolution feat: enhance ModuleLoader with local-first guarantees for consistent module resolution
Important Review skippedAuto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the You can disable this status message by setting the ✨ Finishing Touches🧪 Generate unit tests
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
SupportNeed help? Create a ticket on our support page for assistance with any issues or questions. Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
Claude finished @wtfsayo's task —— View job PR Review - v1.2.12 Release📋 Review Status: COMPLETE Critical Issues ❌❌ CRITICAL: Wrong test framework usage → Fix: Replace vitest with bun:test
❌ CRITICAL: Mixed test frameworks → Fix: Remove jest imports, use bun:test only
❌ CRITICAL: Wrong process API usage → Fix: Use Bun.spawn() instead of Node.js spawn
❌ CRITICAL: Wrong process API usage → Fix: Use bun-exec utilities
Important Issues
|
…placement fix: (cli) prevent .elizadb inheritance in nested project creation
Claude finished @wtfsayo's task —— View job PR Review - v1.2.12 Release📋 Review Status:
🚨 CRITICAL ISSUES❌ CRITICAL: Wrong process spawning API → Fix: Replace
❌ CRITICAL: Jest usage in tests → Fix: Remove all jest imports and APIs, use bun test only
❌ CRITICAL: npm command in script → Fix: Replace
|
Cleaned up unnecessary trailing whitespace in the createTEEProject and createProject functions for better code style consistency.
Claude finished @wtfsayo's task —— View job PR Review - v1.2.12 Release📋 Review Status: COMPLETE Critical Issues ❌❌ CRITICAL: Wrong test framework usage → Fix: Replace vitest with bun:test
❌ CRITICAL: Mixed test frameworks → Fix: Remove jest imports, use bun:test only
❌ CRITICAL: Wrong process API usage → Fix: Use Bun.spawn() instead of Node.js spawn
❌ CRITICAL: Wrong process API usage → Fix: Use bun-exec utilities
Important Issues
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Bug: Monorepo Version Mismatch Causes Deployment Issues
Monorepo version inconsistency: The PR title states "v1.2.12", but lerna.json
is "1.2.11-beta.9", and individual packages have mixed versions (1.2.10 and 1.2.11-beta.9). This creates potential dependency resolution and deployment issues.
lerna.json#L1-L2
Lines 1 to 2 in 56f983f
{ | |
"version": "1.2.11-beta.9", |
packages/server/package.json#L2-L3
eliza/packages/server/package.json
Lines 2 to 3 in 56f983f
"name": "@elizaos/server", | |
"version": "1.2.11-beta.9", |
Was this report helpful? Give feedback by reacting with 👍 or 👎
No description provided.