- 03 Jul, 2023 9 commits
-
-
vercel-release-bot authored
-
Jiachi Liu authored
Reverts vercel/next.js#52032 Will reland after the release
-
Chris Yang 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 # --> Co-authored-by:
JJ Kasper <jj@jjsweb.site>
-
Alex Kirszenberg authored
See https://github.com/vercel/turbo/pull/5430 ## Turbopack changes * https://github.com/vercel/turbo/pull/5430 <!-- Alex Kirszenberg - ReverseTopological -> AdjacencyMap -->
-
vercel-release-bot authored
-
Jiachi Liu authored
### Issue When you edit .env* files, the pages under app dir that using env vars are not triggering hot reload ### Fix Triggering serverComponentChanges hot reload action when we detect env or tsconfig related change. There's a time period that we need to wait before the compilation is finished. First we save a flag `reloadOnDone` if we need to reload when after compilation is done, by determining if `envChange` is `true` (we already know this in dev server). Then in the compilation hooks, we refresh RSC page once it's finished. ### Extra change since we're checking `event.action` in client hot reloader, and throwing error for unknown action, filter devPagesManifestUpdate out from unexpected action as it sometimes triggered as error in console. Introduced in #51516 Fixes NEXT-1261
-
Jiachi Liu authored
As we moved to new CI runner in `#50436`, try to re-enable few flaky tests we disabled before
-
Alex Kirszenberg authored
See https://github.com/vercel/turbo/pull/5420 # Turbopack changes * https://github.com/vercel/turbo/pull/5420 * https://github.com/vercel/turbo/pull/5387
-
Shu Ding authored
-
- 02 Jul, 2023 3 commits
-
-
Tyler Lutz authored
Fix a broken link in optimizing index.mdx.
-
Tim Neutkens authored
Follow up to #50900. Based on https://github.com/vercel/next.js/issues/48748#issuecomment-1608783867
-
Shu Ding authored
In the dev server, we need to call `getStaticInfoIncludingLayouts` for the middleware file to extract its `matchers` field. However, that's currently executed in both app and pages workers. This method is expensive as it depends on the SWC binary to be loaded. This PR changes it to invoke it as an IPC method, so only the router worker (which runs the compilation) loads SWC, instead of all 3 of them. This also fixes duplicated console messages of: ``` Using locally built binary of @next/swc ``` For our test app, I'm seeing a 150~250ms improvement:  Haven't measured about the memory impact yet, but it should be a lot.
-
- 01 Jul, 2023 2 commits
-
-
MONEY authored
-
Delba de Oliveira authored
-
- 30 Jun, 2023 17 commits
-
-
Leah authored
-
vercel-release-bot authored
-
JJ Kasper authored
This ensures we correctly pass up the non-implicit tags for `unstable_cache` so that `revalidateTag` can be triggered for ISR paths properly. x-ref: [slack thread](https://vercel.slack.com/archives/C03S8ED1DKM/p1687900021175649)
-
Steven authored
Follow up to: - https://github.com/vercel/next.js/pull/52052
-
Steven authored
This makes it really easy to copy/paste the changelog into the PR description after running `sync-react.js`. Previously, the output would link to incorrect PRs because it didn't know the PR number was from a different repo. We know `facebook/react` uses squash so there should always be a PR number at the end of the commit title. Example of the new format: https://github.com/vercel/next.js/pull/52005
-
Wyatt Johnson authored
This adapts the new route module rendering to support edge as well. - Added a new `routeModule` export to the Edge SSR Loader - Updated some tests to validate page state Fixes NEXT-1327
-
Shu Ding authored
During development, for fonts created via `next/font` the file path is already containing the hash so we can always have them cached. This fixes the problem of fonts causing FOUC in HMR. Since I can't find an easy way to test it reliably, I recorded two screenshots using the same steps as reproduced in #50879: https://github.com/vercel/next.js/assets/3676859/5cb6a64c-cb4a-4ed4-808f-d7b2d0d6c0a3 With the fix: https://github.com/vercel/next.js/assets/3676859/154b2332-a94b-4392-8132-4be609670745 fix #50879 fix NEXT-1334
-
Steven authored
This PR ensure that `create-next-app` questions are all formatted the same way: ``` Would you like to use <feature>? ``` fix NEXT-1333
-
Tobias Koppers authored
### What? This fixes a performance problem when many pages are involved. fixes WEB-1067 see also https://github.com/vercel/turbo/pull/5360 ### Turbopack Changes * https://github.com/vercel/turbo/pull/5416 * https://github.com/vercel/turbo/pull/5360
-
Jiachi Liu authored
Reverts vercel/next.js#52028 revert temporarily and will re-land in next round release
-
Shu Ding authored
When looking at [some sites](https://rsc-llm-on-the-edge.vercel.app/) with a large amount of chunks streamed, I noticed that the inlined Flight data array can be optimized quite a lot. Currently we do: ```js self.__next_f.push([1,"d5:[\"4\",[\"$\",\"$a\",null,..."]) ``` 1. The `self.` isn't needed (except for the initial bootstrap tag) as React itself has `<script>$RC("B:f","S:f")</script>` too. 2. After the bootstrap script tag, all items are an array with `[1, flight_data]` and `flight_data` is always a string. We can just push only these strings. 3. We use `JSON.stringify(flight_payload)` to inline the payload where the payload itself is a string with a lot of double quotes (`"`), this results in a huge amount of backslashes (`\`). Here we can instead replace it to use a pair of single quotes on the outside and un-escape the double quotes inside. Here's a side-by-side comparison of a small page: <img width="1710" alt="CleanShot 2023-06-30 at 11 41 02@2x" src="https://github.com/vercel/next.js/assets/3676859/398356ec-91d5-435c-892d-16fb996029e8"> For a real production page I saw the HTML payload reduced by 11,031 bytes, a 3% improvement. Note that all the tests are not considering gzip here, so the actual traffic impact will be smaller.
-
vercel-release-bot authored
-
Shu Ding authored
This PR changes some Webpack loaders to be synchronous as they don't have async code inside. Some of them will scale quiet a lot such as `next-flight-client-module-loader` and we don't want to waste some extra ticks there, as well as got potentially queued after some other events like file I/O.
-
Jiachi Liu authored
We show the "Application error: a client-side exception has occurred (see the browser console for more information)" error incorrectly when a server-side error occurs (a digest is present) when we should be showing an error saying it is in fact a server side error and should check the logs there. This change will make the error message more accurate for users to look up Fixes NEXT-1263
-
Josh Story authored
the metadata tests have an unnecessarily strict matcher which will fail if the matched metadata isn't the first instance of the element tag type. This will cause a problem when we start to preload bootstrap scripts which will cause preload links in all test cases that did not come from the metadata api itself Co-authored-by:Jiachi Liu <4800338+huozhi@users.noreply.github.com>
-
Shu Ding authored
Unlike other routes, these two entries are needed for every request so there is no reason to have them disposed. This avoids wasting extra dev server resource to get them re-compiled.
-
Shu Ding authored
Increase `maxInactiveAge` to be `60` seconds and `pagesBufferLength` to be `5`. This change makes it infrequent to have expired entry compilations from recent accessed routes when running the dev server.
-
- 29 Jun, 2023 9 commits
-
-
vercel-release-bot authored
-
Justin Ridgewell authored
### What? The updates `edge-runtime` to the latest version ### Why? https://github.com/vercel/edge-runtime/pull/428 fixes `consumeUint8ArrayReadableStream` so that when we break iteration early (due to client disconnect), we cleanup the inner stream. That will fire the stream's `cancel` handler, and allow devs to disconnect from an AI service fetch. ### How? `edge-runtime` maintain a `try {} finally {}` over the inner stream's iteration. When we early break, JS will call `it.return()`, and that will resume `consumeUint8ArrayReadableStream` with an abrupt completion (essentially, the `yield` turns into a `return`). We'll be able to trigger the `finally {}` block with that, and we call `inner.cancel()` to cleanup. Fixes https://github.com/vercel-labs/ai/issues/90
-
Jiachi Liu authored
FIx the type change introduced in #51727
-
Jiachi Liu authored
Filter out the invalid images in metadata og/twitter `images` filter to avoid crash when falsy image slides in. Add filtering for now as the erroring doesn't show the proper trace pointing to where it's original introduced, might introduce other validation in the future.
-
Steven authored
This PR documents the `NODE_ENV` environment variable behavior. This feature was originally added in 152c2c2a which was released in `next@5`. See the current source code here: https://github.com/vercel/next.js/blob/e3e76a45ee2b10e91b4e285fea536e42cf8e60e2/packages/next/src/bin/next.ts#L82 ---------
-
Timothy Vernon authored
Link leads to a 404 page
-
Tim Neutkens authored
Re-enables the test disabled in #51879 as it was fixed in #51973
-
Tyler Lutz authored
App directory is stable so you no longer need appDir. Co-authored-by:Steven <229881+styfle@users.noreply.github.com>
-
Delba de Oliveira authored
-