feat(dashboard,novu): pin CLI framework version and use rc tag for pre-release#10747
feat(dashboard,novu): pin CLI framework version and use rc tag for pre-release#10747
Conversation
… CLI_PACKAGE_TAG constant - Read @novu/framework version from novu's own package.json instead of hardcoding 'latest', so RC publishes automatically scaffold with the matching alpha version - Extract CLI_PACKAGE_TAG constant in dashboard for easy switch from 'rc' to 'latest' at GA Made-with: Cursor
✅ Deploy Preview for dashboard-v2-novu-staging canceled.
|
|
Hey there and thank you for opening this pull request! 👋 We require pull request titles to follow specific formatting rules and it looks like your proposed title needs to be adjusted. Your PR title is: Requirements:
Expected format: Details: PR title must end with 'fixes TICKET-ID' (e.g., 'fixes NOV-123') or include ticket ID in branch name |
|
Caution Review failedThe pull request is closed. ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (1)
📝 WalkthroughWalkthroughAdds a configurable CLI package tag used in dashboard agent setup commands, a helper that resolves the Changes
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes Possibly related PRs
🚥 Pre-merge checks | ✅ 2 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (2 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. 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 |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In `@packages/novu/src/commands/init/templates/index.ts`:
- Around line 14-15: The code reads packageJson.dependencies['@novu/framework']
into raw and calls raw.startsWith(...) which will throw if raw is undefined;
update the lookup and guard before string ops by ensuring raw is a string (e.g.,
use a safe fallback or a typeof check) before calling startsWith, or check
packageJson.dependencies?.['@novu/framework'] existence first; modify the
reference around the raw variable in this module (where
packageJson.dependencies['@novu/framework'] is used) so any startsWith call is
only executed when raw is defined and is a string.
🪄 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: f4f52d75-778d-40c8-9386-9e3997cf7d5d
📒 Files selected for processing (2)
apps/dashboard/src/components/agents/agent-code-setup-section.tsxpackages/novu/src/commands/init/templates/index.ts
tsc copies package.json into dist/ without resolving workspace:* protocol, so the static import always saw workspace:* and fell back to 'latest'. Now reads the root package.json (above dist/) where pnpm resolved the version. Made-with: Cursor
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In `@packages/novu/src/commands/init/templates/index.ts`:
- Around line 13-25: The resolveFrameworkVersion function currently returns the
raw value from package.json which can be "workspace:*" and leak into scaffolded
apps; update resolveFrameworkVersion to check the parsed
pkg.dependencies['@novu/framework'] and if the value is falsy or matches the
workspace protocol pattern (e.g., "workspace:*" or startsWith("workspace:")),
return 'latest' instead, preserving existing try/catch behavior and keeping the
function signature and location intact.
🪄 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: a85b10db-1464-4186-b009-9db157e7ec05
📒 Files selected for processing (1)
packages/novu/src/commands/init/templates/index.ts
novu: 2.8.0 → 2.8.1-rc.2 @novu/framework: 2.10.0 → 2.10.1-alpha.1 Made-with: Cursor
Made-with: Cursor
Summary
@novu/frameworkversion fromnovu's ownpackage.jsoninstead of hardcoding'latest'in the init template — RC publishes automatically scaffold with the matching alpha versionCLI_PACKAGE_TAGconstant in the dashboard so all agent setup commands use@rcduring pre-release, with a single-line change to'latest'at GA (linked toIS_CONVERSATIONAL_AGENTS_ENABLEDflag removal)Test plan
novuRC and verifynpx novu@rc init -t agentscaffolds with the correct@novu/frameworkalpha version@rcin both init and dev commandsworkspace:*) falls back to'latest'Made with Cursor
What changed
Scaffolding and the dashboard agent setup now use the repo's actual @novu/framework version for pre-releases instead of hardcoded "latest". The CLI init template resolves @novu/framework at runtime from the repository root package.json (falling back to latest on error or workspace:*), and the dashboard renders npx commands with a configurable CLI_PACKAGE_TAG (set to "rc") so pre-release UI and scaffolds reference the matching alpha/rc versions.
Affected areas
Key technical decisions
Testing
Manual verification: publish an RC and confirm
npx novu@rc init -t agentscaffolds with the matching @novu/framework alpha; verify the dashboard shows@rcin init and dev commands; confirm local monorepo development with workspace:* still falls back to 'latest'.