Skip to content

Update dependency next-seo to v7 - #749

Open
renovate[bot] wants to merge 1 commit into
mainfrom
renovate/next-seo-7.x
Open

renovate[bot] wants to merge 1 commit into
mainfrom
renovate/next-seo-7.x

Conversation

@renovate

@renovate renovate Bot commented Oct 18, 2025 •

Copy link
Copy Markdown
Contributor

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.3.0

Compare Source

Minor Changes
  • 7784fd2: Add optional nonce prop to all JSON-LD components for Content Security Policy (CSP) compliance

    Sites that send a strict CSP header such as script-src 'nonce-{RANDOM}' block inline scripts without a matching nonce. Every JSON-LD component now accepts an optional nonce prop, which is forwarded to the rendered <script type="application/ld+json"> tag. Omit the prop and no nonce attribute is rendered, so existing usage is unchanged.

    import { headers } from "next/headers";
    import { ArticleJsonLd } from "next-seo";
    
    const nonce = (await headers()).get("x-nonce") ?? undefined;
    
    <ArticleJsonLd headline="My Article" nonce={nonce} />;

v7.2.0

Compare Source

Minor Changes
  • 28c684e: Add review and aggregateRating props to OrganizationJsonLd component, matching the existing support in LocalBusinessJsonLd. Both are direct Schema.org Organization properties processed using shared utilities.

v7.1.0

Compare Source

Minor Changes
  • d412e2b: Add HowToJsonLd component for structured data support
    • New HowToJsonLd component following Schema.org HowTo specification
    • Support for HowToStep, HowToSection, HowToDirection, and HowToTip types
    • HowToSupply and HowToTool for materials and equipment
    • Duration properties (prepTime, performTime, totalTime) in ISO 8601 format
    • estimatedCost as string or MonetaryAmount object
    • yield as string or QuantitativeValue
    • Video support via VideoObject

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
    "@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: (UTC)

  • 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 5 times, most recently from 9ee0b1e to 5bd4c62 Compare December 4, 2025 02:12
@renovate
renovate Bot force-pushed the renovate/next-seo-7.x branch 4 times, most recently from 9a451a4 to 1e7e7b7 Compare December 12, 2025 14:32
@renovate
renovate Bot force-pushed the renovate/next-seo-7.x branch 2 times, most recently from 403150b to 1f252cf Compare December 22, 2025 20:54
@renovate
renovate Bot force-pushed the renovate/next-seo-7.x branch from 1f252cf to 13a6836 Compare December 31, 2025 16:50
@renovate
renovate Bot force-pushed the renovate/next-seo-7.x branch 4 times, most recently from 6a0ade5 to f01894a Compare January 20, 2026 04:36
@renovate
renovate Bot force-pushed the renovate/next-seo-7.x branch 5 times, most recently from 5511d00 to 01e9a5f Compare January 28, 2026 04:58
@renovate
renovate Bot force-pushed the renovate/next-seo-7.x branch 2 times, most recently from aa1b909 to 7527956 Compare March 21, 2026 04:59
@renovate
renovate Bot force-pushed the renovate/next-seo-7.x branch 2 times, most recently from ba0cfc8 to 7a9caa9 Compare April 1, 2026 19:29
@renovate
renovate Bot force-pushed the renovate/next-seo-7.x branch 3 times, most recently from cedab92 to e1123d2 Compare April 9, 2026 02:11
@renovate
renovate Bot force-pushed the renovate/next-seo-7.x branch 3 times, most recently from f74d4f2 to 5bad66f Compare May 18, 2026 20:32
@renovate
renovate Bot force-pushed the renovate/next-seo-7.x branch 3 times, most recently from 29847b6 to 08e3d1f Compare June 2, 2026 05:08
@renovate
renovate Bot force-pushed the renovate/next-seo-7.x branch 2 times, most recently from 11d35f3 to 29d783c Compare June 11, 2026 14:48
@renovate
renovate Bot force-pushed the renovate/next-seo-7.x branch from 29d783c to 5eef2dc Compare July 2, 2026 03:35
@renovate
renovate Bot force-pushed the renovate/next-seo-7.x branch from 5eef2dc to dc24067 Compare July 12, 2026 16:02
@renovate
renovate Bot force-pushed the renovate/next-seo-7.x branch 3 times, most recently from 7900774 to 97e6278 Compare July 26, 2026 05:01
@renovate
renovate Bot force-pushed the renovate/next-seo-7.x branch from 97e6278 to 793299c Compare July 29, 2026 20:53
@renovate
renovate Bot force-pushed the renovate/next-seo-7.x branch from 793299c to d14c41c Compare August 12, 2026 04:12
@renovate
renovate Bot force-pushed the renovate/next-seo-7.x branch from d14c41c to f3ccad7 Compare August 26, 2026 16:01
@renovate
renovate Bot force-pushed the renovate/next-seo-7.x branch 2 times, most recently from fb47f5a to 781740e Compare September 3, 2026 22:30
@renovate
renovate Bot force-pushed the renovate/next-seo-7.x branch from 781740e to 8a264be Compare September 10, 2026 11:31
@renovate
renovate Bot force-pushed the renovate/next-seo-7.x branch 2 times, most recently from 5495a26 to 339e7b8 Compare October 1, 2026 05:02
@renovate
renovate Bot force-pushed the renovate/next-seo-7.x branch from 339e7b8 to 9a62073 Compare October 5, 2026 17:40

This branch has not been deployed

No deployments
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.

0 participants