fix: allow Pro greenfield validation without package manifest - #733
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
WalkthroughThis PR bumps package versions across the monorepo (core wrapper to 5.2.3, core to 5.2.3, installer to 3.3.3) and updates installer validation to detect and handle greenfield projects that have ChangesGreenfield validation feature and release
Estimated code review effort🎯 2 (Simple) | ⏱️ ~12 minutes Possibly related PRs
Suggested labels
Suggested reviewers
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Tip 💬 Introducing Slack Agent: The best way for teams to turn conversations into code.Slack Agent is built on CodeRabbit's deep understanding of your code, so your team can collaborate across the entire SDLC without losing context.
Built for teams:
One agent for your entire SDLC. Right inside Slack. 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.
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (1)
packages/installer/src/wizard/validation/validators/dependency-validator.js (1)
15-24: 🛠️ Refactor suggestion | 🟠 Major | ⚡ Quick winDocument the new depsContext properties.
The JSDoc parameter documentation for
depsContextshould include theskippedandreasonproperties that are now part of the function contract (used at lines 51-52).📝 Proposed JSDoc enhancement
/** * Validate dependencies * * `@param` {Object} depsContext - Dependency installation context * `@param` {boolean} depsContext.success - Installation success status * `@param` {string} depsContext.packageManager - Package manager used * `@param` {boolean} depsContext.offlineMode - Offline mode flag * `@param` {string} depsContext.projectType - Project type (GREENFIELD, BROWNFIELD, etc.) + * `@param` {boolean} [depsContext.skipped] - Whether dependency installation was skipped + * `@param` {string} [depsContext.reason] - Reason for skipping (e.g., 'no-package-json') * `@returns` {Promise<Object>} Validation result */🤖 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 `@packages/installer/src/wizard/validation/validators/dependency-validator.js` around lines 15 - 24, The JSDoc for the validate dependencies function needs to document the newly used properties on depsContext: add `@param` lines for depsContext.skipped (boolean) and depsContext.reason (string) to the existing JSDoc block so callers/readers know those fields are part of the contract; update the block that currently documents depsContext.success, packageManager, offlineMode, and projectType to also list skipped and reason and a short description for each, referencing the same depsContext identifier used by the function.
🤖 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.
Outside diff comments:
In `@packages/installer/src/wizard/validation/validators/dependency-validator.js`:
- Around line 15-24: The JSDoc for the validate dependencies function needs to
document the newly used properties on depsContext: add `@param` lines for
depsContext.skipped (boolean) and depsContext.reason (string) to the existing
JSDoc block so callers/readers know those fields are part of the contract;
update the block that currently documents depsContext.success, packageManager,
offlineMode, and projectType to also list skipped and reason and a short
description for each, referencing the same depsContext identifier used by the
function.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
Run ID: 3abd96c6-1bfb-49c0-b3a4-b8bfea593176
⛔ Files ignored due to path filters (1)
package-lock.jsonis excluded by!**/package-lock.json
📒 Files selected for processing (5)
compat/aiox-core/package.jsonpackage.jsonpackages/installer/package.jsonpackages/installer/src/wizard/validation/validators/dependency-validator.jstests/unit/wizard/validation/dependency-validator.test.js
Summary\n- Treat greenfield installs that intentionally skipped package.json as valid even when Pro creates node_modules\n- Skip package manifest and security audit checks in that specific no-package.json greenfield path\n- Bump @aiox-squads/core/aiox-core to 5.2.3 and @aiox-squads/installer to 3.3.3 for publication\n\n## Validation\n- npm test -- tests/installer/pro-setup-auth.test.js tests/unit/wizard/validation/dependency-validator.test.js --runInBand\n- npm run lint -- --no-cache packages/installer/src/wizard/validation/validators/dependency-validator.js tests/unit/wizard/validation/dependency-validator.test.js\n- npm run validate:publish\n- Local guided Pro install with real account: Pro activated, 2538 files installed, Overall Status: All checks passed\n
Summary by CodeRabbit
Bug Fixes
Chores
Tests