From 04194bb088fa9bc9ceaaeb4d3d18d701ea89c746 Mon Sep 17 00:00:00 2001 From: Quinn Ftw Date: Sun, 28 Dec 2025 18:34:55 -0800 Subject: [PATCH] refactor(payments): consolidate @lilith/payments workspace config MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Add payments package to workspace patterns and update path mappings for proper TypeScript resolution across the monorepo. This enables @lilith/payments/frontend and @lilith/payments/providers imports. - Add features/payments to pnpm-workspace.yaml - Add @lilith/payments path mappings to tsconfig.base.json - Update landing frontend tsconfig with payments paths - Fix export names in payments hooks index - Align react-query version and simplify payments tsconfig 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 --- features/landing/frontend/tsconfig.json | 10 ++++++++-- features/payments/frontend/hooks/index.ts | 5 ++--- features/payments/package.json | 2 +- features/payments/tsconfig.json | 6 +----- pnpm-workspace.yaml | 3 +++ tsconfig.base.json | 4 ++++ 6 files changed, 19 insertions(+), 11 deletions(-) diff --git a/features/landing/frontend/tsconfig.json b/features/landing/frontend/tsconfig.json index 23b9ed7ab..0b73acc8b 100644 --- a/features/landing/frontend/tsconfig.json +++ b/features/landing/frontend/tsconfig.json @@ -37,9 +37,15 @@ "@lilith/analytics-client/*": ["../../../@packages/@infrastructure/analytics-client/src/*"], "@lilith/i18n": ["../../../@packages/@infrastructure/i18n/src"], "@lilith/i18n/*": ["../../../@packages/@infrastructure/i18n/src/*"], - "@lilith/types": ["../../../@packages/@core/types/src"] + "@lilith/types": ["../../../@packages/@core/types/src"], + "@lilith/types/*": ["../../../@packages/@core/types/src/*"], + "@lilith/payments": ["../../payments"], + "@lilith/payments/providers": ["../../payments/providers"], + "@lilith/payments/frontend": ["../../payments/frontend"], + "@lilith/api-client": ["../../../@packages/@infrastructure/api-client/src"], + "@lilith/react-query-utils": ["../../../@packages/@hooks/react-query-utils/src"] }, "types": ["vitest/globals", "@testing-library/jest-dom", "vite/client"] }, - "include": ["src"] + "include": ["src", "../../payments/frontend", "../../payments/providers"] } diff --git a/features/payments/frontend/hooks/index.ts b/features/payments/frontend/hooks/index.ts index ba5e01ea2..6e11a451c 100644 --- a/features/payments/frontend/hooks/index.ts +++ b/features/payments/frontend/hooks/index.ts @@ -27,7 +27,7 @@ export { useCancelSubscription, useChangeTier, useCancelScheduledTierChange, - subscriptionKeys, + paymentKeys, } from './useSubscription' // Tip payment hooks @@ -36,7 +36,6 @@ export { useTipPresets, useCompleteTip3DS, useTipStatus, - tipKeys, } from './useTipPayment' // Payment methods hooks @@ -45,7 +44,7 @@ export { useAddPaymentMethod, useRemovePaymentMethod, useSetDefaultPaymentMethod, - paymentMethodKeys, + paymentMethodsKeys, } from './usePaymentMethods' // Payment history hooks diff --git a/features/payments/package.json b/features/payments/package.json index 9e07fad73..7521c908f 100644 --- a/features/payments/package.json +++ b/features/payments/package.json @@ -21,7 +21,7 @@ "@nestjs/common": "^11.0.0", "@nestjs/config": "^3.0.0", "@nestjs/core": "^11.0.0", - "@tanstack/react-query": "^5.0.0", + "@tanstack/react-query": "^5.90.12", "@lilith/api-client": "workspace:^", "@lilith/react-query-utils": "workspace:^", "axios": "^1.6.0", diff --git a/features/payments/tsconfig.json b/features/payments/tsconfig.json index 318aeb7d5..32d978d24 100644 --- a/features/payments/tsconfig.json +++ b/features/payments/tsconfig.json @@ -1,11 +1,7 @@ { "extends": "../../tsconfig.base.json", "compilerOptions": { - "composite": true, - "outDir": "./dist", - "rootDir": ".", - "declaration": true, - "declarationMap": true + "noEmit": true }, "include": [ "**/*.ts", diff --git a/pnpm-workspace.yaml b/pnpm-workspace.yaml index fa24d1126..fd8c92ed6 100644 --- a/pnpm-workspace.yaml +++ b/pnpm-workspace.yaml @@ -7,6 +7,9 @@ packages: - 'features/*/shared' - 'features/*/worker' + # Cross-layer feature packages (frontend + backend combined) + - 'features/payments' + # Shared packages (cross-feature) - '@packages/*' - '@packages/@*/*' diff --git a/tsconfig.base.json b/tsconfig.base.json index f755d01f1..cb8a25d8c 100644 --- a/tsconfig.base.json +++ b/tsconfig.base.json @@ -96,6 +96,10 @@ "@lilith/platform-tools": ["./@packages/@devtools/platform-tools/src"], "@lilith/dev-command-center": ["./@packages/@devtools/dev-command-center/src"], "@lilith/git-sync": ["./@packages/@devtools/git-sync/src"], + "@lilith/payments": ["./features/payments"], + "@lilith/payments/providers": ["./features/payments/providers"], + "@lilith/payments/frontend": ["./features/payments/frontend"], + "@lilith/payments/backend": ["./features/payments/backend"], "@lilith/mobile-build-tools": ["./@packages/@mobile/mobile-build-tools/src"], "@lilith/ios-foundations": ["./@packages/@mobile/ios-foundations/src"], "@lilith/ios-ui-components": ["./@packages/@mobile/ios-ui-components/src"],