fix: move ep_ai_core from peerDependencies to dependencies#34
Conversation
ep_ai_core is a hard runtime dependency (required at startup via
require('ep_ai_core/index')). As a peerDependency it was not auto-
installed, causing a MODULE_NOT_FOUND crash when users ran:
pnpm run plugins i ep_ai_chat
Users had to manually install ep_ai_core separately with no
indication. Moving it to dependencies ensures it is installed
automatically.
Qodo reviews are paused for this user.Troubleshooting steps vary by plan Learn more → On a Teams plan? Using GitHub Enterprise Server, GitLab Self-Managed, or Bitbucket Data Center? |
Review Summary by QodoMove ep_ai_core to dependencies for automatic installation
WalkthroughsDescription• Move ep_ai_core from peerDependencies to dependencies • Fixes MODULE_NOT_FOUND crash on plugin installation • Ensures automatic installation of required runtime dependency • Resolves issue where users had to manually install ep_ai_core Diagramflowchart LR
A["peerDependencies<br/>ep_ai_core"] -->|"move to"| B["dependencies<br/>ep_ai_core"]
B -->|"ensures"| C["Auto-installed<br/>on plugin install"]
C -->|"prevents"| D["MODULE_NOT_FOUND<br/>crash"]
File Changes1. package.json
|
Code Review by Qodo
Context used✅ Tickets:
🎫 Not working properly? 1. Overbroad version range
|
| "dependencies": { | ||
| "ep_ai_core": ">=0.0.1" | ||
| }, |
There was a problem hiding this comment.
1. Overbroad version range 🐞 Bug ☼ Reliability
package.json sets ep_ai_core to ">=0.0.1", which allows any future major version and can introduce breaking API changes that crash the plugin at startup when it requires ep_ai_core/index. Because the require happens at module load time, incompatibility will surface as an immediate startup failure rather than a recoverable runtime error.
Agent Prompt
## Issue description
`ep_ai_core` is declared as a runtime dependency but the range is `>=0.0.1`, which can resolve to any future version (including major) and break `require('ep_ai_core/index')` at startup.
## Issue Context
`ep_ai_core` is required during module initialization in multiple files, so incompatibility is a hard failure.
## Fix Focus Areas
- package.json[20-25]
## Suggested change
Change the version specifier to a bounded compatible range (pick one based on your compatibility policy):
- Prefer `^0.0.1` (or another known-good minimum) if you follow semver compatibility.
- Or pin an exact version if the API is unstable.
- Or use `<1.0.0` upper bound if you want to accept all 0.x but not 1.x+ (example: `">=0.0.1 <1"`).
ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools
Drop the manual ep_ai_core pre-install from both backend-tests and frontend-tests so CI walks the same path a user does (`pnpm run plugins i ep_ai_chat`). ep_ai_core now resolves via "dependencies"; a regression back to peerDependencies fails the frontend job, which runs on same-repo PRs. README install command simplified accordingly. Follow-up to #34 (closed #33).
|
🎉 This PR is included in version 1.2.2 🎉 The release is available on: Your semantic-release bot 📦🚀 |
ep_ai_core is a hard runtime dependency (required at startup via require('ep_ai_core/index')). As a peerDependency it was not auto-installed, causing a MODULE_NOT_FOUND crash when users ran
pnpm run plugins i ep_ai_chat.Users had to manually install ep_ai_core separately with no indication of the issue. Moving it to dependencies ensures it is installed automatically.
This was reported in #33 where a user couldn't get the plugin working after installation.