Skip to content

feat(dashboard,novu): pin CLI framework version and use rc tag for pre-release#10747

Merged
ChmaraX merged 4 commits intonextfrom
feat/pin-cli-framework-version
Apr 16, 2026
Merged

feat(dashboard,novu): pin CLI framework version and use rc tag for pre-release#10747
ChmaraX merged 4 commits intonextfrom
feat/pin-cli-framework-version

Conversation

@ChmaraX
Copy link
Copy Markdown
Contributor

@ChmaraX ChmaraX commented Apr 16, 2026

Summary

  • Read @novu/framework version from novu's own package.json instead of hardcoding 'latest' in the init template — RC publishes automatically scaffold with the matching alpha version
  • Extract CLI_PACKAGE_TAG constant in the dashboard so all agent setup commands use @rc during pre-release, with a single-line change to 'latest' at GA (linked to IS_CONVERSATIONAL_AGENTS_ENABLED flag removal)

Test plan

  • Publish novu RC and verify npx novu@rc init -t agent scaffolds with the correct @novu/framework alpha version
  • Verify dashboard agent setup guide shows @rc in both init and dev commands
  • Verify local dev (workspace:*) 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

  • dashboard: Replaced hardcoded npx novu@latest commands with npx novu@${CLI_PACKAGE_TAG} for agent init, copy-init, and dev tunnel commands; added CLI_PACKAGE_TAG = 'rc' (with a TODO to flip at GA).
  • js (packages/novu init templates): Added resolveFrameworkVersion() used when generating projects so @novu/framework in scaffolded package.json is taken from the repo root dependency (with safe fallbacks to 'latest' for workspace:* or errors).
  • packages/framework & packages/novu: Bumped package versions for the pre-release: @novu/framework → 2.10.1-alpha.1 and novu → 2.8.1-rc.2.

Key technical decisions

  • resolveFrameworkVersion reads the compiled package location to locate the repository root package.json and returns pkg.dependencies['@novu/framework'], but returns 'latest' for missing/dist failures or workspace:* values to avoid leaking workspace references into generated projects.
  • Dashboard command tag is driven by a single CLI_PACKAGE_TAG constant to make switching release tags a one-line change and decouple UI copy from release mechanics.

Testing

Manual verification: publish an RC and confirm npx novu@rc init -t agent scaffolds with the matching @novu/framework alpha; verify the dashboard shows @rc in init and dev commands; confirm local monorepo development with workspace:* still falls back to 'latest'.

… 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
@netlify
Copy link
Copy Markdown

netlify Bot commented Apr 16, 2026

Deploy Preview for dashboard-v2-novu-staging canceled.

Name Link
🔨 Latest commit 1f0074e
🔍 Latest deploy log https://app.netlify.com/projects/dashboard-v2-novu-staging/deploys/69e0c34d4be3f4000864e929

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Apr 16, 2026

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: feat(dashboard,novu): pin CLI framework version and use rc tag for pre-release

Requirements:

  1. Follow the Conventional Commits specification
  2. As a team member, include Linear ticket ID at the end: fixes TICKET-ID or include it in your branch name

Expected format: feat(scope): Add fancy new feature fixes NOV-123

Details:

PR title must end with 'fixes TICKET-ID' (e.g., 'fixes NOV-123') or include ticket ID in branch name

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented Apr 16, 2026

Caution

Review failed

The pull request is closed.

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: e70ed1e1-91a0-43d7-b6a5-b7519894637c

📥 Commits

Reviewing files that changed from the base of the PR and between e3530df and 1f0074e.

📒 Files selected for processing (1)
  • packages/novu/src/commands/init/templates/index.ts

📝 Walkthrough

Walkthrough

Adds a configurable CLI package tag used in dashboard agent setup commands, a helper that resolves the @novu/framework version from the repo root package.json for template initialization, and bumps packages/framework and packages/novu package versions.

Changes

Cohort / File(s) Summary
Dashboard CLI Versioning
apps/dashboard/src/components/agents/agent-code-setup-section.tsx
Introduce CLI_PACKAGE_TAG = 'rc' and update buildInitCommand, buildInitCopyCommand, and the dev tunnel TerminalBlock to use npx novu@${CLI_PACKAGE_TAG} instead of npx novu@latest.
Template Framework Version Resolution
packages/novu/src/commands/init/templates/index.ts
Add resolveFrameworkVersion() which reads repository root package.json to determine @novu/framework version (falls back to 'latest') and use it in generated projects' baseDependencies instead of hardcoded 'latest'.
Package Version Bumps
packages/framework/package.json, packages/novu/package.json
Bump packages/framework version 2.10.02.10.1-alpha.1 and packages/novu version 2.8.02.8.1-rc.2. No other fields changed.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Possibly related PRs

🚥 Pre-merge checks | ✅ 2 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (2 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed Title follows Conventional Commits format with valid type (feat), valid comma-separated scopes (dashboard, novu), and imperative description. No Linear ticket is referenced, so that requirement doesn't apply.

✏️ 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.

❤️ Share

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

Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

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

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

📥 Commits

Reviewing files that changed from the base of the PR and between 75b4d81 and 59dce74.

📒 Files selected for processing (2)
  • apps/dashboard/src/components/agents/agent-code-setup-section.tsx
  • packages/novu/src/commands/init/templates/index.ts

Comment thread packages/novu/src/commands/init/templates/index.ts Outdated
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
Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

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

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

📥 Commits

Reviewing files that changed from the base of the PR and between 59dce74 and 6029074.

📒 Files selected for processing (1)
  • packages/novu/src/commands/init/templates/index.ts

Comment thread 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
@ChmaraX ChmaraX merged commit 1acb6f1 into next Apr 16, 2026
20 of 21 checks passed
@ChmaraX ChmaraX deleted the feat/pin-cli-framework-version branch April 16, 2026 11:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant