Skip to content

Comments

[pull] canary from vercel:canary#810

Merged
pull[bot] merged 11 commits intocode:canaryfrom
vercel:canary
Feb 21, 2026
Merged

[pull] canary from vercel:canary#810
pull[bot] merged 11 commits intocode:canaryfrom
vercel:canary

Conversation

@pull
Copy link

@pull pull bot commented Feb 21, 2026

See Commits and Changes for more details.


Created by pull[bot] (v2.0.0-alpha.4)

Can you help keep this open source service alive? 💖 Please sponsor : )

eps1lon and others added 11 commits February 20, 2026 11:31
We are soon going to use these for client-side static assets as well
#89963)

This PR adds an LRU disk cache so that reads and writes from the Image
Optimization API will evict old entries based on the value of
`images.maximumDiskCacheSize` configuration.

The LRU ensures that cache reads bump the entry to the top so that they
don't get evicted - only the least recently used entries get evicted.

When `next start` is run, if there is an existing disk cache the we will
replay the files in order to populate the LRU and respect
`images.maximumDiskCacheSize` if it was changed.

If no configuration is provided, default to 50% available disk space.
Before:

```
    apiRequestContext.fetch: Request timed out after 30000ms
    Call log:
      - → GET http://localhost:55200/refetch-on-new-base-tree/a?_rsc=1u5ob
      -   <snip>

      225 |             // server; we pass the request to the server the immediately.
      226 |             result: (async () => {
    > 227 |               const originalResponse = await page.request.fetch(request, {
          |                                                           ^
      228 |                 maxRedirects: 0,
      229 |               })
      230 |

      at fetch (lib/router-act.ts:227:59)
      at lib/router-act.ts:245:13
      at routeHandler (lib/router-act.ts:257:7)
```

After:

```
    apiRequestContext.fetch: Request timed out after 30000ms
    Call log:
      - → GET http://localhost:61662/refetch-on-new-base-tree/a?_rsc=1u5ob
      -   <snip>

      264 |
      265 |     // Reveal the links to trigger prefetches
    > 266 |     await act(async () => {
          |           ^
      267 |       await linkALinkVisibilityToggle.click()
      268 |       await linkBLinkVisibilityToggle.click()
      269 |     }, [

      at Object.act (e2e/app-dir/segment-cache/revalidation/segment-cache-revalidation.test.ts:266:11)
```

<!-- 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

### 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 #

-->
We want `FileContent.content_hash()` to only hash the content bytes. This is also needed to produce the correct hashes [for SRI](https://developer.mozilla.org/en-US/docs/Web/Security/Defenses/Subresource_Integrity)

However, the default `DeterministicHash` and `Hash` impls are ill-suited for that because they're a generic hashing infrastructure.
Hashing only the content bytes isn't what you want actually, otherwise `hash(("a", "b", "c"))`  would be the same as `hash("abc")`
https://doc.rust-lang.org/std/hash/trait.Hasher.html#method.write_str describes this problem as well

This is exactly what we want for Rope though, so this adds a `Rope.content_hash() -> impl DeterministicHash`.

Additionally, this changes `content_hash` to accept a HashAlgorithm to prepare for sha SRI hashes. This required changing the return type to `RcStr`, because of the variable hash lengths. But the return value was always `encode_hex`d everywhere anyway.
…ler" (#90268)

Reverts #90083

This causes an MPA navigation when updating the hash fragment via
`window.location.hash = "foo"`
Adds handling for 


```tsx
export { unstable_instant } from './config'
       ^
```
```tsx
const unstable_instant = ...
                         ^
export { unstable_instant }
```
```tsx
const instant = ...
                ^
export { instant as unstable_instant }
```
We're not following assignments recursively and stop at the first declaration:
```tsx
const _instant = ...
const instant = _instant
                ^
export { instant as unstable_instant }
```
If the trimmed error message has no length, we skip the line entirely to remove useless vertical space from the Redbox. Errors with no messages are assumed to only be relevant due to their stack.
…86435)

This pull request updates the blog post rendering in the EdgeDB example
to use our `streamdown` library in static mode instead of
`react-markdown` for Markdown parsing and rendering.

---------

Co-authored-by: Joseph <joseph.chamochumbi@vercel.com>
@pull pull bot locked and limited conversation to collaborators Feb 21, 2026
@pull pull bot added the ⤵️ pull label Feb 21, 2026
@pull pull bot merged commit 22e46a4 into code:canary Feb 21, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants