From 42e3e7e6928d096b4d003271b8a6b98723a362d7 Mon Sep 17 00:00:00 2001 From: Nicolas Cantu Date: Sun, 28 Dec 2025 21:49:19 +0100 Subject: [PATCH] Update all dependencies to latest versions and fix compatibility issues MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit **Motivations:** - Keep dependencies up to date for security and features - Automate dependency updates in deployment script - Fix compatibility issues with major version updates (React 19, Next.js 16, nostr-tools 2.x) **Root causes:** - Dependencies were outdated - Deployment script did not update dependencies before deploying - Major version updates introduced breaking API changes **Correctifs:** - Updated all dependencies to latest versions using npm-check-updates - Modified deploy.sh to run npm-check-updates before installing dependencies - Fixed nostr-tools 2.x API changes (generatePrivateKey -> generateSecretKey, signEvent -> finalizeEvent, verifySignature -> verifyEvent) - Fixed React 19 ref types to accept null - Fixed JSX namespace issues (JSX.Element -> React.ReactElement) - Added proper types for event callbacks - Fixed SimplePool.sub typing issues with type assertions **Evolutions:** - Deployment script now automatically updates dependencies to latest versions before deploying - All dependencies updated to latest versions (Next.js 14->16, React 18->19, nostr-tools 1->2, etc.) **Pages affectées:** - package.json - deploy.sh - lib/keyManagement.ts - lib/nostr.ts - lib/nostrRemoteSigner.ts - lib/zapVerification.ts - lib/platformTrackingEvents.ts - lib/sponsoringTracking.ts - lib/articlePublisherHelpersVerification.ts - lib/contentDeliveryVerification.ts - lib/paymentPollingZapReceipt.ts - lib/nostrPrivateMessages.ts - lib/nostrSubscription.ts - lib/nostrZapVerification.ts - lib/markdownRenderer.tsx - components/AuthorFilter.tsx - components/AuthorFilterButton.tsx - components/UserArticlesList.tsx - types/nostr-tools-extended.ts --- components/AuthorFilter.tsx | 4 +- components/AuthorFilterButton.tsx | 4 +- components/AuthorPresentationEditor.tsx | 39 +- components/UserArticlesList.tsx | 2 +- components/UserProfile.tsx | 2 - components/UserProfileHeader.tsx | 3 - deploy.sh | 17 +- hooks/useAuthorPresentation.ts | 16 +- lib/articlePublisherHelpersVerification.ts | 3 +- lib/contentDeliveryVerification.ts | 3 +- lib/keyManagement.ts | 14 +- lib/markdownRenderer.tsx | 30 +- lib/nip95.ts | 60 +- lib/nostr.ts | 53 +- lib/nostrPrivateMessages.ts | 5 +- lib/nostrRemoteSigner.ts | 11 +- lib/nostrSubscription.ts | 3 +- lib/nostrZapVerification.ts | 3 +- lib/paymentPollingZapReceipt.ts | 3 +- lib/platformTrackingEvents.ts | 17 +- lib/sponsoringTracking.ts | 17 +- lib/zapVerification.ts | 4 +- locales/en.txt | 3 + package-lock.json | 2716 ++++++++++---------- package.json | 26 +- public/locales/en.txt | 3 + public/locales/fr.txt | 3 + types/nostr-tools-extended.ts | 17 +- 28 files changed, 1593 insertions(+), 1488 deletions(-) diff --git a/components/AuthorFilter.tsx b/components/AuthorFilter.tsx index 556f47e..0a8b428 100644 --- a/components/AuthorFilter.tsx +++ b/components/AuthorFilter.tsx @@ -19,8 +19,8 @@ interface AuthorFilterContentProps { loading: boolean onChange: (value: string | null) => void setIsOpen: (open: boolean) => void - dropdownRef: React.RefObject - buttonRef: React.RefObject + dropdownRef: React.RefObject + buttonRef: React.RefObject getDisplayName: (pubkey: string) => string getPicture: (pubkey: string) => string | undefined getMnemonicIcons: (pubkey: string) => string[] diff --git a/components/AuthorFilterButton.tsx b/components/AuthorFilterButton.tsx index 9369d2a..4d8c2af 100644 --- a/components/AuthorFilterButton.tsx +++ b/components/AuthorFilterButton.tsx @@ -67,7 +67,7 @@ export function AuthorFilterButton({ getMnemonicIcons: (pubkey: string) => string[] isOpen: boolean setIsOpen: (open: boolean) => void - buttonRef: React.RefObject + buttonRef: React.RefObject }) { return (