Skip to content

Commit 3eb3494

Browse files
committed
Merge branch '10-13-_do_not_merge_eslint' of github.com:vercel/next.js into 10-14-test_improve_linting
2 parents 9b51be9 + 8925753 commit 3eb3494

File tree

208 files changed

+2868
-1090
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

208 files changed

+2868
-1090
lines changed

.github/ISSUE_TEMPLATE/1.bug_report.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -135,4 +135,4 @@ body:
135135
136136
or
137137
138-
I am hosting via Docker with the recommended `output: "standalone"` option", and if I remove that option or try a different hosting option, I cannot reproduce the same issue.
138+
I am hosting via Docker with the recommended `output: "standalone"` option, and if I remove that option or try a different hosting option, I cannot reproduce the same issue.

crates/next-core/src/next_client/context.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -322,6 +322,7 @@ pub async fn get_client_module_options_context(
322322
enable_mdx_rs,
323323
css: CssOptionsContext {
324324
use_swc_css,
325+
minify_type: next_mode.minify_type(),
325326
..module_options_context.css
326327
},
327328
rules: vec![

docs/02-app/01-building-your-application/01-routing/14-middleware.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ Recognizing situations where middleware may not be the optimal approach is just
2525
- Complex Data Fetching and Manipulation: Middleware is not designed for direct data fetching or manipulation, this should be done within Route Handlers or server-side utilities instead.
2626
- Heavy Computational Tasks: Middleware should be lightweight and respond quickly or it can cause delays in page load. Heavy computational tasks or long-running processes should be done within dedicated Route Handlers.
2727
- Extensive Session Management: While Middleware can manage basic session tasks, extensive session management should be managed by dedicated authentication services or within Route Handlers.
28-
- Direct Database Operations: Performing direct database operations within Middleware is not recommended. Database interactions should done within Route Handlers or server-side utilities.
28+
- Direct Database Operations: Performing direct database operations within Middleware is not recommended. Database interactions should be done within Route Handlers or server-side utilities.
2929

3030
## Convention
3131

docs/02-app/01-building-your-application/03-rendering/03-composition-patterns.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -358,7 +358,7 @@ To reduce the Client JavaScript bundle size, we recommend moving Client Componen
358358

359359
For example, you may have a Layout that has static elements (e.g. logo, links, etc) and an interactive search bar that uses state.
360360

361-
Instead of making the whole layout a Client Component, move the interactive logic to a Client Component (e.g. `<SearchBar />`) and keep your layout as a Server Component. This means you don't have to send all the component Javascript of the layout to the client.
361+
Instead of making the whole layout a Client Component, move the interactive logic to a Client Component (e.g. `<SearchBar />`) and keep your layout as a Server Component. This means you don't have to send all the component JavaScript of the layout to the client.
362362

363363
```tsx filename="app/layout.tsx" switcher
364364
// SearchBar is a Client Component

docs/02-app/01-building-your-application/06-optimizing/10-open-telemetry.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -279,7 +279,7 @@ This span can be turned off by setting `NEXT_OTEL_FETCH_DISABLED=1` in your envi
279279

280280
- `next.span_type`: `AppRouteRouteHandlers.runHandler`.
281281

282-
This span represents the execution of an API route handler in the app router.
282+
This span represents the execution of an API Route Handler in the app router.
283283

284284
Attributes:
285285

docs/02-app/01-building-your-application/07-configuring/11-draft-mode.mdx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ export async function GET(request: Request) {
8484
const slug = searchParams.get('slug')
8585

8686
// Check the secret and next parameters
87-
// This secret should only be known to this route handler and the CMS
87+
// This secret should only be known to this Route Handler and the CMS
8888
if (secret !== 'MY_SECRET_TOKEN' || !slug) {
8989
return new Response('Invalid token', { status: 401 })
9090
}
@@ -118,7 +118,7 @@ export async function GET(request) {
118118
const slug = searchParams.get('slug')
119119

120120
// Check the secret and next parameters
121-
// This secret should only be known to this route handler and the CMS
121+
// This secret should only be known to this Route Handler and the CMS
122122
if (secret !== 'MY_SECRET_TOKEN' || !slug) {
123123
return new Response('Invalid token', { status: 401 })
124124
}

docs/02-app/01-building-your-application/07-configuring/16-debugging.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ Now go to the Debug panel (`Ctrl+Shift+D` on Windows/Linux, `⇧+⌘+D` on macOS
5858

5959
## Using the Debugger in Jetbrains WebStorm
6060

61-
Click the drop down menu listing the runtime configuration, and click `Edit Configurations...`. Create a `Javascript Debug` debug configuration with `http://localhost:3000` as the URL. Customize to your liking (e.g. Browser for debugging, store as project file), and click `OK`. Run this debug configuration, and the selected browser should automatically open. At this point, you should have 2 applications in debug mode: the NextJS node application, and the client/ browser application.
61+
Click the drop down menu listing the runtime configuration, and click `Edit Configurations...`. Create a `JavaScript Debug` debug configuration with `http://localhost:3000` as the URL. Customize to your liking (e.g. Browser for debugging, store as project file), and click `OK`. Run this debug configuration, and the selected browser should automatically open. At this point, you should have 2 applications in debug mode: the NextJS node application, and the client/ browser application.
6262

6363
## Debugging with Chrome DevTools
6464

docs/02-app/01-building-your-application/09-authentication/index.mdx

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1635,7 +1635,6 @@ Now that you've learned about authentication in Next.js, here are Next.js-compat
16351635
- [Auth0](https://auth0.com/docs/quickstart/webapp/nextjs/01-login)
16361636
- [Clerk](https://clerk.com/docs/quickstarts/nextjs)
16371637
- [Kinde](https://kinde.com/docs/developer-tools/nextjs-sdk)
1638-
- [Lucia](https://lucia-auth.com/getting-started/nextjs-app)
16391638
- [NextAuth.js](https://authjs.dev/getting-started/installation?framework=next.js)
16401639
- [Stack Auth](https://docs.stack-auth.com/getting-started/setup)
16411640
- [Supabase](https://supabase.com/docs/guides/getting-started/quickstarts/nextjs)

docs/02-app/02-api-reference/01-components/link.mdx

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -648,7 +648,7 @@ For example, you can generate a list of links to the dynamic route `app/blog/[sl
648648
```tsx filename="app/blog/page.tsx" switcher
649649
import Link from 'next/link'
650650

651-
function Page({ posts }) {
651+
export default function Page({ posts }) {
652652
return (
653653
<ul>
654654
{posts.map((post) => (
@@ -664,7 +664,7 @@ function Page({ posts }) {
664664
```jsx filename="app/blog/page.js" switcher
665665
import Link from 'next/link'
666666

667-
function Page({ posts }) {
667+
export default function Page({ posts }) {
668668
return (
669669
<ul>
670670
{posts.map((post) => (
@@ -734,7 +734,7 @@ export default NavLink
734734
```
735735

736736
- If you’re using [emotion](https://emotion.sh/)’s JSX pragma feature (`@jsx jsx`), you must use `passHref` even if you use an `<a>` tag directly.
737-
- The component should support `onClick` property to trigger navigation correctly
737+
- The component should support `onClick` property to trigger navigation correctly.
738738

739739
### Nesting a functional component
740740

@@ -1013,7 +1013,7 @@ export default function Home() {
10131013

10141014
<AppOnly>
10151015

1016-
The default scrolling behavior of `<Link>` in Next.js **is to maintain scroll position**, similar to how browsers handle back and fowards navigation. When you navigate to a new [Page](/docs/app/building-your-application/routing/pages), scroll position will stay the same as long as the Page is visible in the viewport.
1016+
The default scrolling behavior of `<Link>` in Next.js **is to maintain scroll position**, similar to how browsers handle back and forwards navigation. When you navigate to a new [Page](/docs/app/building-your-application/routing/pages), scroll position will stay the same as long as the Page is visible in the viewport.
10171017

10181018
However, if the Page is not visible in the viewport, Next.js will scroll to the top of the first Page element. If you'd like to disable this behavior, you can pass `scroll={false}` to the `<Link>` component, or `scroll: false` to `router.push()` or `router.replace()`.
10191019

@@ -1125,6 +1125,8 @@ In this case, you would want to use the following code in your `<Link />` compon
11251125
<AppOnly>
11261126

11271127
```tsx filename="app/page.tsx" switcher
1128+
'use client'
1129+
11281130
import Link from 'next/link'
11291131
import useIsAuthed from './hooks/useIsAuthed' // Your auth hook
11301132
@@ -1140,6 +1142,8 @@ export default function Page() {
11401142
```
11411143

11421144
```js filename="app/page.js" switcher
1145+
'use client'
1146+
11431147
import Link from 'next/link'
11441148
import useIsAuthed from './hooks/useIsAuthed' // Your auth hook
11451149

@@ -1159,6 +1163,8 @@ export default function Page() {
11591163
<PagesOnly>
11601164

11611165
```tsx filename="pages/index.tsx" switcher
1166+
'use client'
1167+
11621168
import Link from 'next/link'
11631169
import useIsAuthed from './hooks/useIsAuthed' // Your auth hook
11641170
@@ -1174,6 +1180,8 @@ export default function Home() {
11741180
```
11751181

11761182
```js filename="pages/index.js" switcher
1183+
'use client'
1184+
11771185
import Link from 'next/link'
11781186
import useIsAuthed from './hooks/useIsAuthed' // Your auth hook
11791187

docs/02-app/02-api-reference/02-file-conventions/route.mdx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ export async function DELETE(request: Request) {}
2222

2323
export async function PATCH(request: Request) {}
2424

25-
// If `OPTIONS` is not defined, Next.js will automatically implement `OPTIONS` and set the appropriate Response `Allow` header depending on the other methods defined in the route handler.
25+
// If `OPTIONS` is not defined, Next.js will automatically implement `OPTIONS` and set the appropriate Response `Allow` header depending on the other methods defined in the Route Handler.
2626
export async function OPTIONS(request: Request) {}
2727
```
2828

@@ -39,7 +39,7 @@ export async function DELETE(request) {}
3939

4040
export async function PATCH(request) {}
4141

42-
// If `OPTIONS` is not defined, Next.js will automatically implement `OPTIONS` and set the appropriate Response `Allow` header depending on the other methods defined in the route handler.
42+
// If `OPTIONS` is not defined, Next.js will automatically implement `OPTIONS` and set the appropriate Response `Allow` header depending on the other methods defined in the Route Handler.
4343
export async function OPTIONS(request) {}
4444
```
4545

0 commit comments

Comments
 (0)