Thanks to visit codestin.com
Credit goes to github.com

Skip to content

[pull] canary from vercel:canary #192

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 17 commits into from
Jun 3, 2025
Merged

[pull] canary from vercel:canary #192

merged 17 commits into from
Jun 3, 2025

Conversation

pull[bot]
Copy link

@pull pull bot commented Jun 3, 2025

See Commits and Changes for more details.


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

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

raunofreiberg and others added 17 commits June 3, 2025 06:41
This PR implements the latest changes from @pranathip to our info
popovers.

| Before | After |
|:------:|:-----:|
| ![CleanShot 2025-06-03 at 13 54
48@2x](https://github.com/user-attachments/assets/164109f9-ae41-4c8a-9154-9ec1f6b8297d)
| ![CleanShot 2025-06-03 at 13 54
29@2x](https://github.com/user-attachments/assets/267e9e88-2f61-48f1-88a9-d639e4750734)
|
The stitched-errors module will live in a different layer than the dev-overlay.
In that future we need to pass the `get*Stack` implementations to the dev-overlay.

Right now it's not meaningful but makes future diffs smaller.
This PR fixes a small bug with the menu keyboard interactions. Namely,
if you open a sub-menu and close it, visually the correct item is
highlighted but does not respond when pressing Enter.


The bug is visible here on this video:


https://github.com/user-attachments/assets/368311eb-1400-4a76-b42b-b59676dedef2


After this PR you can infinitely toggle between the menus:



https://github.com/user-attachments/assets/9ff7f5cd-67cf-4db5-a12f-fd1bf8ebe96b
…pdowns (#80025)

When Preferences is in dark mode, `<option>` items in the `<select>`
components were using the browser’s native white panel with white text,
making them unreadable.

This change explicitly adds CSS styles to the `<option>` items so they
follow the dark/light theme.

fixes #80024

## After:
![potential preferences option color
copy](https://github.com/user-attachments/assets/f473728b-bedb-4400-899a-ba97dfae2eab)

## Before:
![current preferences option
color](https://github.com/user-attachments/assets/1e7f9410-82bb-4788-a9f0-04c7136eae1a)

<!-- 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: Jiwon Choi <[email protected]>
Co-authored-by: Tim Neutkens <[email protected]>
### What?

Precompute hash for `RcStr` and use it for equality bailout.

### Why?


We have lots of `RcStr` in key positions of the hashmap, so adding a fast bailout path to `==` improved the performance.

x-ref: https://vercel.slack.com/archives/C06PPGZ0FD3/p1746715835436899?thread_ts=1746658944.635819&cid=C06PPGZ0FD3
…le (#80054)

Makes it easier to get types for those previously untyped `require` calls.
Same as with `get*Stack` implementation
### What?

Use precomputed data for hashing instead of rehashing everytime.

### Why?

`hash` of `&str` is `O(n)`. Although it's fast, we don't need to pay the cost for memory access.

---------

Co-authored-by: Tobias Koppers <[email protected]>
# Improve Turbopack webpack loader documentation

## Description

This PR improves the Turbopack webpack loader documentation by:

1. Clarifying that the list of supported loaders is not exhaustive
2. Adding a more detailed example showing how to pass options to loaders
using the object format
3. Adding graphql-tag/loader to the list of supported loaders based on
customer feedback

This addresses customer confusion about how to pass options to loaders
and clarifies that many loaders beyond those explicitly listed will
work.

Link to Devin run:
https://app.devin.ai/sessions/33095930f1f34a6daf81c2ce7eca3be0
Requested by: [email protected]

---------

Co-authored-by: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
Co-authored-by: [email protected] <[email protected]>
Co-authored-by: Tim Neutkens <[email protected]>
### Why?

When the user reloads on a specific error, and that error persists, we
show the restart server button as an option. This is because some errors
are recoverable by restarting the server and rebuilding the app.


https://github.com/user-attachments/assets/4e65d26c-8344-47b8-a6b9-1151008c271c

When Turbopack persistent cache is enabled, it will also clear the
bundler cache. This improves DX by replacing the need to run `rm -rf
.next` manually.


https://github.com/user-attachments/assets/e3f08176-5e9e-41fc-a8ce-9e731a45a6f2

Closes NEXT-4477

---------

Co-authored-by: Benjamin Woodruff <[email protected]>
Co-authored-by: Sebastian "Sebbie" Silbermann <[email protected]>
…erences (#80072)

Add options from #80060 to the
preferences tab as well for DX.

**Restart Dev Server**


https://github.com/user-attachments/assets/689441b4-46aa-418a-80e4-66ce495695cb

**Reset Bundler Cache**


https://github.com/user-attachments/assets/911224c6-b923-48ac-844d-52132b05ef3f

Closes NEXT-4478

---------

Co-authored-by: Benjamin Woodruff <[email protected]>
Co-authored-by: Sebastian "Sebbie" Silbermann <[email protected]>
Was previously shadowed because we used an uncast `require` which results in `any`.

Fixes
```
Argument of type '<T>(request: NextRequestHint, fn: () => T) => T' is not assignable to parameter of type '(req: Request, fn: () => T) => T'.
  Types of parameters 'request' and 'req' are incompatible.
    Type 'Request' is missing the following properties from type 'NextRequestHint': sourcePage, fetchMetrics, request, respondWith, and 6 more.ts(2345)
```
…roduction (#79999)

## Fail Google Fonts in Production Builds When Fetch Fails

### What?
This PR changes the behavior of Google Fonts in Next.js to properly fail
production builds when font fetching fails, while still allowing
development to continue with fallback fonts.

### Why?
Previously, font fetch failures were only logged as warnings but didn't
stop production builds. This could lead to production deployments with
missing fonts, creating a poor user experience. Development mode should
be more forgiving to allow work to continue offline.

### How?
- Added `is_dev_mode()` method to the `ChunkingContext` trait to
determine the current environment
- Modified the Google font fetching logic to:
- In development: Show a warning and use fallback fonts when fetching
fails
- In production: Throw an error that fails the build when fetching fails
- Passed the execution context to the font file replacer to access the
chunking context

This ensures that production builds will fail fast when font resources
can't be fetched, while development builds can continue with appropriate
fallbacks.

Fixes #PACK-4667

### Future Hopes

I would hope to eventually expose an enum for the build mode rather than
just a boolean flag like I have here. I started going down that path for
this PR, but it was expanding the scope significantly of what would have
to be done, so I have left it as a bool to fix this problem.
@pull pull bot added the ⤵️ pull label Jun 3, 2025
@pull pull bot merged commit 0a87d75 into code:canary Jun 3, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

8 participants