-
Notifications
You must be signed in to change notification settings - Fork 4.3k
chore(api-service, worker, ws): upgrade to nest js v11 #10653
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: next
Are you sure you want to change the base?
Changes from all commits
098439d
321f3ae
2c609cf
e6b4846
18f794e
e6e7bab
59a996a
a7a5694
b7db4e1
fc46706
211622f
d4879be
ead9f70
11a746e
f1949f2
1441066
8b72d5e
241780d
7278941
ae73bb1
d6a6571
b1d9ee0
5f06329
ba7ec04
77c967b
83110fb
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,6 @@ | ||
| { | ||
| "timeout": 35000, | ||
| "require": "@swc-node/register", | ||
| "file": ["e2e/setup.ts"], | ||
| "exit": true | ||
| } |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,8 +1,7 @@ | ||
| { | ||
| "timeout": 35000, | ||
| "require": "@swc-node/register", | ||
| "node-option": ["no-experimental-strip-types"], | ||
| "require": ["@swc-node/register", "./src/config/load-test-env.ts"], | ||
| "file": ["e2e/setup.ts"], | ||
| "exit": true, | ||
| "files": ["e2e/**/*.e2e.ts", "src/**/*.e2e.ts", "src/**/**/*.spec.ts"] | ||
| "files": ["e2e/**/*.e2e.ts", "src/**/*.e2e.ts", "src/**/*.spec.ts"] | ||
| } |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,16 +1,15 @@ | ||
| import { | ||
| CreateSubscription, | ||
| CreateSubscriptionCommand, | ||
| GetPrices, | ||
| UpdateServiceLevel, | ||
| } from '@novu/ee-billing'; | ||
| import { StripeSubscriptionStatusEnum, StripeUsageTypeEnum } from '@novu/ee-billing/src/stripe/types'; | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🧩 Analysis chain🏁 Script executed: #!/bin/bash
set -euo pipefail
EE_PKG="$(fd -a package.json | rg '/ee-billing/package.json$' | head -n1)"
echo "ee-billing package file: $EE_PKG"
jq '{name, exports, main, module, types}' "$EE_PKG"
EE_DIR="$(dirname "$EE_PKG")"
echo "Checking enum declarations/exports in ee-billing..."
rg -n "enum Stripe(SubscriptionStatusEnum|UsageTypeEnum)|export .*Stripe(SubscriptionStatusEnum|UsageTypeEnum)" "$EE_DIR/src" -g '*.ts'
echo "Checking deep-import usage in billing e2e tests..."
rg -n "@novu/ee-billing/src/stripe/types" apps/api/src/app/billing/e2e -g '*.ts'Repository: novuhq/novu Length of output: 37 🏁 Script executed: # Step 1: Find ee-billing package location
find . -type f -name "package.json" | grep -E "ee-billing" | head -5Repository: novuhq/novu Length of output: 37 🏁 Script executed: # Step 2: Search more broadly for billing packages and workspace configuration
find . -type f -name "pnpm-workspace.yaml" -o -name "package.json" | head -3
ls -la | head -20Repository: novuhq/novu Length of output: 1358 🏁 Script executed: # Step 3: Check the test file and search for enum definitions
cat -n apps/api/src/app/billing/e2e/create-subscription.e2e-ee.ts | head -30
# Also search for StripeSubscriptionStatusEnum definition
rg "StripeSubscriptionStatusEnum|StripeUsageTypeEnum" -g '*.ts' | head -20Repository: novuhq/novu Length of output: 2591 🏁 Script executed: # Step 4: Find ee-billing package location and check its exports
find . -type d -name "*ee-billing*" | grep -v node_modules | grep -v ".git"
# Also check tsconfig for path mappings
cat tsconfig.base.json 2>/dev/null | jq '.compilerOptions.paths | select(. != null) | keys[] | select(contains("ee-billing"))' 2>/dev/null || echo "Checking alternate tsconfig..."Repository: novuhq/novu Length of output: 37 🏁 Script executed: # Step 4b: Broader search for the actual location
ls -la libs/ 2>/dev/null | head -20 || echo "No libs directory"
ls -la packages/ 2>/dev/null | head -20 || echo "No packages directory"
# Search directly for stripe/types file
find . -path "*/stripe/types.ts" -not -path "*/node_modules/*" -not -path "*/.git/*"Repository: novuhq/novu Length of output: 1556 🏁 Script executed: # Step 5: Check packages/novu structure for ee-billing
ls -la packages/novu/ | head -20
# Search for stripe/types.ts
find . -path "*/stripe/types.ts" -not -path "*/node_modules/*" -not -path "*/.git/*" 2>/dev/null
find . -name "types.ts" -path "*/stripe/*" -not -path "*/node_modules/*" -not -path "*/.git/*" 2>/dev/nullRepository: novuhq/novu Length of output: 795 🏁 Script executed: # Step 6: Explore packages/novu/src structure
ls -la packages/novu/src/
# Find stripe/types.ts more directly
find packages/novu -name "types.ts" 2>/dev/null | head -10
# Also search for StripeSubscriptionStatusEnum definition
rg "StripeSubscriptionStatusEnum|StripeUsageTypeEnum" packages/novu/ -g '*.ts' 2>/dev/null | head -15Repository: novuhq/novu Length of output: 809 🏁 Script executed: # Step 7: Search for `@novu/ee-billing` references and StripeSubscriptionStatusEnum definition
rg "@novu/ee-billing" --type json | head -10
# Search for where StripeSubscriptionStatusEnum is defined
rg "enum StripeSubscriptionStatusEnum|export.*StripeSubscriptionStatusEnum" -g '*.ts' 2>/dev/null | head -10
# Check for any ee-billing directories
find . -type d -name "*ee*billing*" -not -path "*/node_modules/*" -not -path "*/.git/*"Repository: novuhq/novu Length of output: 321 🏁 Script executed: # Step 8: Explore enterprise/packages/billing structure
ls -la enterprise/packages/billing/
ls -la enterprise/packages/billing/src/ 2>/dev/null || echo "No src directory"
# Check for stripe/types.ts
find enterprise/packages/billing -name "types.ts" -path "*/stripe/*" 2>/dev/null
# Check package.json exports
cat enterprise/packages/billing/package.json | jq '{name, exports, main, types, files}' 2>/dev/nullRepository: novuhq/novu Length of output: 758 🏁 Script executed: # Step 9: Find the actual source and check index.ts
find . -type d -path "*/.source/billing/src" -not -path "*/node_modules/*"
# Also check relative path from enterprise/packages/billing
ls -la enterprise/packages/billing/../../../.source/billing/src/ 2>/dev/null || echo "Path not found"
# Try to find .source directory
find . -type d -name ".source" -not -path "*/node_modules/*" -not -path "*/.git/*" 2>/dev/null | head -5Repository: novuhq/novu Length of output: 79 🏁 Script executed: # Step 10: Check .source/billing/src structure
ls -la .source/billing/src/ 2>/dev/null || echo "Directory structure not found"
# List all files in .source/billing
find .source/billing -type f -name "*.ts" | head -20
# Check if index.ts exists and what it exports
cat .source/billing/src/index.ts 2>/dev/null | head -50Repository: novuhq/novu Length of output: 152 🏁 Script executed: # Step 11: Check .source directory
ls -la .source/ | head -30
# Search for stripe directory anywhere
find . -type d -name "stripe" -not -path "*/node_modules/*" -not -path "*/.git/*" 2>/dev/null
# Search for any stripe/types.ts anywhere
find . -type f -path "*/stripe/types.ts" -not -path "*/node_modules/*" -not -path "*/.git/*" 2>/dev/null
# Also search for StripeSubscriptionStatusEnum definition
rg "enum StripeSubscriptionStatusEnum" -g '*.ts' 2>/dev/nullRepository: novuhq/novu Length of output: 167 🏁 Script executed: # Step 12: Check enterprise/packages/billing directly for any files
find enterprise/packages/billing -type f -name "*.ts" | head -20
# Search for stripe in entire repo more carefully
find . -type d -name "stripe" -not -path "*/node_modules/*" -not -path "*/.git/*" 2>/dev/null
# Search for StripeSubscriptionStatusEnum or StripeUsageTypeEnum definition more broadly
rg "StripeSubscriptionStatusEnum|StripeUsageTypeEnum" -g '*.ts' --type-list 2>/dev/null | grep -v "import\|from" | head -20
# Check actual dist output if it exists
find enterprise/packages/billing/dist -type f 2>/dev/null | head -10Repository: novuhq/novu Length of output: 37 🏁 Script executed: # Step 13: Check for submodules and gitignore
cat .gitmodules 2>/dev/null | grep -i billing || echo "No billing submodule"
cat .gitignore | grep -i billing || echo "No billing in gitignore"
# Check enterprise/.gitignore
cat enterprise/.gitignore 2>/dev/null | grep -i billing || echo "No billing in enterprise/.gitignore"
# Check what package.json says about main field - follow the reference
cat enterprise/packages/billing/package.json | jq '.main'
# Check the full package.json
cat enterprise/packages/billing/package.jsonRepository: novuhq/novu Length of output: 1907 🏁 Script executed: # Step 14: Check the build script and source structure
cat enterprise/packages/billing/check-ee.mjs
# Also check if src is actually accessible (since symlink is broken, show what's in dist)
ls -la enterprise/packages/billing/dist/ 2>/dev/null | head -20
# Try to find the real source by checking if there's a different path
find . -path "*/billing/src/stripe/types.ts" -not -path "*/node_modules/*" 2>/dev/null
# Also check tsconfig to understand source mapping
cat enterprise/packages/billing/tsconfig.jsonRepository: novuhq/novu Length of output: 1938 🏁 Script executed: # Step 15: Search for index files and stripe enum exports in ee-billing context
rg "export.*Stripe(Subscription|Usage)" enterprise/packages/billing/ -g '*.ts' 2>/dev/null || echo "No exports found"
# Check if there's any src directory (maybe not symlinked but actual)
find enterprise/packages/billing -type d -name src 2>/dev/null
# Search entire repo for where StripeSubscriptionStatusEnum is defined and exported
rg "export.*(enum|const) Stripe(Subscription|Usage)" -g '*.ts' | head -20Repository: novuhq/novu Length of output: 71 Avoid deep-importing The import on line 7 pulls enums from an internal source path (
Suggested fix-import { StripeSubscriptionStatusEnum, StripeUsageTypeEnum } from '@novu/ee-billing/src/stripe/types';
+import { StripeSubscriptionStatusEnum, StripeUsageTypeEnum } from '@novu/ee-billing';If these enums are not currently exported from the public entrypoint, re-export them from 🤖 Prompt for AI Agents |
||
| import { ApiServiceLevelEnum, StripeBillingIntervalEnum } from '@novu/shared'; | ||
| import { expect } from 'chai'; | ||
| import sinon from 'sinon'; | ||
|
|
||
| const { StripeSubscriptionStatusEnum, StripeUsageTypeEnum } = require('@novu/ee-billing/src/stripe/types'); | ||
|
|
||
| describe('CreateSubscription #novu-v2', () => { | ||
| const eeBilling = require('@novu/ee-billing'); | ||
| if (!eeBilling) { | ||
| throw new Error('ee-billing does not exist'); | ||
| } | ||
|
|
||
| const { CreateSubscription, GetPrices, UpdateServiceLevel, CreateSubscriptionCommand } = eeBilling; | ||
|
|
||
| const stripeStub = { | ||
| subscriptions: { | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🧩 Analysis chain
🏁 Script executed:
Repository: novuhq/novu
Length of output: 1060
Remove the unused
nest-ravendependency; it doesn't support NestJS 11.The
nest-raven@10.1.0package has a peer dependency constraint of@nestjs/common@^10.0.0, which excludes NestJS 11. Sincenest-ravenis not imported anywhere in the codebase, it should be removed to avoid a broken peer dependency after this upgrade.Additionally,
@sentry/nestjs@8.49.0also does not yet support NestJS 11 (max supported is v10). Verify that Sentry integration is either disabled or plan a migration to a compatible version before merging.🤖 Prompt for AI Agents