Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 5 additions & 2 deletions crates/next-api/src/project.rs
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ use turbopack_node::child_process_backend;
use turbopack_node::execution_context::ExecutionContext;
#[cfg(feature = "worker_pool")]
use turbopack_node::worker_threads_backend;
use turbopack_nodejs::NodeJsChunkingContext;
use turbopack_nodejs::{NodeJsChunkingContext, fs::NodeModulesPathMatcher};

use crate::{
aggregate_hmr::{AggregateHmrVersion, ChunkListUpdateBuilder, DiffResult, diff_chunks_against},
Expand Down Expand Up @@ -1094,10 +1094,13 @@ impl Project {
*self.root_path,
vec![denied_path, denied_profiles_path],
DiskWatcherConfig {
recursive_mode: None,
poll_interval: self.watch.poll_interval,
// the dev server reports these to the user
report_invalidation_reason: true,
extended_batch_delay_matcher: Some(ResolvedVc::upcast(
NodeModulesPathMatcher.resolved_cell(),
)),
..Default::default()
},
))
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,7 @@ Next.js avoids this with client-side transitions using the `<Link>` component. I
- Keeping any shared layouts and UI.
- Replacing the current page with the prefetched loading state or a new page if available.

Client-side transitions are what makes a server-rendered apps _feel_ like client-rendered apps. And when paired with [prefetching](#prefetching) and [streaming](#streaming), it enables fast transitions, even for dynamic routes.
Client-side transitions make server-rendered apps _feel_ like client-rendered apps. And when paired with [prefetching](#prefetching) and [streaming](#streaming), they enable fast transitions, even for dynamic routes.

Next.js also handles [scrolling to the top of the page](/docs/app/api-reference/components/link#scroll) during client-side transitions. If content scrolls behind a sticky or fixed header after navigation, you can fix this with CSS [`scroll-padding-top`](/docs/app/api-reference/components/link#scroll-offset-with-sticky-headers).

Expand Down
6 changes: 3 additions & 3 deletions docs/01-app/02-guides/redirecting.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -376,11 +376,11 @@ Consider the following data structure:
}
```

In [Proxy](/docs/app/api-reference/file-conventions/proxy), you can read from a database such as Vercel's [Edge Config](https://vercel.com/docs/global-config/get-started) or [Redis](https://vercel.com/docs/redis), and redirect the user based on the incoming request:
In [Proxy](/docs/app/api-reference/file-conventions/proxy), you can read from a database such as Vercel's [Global Config](https://vercel.com/docs/global-config/get-started) or [Redis](https://vercel.com/docs/redis), and redirect the user based on the incoming request:

```ts filename="proxy.ts" switcher
import { NextResponse, NextRequest } from 'next/server'
import { get } from '@vercel/edge-config'
import { get } from '@vercel/global-config'

type RedirectEntry = {
destination: string
Expand All @@ -404,7 +404,7 @@ export async function proxy(request: NextRequest) {

```js filename="proxy.js" switcher
import { NextResponse } from 'next/server'
import { get } from '@vercel/edge-config'
import { get } from '@vercel/global-config'

export async function proxy(request) {
const pathname = request.nextUrl.pathname
Expand Down
18 changes: 18 additions & 0 deletions docs/01-app/03-api-reference/04-functions/generate-metadata.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -923,6 +923,24 @@ export const metadata = {
<link rel="bookmarks" href="https://nextjs.org/13" />
```

### `pagination`

Describes the previous and next pages in a paginated sequence.

```jsx filename="layout.js | page.js"
export const metadata = {
pagination: {
previous: 'https://nextjs.org/blog?page=1',
next: 'https://nextjs.org/blog?page=3',
},
}
```

```html filename="<head> output" hideLineNumbers
<link rel="prev" href="https://nextjs.org/blog?page=1" />
<link rel="next" href="https://nextjs.org/blog?page=3" />
```

### `category`

```jsx filename="layout.js | page.js"
Expand Down
7 changes: 4 additions & 3 deletions examples/with-apivideo/pages/videos/[videoId].tsx
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ const VideoView: NextPage<IVideoViewProps> = ({

<div className="inputs-container">
<div>
<label>Play button color</label>
<label htmlFor="link">Play button color</label>
<input
id="link"
type="text"
Expand All @@ -78,7 +78,7 @@ const VideoView: NextPage<IVideoViewProps> = ({
/>
</div>
<div>
<label>Buttons hover color</label>
<label htmlFor="linkHover">Buttons hover color</label>
<input
id="linkHover"
type="text"
Expand All @@ -89,13 +89,14 @@ const VideoView: NextPage<IVideoViewProps> = ({
</div>
<div>
<input
id="hideControls"
type="checkbox"
checked={hideControls}
onChange={(e) => {
setHideControls(e.currentTarget.checked);
}}
/>
<label>Hide controls</label>
<label htmlFor="hideControls">Hide controls</label>
</div>
</div>
<ApiVideoPlayer
Expand Down
1 change: 0 additions & 1 deletion examples/with-magic/components/form.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@ const Form = ({ errorMessage, onSubmit }) => (
}
.submit {
display: flex;
justify-content: flex-end;
align-items: center;
justify-content: space-between;
}
Expand Down
2 changes: 1 addition & 1 deletion examples/with-magic/pages/login.js
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ const Login = () => {
throw new Error(await res.text());
}
} catch (error) {
console.error("An unexpected error happened occurred:", error);
console.error("An unexpected error occurred:", error);
setErrorMsg(error.message);
}
}
Expand Down
2 changes: 1 addition & 1 deletion examples/with-segment-analytics-pages-router/README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# With Segment Analytics (Pages Router)

This example shows how to use Next.js along with [Segment Analytics](https://segment.com) using [segmentio/analytics-next](https://github.com/segmentio/analytics-next). The custom app [component](https://github.com/vercel/next.js/blob/canary/examples/with-segment-analytics-pages-router/pages/_app.tsx) includes a component (analytics.tsx)[(https://github.com/vercel/next.js/blob/canary/examples/with-segment-analytics-pages-router/components/analytics.tsx)] which loads Segment and also exports the `analytics` object which can be imported and used to call the [Track API](https://segment.com/docs/connections/spec/track/) on user actions (Refer to [`contact.tsx`](https://github.com/vercel/next.js/blob/canary/examples/with-segment-analytics-pages-router/pages/contact.tsx)).
This example shows how to use Next.js along with [Segment Analytics](https://segment.com) using [segmentio/analytics-next](https://github.com/segmentio/analytics-next). The custom app [component](https://github.com/vercel/next.js/blob/canary/examples/with-segment-analytics-pages-router/pages/_app.tsx) includes a component [`analytics.tsx`](https://github.com/vercel/next.js/blob/canary/examples/with-segment-analytics-pages-router/components/analytics.tsx) which loads Segment and also exports the `analytics` object which can be imported and used to call the [Track API](https://segment.com/docs/connections/spec/track/) on user actions (Refer to [`contact.tsx`](https://github.com/vercel/next.js/blob/canary/examples/with-segment-analytics-pages-router/pages/contact.tsx)).

## Deploy your own

Expand Down
2 changes: 1 addition & 1 deletion examples/with-segment-analytics/README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# With Segment Analytics

This example shows how to use Next.js along with [Segment Analytics](https://segment.com) using [segmentio/analytics-next](https://github.com/segmentio/analytics-next). The main app [layout](https://github.com/vercel/next.js/blob/canary/examples/with-segment-analytics/app/layout.tsx) includes a Client Component (analytics.tsx)[(https://github.com/vercel/next.js/blob/canary/examples/with-segment-analytics/components/analytics.tsx)] which loads Segment and also exports the `analytics` object which can be imported and used to call the [Track API](https://segment.com/docs/connections/spec/track/) on user actions (Refer to [`contact.tsx`](https://github.com/vercel/next.js/blob/canary/examples/with-segment-analytics/app/contact/page.tsx)).
This example shows how to use Next.js along with [Segment Analytics](https://segment.com) using [segmentio/analytics-next](https://github.com/segmentio/analytics-next). The main app [layout](https://github.com/vercel/next.js/blob/canary/examples/with-segment-analytics/app/layout.tsx) includes a Client Component [`analytics.tsx`](https://github.com/vercel/next.js/blob/canary/examples/with-segment-analytics/components/analytics.tsx) which loads Segment and also exports the `analytics` object which can be imported and used to call the [Track API](https://segment.com/docs/connections/spec/track/) on user actions (Refer to [`contact.tsx`](https://github.com/vercel/next.js/blob/canary/examples/with-segment-analytics/app/contact/page.tsx)).

## Deploy your own

Expand Down
2 changes: 1 addition & 1 deletion lerna.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,5 +15,5 @@
"registry": "https://registry.npmjs.org/"
}
},
"version": "16.3.1-canary.23"
"version": "16.3.1-canary.24"
}
2 changes: 1 addition & 1 deletion packages/create-next-app/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "create-next-app",
"version": "16.3.1-canary.23",
"version": "16.3.1-canary.24",
"keywords": [
"react",
"next",
Expand Down
2 changes: 1 addition & 1 deletion packages/devlow-bench/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@vercel/devlow-bench",
"private": true,
"version": "16.3.1-canary.23",
"version": "16.3.1-canary.24",
"description": "Benchmarking tool for the developer workflow",
"repository": {
"type": "git",
Expand Down
4 changes: 2 additions & 2 deletions packages/eslint-config-next/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "eslint-config-next",
"version": "16.3.1-canary.23",
"version": "16.3.1-canary.24",
"description": "ESLint configuration used by Next.js.",
"license": "MIT",
"repository": {
Expand All @@ -12,7 +12,7 @@
"dist"
],
"dependencies": {
"@next/eslint-plugin-next": "16.3.1-canary.23",
"@next/eslint-plugin-next": "16.3.1-canary.24",
"eslint-import-resolver-node": "^0.3.6",
"eslint-import-resolver-typescript": "^3.5.2",
"eslint-plugin-import": "^2.32.0",
Expand Down
2 changes: 1 addition & 1 deletion packages/eslint-plugin-internal/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@next/eslint-plugin-internal",
"private": true,
"version": "16.3.1-canary.23",
"version": "16.3.1-canary.24",
"description": "ESLint plugin for working on Next.js.",
"exports": {
".": "./src/eslint-plugin-internal.js"
Expand Down
2 changes: 1 addition & 1 deletion packages/eslint-plugin-next/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@next/eslint-plugin-next",
"version": "16.3.1-canary.23",
"version": "16.3.1-canary.24",
"description": "ESLint plugin for Next.js.",
"main": "dist/index.js",
"types": "dist/index.d.ts",
Expand Down
2 changes: 1 addition & 1 deletion packages/font/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@next/font",
"private": true,
"version": "16.3.1-canary.23",
"version": "16.3.1-canary.24",
"repository": {
"url": "vercel/next.js",
"directory": "packages/font"
Expand Down
2 changes: 1 addition & 1 deletion packages/next-bundle-analyzer/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@next/bundle-analyzer",
"version": "16.3.1-canary.23",
"version": "16.3.1-canary.24",
"main": "index.js",
"types": "index.d.ts",
"license": "MIT",
Expand Down
2 changes: 1 addition & 1 deletion packages/next-codemod/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@next/codemod",
"version": "16.3.1-canary.23",
"version": "16.3.1-canary.24",
"license": "MIT",
"repository": {
"type": "git",
Expand Down
2 changes: 1 addition & 1 deletion packages/next-env/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@next/env",
"version": "16.3.1-canary.23",
"version": "16.3.1-canary.24",
"keywords": [
"react",
"next",
Expand Down
2 changes: 1 addition & 1 deletion packages/next-mdx/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@next/mdx",
"version": "16.3.1-canary.23",
"version": "16.3.1-canary.24",
"main": "index.js",
"license": "MIT",
"repository": {
Expand Down
2 changes: 1 addition & 1 deletion packages/next-playwright/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@next/playwright",
"version": "16.3.1-canary.23",
"version": "16.3.1-canary.24",
"repository": {
"url": "vercel/next.js",
"directory": "packages/next-playwright"
Expand Down
2 changes: 1 addition & 1 deletion packages/next-plugin-storybook/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@next/plugin-storybook",
"version": "16.3.1-canary.23",
"version": "16.3.1-canary.24",
"repository": {
"url": "vercel/next.js",
"directory": "packages/next-plugin-storybook"
Expand Down
2 changes: 1 addition & 1 deletion packages/next-polyfill-module/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@next/polyfill-module",
"version": "16.3.1-canary.23",
"version": "16.3.1-canary.24",
"description": "A standard library polyfill for ES Modules supporting browsers (Edge 16+, Firefox 60+, Chrome 61+, Safari 10.1+)",
"main": "dist/polyfill-module.js",
"license": "MIT",
Expand Down
2 changes: 1 addition & 1 deletion packages/next-polyfill-nomodule/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@next/polyfill-nomodule",
"version": "16.3.1-canary.23",
"version": "16.3.1-canary.24",
"description": "A polyfill for non-dead, nomodule browsers.",
"main": "dist/polyfill-nomodule.js",
"license": "MIT",
Expand Down
2 changes: 1 addition & 1 deletion packages/next-routing/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@next/routing",
"version": "16.3.1-canary.23",
"version": "16.3.1-canary.24",
"keywords": [
"react",
"next",
Expand Down
2 changes: 1 addition & 1 deletion packages/next-rspack/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "next-rspack",
"version": "16.3.1-canary.23",
"version": "16.3.1-canary.24",
"repository": {
"url": "vercel/next.js",
"directory": "packages/next-rspack"
Expand Down
2 changes: 1 addition & 1 deletion packages/next-swc/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@next/swc",
"version": "16.3.1-canary.23",
"version": "16.3.1-canary.24",
"private": true,
"files": [
"native/"
Expand Down
14 changes: 7 additions & 7 deletions packages/next/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "next",
"version": "16.3.1-canary.23",
"version": "16.3.1-canary.24",
"description": "The React Framework",
"main": "./dist/server/next.js",
"license": "MIT",
Expand Down Expand Up @@ -100,7 +100,7 @@
]
},
"dependencies": {
"@next/env": "16.3.1-canary.23",
"@next/env": "16.3.1-canary.24",
"@swc/helpers": "0.5.23",
"baseline-browser-mapping": "^2.9.19",
"caniuse-lite": "^1.0.30001579",
Expand Down Expand Up @@ -164,11 +164,11 @@
"@modelcontextprotocol/sdk": "1.18.1",
"@mswjs/interceptors": "0.42.0",
"@napi-rs/triples": "1.2.0",
"@next/font": "16.3.1-canary.23",
"@next/polyfill-module": "16.3.1-canary.23",
"@next/polyfill-nomodule": "16.3.1-canary.23",
"@next/react-refresh-utils": "16.3.1-canary.23",
"@next/swc": "16.3.1-canary.23",
"@next/font": "16.3.1-canary.24",
"@next/polyfill-module": "16.3.1-canary.24",
"@next/polyfill-nomodule": "16.3.1-canary.24",
"@next/react-refresh-utils": "16.3.1-canary.24",
"@next/swc": "16.3.1-canary.24",
"@opentelemetry/api": "1.6.0",
"@playwright/test": "1.61.0",
"@rspack/core": "1.6.7",
Expand Down
Loading
Loading