[Snyk] Security upgrade next from 14.2.35 to 15.5.10 - #90
Closed
catomean wants to merge 405 commits into
Closed
Conversation
Co-Authored-By: G <butaeff@gmail.com>
Co-Authored-By: G <butaeff@gmail.com>
Co-Authored-By: G <butaeff@gmail.com>
Co-Authored-By: G <butaeff@gmail.com>
Co-Authored-By: G <butaeff@gmail.com>
Co-Authored-By: G <butaeff@gmail.com>
Co-Authored-By: G <butaeff@gmail.com>
Co-Authored-By: G <butaeff@gmail.com>
Co-Authored-By: G <butaeff@gmail.com>
Co-Authored-By: G <butaeff@gmail.com>
Co-Authored-By: G <butaeff@gmail.com>
Co-Authored-By: G <butaeff@gmail.com>
Co-Authored-By: G <butaeff@gmail.com>
Co-Authored-By: G <butaeff@gmail.com>
Co-Authored-By: G <butaeff@gmail.com>
Co-Authored-By: G <butaeff@gmail.com>
Co-Authored-By: G <butaeff@gmail.com>
Co-Authored-By: G <butaeff@gmail.com>
Co-Authored-By: G <butaeff@gmail.com>
Co-Authored-By: G <butaeff@gmail.com>
Co-Authored-By: G <butaeff@gmail.com>
Co-Authored-By: G <butaeff@gmail.com>
Co-Authored-By: G <butaeff@gmail.com>
Co-Authored-By: G <butaeff@gmail.com>
Co-Authored-By: G <butaeff@gmail.com>
Co-Authored-By: G <butaeff@gmail.com>
Co-Authored-By: G <butaeff@gmail.com>
Co-Authored-By: G <butaeff@gmail.com>
Co-Authored-By: G <butaeff@gmail.com>
Co-Authored-By: G <butaeff@gmail.com>
- Remove unused @ts-expect-error directive in jest.setup.ts - Fix useCallback dependency in custom bot page (remove unused 'messages') - Fix useEffect/useCallback pattern in ConversationList Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
The migration commit referenced @supabase/ssr but didn't include it in package.json. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Add next/server mock for Jest to handle NextRequest/NextResponse imports - Fix api-responses tests to match actual function signatures: - jsonSuccess wraps data in response.data property - jsonValidationError expects ValidationError[] not object - formatZodErrors returns array not object with field properties Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Add auto-detection of best available LLM provider - Priority: Ollama (local) > Groq (cloud) > OpenRouter (paid) - Add isOllamaAvailable() check with 2s timeout - Add generateWithBestProvider() for automatic provider selection - Add 60s timeout to Ollama requests for model loading - Update demo chat API to use unified LLM client - Provider info now shown in API responses Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
DRY improvements: - Add LoadingSpinner component (PageLoading, InlineLoading variants) - Add centralized color config (ACCENT_BORDER_CLASSES, helpers) - Add shared icons (CheckIcon, ClockIcon, EditIcon, etc.) Updated files to use shared components: - All auth pages now use PageLoading instead of inline spinners - Profile page uses InlineLoading and centralized accent colors - Settings page uses shared icons (CheckIcon, ChevronRightIcon) This reduces code duplication across 17+ files for spinners and 15+ files for accent color mappings. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Replace inline loading spinners with PageLoading, InlineLoading, and LoadingSpinner components across 10 more files: - app/dashboard/page.tsx - app/documents/page.tsx - app/bots/mine/page.tsx - app/bots/custom/[slug]/page.tsx - app/bots/custom/[slug]/edit/page.tsx - app/infrastructure/page.tsx - app/my-data/page.tsx - app/auth/callback/page.tsx - components/conversations/ConversationList.tsx - components/documents/AddToBotModal.tsx This completes the DRY refactoring for loading spinners. The LoadingSpinner component is now the SSOT for all loading states. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Extended colors.ts with ACCENT_COLOR_OPTIONS and COLOR_CLASSES - Updated colors from purple/orange/yellow to indigo/amber to match usage - Added composite color classes for themed UI components - Removed duplicated color definitions from: - app/bots/custom/[slug]/page.tsx - app/bots/custom/[slug]/edit/page.tsx - components/bot-builder/StepPersonality.tsx - components/bot-builder/StepReview.tsx Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
…SSOT) - Added DOCUMENT_STATUS constant to lib/constants.ts - Added DocumentStatusType derived from constant - Added DOCUMENT_STATUS_CONFIG for display (labels, colors) - Created DocumentStatusBadge shared component - Updated types/document.ts to use DocumentStatusType - Updated app/documents/page.tsx to use shared component and constants Changes to add a new status now require only 1 file (lib/constants.ts). Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
…usBadge - Created useDashboardStats hook for data fetching logic - Simplified dashboard page by extracting state management - Updated dashboard to use DocumentStatusBadge component - Updated my-data page to use DocumentStatusBadge component - Replaced magic status strings with DOCUMENT_STATUS constants Benefits: - Dashboard page reduced from ~100 lines of state logic to ~10 lines - Status badge logic now in single location (SSOT) - Data loading logic is now testable in isolation - Consistent status display across all pages Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Create lib/config/colors.ts as single source of truth for all colors - AccentColor (16 colors) for bot templates - CustomBotAccentColor (5 colors) for custom bots (matches DB constraint) - Remove hardcoded color maps from QuickChat.tsx - Derive types from Zod schemas instead of separate definitions - Add justification comment for any type in supabase mock - Remove console.error from production code Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
## Broken Links Fixed - Fix /projects/governance/build link to /contact in HeroSection.tsx ## Console Statements Removed (production code) - Remove console.log/error from client components - Replace with silent error handling or UI feedback - Files: documents/page.tsx, try/page.tsx, settings/page.tsx, ConversationList.tsx, ProfessionalDemo.tsx, and more ## Inline Styles Converted to Tailwind - Replace animation-delay inline styles with Tailwind arbitrary values - Files: DemoMessage.tsx, DemoChat.tsx, ProfessionalDemo.tsx, QuickChat.tsx, demo/page.tsx, HeroSection.tsx ## Governance Types Consolidated (SSOT) - Create app/projects/governance/types.ts as single source of truth - Create app/projects/governance/utils.ts for formatting functions - Remove duplicate EnhancedTransaction from TransactionWithTraceability.tsx - Update component type files to re-export from SSOT ## Colors Config Extended - Extend COLOR_CLASSES to support all 16 accent colors - Fix type mismatch in custom bot pages ## Magic Numbers Extracted - Add formatBytes utility to lib/format.ts (DRY) - Add DEMO_MAX_FILE_SIZE to VALIDATION constants - Update try/page.tsx to use centralized constants ## Minor Fixes - Fix unused variable warning in CollaborationForm.tsx Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Remove unused workspace-dashboard/ folder (duplicate of workspace/) - Remove unused ClientPortalProps and LawyerPortalProps from types.ts DRY cleanup: workspace/ folder is the active one used by WorkspaceDashboard.tsx and DemoSection.tsx Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Remove duplicate MAX_FILE_SIZE constant, use VALIDATION.MAX_FILE_SIZE (SSOT) - Refactor CustomBotPage sendMessage logic to eliminate code duplication (DRY) - Convert inline animation-delay styles to Tailwind arbitrary values - Add development-only check to ErrorBoundary console.error - Remove deprecated MAX_FILE_SIZE export from types/document.ts Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Delete lib/groq.ts (replaced by lib/llm-client.ts) - Delete tests/api.test.js.bak (orphaned backup file) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Delete example-section/ folder (duplicate of parent components) - Delete unused ClientErrorBoundary wrapper component Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Add toDateString() to lib/format.ts for YYYY-MM-DD date strings - Update lib/blog.ts to use shared toDateString (removed getCurrentDate) - Update lib/knowledge.ts to use shared toDateString (4 usages) DRY: Eliminates duplicate date formatting pattern Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- TeamTab.tsx: member.imageUrl is dynamic external URL - ProfileHeader.tsx: citizen.avatarUrl is dynamic external URL These use <img> because Next.js Image requires explicit domain config for external URLs, which isn't practical for user-provided data. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Delete lib/hooks/useFormSubmit.ts (never imported) - Delete lib/utils/error.ts (never imported) - Remove unused exports from lib/hooks/index.ts: - NAV_COLOR_CLASSES (only used internally) - NavColorClasses type (never imported) - useFormSubmit exports Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Update app/documents/page.tsx to use formatBytes from lib/format - Update app/my-data/page.tsx to use formatBytes from lib/format - Update components/shared/demo/DemoFileUpload.tsx to use formatBytes - Update workspaceUtils.ts to re-export formatBytes as formatFileSize DRY: 4 duplicate formatFileSize implementations → 1 SSOT (lib/format.ts) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Remove swiss-german-teacher/components/shared/ (unused DemoModeOverlay, DemoPopup, Navigation) - Remove swiss-german-teacher/components/navigation/ (unused Navigation) - Remove medical-expert/components/navigation/ (unused Navigation) - Remove product-manager/components/navigation/ (unused Navigation) - Remove research-assistant/components/navigation/ (unused Navigation) - Fix test to use valid ErrorCode type All bots now use BotPageTemplate's shared navigation. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Remove unused InfoBox.tsx (140 lines) - Remove unused ProfileTabs.tsx (40 lines) - Update governance/index.ts to only export ProfileHeader (which is used) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Remove packages that were installed but never imported: - @heroicons/react (using custom Icons instead) - framer-motion (no animations used) - nodemailer (email handled differently) - @mdx-js/loader, @mdx-js/react, @next/mdx (using next-mdx-remote) - @eslint/eslintrc, @eslint/js (using old .eslintrc.json format) - @testing-library/react (tests use Jest only) Reduces bundle size and maintenance surface. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Remove empty stub files (mdx-provider.tsx, events.ts, route.d.ts) - Remove orphaned components/auth/ folder (EmailVerificationBanner never imported) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
The following vulnerabilities are fixed with an upgrade: - https://snyk.io/vuln/SNYK-JS-NEXT-15104645
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Collaborator
Author
|
Closing stale automated PR — cleaning up repo. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Snyk has created this PR to fix 1 vulnerabilities in the npm dependencies of this project.
Snyk changed the following file(s):
package.jsonpackage-lock.jsonVulnerabilities that will be fixed with an upgrade:
SNYK-JS-NEXT-15104645
Important
Note: You are seeing this because you or someone else with access to this repository has authorized Snyk to open fix PRs.
For more information:
🧐 View latest project report
📜 Customise PR templates
🛠 Adjust project settings
📚 Read about Snyk's upgrade logic
Learn how to fix vulnerabilities with free interactive lessons:
🦉 Allocation of Resources Without Limits or Throttling