- 21 Oct, 2024 28 commits
-
-
vercel-release-bot authored
-
Hendrik Liebau authored
This PR removes the extra wrapper functions and `.bind()` calls from the action entrypoint loader. Instead, the loader module now only re-exports the actions from the original module using the IDs as export names. This ensures that the same action instance will always remain identical. It also unblocks the combined usage of `"use cache"` and `"use server"` functions. --------- Co-authored-by:Shu Ding <g@shud.in>
-
Zack Tanner authored
`NEXT_PAGE_EXPORT_ERROR` and `NEXT_STATIC_GEN_BAILOUT` shouldn't show up in failed build logs as they'll point to an internal stack not related to user code. This updates the code that throws the `ExportPageError` to instead exit the worker when `prerenderEarlyExit` is true (which is the default) so that the page export error doesn't leak into the outer error handler which is meant for user errors. For static generation bailout errors, we'll log the error message (if it exists) otherwise there's nothing to log as the stack would point to internal framework code. This also removes a redundant log that is already printed as a prerender error.
-
Vercel Release Bot authored
**breaking change for canary users: Bumps peer dependency of React from `19.0.0-rc-65a56d0e-20241020` to `19.0.0-rc-69d4b800-20241021`** [diff facebook/react@65a56d0e...69d4b800](https://github.com/facebook/react/compare/65a56d0e...69d4b800) <details> <summary>React upstream changes</summary> - https://github.com/facebook/react/pull/31313 </details>
-
Josh Story authored
Implements this in a simpler manner with just { once: true } on the event registration -
Zack Tanner authored
This needs to be updated to specify the version.
-
Sam Ko authored
## Why? For PPR (experimental), user's should just opt to use v15 canary if they want to try out PPR. Removing the v14 mention reduces this confusion. - x-ref: https://vercel.slack.com/archives/C05KYT5S9FF/p1729264052080029?thread_ts=1729263181.989139&cid=C05KYT5S9FF
-
vercel-release-bot authored
-
Josh Story authored
makeHangingPromise returns a promise that rejects when an AbortSignal aborts. If too many are created however Node warns about a possible memory leak. We shouldn't increase the max count becuase this may prevent detection of legitmate memory leaks in user code. As an alternative we delegate aborts through a weakmap and attach only a single listener. This is trivially slower and more memory but safer semantics. This code only runs during revalidate and build so it does not have a perf impact on production streaming use cases.
-
Jiwon Choi authored
### Why? `@next/font` is deprecated and need to be replaced with `next/font`.
-
Jiwon Choi authored
### Why? When running next-upgrade, `next-request-geo-ip` requires to install `@vercel/functions` and `built-in-next-font` makes `@next/font` no longer needed. We added a prompt to ask user whether to (un)install it at https://github.com/vercel/next.js/pull/71038 but it prompts even if there were no transform occurred. This is unnecessary layer so we only prompt when there's a change caused from the codemod. ### No Modification https://github.com/user-attachments/assets/3acfdb24-c8e7-4189-9c81-4765ce748822 ### With Modification https://github.com/user-attachments/assets/f44a8b1c-c75a-4446-afc8-f74111de939d ---------
-
Josh Story authored
Reverts vercel/next.js#71566 which relands #71526 merge after 15 is released
-
vercel-release-bot authored
-
vercel-release-bot authored
-
Zack Tanner authored
We're going to land this after 15. Reverts vercel/next.js#71526
-
vercel-release-bot authored
-
Steven authored
This PR adds missing documentation for the supported src image types. The input format support is determined my `sharp` and can be found here: https://sharp.pixelplumbing.com/api-constructor
-
Jiwon Choi authored
### Why? The prompts selection for React codemods were using "toggle", whereas other prompts using "confirm". Use "confirm" for consistency.
-
vercel-release-bot authored
-
JJ Kasper authored
This ensures we properly clean up workers even if an error is thrown before our normal `.end()` call is done. This can be verified currently by building `pnpm next test/e2e/app-dir/dynamic-io` which should encounter an error and fail but the workers were previously being kept and using lots of CPU, now they are properly cleaned up.
-
Steven authored
chore(docs): remove recommendation about using `priority` over `loading=eager` with `next/image` (#71562) This recommendation to use `priority` instead of `loading=eager` is a little confusing. We don't want `priority` to be overused because it can hurt performance so we can remove this recommendation from the documentation. TLDR: - use `priority` for LCP like a hero image above the fold - use `loading=eager` for other images above the folder - use `loading=lazy` (default) for everything below the fold - use `fetchPriority=high` if you want to load an image out of order that its found in the document
-
Janka Uryga authored
just applying the good old typescript trick that prevent a `'a' | 'b' | string` union from collapsing into `string`, and thus preserving the autocomplete we'd get for `'a' | 'b'` before: <img width="246" alt="Screenshot 2024-10-16 at 21 48 25" src="https://github.com/user-attachments/assets/5bc9c078-fb8a-4aeb-93c5-9ee02854f3f9"> after: <img width="296" alt="Screenshot 2024-10-16 at 21 47 06" src="https://github.com/user-attachments/assets/6b87cc47-ef2b-4124-9dc4-b628b19a4fe3">
-
Hendrik Liebau authored
With this PR, we're assigning names to the transformed `"use cache"` functions, using the same rules as in #71478. Since we can't use named function expressions here, we're using `Object.defineProperty` instead, which we already used in #71478 for server actions with default export expressions. In addition, this PR fixes source mapping of `"use cache"` functions, which was slightly off before, due to the wrong spans being assigned to the new expressions. **Before:** <img width="943" alt="before" src="https://github.com/user-attachments/assets/f7cf674c-32d4-4f0d-a304-d5de5637a6a1"> **After:** <img width="943" alt="after" src="https://github.com/user-attachments/assets/8edda482-a666-4431-bfad-7e21987331eb">
-
Tobias Koppers authored
### What? trace make task dirty add tracing why tasks are marked as dirty report reason when a page is reloaded
-
Jiachi Liu authored
-
JJ Kasper authored
This ensures we properly pass thru expired tags to cache handlers `receiveExpiredTags` methods for `use cache`. These are called per-request as each request can receive tags
-
Sebastian Markbåge authored
This way you can see inline what it really means in terms of numbers with descriptions. Also, document inline CacheLife values. Also fixed a bug where we weren't transferring defaults when a custom was defined. <img width="733" alt="Screenshot 2024-10-20 at 8 48 39 PM" src="https://github.com/user-attachments/assets/420db267-343b-4dc8-9efa-13b0befe8efa"> <img width="700" alt="Screenshot 2024-10-20 at 8 48 48 PM" src="https://github.com/user-attachments/assets/0628b716-b906-49df-a016-65cd9c0b49bf">
-
Josh Story authored
Previously our rules for allowed dynamic were only enforced in builds. This is not tenable for serious adoption because you can't spend all day working on your site and then find out its broken when you build / deploy. To address this I've added a simulated prerendering during dev that should enforce the same rules for rendered routes in dev that would apply during a build. There is no way to avoid doing additional work to implement this feature because we need the abort mechanism of SSR to actually find the dynamic holes that should be disallowed. I was able to avoid completely duplicating the RSC render however by capturing the stream chunks available before the first task completes and stashing them away as a simulated halted RSC payload. I did have to introduce prospective renders to the RSC render and the validating SSR render however to work around issues of lazy module initialization where functions like Math.random and new Date() in module scope would incorrectly trigger dynamic validation when you would not expect them to.
-
- 20 Oct, 2024 12 commits
-
-
vercel-release-bot authored
-
JJ Kasper authored
This ensures we properly normalize the cache handler paths in the manifest since absolute paths can't go in the serialized config as the path might not match where the server is deployed to.
-
Craig 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 # --> I noticed this typo on https://nextjs.org/docs/messages/prefetch-true-deprecatedCo-authored-by:
JJ Kasper <jj@jjsweb.site>
-
vercel-release-bot authored
-
JJ Kasper authored
This ensures even if there are multiple module instances of the tags-manifest module we have one global tags manifest in memory that is used as the source of truth to prevent drift from revalidateTag and various cache handlers.
-
Sebastian "Sebbie" Silbermann authored
-
Jiachi Liu authored
-
Sebastian Markbåge authored
Stacked on #71528 Thanks to the serverModuleMap option added in https://github.com/facebook/react/pull/31300 we don't need to double decode anymore to load server references when parsing the payload.
-
Sebastian Markbåge authored
-
Sebastian Markbåge authored
-
Eng Zer Jun authored
Currently only the code block in the first section of the ISR page has both TypeScript and JavaScript code. This PR updates the remaining code blocks to include TypeScript code. /cc original author of ISR page @leerob --------- Co-authored-by:
Lee Robinson <lee@leerob.com> Co-authored-by:
JJ Kasper <jj@jjsweb.site>
-