forked from vercel/next.js
-
Notifications
You must be signed in to change notification settings - Fork 0
[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
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This PR implements the latest changes from @pranathip to our info popovers. | Before | After | |:------:|:-----:| |  |  |
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:  ## Before:  <!-- 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.
#77728) Co-authored-by: Jiachi Liu <[email protected]>
#80046) Same as with `get*Stack` implementation
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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 : )