- 17 Sep, 2024 3 commits
-
-
vercel-release-bot authored
-
JJ Kasper authored
Clarifies that static vs dynamic resources now influence the static / dynamic staleTime that is used which should hopefully be more intuitive. Reference PR: - https://github.com/vercel/next.js/pull/67868 Also updates the JSDoc for `<Link />` since it was fairly out of date and lacking any info about app router behavior. --------- Co-authored-by:
Delba de Oliveira <32464864+delbaoliveira@users.noreply.github.com>
-
JJ Kasper authored
This ensures we chunk revalidate tag requests so we don't send too many at once. x-ref: [slack thread](https://vercel.slack.com/archives/C03UR7US95F/p1726585656900449?thread_ts=1726049244.204009&cid=C03UR7US95F) --------- Co-authored-by:
Kelly Davis <kldavis4@users.noreply.github.com>
-
- 13 Sep, 2024 2 commits
-
-
Alvar Lagerlöf authored
# What Backported [fix(eslint): allow typescript-eslint v8 #68807](https://github.com/vercel/next.js/pull/68807) # Why Unblocks upgrading eslint-config-next for projects already on typescript-eslint v8
-
Wyatt Johnson authored
This is a backport of #66249 for 14.2.11. --------- Co-authored-by:JJ Kasper <jj@jjsweb.site>
-
- 12 Sep, 2024 4 commits
-
-
vercel-release-bot authored
-
Jiwon Choi authored
Backporting https://github.com/vercel/next.js/pull/69959Co-authored-by:
Maikel <maikel.van.dort@gmail.com>
-
JJ Kasper authored
As discussed this collects all `revalidateTag` calls and invokes in a single request to avoid race conditions and overhead from multiple pending requests. x-ref: [slack thread](https://vercel.slack.com/archives/C0676QZBWKS/p1714688045037509?thread_ts=1710902198.529179&cid=C0676QZBWKS) Closes NEXT-3306
-
- 11 Sep, 2024 2 commits
-
-
vercel-release-bot authored
-
JJ Kasper authored
This removes our invalid revalidate default fallback when a revalidate value isn't returned from render as render should always return a valid value. We also already have an invariant when an invalid revalidate value is returned we just need to ensure that case could be hit properly. This also fixes some invalid test cases which were sending invalid headers. x-ref: [slack thread](https://vercel.slack.com/archives/C0676QZBWKS/p1726061828198529?thread_ts=1720714625.621179&cid=C0676QZBWKS)
-
- 10 Sep, 2024 1 commit
-
-
Jiachi Liu authored
-
- 09 Sep, 2024 7 commits
-
-
JJ Kasper authored
This continues https://github.com/vercel/next.js/pull/39707 bringing the changes up to date with canary and adds test cases to ensure it's working as expected. Closes: https://github.com/vercel/next.js/issues/22319 Closes: https://github.com/vercel/next.js/pull/39707 Closes: NDX-148
-
vercel-release-bot authored
-
Jiachi Liu authored
-
Zack Tanner authored
There's code that uses `glob` to find all template files and replaces the default import alias with whatever is specified during CNA. This does so without excluding fonts, and so we're unintentionally corrupting these `woff` files. This wasn't a problem in previous versions because we didn't use `localFont` in the default template, just `Inter`. The files were technically still being corrupted it just never manifested unless you went to actually use them. This is a quick fix to introduce minimal changes but ideally in a follow-up we should figure out a better solution for replacing aliases, ie by using an allowlist rather than an exclude list. h/t to @lubieowoce for the thorough test cases Fixes #69748 --------- Co-authored-by:Janka Uryga <lolzatu2@gmail.com>
-
Janka Uryga authored
-
Janka Uryga authored
this reverts the change from 564b620d
-
Jiachi Liu authored
### What Fixes metadata merging issue on 14.2. There's a bug with React on 14.2 as it bit outdated: while generating rsc payload, if we use fragment to wrap the metadata and noindex component, it will miss all the data. It works well with separating them as an array. It also requires #64058 to be applied as well so the output not-found page will having correct status 404, and then we can generate noindex metatag based on correct status Fixes #69778
-
- 06 Sep, 2024 5 commits
-
-
Jiachi Liu authored
-
JJ Kasper authored
This ensures we properly set the request meta during our middleware invoke so that the `NoFallbackError` bubbling is handled properly. Without these fields set we bubble the error unexpectedly causing an unexpected 500 instead of a 404. x-ref: https://github.com/vercel/next.js/pull/66987 Closes: https://github.com/vercel/next.js/issues/69428
-
Jiachi Liu authored
-
Janka Uryga authored
We should be testing both usage patterns, i.e. returning a component wrapped in a `{ default: ... }` and just a bare component. Note that the behavior here will partially change in 15, so this test is just so that we can avoid regressing in 14.x. -
Jiachi Liu authored
This reverts commit 9bb06c54. This was a sort breaking change that could effect using `next/dynamic` in server component, when the imported one is client component. Ideally you shouldn't directly return it due to the property access restriction for client reference. We've already provided related codemod for v15 but this might be a bit surprise for users upgrading to the new patch. Reverted as it's not necessarily part of ESM externals fixes. Fixes #69720
-
- 04 Sep, 2024 2 commits
-
-
vercel-release-bot authored
-
Abhishek Mehandiratta authored
### What? Fixes #69456 which describes an issue with `next/image` component, where an external image containing `_next/image` in the URL fails with the error `"url" parameter cannot be recursive`. ### Why? The `next/image` component should be able to render images from configured hostnames without doing the recursive check. ### How? Before checking for the existence of `_next/image` substring in the image's path, we can simply check if the image is an external URL that comes from a preconfigured host in the `next.config.js` file. Example: <img width="1207" alt="image" src="https://github.com/user-attachments/assets/8d5c99cf-f050-40a9-b5a4-ba961b83f037"> --------- Co-authored-by:
Steven <steven@ceriously.com>
-
- 03 Sep, 2024 14 commits
-
-
hrmny authored
Writes the async flag to the client reference manifest to support ESM externals in app dir. The `app-ssr` context can't have esm externals as that might cause a module to be async in ssr but not on the client. Closes PACK-2967 Fixes #64525
-
Janka Uryga authored
-
Will Binns-Smith authored
This extends #64520 to cover cases where client components originate from node_modules (foreign code). Test Plan: Extended the integration test to cover this Closes #64412 Fixes PACK-3014 --------- Co-authored-by:OJ Kwon <1210596+kwonoj@users.noreply.github.com>
-
Shu Ding authored
This adds an extra `hash_salt` option to the Server Actions transform's `generate_action_id` method which defaults to empty for now (so no actual behavior changes). When set, the salt will be used to prefix the payload.
-
Jiachi Liu authored
-
Jiachi Liu authored
-
Tobias Koppers authored
### What? optimize allocations in server actions transform In one edge case it reduces allocations from 30GB to 4.5MB and time from 760ms to 11ms. ### Why? make it faster
-
JJ Kasper authored
Currently we are only strip all comments properly when `swcMinify: false` is set although the default is to use `swcMinify` which can cause confusion with these two modes not matching comments handling. This updates the default to match comment stripping between the two and also adds an experimental config to allow toggling this regardless of which minifier is being used. x-ref: [slack thread](https://vercel.slack.com/archives/C0676QZBWKS/p1722444791037279) x-ref: NEXT-3642
-
Janka Uryga authored
-
Jiachi Liu authored
Follow up for #67779 , we don't have to generate the edge preview manifest since it's mainly for rendering the preview props and now preview props can be accessed through process env by a util `getEdgePreviewProps()`
-
Janka Uryga authored
-
Janka Uryga authored
-
Jiachi Liu authored
Chnage the way of preview props injection to edge runtime, directly read from env vars of preview props instead of writing to and reading from prerender manifest.js Previously we're trying to make these preview props values become deterministic that we can replace in edge deployment pipeline in #64521 But the way of serializing process env vars in edge runtime is not correct. They'll remain as string "process.env.xxx" in the manifest and also after consumed. This PR fixes that behavior, instead of writing it into manifest, alwyas consuming from process.env.var directly. I created a shared util to access the preview props of edge runtime across all the templates. On draft provider side, we still need to handle dev mode case when preview id is `development-id`, but we already have the cookie, it cannot be aligned with the preview id. So we do a fallback check for dev mode if the cookie is present and preview id is `development-id` then we still treat it as draft mode is enabled. Fixes #52080 Fixes #67075 Closes NEXT-3541
-
Janka Uryga authored
-