Skip to content

Conversation

@renovate
Copy link
Contributor

@renovate renovate bot commented Oct 18, 2025

This PR contains the following updates:

Package Change Age Confidence
next-seo ^6.8.0 -> ^7.0.0 age confidence

Release Notes

garmeeh/next-seo (next-seo)

v7.0.1

Patch Changes
  • 1db3648: Add JSDoc comment to internal type guard function

v7.0.0

Next SEO v7.0.0 Release Notes

🚨 Important Notice

Next SEO v7 is a complete rewrite with breaking changes throughout the entire API.

We strongly recommend staying on v6 unless you:

  • Need the new JSON-LD components based on Google's latest specifications
  • Are starting a new project and want to use the latest architecture
  • Are willing to completely rewrite your SEO implementation

Version 6 will continue to receive bug fixes and security updates.


📋 Summary

Next SEO v7 represents a ground-up rewrite of the library, modernizing every aspect from tooling to API design. This release focuses on:

  • Modern developer experience with improved TypeScript support and better tree-shaking
  • AI-friendly development making it easier to maintain and contribute
  • Google-specification compliance for all JSON-LD components
  • Maintains Pages Router support with function-based API

🎯 Why v7?

The web development ecosystem has evolved significantly as well as my skills (I hope) since Next SEO's inception. Version 7 addresses several key challenges:

  1. Maintainability: The previous architecture made it difficult to add new components and keep up with Google's evolving structured data specifications
  2. Modern Tooling: Moving from legacy build tools to modern alternatives for better performance and developer experience
  3. AI-Assisted Development: Set up to be AI agent-friendly, making it easier for contributors to add features and fix bugs
  4. Specification Compliance: All JSON-LD components rebuilt from scratch following Google's latest documentation and also you can easily create your own

✨ Major Improvements

1. Modern Build Tooling
  • tsup replaces microbundle for faster, more reliable builds
  • Vitest replaces Jest for lightning-fast unit tests
  • Playwright replaces Cypress for more stable E2E testing
  • ESM-first with CommonJS compatibility
2. Enhanced Developer Experience
  • Full TypeScript rewrite with improved type inference
  • Better tree-shaking support
  • Comprehensive documentation for each component
  • AI-friendly codebase with AGENTS.md and ADDING_NEW_COMPONENTS.md guides
3. Google-Compliant JSON-LD Components

All JSON-LD components have been rebuilt from scratch following Google's structured data gallery specifications:

  • More accurate schema implementation
  • Better validation and error messages
  • Support for latest schema.org properties
4. Simplified Pages Router API

Instead of components that manage Next.js internals, v7 exposes pure functions that you control:

// v6 (old)
import { NextSeo } from "next-seo";
<NextSeo title="My Page" description="..." />;

// v7 (new)
import Head from "next/head";
import { generateNextSeo } from "next-seo/pages";
<Head>{generateNextSeo({ title: "My Page", description: "..." })}</Head>;

💔 Breaking Changes

Complete API Redesign

This is not a drop-in replacement. Every aspect of the API has changed:

Pages Router Changes
Feature v6 v7
Component <NextSeo /> generateNextSeo() function
Default SEO <DefaultSeo /> generateDefaultSeo() function
Import next-seo next-seo/pages
Usage Direct component Wrap in <Head>
App Router Changes
Feature v6 v7
Usage Components with useAppDir={true} Direct component usage
Title prop Not required Built-in support
Placement page.js page.tsx/jsx
JSON-LD Component Changes

All components have completely new APIs. Properties have been renamed, restructured, or removed to match Google's specifications.

🔄 Migration Guide

Basic Pages Router Migration
Before (v6):
// pages/index.tsx
import { NextSeo } from "next-seo";

export default function Home() {
  return (
    <>
      <NextSeo
        title="My Homepage"
        description="Welcome to my website"
        canonical="https://example.com"
        openGraph={{
          url: "https://example.com",
          title: "My Homepage",
          description: "Welcome to my website",
        }}
      />
      <h1>Welcome</h1>
    </>
  );
}
After (v7):
// pages/index.tsx
import Head from "next/head";
import { generateNextSeo } from "next-seo/pages";

