- 21 Jul, 2023 20 commits
-
-
vercel-release-bot authored
-
vercel-release-bot authored
-
Steven authored
This link is failing CI as seen here: https://github.com/vercel/next.js/actions/runs/5623454975/job/15238167610 ``` Error: The action could not create a Github comment because it is initiated from a forked repo. View the action logs for a list of broken links. This PR introduces broken links to the docs: ┌─────────┬───────────────────────────────────────────────────────────────────────────────┬──────┬─────────────────────────────────────────────────────────────────────────────────────┐ │ (index) │ link │ type │ docPath │ ├─────────┼───────────────────────────────────────────────────────────────────────────────┼──────┼─────────────────────────────────────────────────────────────────────────────────────┤ │ 0 │ 'app/building-your-application/configuring/typescript#statically-typed-links' │ │ 'docs/02-app/01-building-your-application/01-routing/03-linking-and-navigating.mdx' │ └─────────┴───────────────────────────────────────────────────────────────────────────────┴──────┴─────────────────────────────────────────────────────────────────────────────────────┘ Error: This PR introduces broken links to the docs. The action could not create a Github check because it is initiated from a forked repo. Error: Process completed with exit code 1. ```
-
Zack Tanner authored
-
JJ Kasper authored
Temporarily reverts these changes to allow patch release first. Reverts: https://github.com/vercel/next.js/pull/52149 Reverts: https://github.com/vercel/next.js/pull/52492
-
Jiachi Liu authored
Reland #52790 Reverts vercel/next.js#52977 was failed due to failed job [vercel/next.js/actions/runs/5616458194/job/15220295829](https://github.com/vercel/next.js/actions/runs/5616458194/job/15220295829) Should be fine to resolve with https://github.com/vercel/next.js/pull/52979 now Fixes #52718 Fixes #52739 --------- Co-authored-by:
Alex Kirszenberg <alex.kirszenberg@vercel.com> Co-authored-by:
Tobias Koppers <tobias.koppers@googlemail.com>
-
Heidar-An authored
grammatical mistake ### What? Small grammatical mistake on https://nextjs.org/docs/pages/building-your-application/routing/dynamic-routes
-
Syed Taqi Haider authored
fixes #52970 Yarn 3 has removed the "--force" flag. This can cause issues with building the Next.js repository if Yarn 3 is activated on a development machine (specifically the postinstall script "install-native.mjs"). Using pnpm as the package manager fixes this issue.
-
Shaun Ferris authored
> Add a sentence to the instructions for using typescript in an existing project instructing the user to copy the `paths` compiler option from the existing jsconfig file to the new tsconfig file. > Not doing so causes absolute imports from project directories to break, and gives "Module Not Found" messages that the docs do not have a case for solving"
-
Steven authored
This creates a monorepo for each github action and ensures they all use pnpm. You can install and build all with the following: ``` cd .github pnpm i pnpm -r build ```
-
Alex Kirszenberg authored
-
Tobias Koppers authored
### What? see https://github.com/vercel/turbo/pull/5572 ### Why? ### How?
-
Donny/강동윤 authored
### What? Update swc_core to `v0.79.22` and other SWC crates to the latest. ### Why? This is for further next.js work: https://vercel.slack.com/archives/C02HY34AKME/p1689768597095499 ### How? Closes WEB-1299 turbopack counterpart: https://github.com/vercel/turbo/pull/5575Co-authored-by:
Tobias Koppers <1365881+sokra@users.noreply.github.com>
-
Tobias Koppers authored
* https://github.com/vercel/turbo/pull/5567 <!-- Alex Kirszenberg - Remove unnecessary ValueDebugFormat item, hide Vc field --> * https://github.com/vercel/turbo/pull/5576 <!-- Alex Kirszenberg - Extract shared HMR utils to their own modules/crates --> * https://github.com/vercel/turbo/pull/5503 <!-- OJ Kwon - feat(turbopack_core): define trait for diagnostics --> * https://github.com/vercel/turbo/pull/5487 <!-- Will Binns-Smith - turbopack-cli: modularize code to support turbopack build --> * https://github.com/vercel/turbo/pull/5488 <!-- Will Binns-Smith - turbopack-cli: implement `turbopack build` --> * https://github.com/vercel/turbo/pull/5450 <!-- Leah - feat: async modules / top level await --> --------- Co-authored-by:
kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
-
JJ Kasper authored
x-ref: [slack thread](https://vercel.slack.com/archives/C03LMQZL205/p1689895062566699?thread_ts=1688753294.342269&cid=C03LMQZL205)
-
Wyatt Johnson authored
Moves the rendering for Pages API routes into the bundle. This also implements the `routeModule` interface for both Pages and Pages API routes in the Turbopack output. This also fixes a bug where the order of the imports for `Document` and `App` were reversed in the Turbopack build.
-
JJ Kasper authored
This breaks out routing handling from `next-server`, `next-dev-server`, and `base-server` so that these are only handling the "render" work and eventually these will be deleted completely in favor of the bundling work being done. The `router` process and separate `render` processes are still maintained here although will be investigated further in follow-up to see if we can reduce the need for these. We are also changing the `require-cache` IPC to a single call instead of call per entry to reduce overhead and also de-dupes handling for starting the server between the standalone server and normal server. To maintain support for existing turbopack route resolving this implements the new route resolving in place of the existing `route-resolver` until the new nextturbo API is fully landed. After these initial changes we should continue to eliminate non-render related code from `next-server`, `base-server`, and `next-dev-server`.
-
vercel-release-bot authored
-
vercel-release-bot authored
-
JJ Kasper authored
Reverts vercel/next.js#52790 Reverting temporarily as this breaks turbopack's not found handling due to the app tree being generated there not having the necessary parallel routes in the `_not-found` entry x-ref: https://github.com/vercel/next.js/blob/0df8aac935741808ee6aee78a8b545b2c1405f29/packages/next-swc/crates/next-core/src/app_structure.rs#L677-L681 x-ref: https://github.com/vercel/next.js/actions/runs/5616458194/job/15220295829
-
- 20 Jul, 2023 13 commits
-
-
vercel-release-bot authored
-
JJ Kasper authored
We shouldn't be generating src files during the build script as these can break publishing.
-
Jimmy Lai authored
This PR tries to address some feedback around prefetching, like in #49607, where they were some warnings because we were over prefetching. The tweaks in this PR: - if there are no loading boundary below, we don't prefetch the full page anymore. I made that change a while ago but I think it wasn't the original intent from @sebmarkbage. Fixing that now. So now, we will prefetch the page content until the nearest loading boundary, only if there is any. - there's now a queue for limiting the number of concurrent prefetches. This is to not ruin the bandwidth for complex pages. Thanks @alvarlagerlof for that one. - also, if the prefetch is in the queue when navigating, it will get bumped. - bonus: fixes a bug where we were wrongly stripping headers in dev for static pages Test plan: <img width="976" alt="CleanShot 2023-07-20 at 17 53 43@2x" src="https://github.com/vercel/next.js/assets/11064311/2ea34419-c002-4aea-94df-57576e3ecb2e"> In the screenshot you can see that: - only 5 requests at a time are authorised - when I clicked on 15, it got prioritised in the queue (did not cancel the rest) - the prefetch only included the content until the loading boundary Co-authored-by:
JJ Kasper <22380829+ijjk@users.noreply.github.com>
-
Jiachi Liu authored
### What This PR changes the flow of not-found rendering process. ### Why `not-found.js` was rendered in two ways before: * 1 is SSR rendering the not-found as 404 * 2 is triggering the error on RSC rendering then the error will be preserved in inline flight data, on the client it will recover the error and trigger the proper error boundary. The solution has been through a jounery: No top-level not found boundary -> introduce metadata API -> then we create a top level root not found boundary -> then we delete it due to duplicated rendering of root layout -> now this So the solution before this PR is still having a root not found boundary wrapped in the `AppRouter`, it's being used in a lot of places including HMR. As we discovered it's doing duplicated rendering of root layout, then we removed it and it started failing with rendering `not-found` but missing root layout. In this PR we redesign the process. ### How Now the rendering architecture looks like: * For normal root not-found and certain level of not-found boundary they're still covered by `LayoutRouter` * For other error renderings including not-found * Fully remove the top level not-found boundary, when it renders with 404 error it goes to render the fallback page * During rendering the fallback page it will check if it should just renders a 404 error page or render nothing and let the error from inline flight data to trigger the error boundary pseudo code ``` try { render AppRouter > PageComponent } catch (err) { create ErrorComponent by determine err render AppRouter > ErrorComponent } ``` In this way if the error is thrown from top-level like the page itself or even from metadata, we can still catch them and render the proper error page based on the error type. The problematic is the HMR: introduces a new development mode meta tag `<meta name="next-error">` to indicate it's 404 so that we don't do refresh. This reverts the change brougt in #51637 as it will also has the duplicated rendering problem for root layout if it's included in the top level not found boundary. Also fixes the root layout missing issue: Fixes #52718 Fixes #52739 --------- Co-authored-by:Shu Ding <g@shud.in>
-
Cassidy Williams authored
### What and why? The word "publicly" should be spelled consistently across the documentation. It is spelled currently as "publically" in a few places. ### How? Fixed the spelling!
-
Shu Ding authored
We have the logic to group the client compiler's entry names to make sure we generate one single manifest file for the page. This is complicated and requires a special step to "group" the entry names because a page can depend on a bunch of files from everywhere. And currently, the normalization of "entryName → groupName" doesn't cover interception routes' conventions (`(.)`, `(..)` and `(...)`). This PR fixes that. Closes #52862, closes #52681, closes #52958.
-
Jon Meyers authored
### What? Stop `with-supabase` template from throwing errors on build ### Why? Dynamic Routes now fail the build, rather than console.logging an error ### How? Export the following from any routes that use the `cookies` function ``` export const dynamic = "force-dynamic"; ``` Install `encoding` as a dev dependency until this is fixed downstream
-
Daryll J. Reillo authored
The correct filename is seen on PagesOnly. But on AppOnly, the filename is not correct. It should be "hello" instead of "ClientComponent". line to change: from: import('../components/ClientComponent').then((mod) => mod.Hello) to: import('../components/hello').then((mod) => mod.Hello) line to change: from: import('../components/ClientComponent').then((mod) => mod.Hello) to: import('../components/hello').then((mod) => mod.Hello) -
Darshan Jain authored
Closes #52898 LangCode Missing zh-Hans and zh-Hant | 'yo-NG' | 'zh-CN' | 'zh-Hans' //added | 'zh-Hant' //added | 'zh-HK' | 'zh-MO' | 'zh-SG' | 'zh-TW' | 'zu-ZA' https://github.com/vercel/next.js/blob/f5272acbe5628164257ef8e584c8a469a4af5cb8/packages/next/src/lib/metadata/types/alternative-urls-types.ts#L419Co-authored-by:
Shu Ding <3676859+shuding@users.noreply.github.com>
-
Balázs Orbán authored
### What? Adds a GitHub Action that automatically marks unhelpful comments as "off-topic". You can test it by adding off-topic comments to this issue: https://github.com/balazsorban44/next.js/issues/21 https://github.com/balazsorban44/next.js/blob/17e3ec30689a2323161260c9b03bb7f51ed008f9/.github/actions/minus-one/src/index.mjs#L6 ### Why? A common problem is when an issue thread receives "+1" comments, it usually encourages others to do the same. This makes the thread harder and harder for maintainers to read, without adding value to the discussion. ### How? When an issue receives a comment, we compare it to a list that we determine as off-topic. If it matches, we hide the comment. See: https://docs.github.com/en/graphql/reference/mutations#minimizecomment
-
Tobias Koppers authored
### What? adds edge pages, apis, app pages and app routes to next.rs api ### Why? ### How?
-
Zack Tanner authored
We were preventing smooth scrolling to avoid jarring UX when `scroll-behavior: smooth` was set and the user navigates to another route ([PR](https://github.com/vercel/next.js/pull/40642) and [related comment](https://github.com/vercel/next.js/issues/51721#issuecomment-1623416600)). This updates both pages & app router to restore smooth scroll functionality if the only the route hash changes. Fixes #51721 Closes NEXT-1406
-
Zack Tanner authored
### What? - Visiting a page in the app router without a proper component export doesn't show the dev overlay, but logs errors to the console - When it does show the error overlay (e.g. during an HMR event), the error message was sharing the module code itself rather than the component path, making it hard to debug ### Why? `createComponentTree` can throw these errors before the AppRouter tree is mounted, leaving the errors uncaught by the dev overlay. ### How? This wraps the server root in the `ReactDevOverlay` when in dev mode with a minimal "HMR" for when the server component is edited (to reload the page). Closes NEXT-308
-
- 19 Jul, 2023 7 commits
-
-
Wyatt Johnson authored
Fixes a bug where the edge runtime didn't support `basePath` with Custom App Routes. - Fixes #49661
-
Soheil Nazari authored
-
Darshan Jain authored
Fixes #52853 Lacking 'color' attribute in IconDescriptor Metadata ```diff export type IconDescriptor = { url: string | URL type?: string sizes?: string + color?: string // added the color attribute /** defaults to rel="icon" unless superseded by Icons map */ rel?: string media?: string /** * @see https://developer.mozilla.org/en-US/docs/Web/API/HTMLImageElement/fetchPriority */ fetchPriority?: 'high' | 'low' | 'auto' } ``` https://github.com/vercel/next.js/blob/v13.4.11-canary.0/packages/next/src/lib/metadata/types/metadata-types.ts#L99 -
Adam Hunter authored
-
Steven authored
- See current bug: https://nextjs.org/docs/app/api-reference/functions/generate-metadata#generatemetadata-function - Closes #52903
-
Antoine Bourin authored
-
Jiachi Liu authored
Upgrade `@vercel/og` to latest version https://github.com/vercel/og/releases/tag/0.5.9
-