- 28 Dec, 2024 2 commits
-
-
vercel-release-bot authored
-
Lee Robinson authored
x-ref: https://github.com/vercel/next.js/issues/49630
-
- 27 Dec, 2024 2 commits
-
-
vercel-release-bot authored
-
Nick Oates 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 # -->
-
- 26 Dec, 2024 2 commits
-
-
vercel-release-bot authored
-
Sam Ko authored
## Why? Since we updated the stale waiting period in https://github.com/vercel/next.js/pull/73709, we need to update these comments as well.
-
- 25 Dec, 2024 2 commits
-
-
vercel-release-bot authored
-
Jiwon Choi authored
### Why? This PR restores the pagination style, which was accidentally omitted at #74097. #### Before  #### After 
-
- 24 Dec, 2024 1 commit
-
-
vercel-release-bot authored
-
- 23 Dec, 2024 6 commits
-
-
Jiachi Liu authored
-
Jiachi Liu authored
-
vercel-release-bot authored
-
sommeeeR authored
fix typo Co-authored-by:Zack Tanner <1939140+ztanner@users.noreply.github.com>
-
ytreister authored
There is a bug in the documentation. The code sample sets the `distDir `to `'./build'`, but the comment says `'./dist'`.
-
Zack Tanner authored
Fixes failing devlow jobs. x-ref: https://github.com/vercel/next.js/actions/runs/12458537348/job/34774816138
-
- 22 Dec, 2024 2 commits
-
-
vercel-release-bot authored
-
Lee Robinson authored
Co-authored-by:JJ Kasper <jj@jjsweb.site>
-
- 20 Dec, 2024 21 commits
-
-
vercel-release-bot authored
-
Jiachi Liu authored
-
Jiwon Choi authored
This PR added Geist font to be used in Dev Overlay.  Closes NDX-572
-
vercel-release-bot authored
-
Hendrik Liebau authored
When scoping the `requestStore` to dynamic renders in #72312, we missed the case when a server action is invoked before hydration is complete. This leads to an error when a server action tries to read headers, cookies, or anything else that requires the presence of the `requestStore`. This fixes that for both the Node.js and Edge runtimes. It also appears that progressively enhanced form actions did not work at all before in the Edge runtime due to a missing `await` of `decodeFormState`. fixes #73992 closes NAR-55
-
Wyatt Johnson authored
In order to simplify internal state management, this migrates internal use of query parameters over to storing details on the request metadata. Future PR's might be able to pull items off the metadata entirely and use prop drilling and the new `PageRenderContext`, `PageSharedContext`, and app equivalents.
-
Jiwon Choi authored
This PR modified the `Errors` (Runtime Error component) to use the shared `ErrorOverlayLayout`. 
-
Jiachi Liu authored
-
Tobias Koppers authored
### What? fixes the computation of `import.meta.url` inside of monorepos (when the root_path != project_path) ### How? We add a new argument to the ChunkingContext that represents the relative path from the output folder to the root of the monorepo. Since they are on different filesystems, we can't compute them from the values alone.
-
Jiwon Choi authored
Ported the ToolButtonsGroup: 
-
Jiwon Choi authored
Ported LeftIcon and RightIcon used in the pagination.
-
Jiwon Choi authored
Ported `ErrorPagination` and replaced in the `Errors` component.
-
Hendrik Liebau authored
In #73059 we added build-time checks for the forbidden usage of `this` and `arguments` in server functions. A nested function expression is however allowed to use these expressions. fixes #74181 To add a bit more context: `this` is forbidden in server actions because the Next.js compiler hoists inline server actions out of their original location into the module scope, so that they can be imported and invoked by the action handler. Due to this hoisting, the `this` context gets lost and is not available to the server action. To prevent surprising runtime errors for such cases, we emit a build error to provide feedback to developers as early as possible. However, nested function declarations or function expressions create a new `this` context, and in those it's allowed to access `this` and `arguments`. For consistency, and to prevent surprises when refactoring server actions, we apply the same rules for module-level server actions.
-
Benjamin Woodruff authored
Had a discussion with @sokra about this during office hours. We were in agreement to delete this, not because it's usually wrong, but just because it's not high-signal enough: - Many instances of `to_resolved().await` are on simple constructor calls, so it doesn't really matter if they're sequential. We could add some heuristics for this, but they'd be imperfect. - `to_resolved().await` isn't actually what drives the work forward, it's the function call that schedules the work, so in some cases this isn't accurate (and you can't know without type information). - This would make more sense if we were typically starved for work, but usually we have more tokio tasks than we can process anyways, so increasing parallelism is unlikely to help in most cases. - Some code isn't performance sensitive (e.g. internal CLI utilities, tests), so this is just noise in those places.
-
Benjamin Woodruff authored
`OperationVc`s should be used with `CollectiblesSource` instead of `Vc`s because collectibles represent a side-effect or implicit extra return value of a function's execution. This PR doesn't convert all callsites, just a handful.
-
JJ Kasper authored
Currently we are using `pendingWaitUntil` on `renderOpts` to handle pending revalidations (fetch updates and revalidate tag calls). This uses our old strategy of `waitUntil` inside of `sendResponse` which just keeps the stream open until the promise resolves. This isn't ideal if we have a proper waitUntil strategy provided so this updates to ensure we use that instead if available. Also adds some debug logs so we can track when this pending revalidates promise is resolved.
-
Benjamin Woodruff authored
- We should generally prefer `try_join` over `to_resolved().await` in a loop as it can provide more parallelism. - Some of these should just resolve the `Vc` outside the loop.
-
Benjamin Woodruff authored
I started writing this PR by requiring `OperationValue` in `State`: ```diff impl<T> State<T> { - pub fn new(value: T) -> Self { + pub fn new(value: T) -> Self + where + T: OperationValue, + { ``` And then went through changing every compilation error that occurred as a result. ## Hacks **There are some hacks in a number of places here where we incorrectly convert `ResolvedVc` to `OperationValue`.** Unfortunately these have to exist because it's impractical to convert everything to `OperationValue`. `OperationValues` are harder to construct as they must be created directly from the return value of an unresolved function call. ## Why does `State<T>` need `T: OperationValue`? `OperationVc` types require that `.connect()` is called before their value can be read. As an internally-mutable type, `State` allows `Vc`s to be passed in ways that we cannot track. `.connect()` re-connects the `Vc` to the dependency graph so that strong resolution is possible. Without this, you might end up with stale results when reading a `Vc` inside of `State`, which can be very hard to debug. Fundamentally, I think `State` is unsound, but this is a band-aid on it until we can migrate to a better solution (likely effect-style `Collectibles` for `VersionedContentMap`). -
Benjamin Woodruff authored
refactor(turbo-tasks): Remove public OperationVc constructor, introduce a macro annotation for creating OperationVc types (#72871) Introduces a new `operation` argument to the `#[turbo_tasks::function]` macro for creating functions that return `OperationVc`: ``` // this function's external signature returns an `OperationVc` #[turbo_tasks::function(operation)] async fn multiply(value: OperationVc<i32>, coefficient: i32) -> Result<Vc<i32>> { Ok(Vc::cell(*value.connect().await? * coefficient)) } ``` This is important to solve a few major footguns with manually-constructed `OperationVc`s: - It can be hard to know if a `Vc` is an operation or not, and the only warning you'd get if you got it wrong was a runtime error. - Local-task-based resolution (#69126) will implicitly create local `Vc`s if an argument isn't resolved. - ~We want to enforce that all arguments to `OperationVc`-returning functions are also `OperationVc`s or non-`Vc` values. Otherwise you could end up with a stale/wrong `OperationVc`.~ Scrapped, this was too hard/impractical, see below. This removes the public constructor. Methods are not currently supported because: 1. Operations are uncommon, and it's not worth the effort, IMO. 2. There's no way to make it work for dynamic-dispatched method calls, as we cannot resolve the type of `self`. It could be made to work for inherent impls and non-object trait types. --- This is basically implementing @sokra's TODO comment in the old `OperationVc::new` constructor: ``` // TODO to avoid this runtime check, we should mark functions with `(operation)` and return // a OperationVc directly ``` But with assertions for the function arguments, based on some discussion in DMs: <img src="https://graphite-user-uploaded-assets-prod.s3.amazonaws.com/HAZVitxRNnZz8QMiPn4a/13952614-f421-4c8a-99b8-3ce5f19715ae.png" width="600"/> We allow *either* `ResolvedVc` or `OperationVc` as arguments because: - Only accepting `OperationVc` arguments was impossible to refactor to, as this made it "viral" and there are too many places where we need to use operations that have too many dependencies. - While it makes sense for `State` to require `OperationVc` as arguments to any operation (keeps the whole dependency/call tree alive), for collectibles, sometimes you want the arguments to be `ResolvedVc`. It's just a matter of if you want to include collectibles generated when creating the arguments or not. -
Benjamin Woodruff authored
These tests exist to see that the compiler generates errors when doing similar things to what the lint is designed to catch. I'd rather exempt these in the lint than in the trybuild tests, as once we get rid of support for the `local` opt-out in the `turbo_tasks::value` macro, we shouldn't need the lint anymore (it won't be possible to compile code using an unresolved `Vc` in a `VcValueType`), but we still will need these trybuild tests.
-
Zack Tanner authored
Similar to #73138, this removes the direct usage of `jest-worker` for the linting/typechecking step in favor of the shared worker that has built-in handling for propagating errors to the parent process. This is to ensure that if the worker performing the typechecking/linting receives a SIGKILL signal (which could happen with an OOM error), that the parent process exits appropriately.
-
- 19 Dec, 2024 2 commits
-
-
vercel-release-bot authored
-
Vercel Release Bot authored
-