forked from vercel/next.js
-
Notifications
You must be signed in to change notification settings - Fork 1
[pull] canary from vercel:canary #753
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 auto-generated PR updates the development integration test manifest used when testing Rspack.
This auto-generated PR updates the production integration test manifest used when testing Rspack.
… to more structurally prevent bugs like what was fixed in #89228 (#89255) # Fix inconsistencies in flag handling ## What? This PR refactors the task flags bitfield implementation to properly separate flags by category (meta vs data) during serialization and deserialization. It also regularizes the way accessors are generated to try to prevent future bugs like what was fixed in #89228
This test is also very flakey so adds it to the manifest as well
)" (#89323) `test/e2e/middleware-redirects` has 404s on the data route
…89316) The server actions transform, which handles the `'use cache'` directive, was not being applied to `node_modules` when imported from route handlers. This caused `'use cache'` functions from dependencies to fail with errors like `"cacheLife() can only be called inside a 'use cache' function"``. The issue was that the `AppRoute` context used `internal_custom_rules` for its foreign code module options, which did not include the server actions transform. This is inconsistent with `AppRSC` (App Router pages), which correctly uses `foreign_next_server_rules` that includes the transform. The fix extends `foreign_next_server_rules` with `internal_custom_rules` and uses it for the foreign code context in `AppRoute`, matching the pattern used by `AppRSC`.
) [flakiness metric](https://app.datadoghq.com/ci/test/runs?query=test_level%3Atest%20%40git.repository.id%3A%22github.com%2Fvercel%2Fnext.js%22%20%40test.name%3A%22browser-log-forwarding%20verbose%20level%20should%20forward%20all%20logs%20to%20terminal%22%20%40test.type%3A%22nextjs%22%20%40test.status%3Afail&agg_m=count&agg_m_source=base&agg_t=count&fromUser=false&index=citest&start=1769207121512&end=1769811921512&paused=false) The test frequently failed because it snapshot-asserted on the forwarded browser logs before the final debug message was forwarded. This is because the initial assertion inside the `retry` block would pass because it falsely matched the debug message inside the error code frame (line 11): ``` [browser] browser error: this is an error message at Page.useEffect (app/page.tsx:10:13) 8 | console.info('browser info: this is an info message') 9 | console.warn('browser warn: this is a warning message') > 10 | console.error('browser error: this is an error message') | ^ 11 | console.debug('browser debug: this is a debug message') 12 | }, []) 13 | (app/page.tsx:10:13) ``` By adding the `[browser] ` prefix to all expected log messages, we ensure that the test only passes when the actual log messages are forwarded, and not when they appear inside code frames. <!-- 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 # -->
… crate name (#89314) Disclaimer: This PR is entirely claude+opencode generated. - Crate name said `next-swc-napi`, which was confusing, because this has a lot more than swc bindings nowdays. - The crate name didn't match the directory name, which often confused agents. This does not change the npm package name, as that would likely have a much larger blast radius, and could break more things, to a point where it may not be worth it.
…piler (#89149) ## What? This PR adds support for detecting `@typescript/native-preview` as an alternative TypeScript compiler. When installed, Next.js will no longer automatically install the `typescript` package. ## Why? Fixes #88580 Users who want to use `@typescript/native-preview` (a Go-based native TypeScript compiler) should not be forced to also install the JavaScript-based `typescript` package. This is especially relevant for projects using `next.config.ts` where TypeScript support is provided by Node.js native TS or SWC. ## How? 1. Added `hasNativeTypeScriptPreview()` function to detect if `@typescript/native-preview` is installed 2. Modified the dependency check logic in `verifyTypeScriptSetup()` to skip auto-installing `typescript` when the native preview is present 3. Added an informative log message to notify users that some TypeScript features (like type checking during build) require the standard `typescript` package 4. Added e2e test to verify the behavior ## Test Plan - Added new e2e test at `test/e2e/app-dir/typescript-native-preview/` - The test verifies: - Detection message is shown - `typescript` is not auto-installed - The app still works (SWC/Turbopack handles compilation)
Reverts #89099 Apparently this did not solve the user's memory leak issue: #89091 (comment)
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.4)
Can you help keep this open source service alive? 💖 Please sponsor : )