- 22 Feb, 2024 17 commits
-
-
vercel-release-bot authored
-
Sam Ko authored
## Changes - Add clarifying comment around why we're `process.exit(1)` at the end of `runLintCheck` - Related → https://github.com/vercel/next.js/pull/62378 Closes NEXT-2576
-
Jiwon Choi authored
### What? When the next config has no default export, it does not inform the user correctly, but as: ```ts // next.config.mjs /** @type {import('next').NextConfig} */ export const config = { // ... } ``` ```sh⚠ Invalid next.config.mjs options detected:⚠ Unrecognized key(s) in object: 'config'⚠ See more info here: https://nextjs.org/docs/messages/invalid-next-config ``` ### Why? The options within the named exported config may be inactivated without notice. ### How? Since we use dynamic import for the config, check if `userConfigModule` has a `default` export, and if not, throw an error. Also, added to the docs to address by text that the config needs a default export. -
Mehran Farahani authored
### What? Added a `_currentState` argument to the `authenticate` function in the 'Building Your Application' authentication documentation. ### Why? The `useFormState` hook's first argument is a function that requires two arguments. This adjustment ensures the `authenticate` function aligns with the expected structure used by `useFormState`. For more details, refer to the React documentation: [useFormState Hook](https://react.dev/reference/react-dom/hooks/useFormState).
-
Sam Ko authored
Reverts vercel/next.js#61957
-
Colby Fayock authored
### What? Updates the Cloudinary bullets and links under the Video Optimization. https://nextjs.org/docs/app/building-your-application/optimizing/videos#cloudinary-integration ### Why? More relevant direct link to the Cloudinary-supported Next.js SDK along with an additional link to the Video solution itself. --------- Co-authored-by:
Sam Ko <sam@vercel.com>
-
John Slemmer authored
The current link just takes you to the definition of serialization on MDN. I'm proposing this should link to the React docs and what they are able to serialize because it is way more than JSON.
-
Tim Neutkens authored
## What? Ensures that `prependData` and `additionalData` are passed as loader options instead of as part of `sassOptions`, mirrors webpack behavior. Covers two cases that currently fail in #62321. <!-- Thanks for opening a PR! Your contribution is much appreciated. To make sure your PR is handled as smoothly as possible we request that you follow the checklist sections below. Choose the right checklist for the change(s) that you're making: ## For Contributors ### Improving Documentation - Run `pnpm prettier-fix` to fix formatting issues before opening the PR. - Read the Docs Contribution Guide to ensure your contribution follows the docs guidelines: https://nextjs.org/docs/community/contribution-guide ### Adding or Updating Examples - The "examples guidelines" are followed from our contributing doc https://github.com/vercel/next.js/blob/canary/contributing/examples/adding-examples.md - Make sure the linting passes by running `pnpm build && pnpm lint`. See https://github.com/vercel/next.js/blob/canary/contributing/repository/linting.md ### Fixing a bug - Related issues linked using `fixes #number` - Tests added. See: https://github.com/vercel/next.js/blob/canary/contributing/core/testing.md#writing-tests-for-nextjs - Errors have a helpful link attached, see https://github.com/vercel/next.js/blob/canary/contributing.md ### Adding a feature - Implements an existing feature request or RFC. Make sure the feature request has been accepted for implementation before opening a PR. (A discussion must be opened, see https://github.com/vercel/next.js/discussions/new?category=ideas) - Related issues/discussions are linked using `fixes #number` - e2e tests added (https://github.com/vercel/next.js/blob/canary/contributing/core/testing.md#writing-tests-for-nextjs) - Documentation added - Telemetry added. In case of a feature if it's used or not. - Errors have a helpful link attached, see https://github.com/vercel/next.js/blob/canary/contributing.md ## For Maintainers - Minimal description (aim for explaining to someone not on the team to understand the PR) - When linking to a Slack thread, you might want to share details of the conclusion - Link both the Linear (Fixes NEXT-xxx) and the GitHub issues - Add review comments if necessary to explain to the reviewer the logic behind a change ### What? ### Why? ### How? Closes NEXT- Fixes # --> Closes NEXT-2571
-
Svetoslav99 authored
Changing from "components" to "_components" folder name here "app/components/web-vitals.tsx", to be the same as previous example on the page "app/_components/web-vitals.tsx". Co-authored-by:Steven <steven@ceriously.com>
-
Zack Tanner authored
This test case was added in #59752, but this doesn't seem like the correct behavior. The original PR was intended to be smart about resolving `/default.tsx` to a route group default (e.g. `/(foo)/default.tsx`) when one wasn't specified. But since the route group is creating a new hierarchy in the tree and defines its own layout, if the route group layout doesn't specify a default, then the not found behavior seems correct. To fix unexpected not-found behavior in this case, you should specify a default at the same level as the layout where the missing slot(s) might be rendered. Closes NEXT-2565
-
Sam Ko authored
## Changes The error on https://github.com/vercel/next.js/blob/3e92d8a41d5ed4970e252b6e34f11b100dacd167/packages/next/src/lib/eslint/runLintCheck.ts#L117 runs to the `try` in here → https://github.com/vercel/next.js/blob/3e92d8a41d5ed4970e252b6e34f11b100dacd167/packages/next/src/cli/next-lint.ts#L191 instead of throwing in the `catch`, so we add a last `else` statement to `process.exit(1)`. Closes NEXT-2567
-
Vercel Release Bot authored
This auto-generated PR updates the integration test manifest used when testing Turbopack.
-
Tobias Koppers authored
### Why? Allows to correctly aggregate different endpoints in tracing Closes PACK-2559
-
Zack Tanner authored
This onClick isn't actually being used by the test and seems to be causing a flake unrelated to the test assertions. This removes the unused code for now so we can still keep the relevant part of the test in-tact. (Specifically, this test is asserting that we're using the correct prefetch cache entry for interception routes that originate from different trees but resolve to the same URL) <!-- Thanks for opening a PR! Your contribution is much appreciated. To make sure your PR is handled as smoothly as possible we request that you follow the checklist sections below. Choose the right checklist for the change(s) that you're making: ## For Contributors ### Improving Documentation - Run `pnpm prettier-fix` to fix formatting issues before opening the PR. - Read the Docs Contribution Guide to ensure your contribution follows the docs guidelines: https://nextjs.org/docs/community/contribution-guide ### Adding or Updating Examples - The "examples guidelines" are followed from our contributing doc https://github.com/vercel/next.js/blob/canary/contributing/examples/adding-examples.md - Make sure the linting passes by running `pnpm build && pnpm lint`. See https://github.com/vercel/next.js/blob/canary/contributing/repository/linting.md ### Fixing a bug - Related issues linked using `fixes #number` - Tests added. See: https://github.com/vercel/next.js/blob/canary/contributing/core/testing.md#writing-tests-for-nextjs - Errors have a helpful link attached, see https://github.com/vercel/next.js/blob/canary/contributing.md ### Adding a feature - Implements an existing feature request or RFC. Make sure the feature request has been accepted for implementation before opening a PR. (A discussion must be opened, see https://github.com/vercel/next.js/discussions/new?category=ideas) - Related issues/discussions are linked using `fixes #number` - e2e tests added (https://github.com/vercel/next.js/blob/canary/contributing/core/testing.md#writing-tests-for-nextjs) - Documentation added - Telemetry added. In case of a feature if it's used or not. - Errors have a helpful link attached, see https://github.com/vercel/next.js/blob/canary/contributing.md ## For Maintainers - Minimal description (aim for explaining to someone not on the team to understand the PR) - When linking to a Slack thread, you might want to share details of the conclusion - Link both the Linear (Fixes NEXT-xxx) and the GitHub issues - Add review comments if necessary to explain to the reviewer the logic behind a change ### What? ### Why? ### How? Closes NEXT- Fixes # --> Closes NEXT-2568
-
Tobias Koppers authored
### What? * scope issues from subscriptions to the websocket connection * close subscriptions when closing the websocket connection ### Why? * subscriptions on one page should not affect other pages ### How? Closes PACK-2567
-
Donny/강동윤 authored
### What? Highlight only `'use server'`, instead of the whole function body. ### Why? Other statements of the body is not related to the error. ### How? x-ref: https://vercel.slack.com/archives/C04CAN8CGCE/p1708353068632249?thread_ts=1708351927.544179&cid=C04CAN8CGCE Closes PACK-2538
-
JJ Kasper authored
This adds an experimental flag to allow exiting during prerendering when the first path errors instead of waiting until all prerendering is finished to then fail the build. x-ref: [slack thread](https://vercel.slack.com/archives/C0676QZBWKS/p1708559793380989) Closes: NEXT-2561 Closes NEXT-2563
-
- 21 Feb, 2024 23 commits
-
-
vercel-release-bot authored
-
JJ Kasper authored
Makes the error message more specific to Next.js and provides specific size that exceeded the limit. x-ref: [slack thread](https://vercel.slack.com/archives/C05U6TZ2DCP/p1708543103375799) Closes NEXT-2559
-
vercel-release-bot authored
-
Tobias Koppers authored
### What? Run 10 concurrent Turbopack compilation jobs instead of all of them show a progress spinner ### Why? * In future this allows to reclaim memory for finished jobs * It looks nicer in tracing Closes PACK-2561
-
Tobias Koppers authored
### What? Use an output filesystem without watching to allow external changes to output files Closes PACK-2566
-
Tobias Koppers authored
### What? * unnecessary request * removes a race condition with script loading Closes PACK-2544
-
Jiachi Liu authored
Reverts vercel/next.js#62214 Enabling build worker by default breaks some mdx rendering pages with `next build` x-ref: https://vercel.slack.com/archives/C04DUD7EB1B/p1708543258307169
-
JJ Kasper authored
This re-lands the chunking optimization with fix for the split chunks config to ensure we aren't generating duplicate chunks from not chunking `all` together. Tested various configs against our repro case here: https://vercel.com/vercel/vercel-site/2D5Xirs9Vr1M29WHAuNawgjvgE4G https://vercel.com/vercel/vercel-site/B2aez1NNCyVvoUBTSMFy8npBKK3j Closes NEXT-2552 closes: https://github.com/vercel/next.js/issues/51298 x-ref: https://github.com/vercel/next.js/pull/62313
-
Sébastien Vanvelthem authored
### What? Allow [typescript-eslint v7](https://typescript-eslint.io/blog/announcing-typescript-eslint-v7) support ### Why? Allow compatibility with typescript eslint v7, pave the way to support eslint flat config and possibly typescript 5.4 ### How? Add a v7 to the allowed versions in eslint-config-next dependencies and regenerate the lock with pnpm install. Be aware that some eslint peer dev deps have been updated in the process. See the lock Tested with pnpm build && ppm lint ## Close - Closes https://github.com/vercel/next.js/issues/62138
-
Balázs Orbán authored
### What? Clean up the error overlay: <details> <summary><b>Before:</b></summary> <img src="https://github.com/vercel/next.js/assets/18369201/22c3ab2c-8445-4c25-8554-a5ab51100af4"/> </details> <details> <summary><b>After:</b></summary> <img src="https://github.com/vercel/next.js/assets/18369201/403c30fc-8b27-4529-838c-47d9cbe52381"/></details> I also simplified the current code as it was likely using `useMemo` a bit eagerly. ### Why? This is an unactionable line by the user, no value in showing it in the overlay. ### How? Filter out the frame before rendering it in the overlay. This answers [this question](https://github.com/vercel/next.js/pull/62206#issuecomment-1956636486) too, since the module grouping is local. Now that `<anonymous>` is filtered out, the two Next.js groups are now merged into one, further cleaning up the stack. Closes NEXT-2505
-
Tobias Koppers authored
Reverts vercel/next.js#62291 Closes PACK-2563
-
Balázs Orbán authored
### What? While working on hiding useless frames, I also noticed that we regressed on #44137, meaning it was totally ignored. I haven't tracked down at which point this happened but made it work again in the same PR. This should significantly clear up the shown error stack in the error overlay: <details> <summary><b>Before:</b></summary> <img src="https://github.com/vercel/next.js/assets/18369201/1833abfe-7c0b-4a34-bad8-735799f1cf42"/> <img src="https://github.com/vercel/next.js/assets/18369201/70ecc124-1241-4df9-adfe-7f0c8f47d6d3"/> </details> <details> <summary><b>After:</b></summary> <img src="https://github.com/vercel/next.js/assets/18369201/d0395320-c52c-47a0-a281-f7721410f4da"/> </details> ### Why? Some frames in the error stack are useless/unactionable to the user and make it harder to parse the error. This PR filters out some of them, to make the stack more readable. ### How? The stack traces are run through a `.filter()` before being displayed. Closes NEXT-2505 Closes NEXT-2522
-
Tobias Koppers authored
### Why? Show correct type of processing in tracing Closes PACK-2560
-
Tobias Koppers authored
### What? * reduce tasks needed for emitting * add user level tracing Closes PACK-2552
-
vercel-release-bot authored
-
JJ Kasper authored
We have a reproduction of OOMs still occurring with this chunking so going to revert while we investigate further x-ref: https://github.com/vercel/next.js/issues/51298#issuecomment-1953004425 Reverts vercel/next.js#62205 Closes NEXT-2548
-
Vercel Release Bot authored
This auto-generated PR updates the integration test manifest used when testing Turbopack.
-
Tim Neutkens authored
## What? Further simplifying the way the tests are created for Sass so that they can be moved into `test/e2e` in a follow-up PR. <!-- Thanks for opening a PR! Your contribution is much appreciated. To make sure your PR is handled as smoothly as possible we request that you follow the checklist sections below. Choose the right checklist for the change(s) that you're making: ## For Contributors ### Improving Documentation - Run `pnpm prettier-fix` to fix formatting issues before opening the PR. - Read the Docs Contribution Guide to ensure your contribution follows the docs guidelines: https://nextjs.org/docs/community/contribution-guide ### Adding or Updating Examples - The "examples guidelines" are followed from our contributing doc https://github.com/vercel/next.js/blob/canary/contributing/examples/adding-examples.md - Make sure the linting passes by running `pnpm build && pnpm lint`. See https://github.com/vercel/next.js/blob/canary/contributing/repository/linting.md ### Fixing a bug - Related issues linked using `fixes #number` - Tests added. See: https://github.com/vercel/next.js/blob/canary/contributing/core/testing.md#writing-tests-for-nextjs - Errors have a helpful link attached, see https://github.com/vercel/next.js/blob/canary/contributing.md ### Adding a feature - Implements an existing feature request or RFC. Make sure the feature request has been accepted for implementation before opening a PR. (A discussion must be opened, see https://github.com/vercel/next.js/discussions/new?category=ideas) - Related issues/discussions are linked using `fixes #number` - e2e tests added (https://github.com/vercel/next.js/blob/canary/contributing/core/testing.md#writing-tests-for-nextjs) - Documentation added - Telemetry added. In case of a feature if it's used or not. - Errors have a helpful link attached, see https://github.com/vercel/next.js/blob/canary/contributing.md ## For Maintainers - Minimal description (aim for explaining to someone not on the team to understand the PR) - When linking to a Slack thread, you might want to share details of the conclusion - Link both the Linear (Fixes NEXT-xxx) and the GitHub issues - Add review comments if necessary to explain to the reviewer the logic behind a change ### What? ### Why? ### How? Closes NEXT- Fixes # --> Closes NEXT-2537
-
Ethan Arrowood authored
### What? In today's implementation, requests that don't end in `.rsc` are getting the data request query. We need to remove this toggle to prevent them from 500'ing. ### Why? The invariant triggered was: https://github.com/vercel/next.js/blob/212553958c671ea1f71d96fbc97ea4b9e5019bf3/packages/next/src/server/base-server.ts#L2838-L2842 Crawling up the code, the conditional: https://github.com/vercel/next.js/blob/212553958c671ea1f71d96fbc97ea4b9e5019bf3/packages/next/src/server/base-server.ts#L2815 must be `true`. The variable `isDataReq` is set here: https://github.com/vercel/next.js/blob/212553958c671ea1f71d96fbc97ea4b9e5019bf3/packages/next/src/server/base-server.ts#L1833-L1839 This conditional expression is a bit complex, but it simplifies down to: - `isDataReq` is `true` when (TODO) - `isDataReq` is `false` when (TODO) ### How? Closes NEXT-2341 Fixes #61377 Tested manually by: - Building and packaging this branch locally - Deploying tarball and then depending on it as the Next.js version for an example app similar to the one reported by #61377 - Inspecting console for 500 errors. --------- Co-authored-by:
JJ Kasper <jj@jjsweb.site> Co-authored-by:
Zack Tanner <zacktanner@gmail.com>
-
vercel-release-bot authored
-
Sam Ko authored
## Description We need to manually update the `@capsizecss/metrics` every time it updates so we get the latest fallback fonts. ## Changes - https://github.com/vercel/next.js/issues/47115 Closes NEXT-2547
-
suu3 authored
<!-- Thanks for opening a PR! Your contribution is much appreciated. To make sure your PR is handled as smoothly as possible we request that you follow the checklist sections below. Choose the right checklist for the change(s) that you're making: ## For Contributors ### Improving Documentation - Run `pnpm prettier-fix` to fix formatting issues before opening the PR. - Read the Docs Contribution Guide to ensure your contribution follows the docs guidelines: https://nextjs.org/docs/community/contribution-guide ### Adding or Updating Examples - The "examples guidelines" are followed from our contributing doc https://github.com/vercel/next.js/blob/canary/contributing/examples/adding-examples.md - Make sure the linting passes by running `pnpm build && pnpm lint`. See https://github.com/vercel/next.js/blob/canary/contributing/repository/linting.md ### Fixing a bug - Related issues linked using `fixes #number` - Tests added. See: https://github.com/vercel/next.js/blob/canary/contributing/core/testing.md#writing-tests-for-nextjs - Errors have a helpful link attached, see https://github.com/vercel/next.js/blob/canary/contributing.md ### Adding a feature - Implements an existing feature request or RFC. Make sure the feature request has been accepted for implementation before opening a PR. (A discussion must be opened, see https://github.com/vercel/next.js/discussions/new?category=ideas) - Related issues/discussions are linked using `fixes #number` - e2e tests added (https://github.com/vercel/next.js/blob/canary/contributing/core/testing.md#writing-tests-for-nextjs) - Documentation added - Telemetry added. In case of a feature if it's used or not. - Errors have a helpful link attached, see https://github.com/vercel/next.js/blob/canary/contributing.md ## For Maintainers - Minimal description (aim for explaining to someone not on the team to understand the PR) - When linking to a Slack thread, you might want to share details of the conclusion - Link both the Linear (Fixes NEXT-xxx) and the GitHub issues - Add review comments if necessary to explain to the reviewer the logic behind a change ### What? ### Why? ### How? Closes NEXT- Fixes # --> Hello, I noticed the following code in `link.tsx`. ``` //client/link.tsx ... onMouseEnter(e) { ... if ( (!prefetchEnabled || process.env.NODE_ENV === 'development') && isAppRouter ) { return } prefetch( ... ) }, ``` It seems that when prefetch={false} is set, prefetch still occurs on hover for page routers. However, there is no explanation in the <Link> documentation, which caused misleading. I added the explanation inside PageOnly component, could you please review it?
-
OJ Kwon authored
### What This PR amends turbopack's behavior to handle some cases of normalized path (`%5F` starting path), mainly fixes entry lookup works against original path without normalization, also bends the output path of client reference manifest matchs to what next.js expects. Closes PACK-2553
-