Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 12 additions & 1 deletion .github/workflows/release-packages.yml
Original file line number Diff line number Diff line change
Expand Up @@ -284,7 +284,18 @@ jobs:
for changelog_path in "${possible_paths[@]}"; do
if [ -f "$changelog_path" ]; then
echo "Found changelog at: $changelog_path"
changelog_content=$(head -100 "$changelog_path")
changelog_content=$(awk -v version="${{ steps.extract-info.outputs.version }}" '
BEGIN { capture=0 }
/^## / || /^# / || /^v[0-9]+\./ {
if (capture) exit
if ($0 ~ "(^|[^0-9.])" version "([^0-9.]|$)") {
capture=1
next
}
}
capture { print }
' "$changelog_path" | sed '/^$/d' | head -50)

if [ -n "$changelog_content" ]; then
release_body="$changelog_content"
break
Expand Down
2 changes: 1 addition & 1 deletion apps/api/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@novu/api-service",
"version": "3.11.0",
"version": "3.12.0",
"description": "description",
"author": "",
"private": "true",
Expand Down
2 changes: 1 addition & 1 deletion apps/dashboard/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@novu/dashboard",
"private": true,
"version": "3.11.4",
"version": "3.12.0",
"type": "module",
"scripts": {
"start": "vite",
Expand Down
8 changes: 5 additions & 3 deletions apps/dashboard/src/hooks/use-fetch-layouts.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -22,12 +22,14 @@ export const useFetchLayouts = ({
refetchOnWindowFocus = true,
}: UseLayoutsParams = {}) => {
const { currentEnvironment } = useEnvironment();
const environmentId = currentEnvironment?._id;
const params = { limit, offset, query, orderBy, orderDirection };

const layoutsQuery = useQuery({
queryKey: [QueryKeys.fetchLayouts, currentEnvironment?._id, { limit, offset, query, orderBy, orderDirection }],
queryFn: () => getLayouts({ environment: currentEnvironment!, limit, offset, query, orderBy, orderDirection }),
queryKey: [QueryKeys.fetchLayouts, environmentId, params],
queryFn: () => getLayouts({ environment: currentEnvironment!, ...params }),
placeholderData: keepPreviousData,
enabled: !!currentEnvironment?._id,
enabled: !!environmentId,
refetchOnWindowFocus,
});

Expand Down
2 changes: 1 addition & 1 deletion apps/web/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@novu/web",
"version": "2.1.22",
"version": "2.1.23",
"private": true,
"scripts": {
"start": "DISABLE_ESLINT_PLUGIN=true pnpm panda --watch & cross-env NODE_OPTIONS=--max_old_space_size=8192 PORT=4200 react-app-rewired start",
Expand Down
2 changes: 1 addition & 1 deletion apps/webhook/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@novu/webhook",
"version": "3.11.0",
"version": "3.12.0",
"description": "",
"author": "",
"private": true,
Expand Down
2 changes: 1 addition & 1 deletion apps/worker/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@novu/worker",
"version": "3.11.0",
"version": "3.12.0",
"description": "description",
"author": "",
"private": "true",
Expand Down
2 changes: 1 addition & 1 deletion apps/ws/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@novu/ws",
"version": "3.11.0",
"version": "3.12.0",
"description": "",
"author": "",
"private": true,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ export class SendgridHandler extends BaseEmailHandler {
senderName: credentials.senderName,
ipPoolName: credentials.ipPoolName,
webhookPublicKey: credentials.inboundWebhookSigningKey,
region: credentials.region,
});
}
}
4 changes: 3 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -196,7 +196,9 @@
"vite@>=5.0.0 <5.4.15": "^5.4.21",
"vite@<4.5.10": "^4.5.10",
"node-forge@<1.3.2": "^1.3.2",
"ws@>=8.0.0 <8.17.1": "^8.17.1"
"ws@>=8.0.0 <8.17.1": "^8.17.1",
"next@>=13.0.0 <14.2.32": "^14.2.35",
"next@>=15.0.0 <15.4.7": "^15.4.10"
},
"onlyBuiltDependencies": [
"@clerk/shared",
Expand Down
15 changes: 15 additions & 0 deletions packages/js/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,18 @@
## v3.12.0 (2026-01-07)

### 🚀 Features

- **js,react:** Italics formatting support in content fixes NV-7025 ([#9789](https://github.com/novuhq/novu/pull/9789))

### 🩹 Fixes

- **js:** inbox doubled notifications issue fixes NV-7014 ([#9773](https://github.com/novuhq/novu/pull/9773))

### ❤️ Thank You

- Dima Grossman @scopsy
- Paweł Tymczuk @LetItRock

## v3.11.2 (2025-12-24)

### 🚀 Features
Expand Down
2 changes: 1 addition & 1 deletion packages/js/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@novu/js",
"version": "3.11.2",
"version": "3.12.0",
"repository": "https://github.com/novuhq/novu",
"description": "Novu JavaScript SDK for <Inbox />",
"author": "",
Expand Down
4 changes: 4 additions & 0 deletions packages/nextjs/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
## v3.12.0 (2026-01-07)

This was a version bump only for @novu/nextjs to align it with other projects, there were no code changes.

## v3.11.2 (2025-12-24)

### 🚀 Features
Expand Down
2 changes: 1 addition & 1 deletion packages/nextjs/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@novu/nextjs",
"version": "3.11.2",
"version": "3.12.0",
"repository": {
"type": "git",
"url": "https://github.com/novuhq/novu",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import { Client } from '@sendgrid/client';
import { MailService } from '@sendgrid/mail';
import { expect, test, vi } from 'vitest';
import { SendgridEmailProvider } from './sendgrid.provider';
Expand Down Expand Up @@ -168,3 +169,35 @@ test('should override credentials with mail data', async () => {
});
expect(sendMock).toHaveBeenCalledWith(expect.objectContaining({ ipPoolName: 'ip_from_mail_data' }));
});

test('should set EU data residency when region is eu', async () => {
const setDataResidencySpy = vi.spyOn(Client.prototype, 'setDataResidency');

new SendgridEmailProvider({
...mockConfig,
region: 'eu',
});

expect(setDataResidencySpy).toHaveBeenCalledWith('eu');
});

test('should not set data residency when region is global', async () => {
const setDataResidencySpy = vi.spyOn(Client.prototype, 'setDataResidency');
setDataResidencySpy.mockClear();

new SendgridEmailProvider({
...mockConfig,
region: 'global',
});

expect(setDataResidencySpy).not.toHaveBeenCalled();
});

test('should not set data residency when region is not provided', async () => {
const setDataResidencySpy = vi.spyOn(Client.prototype, 'setDataResidency');
setDataResidencySpy.mockClear();

new SendgridEmailProvider(mockConfig);

expect(setDataResidencySpy).not.toHaveBeenCalled();
});
21 changes: 14 additions & 7 deletions packages/providers/src/lib/email/sendgrid/sendgrid.provider.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import {
IEmailProvider,
ISendMessageSuccessResponse,
} from '@novu/stateless';
import sgClient from '@sendgrid/client';
import { Client } from '@sendgrid/client';
// cspell:disable-next-line
import { EventWebhook } from '@sendgrid/eventwebhook';
import { MailDataRequired, MailService } from '@sendgrid/mail';
Expand All @@ -23,7 +23,7 @@ export class SendgridEmailProvider extends BaseProvider implements IEmailProvide
protected casing: CasingEnum = CasingEnum.CAMEL_CASE;
channelType = ChannelTypeEnum.EMAIL as ChannelTypeEnum.EMAIL;
private sendgridMail: MailService;
private sendgridClient: typeof sgClient;
private client: Client;

constructor(
private config: {
Expand All @@ -32,13 +32,20 @@ export class SendgridEmailProvider extends BaseProvider implements IEmailProvide
senderName: string;
ipPoolName?: string;
webhookPublicKey?: string;
region?: string;
}
) {
super();
this.client = new Client();

if (this.config.region === 'eu') {
this.client.setDataResidency('eu');
}

this.client.setApiKey(this.config.apiKey);

this.sendgridMail = new MailService();
this.sendgridMail.setApiKey(this.config.apiKey);
this.sendgridClient = sgClient;
this.sendgridClient.setApiKey(this.config.apiKey);
this.sendgridMail.setClient(this.client);
}

async sendMessage(
Expand Down Expand Up @@ -210,7 +217,7 @@ export class SendgridEmailProvider extends BaseProvider implements IEmailProvide
}> {
try {
// Step 1: Create a new Event Webhook
const [createResponse, createBody] = await this.sendgridClient.request({
const [createResponse, createBody] = await this.client.request({
url: '/v3/user/webhooks/event/settings',
method: 'POST' as const,
body: {
Expand All @@ -237,7 +244,7 @@ export class SendgridEmailProvider extends BaseProvider implements IEmailProvide
const webhookId = createBody.id;

// Step 2: Enable Signature Verification
const [enableSignatureResponse, enableSignatureBody] = await this.sendgridClient.request({
const [enableSignatureResponse, enableSignatureBody] = await this.client.request({
url: `/v3/user/webhooks/event/settings/signed/${webhookId}`,
method: 'PATCH' as const,
body: {
Expand Down
4 changes: 4 additions & 0 deletions packages/react-native/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
## v3.12.0 (2026-01-07)

This was a version bump only for @novu/react-native to align it with other projects, there were no code changes.

## v3.11.2 (2025-12-24)

### 🚀 Features
Expand Down
2 changes: 1 addition & 1 deletion packages/react-native/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@novu/react-native",
"version": "3.11.2",
"version": "3.12.0",
"repository": "https://github.com/novuhq/novu",
"description": "Novu's React Native SDK for building custom inbox notification experiences",
"author": "",
Expand Down
4 changes: 4 additions & 0 deletions packages/react/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
## v3.12.0 (2026-01-07)

This was a version bump only for @novu/react to align it with other projects, there were no code changes.

## v3.11.2 (2025-12-24)

### 🚀 Features
Expand Down
2 changes: 1 addition & 1 deletion packages/react/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@novu/react",
"version": "3.11.2",
"version": "3.12.0",
"repository": {
"type": "git",
"url": "https://github.com/novuhq/novu",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -201,6 +201,18 @@ export const sendgridConfig: IConfigCredential[] = [
type: 'string',
required: true,
},
{
key: CredentialsKeyEnum.Region,
displayName: 'Region',
description: 'Select EU if your SendGrid account is hosted in the EU data center',
type: 'dropdown',
required: false,
value: 'global',
dropdown: [
{ name: 'Global (US)', value: 'global' },
{ name: 'EU', value: 'eu' },
],
},
{
key: CredentialsKeyEnum.IpPoolName,
displayName: 'IP Pool Name',
Expand Down
Loading
Loading