- 18 Oct, 2024 23 commits
-
-
vercel-release-bot authored
-
Hendrik Liebau authored
This PR adjusts the server action transforms to assign proper function names for the generated server reference proxies. - If the original function has a name, this name is used. - If a function expression is assigned to a variable, the variable's name is used. - If an anonymous function expression is assigned to a prop, the prop's name is used. In addition, this PR simplifies the output for exported functions, avoiding unnecessary `registerServerReference` calls. It also fixes the source mapping of default exported server actions. **Before:** <img width="890" alt="before" src="https://github.com/user-attachments/assets/a3d6a5f8-d48e-474d-8f03-b49306fb704f"> **After:** <img width="890" alt="after" src="https://github.com/user-attachments/assets/8f332690-6c26-46f1-9eef-7680f47ea578"> Next up, we will do the same for `'use cache'` functions.
-
Josh Story authored
Temporarily removing the dev warnings. I've moved these to be errors in the build side. In a follow up PR I will use prerendering during dev to trigger these errors and report them as dev errors as well. This also updates how we track sync dynamic errors. The main goal is to have a stack trace of the sync function and separately report all the component stacks that might contain this function call. It's not fool-proof b/c the sync api may be called in a way that is not observed by SSR. The whole debugging story here will improve dramatically with owner stacks but that is currently experimental only in React. The plan for future updates is to add a prospective render for SSR so we can flush out module scope issues like calling Math.random while lazy initializing a module. This is asserted for RSC in this change (see new tests) but won't wouldn't pass for SSR b/c we only do single pass prerendering at the moment. After that I will add in the prerender-while-render in dev and utilize the prerender errors to power dev as well.
-
Niklas Mischkulnig authored
- Slightly improve externals error message - Don't try to append `.js` to requests without subpaths - Simplify request->package name parsing Before  After (app code changed to include a subpath for better visualization) <img width="963" alt="Bildschirmfoto 2024-10-17 um 11 24 39" src="https://github.com/user-attachments/assets/f2d5caa7-a2f4-498b-88aa-a026aedcabe5"> Without the CSS change, it can look like this if there is no `-` in the filepath: <img width="1005" alt="Bildschirmfoto 2024-10-17 um 10 55 13" src="https://github.com/user-attachments/assets/1a899d46-87cc-4e32-8005-92232fee318f">
-
Niklas Mischkulnig authored
- Make UnableToExternalize a warning - Special case that warning so that it's still printed even inside node_modules - Make sure that it's only printed once
-
Sam Ko authored
## Why? Add an additional example that highlights using Route Groups to opt a loading skeleton to a specific route. - Fixes: https://github.com/vercel/next.js/issues/71321
-
Wyatt Johnson authored
A test helper was recently deleted that caused a failure for tests: https://github.com/vercel/next.js/pull/71326/files#diff-89f3ffc2ba61402d4e283e83323169b7b567967666b03b1e3eabca8d87fbcf20L16 This adds the test helper back.
-
Tobias Koppers authored
fix race condition in read transaction cache unset fresh db when persisting DB avoid restoring data twice fix syntax in feature flagged code improve readablility <!-- 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 # -->
-
Niklas Mischkulnig authored
- Also refactors `AppEndpoint` a bit (pulling code out into functions and hoist common function calls for Node/Edge) - Use the `server/app/.../page.js` RSC entry chunks in the `rscModuleMapping` to not have to generate extra chunks. Alternative implementation for https://github.com/vercel/next.js/pull/71304 Closes #71304 - [x] ~~It fails with this strange error though:~~ ``` Error: Cannot find module '../chunks/ssr/[turbopack]_runtime.js' Require stack: next.js/test/e2e/app-dir/use-cache/.next/server/chunks/ssr/[turbopack]_runtime.js next.js/test/e2e/app-dir/use-cache/.next/server/app/page.js ``` --------- Co-authored-by:
Hendrik Liebau <mail@hendrik-liebau.de>
-
Jiachi Liu authored
-
Tobias Koppers authored
### What? When the OS filesystem cache is cold, accessing the database can be quite slow and add a few seconds of build time since database is accessed kind of randomly. This adds a cache file on top of the key value database which caches the first 100MB of data accessed from the database and puts it into a separate file. That file is sequentially read and pulled into memory on startup.
-
Jiachi Liu authored
-
Jiachi Liu authored
-
Tobias Koppers authored
### What? When loading a trace file and that increases in size while reading it, update the info about the total size before reaching 100%.
-
Jiachi Liu authored
-
Sebastian "Sebbie" Silbermann authored
Co-authored-by:Jiachi Liu <inbox@huozhi.im>
-
Tobias Koppers authored
### What? * use fx hash map * more efficient restoring * disable counting of persisting items * parallelize processing tasks updates
-
Tobias Koppers authored
### What? refactor BackingStore to allow different KeyValueDatabases, avoid dynamic calls and have ReadTransactions and ValueBuffer as trait associated type. Also adds a default backing storage to be used by next.js
-
Vercel Release Bot authored
-
Tobias Koppers authored
### What? A lot of small performance improvements for the task aggregation in the new backend
-
Tobias Koppers authored
### What? Typo
-
Tobias Koppers authored
### What? A bunch of small performance optimizations * split operation_suspend_point in inlined and cold part * keep children count instead of iterating children every time * avoid bubbling find and schedule into already scheduling parts of the graph * reduce number of turbo-tasks function calls in EsmAssertReference::code_generation * avoid creating empty maps Sadly no measurable effect...
-
Josh Story authored
The examples and wording are clarified to indicate how to think about reading the current time during render. --------- Co-authored-by:Zack Tanner <1939140+ztanner@users.noreply.github.com>
-
- 17 Oct, 2024 17 commits
-
-
Sebastian Markbåge authored
This lets us render deeper into the "use cache" entry as if it wasn't there for the purposes of prerendering. One such hanging input is the params/searchParams passed to pages. For now we error if you end up using the dynamic input after a timeout. We could generate a useful partially dynamic output here if we generated a halted RSC payload but for now we just error. Doing this without a timeout is tricky.
-
Jiachi Liu authored
-
vercel-release-bot authored
-
Sebastian "Sebbie" Silbermann authored
-
Jiachi Liu authored
-
루밀LuMir authored
##
🛠 ️Rename Hello, While reviewing the source code in `errors` directory, I found that ONLY the `errors/next-request-in-use-cache.md` file uses `.md` extension. So, I corrected it by changing the extension to `.mdx`.  Co-authored-by:JJ Kasper <jj@jjsweb.site>
-
Josh Story authored
Co-authored-by:Jiachi Liu <inbox@huozhi.im>
-
Jiachi Liu authored
-
Sebastian "Sebbie" Silbermann authored
-
SamPhillemon authored
This PR updates the with-styled-jsx example to use the App Router. Here are the changes that have been made: - Renamed the `pages` folder to the `app` folder. - Added the `layout.tsx` file as part of the App Router. - Updated the `package.json` file. The following actions were performed as part of this PR: - Ran `pnpm prettier-check` with no issues found. - Executed the `pnpm check-examples` script. CC: @samcx --------- Co-authored-by:samcx <sam@vercel.com>
-
TN authored
Fix a typo in the error doc. <!-- 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>
-
Manoj M S authored
This PR updates the `with-goober` example to use the App Router. Here are the changes that have been made: - Renamed the `pages` folder to the` app` folder. - Converted the `index.tsx` to ` page.tsx ` file as part of the App Router. - Created a new `layout.tsx` file in the app directory. - Merged functionality from both `_app.tsx` and `_document.tsx` into `layout.tsx`: - Goober setup from `_app.tsx` - CSS extraction and injection from `_document.tsx` - Updated the `package.json` file. The following actions were performed as part of this PR: - Ran `pnpm prettier-check` with no issues found. - Executed the `pnpm check-examples` script. **CC:** @samcx --------- Co-authored-by:samcx <sam@vercel.com>
-
Hendrik Liebau authored
The hoisting of the proxy expressions only needs to be done for the server layer. We can skip this part completely when we know we're compiling a module for the client layer.
-
Sam Ko authored
## Why? Currently, `url` would just use the GitHub API url (JSON response of issue), not the issue's html url, which is the correct html link to the issue. We want the html link instead.
-
Hendrik Liebau authored
In #71360, I accidentally changed the jest test timeout value instead of increasing the `retry` duration.
-
Hendrik Liebau authored
When running deploy tests, the deployments are done in the `beforeAll` hook of a test. For some more complex test apps the deployment may take a while to complete which can result in the test timing out after 120 seconds. To mitigate this, we increase the timeout to 240 seconds. x-ref: [example run with a timeout](https://github.com/vercel/next.js/actions/runs/11385828170/job/31678217067)
-
Hendrik Liebau authored
x-ref: [Flakiness Metrics](https://app.datadoghq.com/ci/test-runs?query=test_level%3Atest%20env%3Aci%20%40git.repository.id%3Agithub.com%2Fvercel%2Fnext.js%20%40test.service%3Anextjs%20%40test.status%3Afail%20%40test.name%3A%22streaming%20responses%20cancel%20inner%20stream%20after%20disconnect%20edge%20pages%20api%20cancels%20stream%20making%20progress%22&agg_m=count&agg_m_source=base&agg_t=count¤tTab=overview&eventStack=&fromUser=false&index=citest&start=1728463943572&end=1729068743572&paused=false) In #71163, we added to the `Streamable` handling the case where the request might already be aborted before the response was sent or had a chance to be consumed. For the "cancels stream making progress" however, the request may not be aborted, and instead only the response is destroyed, leading to the `cancel` method of the `Streamable` being called, but not the `abort` method. To handle all cases, we're now resolving the `finished` promise of the `Streamable` when either `abort` or `cancel` are called.
-