export default function Home() {
  return (
    <>
      <Head>
        {generateNextSeo({
          title: "My Homepage",
          description: "Welcome to my website",
          canonical: "https://example.com",
          openGraph: {
            url: "https://example.com",
            title: "My Homepage",
            description: "Welcome to my website",
          },
        })}
      </Head>
      <h1>Welcome</h1>
    </>
  );
}
JSON-LD Migration Example
Before (v6):
import { ArticleJsonLd } from "next-seo";

<ArticleJsonLd
  url="https://example.com/article"
  title="Article headline"
  images={["https://example.com/image.jpg"]}
  datePublished="2024-01-01"
  authorName="John Doe"
  publisherName="Example News"
  publisherLogo="https://example.com/logo.jpg"
  description="Article description"
/>;
After (v7):
import { ArticleJsonLd } from "next-seo";

<ArticleJsonLd
  url="https://example.com/article"
  headline="Article headline" // Changed from 'title'
  image="https://example.com/image.jpg" // Changed from 'images'
  datePublished="2024-01-01T00:00:00.000Z" // ISO 8601 format recommended
  author="John Doe" // Changed from 'authorName'
  publisher={{
    // Now an object instead of separate props
    "@&#8203;type": "Organization",
    name: "Example News",
    logo: "https://example.com/logo.jpg",
  }}
  description="Article description"
/>;

🛠️ Technical Improvements

Build System
  • tsup: Modern bundler with better ESM/CJS dual package support
  • Path aliases: Cleaner imports with ~ mapping to src
  • Optimized output: Smaller bundle sizes with better tree-shaking
Testing Infrastructure
  • Vitest: 10x faster test execution
  • Playwright: More reliable E2E tests
  • React Testing Library: Better integration testing
Developer Tooling
  • AI-Friendly Documentation: CLAUDE.md and ADDING_NEW_COMPONENTS.md for AI-assisted development
  • Modern ESLint: Flat config with latest rules
  • Prettier Integration: Consistent code formatting
  • Husky: Pre-commit hooks for quality assurance

📚 Documentation

The documentation has been completely rewritten:

  • Component-by-component guides with examples
  • Best practices for each component
  • Migration guides for common scenarios
  • AI-friendly contribution guides

🤝 Contributing

Version 7 makes contributing easier than ever:

  • AI agent-friendly codebase
  • Comprehensive guide for adding new components
  • Modern tooling that's familiar to developers
  • Clear patterns and conventions

🔮 Future Plans

  • Continue v6 maintenance with bug fixes and security updates
  • Add more JSON-LD components based on community needs
  • Further performance optimizations

📞 Support

⚠️ Final Recommendation

Unless you specifically need the new JSON-LD components or are starting a fresh project, we recommend staying on v6. The API changes are extensive and will require a complete rewrite of your SEO implementation. Version 6 remains stable, battle-tested, and will continue to receive maintenance updates.


Thank you for your continued support of Next SEO. I'm excited about the future of SEO in Next.js applications!


Configuration

📅 Schedule: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).

🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.

Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.

🔕 Ignore: Close this PR and you won't be reminded about this update again.


  • If you want to rebase/retry this PR, check this box

This PR was generated by Mend Renovate. View the repository job log.

@renovate renovate bot added the dependencies Pull requests that update a dependency file label Oct 18, 2025
@renovate renovate bot force-pushed the renovate/next-seo-7.x branch 2 times, most recently from 831ed40 to 36409c3 Compare October 22, 2025 12:45
@renovate renovate bot force-pushed the renovate/next-seo-7.x branch from 36409c3 to f938ee1 Compare October 29, 2025 11:52
@renovate renovate bot force-pushed the renovate/next-seo-7.x branch 3 times, most recently from 075a492 to 9a1bfb2 Compare November 14, 2025 02:14
@renovate renovate bot force-pushed the renovate/next-seo-7.x branch 2 times, most recently from 2d69991 to 41cb7bb Compare November 24, 2025 21:47
@renovate renovate bot force-pushed the renovate/next-seo-7.x branch 4 times, most recently from 0fea003 to 9ee0b1e Compare December 3, 2025 20:47
@renovate renovate bot force-pushed the renovate/next-seo-7.x branch from 9ee0b1e to 5bd4c62 Compare December 4, 2025 02:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

dependencies Pull requests that update a dependency file

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant