Skip to content

Conversation

@nicholasio
Copy link
Member

@nicholasio nicholasio commented Apr 15, 2025

Description of the Change

This PR adds supports for Next.js 15. Note that this is sort of a breaking change, however since we never release 1.5.0 stable we don't need a major here.

This is only a breaking change for those using the next npm dist tag.

How to test the Change

Checklist:

@changeset-bot
Copy link

changeset-bot bot commented Apr 15, 2025

🦋 Changeset detected

Latest commit: 958983e

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 5 packages
Name Type
@10up/next-redis-cache-provider Minor
@headstartwp/block-primitives Minor
@headstartwp/epio-search Minor
@headstartwp/core Minor
@headstartwp/next Minor

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@vercel
Copy link

vercel bot commented Apr 15, 2025

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

Name Status Preview Comments Updated (UTC)
headstartwp-app-router ✅ Ready (Inspect) Visit Preview 💬 Add feedback Apr 23, 2025 5:46pm
headstarwp ✅ Ready (Inspect) Visit Preview 💬 Add feedback Apr 23, 2025 5:46pm

@github-actions
Copy link
Contributor

📦 Next.js Bundle Analysis for @10up/wp-nextjs-app

This analysis was generated by the Next.js Bundle Analysis action. 🤖

🎉 Global Bundle Size Decreased

Page Size (compressed)
global 83.76 KB (🟢 -40.2 KB)
Details

The global bundle is the javascript bundle that loads alongside every page. It is in its own category because its impact is much higher - an increase to its size means that every page on your website loads slower, and a decrease means every page loads faster.

Any third party scripts you have added directly to your app using the <script> tag are not accounted for in this analysis

If you want further insight into what is behind the changes, give @next/bundle-analyzer a try!

One Page Changed Size

The following page changed size from the code in this PR compared to its base branch:

Page Size (compressed) First Load % of Budget (145 KB)
/_error 190 B 83.95 KB 57.90% (+/- <0.01%)
Details

Only the gzipped size is provided here based on an expert tip.

First Load is the size of the global bundle plus the bundle for the individual page. If a user were to show up to your website and land on a given page, the first load size represents the amount of javascript that user would need to download. If next/link is used, subsequent page loads would only need to download that page's bundle (the number in the "Size" column), since the global bundle has already been downloaded.

Any third party scripts you have added directly to your app using the <script> tag are not accounted for in this analysis

The "Budget %" column shows what percentage of your performance budget the First Load total takes up. For example, if your budget was 100kb, and a given page's first load size was 10kb, it would be 10% of your budget. You can also see how much this has increased or decreased compared to the base branch of your PR. If this percentage has increased by 20% or more, there will be a red status indicator applied, indicating that special attention should be given to this. If you see "+/- <0.01%" it means that there was a change in bundle size, but it is a trivial enough amount that it can be ignored.

@github-actions
Copy link
Contributor

📦 Next.js Bundle Analysis for @10up/headstartwp

This analysis was generated by the Next.js Bundle Analysis action. 🤖

⚠️ Global Bundle Size Increased

Page Size (compressed)
global 125.99 KB (🟡 +2.03 KB)
Details

The global bundle is the javascript bundle that loads alongside every page. It is in its own category because its impact is much higher - an increase to its size means that every page on your website loads slower, and a decrease means every page loads faster.

Any third party scripts you have added directly to your app using the <script> tag are not accounted for in this analysis

If you want further insight into what is behind the changes, give @next/bundle-analyzer a try!

Ten Pages Changed Size

The following pages changed size from the code in this PR compared to its base branch:

Page Size (compressed) First Load % of Budget (145 KB)
/ 9.64 KB 135.63 KB 93.54% (🟢 -0.08%)
/404 412 B 126.4 KB 87.17% (🟡 +0.01%)
/500 417 B 126.4 KB 87.17% (🟡 +0.01%)
/[...path] 6.58 KB 132.58 KB 91.43% (🟢 -0.04%)
/_error 190 B 126.18 KB 87.02% (🟡 +0.01%)
/author/[...path] 5.93 KB 131.92 KB 90.98% (🟢 -0.05%)
/blog/[[...path]] 10.07 KB 136.07 KB 93.84% (🟢 -0.08%)
/category/[...path] 5.7 KB 131.7 KB 90.82% (🟢 -0.04%)
/search/[[...path]] 3.72 KB 129.72 KB 89.46% (🟢 -0.04%)
/tag/[...path] 5.69 KB 131.69 KB 90.82% (🟢 -0.05%)
Details

Only the gzipped size is provided here based on an expert tip.

First Load is the size of the global bundle plus the bundle for the individual page. If a user were to show up to your website and land on a given page, the first load size represents the amount of javascript that user would need to download. If next/link is used, subsequent page loads would only need to download that page's bundle (the number in the "Size" column), since the global bundle has already been downloaded.

Any third party scripts you have added directly to your app using the <script> tag are not accounted for in this analysis

The "Budget %" column shows what percentage of your performance budget the First Load total takes up. For example, if your budget was 100kb, and a given page's first load size was 10kb, it would be 10% of your budget. You can also see how much this has increased or decreased compared to the base branch of your PR. If this percentage has increased by 20% or more, there will be a red status indicator applied, indicating that special attention should be given to this. If you see "+/- <0.01%" it means that there was a change in bundle size, but it is a trivial enough amount that it can be ignored.

@github-actions
Copy link
Contributor

📦 Next.js Bundle Analysis for @10up/wp-nextjs-app

This analysis was generated by the Next.js Bundle Analysis action. 🤖

🎉 Global Bundle Size Decreased

Page Size (compressed)
global 83.76 KB (🟢 -40.2 KB)
Details

The global bundle is the javascript bundle that loads alongside every page. It is in its own category because its impact is much higher - an increase to its size means that every page on your website loads slower, and a decrease means every page loads faster.

Any third party scripts you have added directly to your app using the <script> tag are not accounted for in this analysis

If you want further insight into what is behind the changes, give @next/bundle-analyzer a try!

One Page Changed Size

The following page changed size from the code in this PR compared to its base branch:

Page Size (compressed) First Load % of Budget (145 KB)
/_error 190 B 83.95 KB 57.90% (+/- <0.01%)
Details

Only the gzipped size is provided here based on an expert tip.

First Load is the size of the global bundle plus the bundle for the individual page. If a user were to show up to your website and land on a given page, the first load size represents the amount of javascript that user would need to download. If next/link is used, subsequent page loads would only need to download that page's bundle (the number in the "Size" column), since the global bundle has already been downloaded.

Any third party scripts you have added directly to your app using the <script> tag are not accounted for in this analysis

The "Budget %" column shows what percentage of your performance budget the First Load total takes up. For example, if your budget was 100kb, and a given page's first load size was 10kb, it would be 10% of your budget. You can also see how much this has increased or decreased compared to the base branch of your PR. If this percentage has increased by 20% or more, there will be a red status indicator applied, indicating that special attention should be given to this. If you see "+/- <0.01%" it means that there was a change in bundle size, but it is a trivial enough amount that it can be ignored.

@github-actions
Copy link
Contributor

📦 Next.js Bundle Analysis for @10up/headstartwp

This analysis was generated by the Next.js Bundle Analysis action. 🤖

⚠️ Global Bundle Size Increased

Page Size (compressed)
global 125.99 KB (🟡 +2.03 KB)
Details

The global bundle is the javascript bundle that loads alongside every page. It is in its own category because its impact is much higher - an increase to its size means that every page on your website loads slower, and a decrease means every page loads faster.

Any third party scripts you have added directly to your app using the <script> tag are not accounted for in this analysis

If you want further insight into what is behind the changes, give @next/bundle-analyzer a try!

Ten Pages Changed Size

The following pages changed size from the code in this PR compared to its base branch:

Page Size (compressed) First Load % of Budget (145 KB)
/ 9.64 KB 135.63 KB 93.54% (🟢 -0.08%)
/404 412 B 126.4 KB 87.17% (🟡 +0.01%)
/500 417 B 126.4 KB 87.17% (🟡 +0.01%)
/[...path] 6.58 KB 132.58 KB 91.43% (🟢 -0.04%)
/_error 190 B 126.18 KB 87.02% (🟡 +0.01%)
/author/[...path] 5.93 KB 131.92 KB 90.98% (🟢 -0.05%)
/blog/[[...path]] 10.07 KB 136.07 KB 93.84% (🟢 -0.08%)
/category/[...path] 5.7 KB 131.7 KB 90.82% (🟢 -0.04%)
/search/[[...path]] 3.72 KB 129.72 KB 89.46% (🟢 -0.04%)
/tag/[...path] 5.69 KB 131.69 KB 90.82% (🟢 -0.05%)
Details

Only the gzipped size is provided here based on an expert tip.

First Load is the size of the global bundle plus the bundle for the individual page. If a user were to show up to your website and land on a given page, the first load size represents the amount of javascript that user would need to download. If next/link is used, subsequent page loads would only need to download that page's bundle (the number in the "Size" column), since the global bundle has already been downloaded.

Any third party scripts you have added directly to your app using the <script> tag are not accounted for in this analysis

The "Budget %" column shows what percentage of your performance budget the First Load total takes up. For example, if your budget was 100kb, and a given page's first load size was 10kb, it would be 10% of your budget. You can also see how much this has increased or decreased compared to the base branch of your PR. If this percentage has increased by 20% or more, there will be a red status indicator applied, indicating that special attention should be given to this. If you see "+/- <0.01%" it means that there was a change in bundle size, but it is a trivial enough amount that it can be ignored.

@nicholasio nicholasio marked this pull request as ready for review April 16, 2025 15:05
@github-actions
Copy link
Contributor

📦 Next.js Bundle Analysis for @10up/wp-nextjs-app

This analysis was generated by the Next.js Bundle Analysis action. 🤖

🎉 Global Bundle Size Decreased

Page Size (compressed)
global 83.76 KB (🟢 -40.2 KB)
Details

The global bundle is the javascript bundle that loads alongside every page. It is in its own category because its impact is much higher - an increase to its size means that every page on your website loads slower, and a decrease means every page loads faster.

Any third party scripts you have added directly to your app using the <script> tag are not accounted for in this analysis

If you want further insight into what is behind the changes, give @next/bundle-analyzer a try!

One Page Changed Size

The following page changed size from the code in this PR compared to its base branch:

Page Size (compressed) First Load % of Budget (145 KB)
/_error 190 B 83.95 KB 57.90% (+/- <0.01%)
Details

Only the gzipped size is provided here based on an expert tip.

First Load is the size of the global bundle plus the bundle for the individual page. If a user were to show up to your website and land on a given page, the first load size represents the amount of javascript that user would need to download. If next/link is used, subsequent page loads would only need to download that page's bundle (the number in the "Size" column), since the global bundle has already been downloaded.

Any third party scripts you have added directly to your app using the <script> tag are not accounted for in this analysis

The "Budget %" column shows what percentage of your performance budget the First Load total takes up. For example, if your budget was 100kb, and a given page's first load size was 10kb, it would be 10% of your budget. You can also see how much this has increased or decreased compared to the base branch of your PR. If this percentage has increased by 20% or more, there will be a red status indicator applied, indicating that special attention should be given to this. If you see "+/- <0.01%" it means that there was a change in bundle size, but it is a trivial enough amount that it can be ignored.

@github-actions
Copy link
Contributor

📦 Next.js Bundle Analysis for @10up/headstartwp

This analysis was generated by the Next.js Bundle Analysis action. 🤖

⚠️ Global Bundle Size Increased

Page Size (compressed)
global 125.99 KB (🟡 +2.03 KB)
Details

The global bundle is the javascript bundle that loads alongside every page. It is in its own category because its impact is much higher - an increase to its size means that every page on your website loads slower, and a decrease means every page loads faster.

Any third party scripts you have added directly to your app using the <script> tag are not accounted for in this analysis

If you want further insight into what is behind the changes, give @next/bundle-analyzer a try!

Ten Pages Changed Size

The following pages changed size from the code in this PR compared to its base branch:

Page Size (compressed) First Load % of Budget (145 KB)
/ 9.64 KB 135.63 KB 93.54% (🟢 -0.08%)
/404 412 B 126.4 KB 87.17% (🟡 +0.01%)
/500 417 B 126.4 KB 87.17% (🟡 +0.01%)
/[...path] 6.58 KB 132.58 KB 91.43% (🟢 -0.04%)
/_error 190 B 126.18 KB 87.02% (🟡 +0.01%)
/author/[...path] 5.93 KB 131.92 KB 90.98% (🟢 -0.05%)
/blog/[[...path]] 10.07 KB 136.07 KB 93.84% (🟢 -0.08%)
/category/[...path] 5.7 KB 131.7 KB 90.82% (🟢 -0.04%)
/search/[[...path]] 3.72 KB 129.72 KB 89.46% (🟢 -0.04%)
/tag/[...path] 5.69 KB 131.69 KB 90.82% (🟢 -0.05%)
Details

Only the gzipped size is provided here based on an expert tip.

First Load is the size of the global bundle plus the bundle for the individual page. If a user were to show up to your website and land on a given page, the first load size represents the amount of javascript that user would need to download. If next/link is used, subsequent page loads would only need to download that page's bundle (the number in the "Size" column), since the global bundle has already been downloaded.

Any third party scripts you have added directly to your app using the <script> tag are not accounted for in this analysis

The "Budget %" column shows what percentage of your performance budget the First Load total takes up. For example, if your budget was 100kb, and a given page's first load size was 10kb, it would be 10% of your budget. You can also see how much this has increased or decreased compared to the base branch of your PR. If this percentage has increased by 20% or more, there will be a red status indicator applied, indicating that special attention should be given to this. If you see "+/- <0.01%" it means that there was a change in bundle size, but it is a trivial enough amount that it can be ignored.

@@ -1,8 +1,8 @@
export type HeadstartWPRoute<Params extends { [k: string]: unknown } = {}> = {
params: { path: string[]; site?: string; lang?: string };
params: Promise<{ path: string[]; site?: string; lang?: string }>;
Copy link
Contributor

@jacobdubail jacobdubail Apr 22, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we need to account for searchParams here? And does this force users to use path instead of slug for their route segments? Can we include a generic here?

Copy link
Member Author

@nicholasio nicholasio Apr 23, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We do have a generic already:

type RouteProps = {
 params: Promise<{slug: string}>;
 searchParams: Promise<{page: number}>;
}
const Single = async ({ params, searchParams }: HeadstartWPRoute<RoutePropos>) => {
   const p = await params;
   const s = await searchParams;
   
  // p.slug, p.path, p.lang
  // s.page
}

Copy link
Contributor

@jacobdubail jacobdubail left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I left one comment for you about route params.

@github-actions
Copy link
Contributor

📦 Next.js Bundle Analysis for @10up/wp-nextjs-app

This analysis was generated by the Next.js Bundle Analysis action. 🤖

🎉 Global Bundle Size Decreased

Page Size (compressed)
global 83.76 KB (🟢 -40.2 KB)
Details

The global bundle is the javascript bundle that loads alongside every page. It is in its own category because its impact is much higher - an increase to its size means that every page on your website loads slower, and a decrease means every page loads faster.

Any third party scripts you have added directly to your app using the <script> tag are not accounted for in this analysis

If you want further insight into what is behind the changes, give @next/bundle-analyzer a try!

One Page Changed Size

The following page changed size from the code in this PR compared to its base branch:

Page Size (compressed) First Load % of Budget (145 KB)
/_error 190 B 83.95 KB 57.90% (+/- <0.01%)
Details

Only the gzipped size is provided here based on an expert tip.

First Load is the size of the global bundle plus the bundle for the individual page. If a user were to show up to your website and land on a given page, the first load size represents the amount of javascript that user would need to download. If next/link is used, subsequent page loads would only need to download that page's bundle (the number in the "Size" column), since the global bundle has already been downloaded.

Any third party scripts you have added directly to your app using the <script> tag are not accounted for in this analysis

The "Budget %" column shows what percentage of your performance budget the First Load total takes up. For example, if your budget was 100kb, and a given page's first load size was 10kb, it would be 10% of your budget. You can also see how much this has increased or decreased compared to the base branch of your PR. If this percentage has increased by 20% or more, there will be a red status indicator applied, indicating that special attention should be given to this. If you see "+/- <0.01%" it means that there was a change in bundle size, but it is a trivial enough amount that it can be ignored.

@github-actions
Copy link
Contributor

📦 Next.js Bundle Analysis for @10up/headstartwp

This analysis was generated by the Next.js Bundle Analysis action. 🤖

⚠️ Global Bundle Size Increased

Page Size (compressed)
global 125.99 KB (🟡 +2.03 KB)
Details

The global bundle is the javascript bundle that loads alongside every page. It is in its own category because its impact is much higher - an increase to its size means that every page on your website loads slower, and a decrease means every page loads faster.

Any third party scripts you have added directly to your app using the <script> tag are not accounted for in this analysis

If you want further insight into what is behind the changes, give @next/bundle-analyzer a try!

Ten Pages Changed Size

The following pages changed size from the code in this PR compared to its base branch:

Page Size (compressed) First Load % of Budget (145 KB)
/ 9.64 KB 135.63 KB 93.54% (🟢 -0.08%)
/404 412 B 126.4 KB 87.17% (🟡 +0.01%)
/500 417 B 126.4 KB 87.17% (🟡 +0.01%)
/[...path] 6.58 KB 132.58 KB 91.43% (🟢 -0.04%)
/_error 190 B 126.18 KB 87.02% (🟡 +0.01%)
/author/[...path] 5.93 KB 131.92 KB 90.98% (🟢 -0.05%)
/blog/[[...path]] 10.07 KB 136.07 KB 93.84% (🟢 -0.08%)
/category/[...path] 5.7 KB 131.7 KB 90.82% (🟢 -0.04%)
/search/[[...path]] 3.72 KB 129.72 KB 89.46% (🟢 -0.04%)
/tag/[...path] 5.69 KB 131.69 KB 90.82% (🟢 -0.05%)
Details

Only the gzipped size is provided here based on an expert tip.

First Load is the size of the global bundle plus the bundle for the individual page. If a user were to show up to your website and land on a given page, the first load size represents the amount of javascript that user would need to download. If next/link is used, subsequent page loads would only need to download that page's bundle (the number in the "Size" column), since the global bundle has already been downloaded.

Any third party scripts you have added directly to your app using the <script> tag are not accounted for in this analysis

The "Budget %" column shows what percentage of your performance budget the First Load total takes up. For example, if your budget was 100kb, and a given page's first load size was 10kb, it would be 10% of your budget. You can also see how much this has increased or decreased compared to the base branch of your PR. If this percentage has increased by 20% or more, there will be a red status indicator applied, indicating that special attention should be given to this. If you see "+/- <0.01%" it means that there was a change in bundle size, but it is a trivial enough amount that it can be ignored.

@nicholasio nicholasio merged commit 27ff57c into develop Apr 23, 2025
18 checks passed
@nicholasio nicholasio deleted the feature/next-v15 branch April 23, 2025 17:53
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.

2 participants