Skip to content

fix: update import statement in elizaos.js to use package alias#6389

Merged
standujar merged 1 commit intodevelopfrom
fix/elizaos-wrapper-import
Jan 26, 2026
Merged

fix: update import statement in elizaos.js to use package alias#6389
standujar merged 1 commit intodevelopfrom
fix/elizaos-wrapper-import

Conversation

@standujar
Copy link
Copy Markdown
Collaborator

@standujar standujar commented Jan 25, 2026

Greptile Overview

Greptile Summary

Updated the import statement in elizaos.js to use the package alias (@elizaos/cli) instead of the direct path (@elizaos/cli/dist/index.js). This follows Node.js best practices by relying on the package's exports field defined in @elizaos/cli/package.json, which maps . to ./dist/index.js.

Changes:

  • Replaced direct dist path import with package alias for better maintainability
  • The change is functionally equivalent and resolves to the same file via package.json exports
  • Improves consistency with standard Node.js module resolution patterns

Confidence Score: 5/5

  • This PR is safe to merge with no risk
  • The change is a simple refactor from a direct path import to a package alias, which is functionally equivalent and follows Node.js best practices. The @elizaos/cli package correctly defines its exports in package.json, mapping the default export to dist/index.js. This is a clean improvement that enhances maintainability without changing behavior.
  • No files require special attention

Important Files Changed

Filename Overview
packages/elizaos/bin/elizaos.js Updated import to use package alias instead of direct dist path

Sequence Diagram

sequenceDiagram
    participant User
    participant elizaos as elizaos package
    participant cli as @elizaos/cli package
    participant index as dist/index.js
    
    User->>elizaos: Run `elizaos` command
    elizaos->>elizaos: Load bin/elizaos.js
    Note over elizaos: import '@elizaos/cli'
    elizaos->>cli: Resolve package alias
    cli->>cli: Check package.json exports
    Note over cli: "." → "./dist/index.js"
    cli->>index: Execute CLI entry point
    index->>User: Run CLI command
Loading

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai bot commented Jan 25, 2026

Important

Review skipped

Auto reviews are disabled on this repository.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

✨ Finishing touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch fix/elizaos-wrapper-import

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@claude
Copy link
Copy Markdown
Contributor

claude bot commented Jan 25, 2026

Claude encountered an error —— View job


I'll analyze this and get back to you.

Copy link
Copy Markdown
Contributor

@greptile-apps greptile-apps bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No files reviewed, no comments

Edit Code Review Agent Settings | Greptile

@claude
Copy link
Copy Markdown
Contributor

claude bot commented Jan 25, 2026

Claude encountered an error —— View job


I'll analyze this and get back to you.

@standujar
Copy link
Copy Markdown
Collaborator Author

I've updated the doc to ensure we use cli (as we always did): elizaOS/docs#83

@standujar standujar merged commit 29afbeb into develop Jan 26, 2026
15 of 17 checks passed
@standujar standujar deleted the fix/elizaos-wrapper-import branch January 26, 2026 11:53
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