fix: resolve Pro squad script dependencies - #666
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (4)
✅ Files skipped from review due to trivial changes (1)
🚧 Files skipped from review as they are similar to previous changes (3)
WalkthroughThis PR adds ensureProjectNodeModulesLink(), exposes it via package exports, uses it in Pro-scaffolder and the legacy installer to create a project root node_modules link to .aiox-core/node_modules when appropriate, and adds tests, docs, and a version/manifest bump. ChangesSquad Dependency Resolution Fix
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~25 minutes Possibly related PRsSuggested labels
Suggested reviewers
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Warning Review ran into problems🔥 ProblemsTimed out fetching pipeline failures after 30000ms 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. Comment |
📊 Coverage ReportCoverage report not available
Generated by PR Automation (Story 6.1) |
There was a problem hiding this comment.
Actionable comments posted: 1
🧹 Nitpick comments (1)
bin/aiox-init.js (1)
521-539: ⚡ Quick winAvoid duplicating node_modules-link logic in legacy installer.
This block now duplicates behavior already implemented in
ensureProjectNodeModulesLink; reusing that helper would reduce drift risk between install paths.🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@bin/aiox-init.js` around lines 521 - 539, Replace the duplicated node_modules symlink code with a call to the existing helper ensureProjectNodeModulesLink so we don't drift behavior; locate the block that checks context.projectRoot and targetCoreDir and remove it, then invoke ensureProjectNodeModulesLink(...) with the same inputs (pass context and/or targetCoreDir as the helper expects) and rely on that helper to perform platform-specific linking and logging/error handling (ensureProjectNodeModulesLink, context.projectRoot, targetCoreDir are the identifying symbols to use).
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@packages/installer/src/pro/pro-scaffolder.js`:
- Line 18: The require for ensureProjectNodeModulesLink in pro-scaffolder.js
uses a relative path; update that require to use the repository's
absolute-import module name (replace require('../installer/aiox-core-installer')
with the canonical absolute module import used elsewhere in the repo) so
ensureProjectNodeModulesLink is imported via the absolute module path and not a
relative path, then run lint/tests to verify.
---
Nitpick comments:
In `@bin/aiox-init.js`:
- Around line 521-539: Replace the duplicated node_modules symlink code with a
call to the existing helper ensureProjectNodeModulesLink so we don't drift
behavior; locate the block that checks context.projectRoot and targetCoreDir and
remove it, then invoke ensureProjectNodeModulesLink(...) with the same inputs
(pass context and/or targetCoreDir as the helper expects) and rely on that
helper to perform platform-specific linking and logging/error handling
(ensureProjectNodeModulesLink, context.projectRoot, targetCoreDir are the
identifying symbols to use).
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
Run ID: 9cc33941-5296-4414-83de-048545f2f1cb
⛔ Files ignored due to path filters (1)
package-lock.jsonis excluded by!**/package-lock.json
📒 Files selected for processing (8)
.aiox-core/install-manifest.yamlbin/aiox-init.jsdocs/stories/epic-123/STORY-123.10-squad-dependency-resolution.mdpackage.jsonpackages/installer/src/installer/aiox-core-installer.jspackages/installer/src/pro/pro-scaffolder.jstests/installer/aiox-core-installer.test.jstests/installer/pro-scaffolder.test.js
* fix: resolve pro squad script dependencies (SynkraAI#624) * fix: address squad dependency review feedback (SynkraAI#624)
Summary
bin/aiox-init.jsfallback.node_modulesto.aiox-core/node_modulesonly when the project has nonode_modulesof its own.squads/**/scriptscan resolve framework dependencies likejs-yaml.aiox-init.jsfallback aligned with the original fix: symlink node_modules so squad scripts can resolve framework deps #624 patch.5.1.6.Validation
node -c packages/installer/src/installer/aiox-core-installer.js && node -c packages/installer/src/pro/pro-scaffolder.js && node -c bin/aiox-init.jsnpm test -- tests/installer/aiox-core-installer.test.js tests/installer/pro-scaffolder.test.js --runInBandpro/content:require.resolve('js-yaml')fromsquads/squad-creator-pro/scriptsresolves through.aiox-core/node_modulesnpm run validate:manifestnpm run validate:publishnpm run lint -- --quietnpm run typechecknpm run test:ci— 314 suites passed, 7,834 tests passed, 149 skippedgit diff --checkRefs #624
Summary by CodeRabbit
New Features
Bug Fixes
Tests
Chores
Documentation