Skip to content

15 updates #32

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

Merged
merged 4 commits into from
Jan 11, 2025
Merged

15 updates #32

merged 4 commits into from
Jan 11, 2025

Conversation

brijr
Copy link
Collaborator

@brijr brijr commented Jan 11, 2025

  1. Enhanced Error Handling:
    • Added a custom WordPressAPIError class for better error handling
    • Implemented proper error messages with HTTP status codes
    • Added environment variable validation for WORDPRESS_URL
  2. Improved Type Safety:
    • Created a FetchOptions interface for type-safe fetch options
    • Added proper TypeScript generics for the wordpressFetch utility
    • Improved type inference across all API functions
  3. Performance Optimizations:
    • Added proper HTTP headers including Accept and Content-Type
    • Implemented user agent tracking for better analytics
    • Consolidated fetch logic into a reusable wordpressFetch utility
  4. Code Organization:
    • Separated configuration, types, and utilities
    • Improved code reusability and maintainability
    • Added proper exports for error handling
  5. Next.js 15 Features:
    • Added proper cache tags for granular revalidation
    • Implemented headers() API for server-side header access
    • Enhanced revalidation with proper error handling

Copy link

vercel bot commented Jan 11, 2025

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
next-wp ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jan 11, 2025 7:48am

@brijr brijr merged commit a18a6c0 into main Jan 11, 2025
2 checks passed
@brijr brijr deleted the 15-updates branch January 11, 2025 07:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant