[pull] canary from vercel:canary#111
Merged
Merged
Conversation
<!-- 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 # --> let Rspack to pass the test cases it was previously able to pass. 1. update Rspack to 1.3.9 2. Moves `moduleSpansByCompilation` setting in `RspackProfilingPlugin` from the `compilation` hook to `thisCompilation`. `TraceEntryPointsPlugin` relies on `moduleSpansByCompilation` during its `thisCompilation` hook. Since the `compilation` hook triggers before `thisCompilation`, initializing the map earlier leads to: ``` Error: × TypeError: Cannot read properties of undefined (reading 'traceChild') ``` relate: #78011 3. The test case `test/integration/middleware-prefetch/tests/index.test.js` was failing due to an unreliable asset name matching strategy. Asset names follow the pattern: `static/chunks/pages/[pagename]-[hash].js`. Test was checking for `ssg-page-2-[hash].js` by looking for names starting with `ssg-page-2`. This could produce false positives when `ssg-page-[hash].js` happens to have a hash starting with `2`. 4. test dev `test/e2e/app-dir/dynamic-data/dynamic-data.test.ts` Test fails due to Rspack's lack of support for compilation.codeGenerationResults JS API. 5. test dev `test/e2e/app-dir/dynamic-href/dynamic-href.test.ts` Same compatibility issue as above. 6. test dev `test/development/acceptance-app/hydration-error.test.ts` Same compatibility issue as above. 6. test dev `test/development/app-dir/ssr-in-rsc/ssr-in-rsc.test.ts` Test fails due to differing error message formats between implementations.
### Feature Introducing a new convention `global-not-found.js`, which let you build your own 404 page within app router. This convention is similar to `global-error.js` but for not found in general case, it's similar to `not-found.js` but including the layout. App router has an implicit convention of building the 404 route, which is composing the top-level root `layout.js` and the root `not-found.js` to build up a 404 page. Since it's so implicit so that users don't have much control over it, which also lead to some confusing errors like `/_not-found` route is build failed due to various reason. The `global-not-found.js` convention is aimed to help users to build 404 route in App Router easily and convenience. Currently it will be bound with a flag `experimental.globalNotFound` and later it will become the stable feature in next major release as it introduces a minor breaking change that we won't use root layout and root not-found to compose the 404 page. Instead, we'll either choose the builtin 404 page or users customized `global-not-found.js` to generate the 404 page when you enable the feature. #### Advantages Good new that if you were having struggles with creating 404 page for the multi root layouts app, such as the case below. Then `global-not-found.js` is your choose. ``` - (2024)/ /layout.js /... # routes - (2025)/ /layout.js /... # routes ``` Closes NDX-1036 Related #59180 #### Follow up The metadata and deployment will be followed up in new PRs
Looks like we never added this after the turbopack repo migration.
This should automatically add the `Rspack` label in most cases, which should let us run the rspack CI in theses cases. There's an issue with the current CI config where the build-and-test job isn't triggered by label changes, so I'll need to make some changes there, but this is a start.
### What? Part of the memory usage reduction task. ### Why? We don't need to clone the AST.
The labeler reads this as json5 here: https://github.com/vercel/next-labeler-webhook/blob/1ecc3b54c2b03fae950c7cb2dd859cf63c3e8684/src/app/api/label/utils/fetchConfig.ts#L1 But apparently something else is also reading it and expecting JSON? 
… local font files (#78941) Previously, we used `anyhow::Result` for this, but this conflicts with how we use `Error` in Turbo Tasks as system-level exceptions. Test Plan: `pnpm test-dev-turbo test/e2e/app-dir/next-font/next-font.test.ts`
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
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 : )