- 01 Oct, 2024 4 commits
-
-
vercel-release-bot authored
-
JJ Kasper authored
This fixes a race where if the body was resolved before the clone operation, it would clone later, resulting in an error being thrown due to the body already being consumed. backports #70082 --------- Co-authored-by:Wyatt Johnson <accounts+github@wyattjoh.ca>
-
Jiachi Liu authored
backport #70508 Co-authored-by:JJ Kasper <jj@jjsweb.site>
-
Jiachi Liu authored
backport #70330 Fixes #69912 --------- Co-authored-by:JJ Kasper <jj@jjsweb.site>
-
- 30 Sep, 2024 5 commits
-
-
JJ Kasper authored
This backports #70446 to 14-2-1 Fixes #70403 ### What? When `revalidateTag()` is called directly in server components, the cache is not purged for the corresponding tags. Reproduction steps available in #70403 ### How? Check [app-render.tsx](https://github.com/vercel/next.js/compare/canary...abhi12299:fix-revalidatetag-rsc?expand=1#diff-a3e2e024db1faa1b501e0dd6040eaaf0d931cb9878ae0fb0f4c3658daa982768) This issue was introduced in #65296 in this file: [revalidate.ts](https://github.com/vercel/next.js/pull/65296/files#diff-7f0cb5bb30d44b9153d724e31c25859b9aab6cc258b35563a1d9464cd0688283). The lines removed from the file resulted in the revalidation checks to be skipped when there is an RSC request. Also fixed checks on `pendingRevalidates` to also check for `revalidatedTags`. Co-authored-by:
Abhishek Mehandiratta <36722596+abhi12299@users.noreply.github.com>
-
JJ Kasper authored
-
JJ Kasper authored
-
JJ Kasper authored
Investigating failing tests on `14-2-1` branch
-
Zack Tanner authored
Backports: - https://github.com/vercel/next.js/pull/67358 Fixes #70527 Note: Turbopack dev failures seem to be pre-existing on the base branch.
-
- 24 Sep, 2024 2 commits
-
-
Zack Tanner authored
We should not attempt to bundle builtin node modules on the server. This adds modules provided by Node.js to our externals list (along with some missing internal ones in Turbopack. These were copied from [here](https://github.com/vercel/next.js/blob/a675bde6c738318264573144663e38819aeb2661/crates/next-custom-transforms/src/transforms/warn_for_edge_runtime.rs#L77-L89)). Fixes #70262 Closes NDX-314 # Conflicts: # turbopack/crates/turbopack-resolve/src/resolve.rs
-
Steven authored
This PR adds a new feature to the existing `remotePatterns` allowlist configuration, that enables the ability to filter on `search` (aka query string). The most common usage will likely be `search: ''`, which means no query string allowed. You can also set the exact query string such as `search: '?v=1'` which can be useful to invalidate the cache one time for a specific version without opening the door to any version. Note the leading question mark to match the behavior of `new URL(url).search`.
-
- 20 Sep, 2024 1 commit
-
-
vercel-release-bot authored
-
- 19 Sep, 2024 4 commits
-
-
raeyoung.kim authored
### What? Fixes the error `Cannot read property 'startTime' of null` on Chrome 74 for Android 9 by ensuring the `beforeHydrationMeasure` and `hydrationMeasure` are not falsy values before accessing their properties. <img width="1164" alt="Screenshot 2024-07-02 at 11 14 53 PM" src="https://github.com/vercel/next.js/assets/52588326/34df95b6-a4fe-4886-96b8-a3c873a2ae6a"> ### Why? The application crashes on Chrome 74 for Android 9 due to `null` or other falsy values being returned in certain situations. This fix ensures that the `startTime` property is only accessed if it is not a falsy value, thereby preventing the crash. ### How? Added a falsy check before accessing the `startTime` property in the performance measurement logic. Specifically, modified the code at [this location](https://github.com/vercel/next.js/blob/b9bd23baec14508400c502b3651f4cf2497e883b/packages/next/src/client/index.tsx#L498) Co-authored-by:
JJ Kasper <jj@jjsweb.site>
-
Jiachi Liu authored
# Conflicts: # pnpm-lock.yaml
-
Jiwon Choi authored
### Why? Since `URL.canParse` is incompatible with older browsers like Safari 16, we added `canParseUrl` util at https://github.com/vercel/next.js/pull/70215. x-ref: https://caniuse.com/?search=URL.canParse To improve maintenance, we decided to add polyfill for `URL.canParse`. x-ref: [slack thread](https://vercel.slack.com/archives/C07BVA6HM17/p1726664071636899?thread_ts=1726620161.450109&cid=C07BVA6HM17) Closes NDX-302 --------- Co-authored-by:
Jiachi Liu <inbox@huozhi.im> # Conflicts: # packages/next/src/lib/url.ts # packages/next/src/server/lib/router-server.ts # pnpm-lock.yaml
-
JJ Kasper authored
This removes an inaccurate check that doesn't set a revalidate value if revalidate is `undefined` which can be the case for SSR app route pages. Also adds a regression test to ensure this doesn't break again. Fixes: https://github.com/vercel/next.js/issues/70213 # Conflicts: # packages/next/src/server/base-server.ts
-
- 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
-