- 08 Jan, 2025 13 commits
-
-
vercel-release-bot authored
-
JJ Kasper authored
Aims to speed up CI by avoiding checking npm registry un-necessarily for every test run since we mostly hard code our test package versions when the version matters.
-
JJ Kasper authored
These internal APIs should not be necessary so removing them to avoid confusion/un-necessary APIs from being used. x-ref: [slack thread](https://vercel.slack.com/archives/C0861RLN3AP/p1736181537629329?thread_ts=1736180335.833419&cid=C0861RLN3AP)
-
Jiachi Liu authored
### What We're suffering from local dev that every time the `*.test.ts` files are resolved with the local tsconfig.json, which was intended to be handled by the root tsconfig.json in the Next.js monorepo as they require to resolve the utils alias. By leveraing the `NEXT_PRIVATE_SKIP_CANARY_CHECK` flag which is renamed to `NEXT_PRIVATE_LOCAL_DEV` for our development. This only happen in local development in our monorepo, not in development of users or any other situations. ### Benefits This helps us to always write the tests with correct type hints especially for the rare cheerio or playwright interface APIs with our testing suite
-
Sebastian "Sebbie" Silbermann authored
Co-authored-by:Zack Tanner <1939140+ztanner@users.noreply.github.com>
-
Lee Robinson authored
Oops.
-
Lee Robinson authored
This documents how to build Single-Page Applications with Next.js. --------- Co-authored-by:
Delba de Oliveira <32464864+delbaoliveira@users.noreply.github.com> Co-authored-by:
Rich Haines <hello@richardhaines.dev>
-
Sam Ko authored
## Why? This [PR](https://github.com/vercel/next.js/pull/67351) de-coupled functionality between the Next.js-provided `priority` property and the native `<img>`-provided `fetchPriority` property. We need to update the documentation to reflect this.
-
JJ Kasper authored
Currently any cache handlers configured under the global symbol are overridden by the default built-in cache handle unexpectedly. The default built-in cache handler should only be used if no user configured one is available and no global symbol provided one is available. This also fixes `expireTags` not being called on configured cache handlers at all due to that part not being wired up. Regression tests for the above are also added to ensure this is behaving as expected.
-
Zack Tanner authored
When we acquire a lock on a fetch, and the fetch errors, we weren't resolving the lock. This meant a subsequent request would stall waiting to acquire a lock and prevent the page from rendering. An example of this is a fetch with force-cache in `generateMetadata` and another in the RSC where both requests encounter a fetch error. Fixes #74613
-
Jam Balaya authored
## What? 1. Rename the following examples. | Before | After | |--------|--------| | [app-dir-mdx](https://github.com/vercel/next.js/tree/canary/examples/app-dir-mdx) | mdx | | [with-mdx](https://github.com/vercel/next.js/tree/canary/examples/with-mdx) | mdx-pages | | [with-mdx-remote](https://github.com/vercel/next.js/tree/canary/examples/with-mdx-remote) | mdx-remote | 2. Change the example names at README.md in the repositories. 3. Update the mdx pathname in the test files. ## Why? ### Why remove `app-dir-` in the directory name? The default has already been App Router anyways and a lot of examples have migrated over. x-ref: https://github.com/vercel/next.js/pull/72642#issuecomment-2474415343 ### Why remove `with-` in the directory name? According to [examples guidelines](https://github.com/vercel/next.js/blob/canary/contributing/examples/adding-examples.md), > Example directories should not be prefixed with `with-` ## How did you verify your code works? I have tested the new [with-mdx.test.ts](https://github.com/vercel/next.js/blob/canary/test/e2e/yarn-pnp/test/with-mdx.test.ts) and [example.test.ts](https://github.com/vercel/next.js/blob/canary/test/examples/examples.test.ts). ### Adding or Updating Examples - [x] The "examples guidelines" are followed from our contributing doc https://github.com/vercel/next.js/blob/canary/contributing/examples/adding-examples.md - [x] Make sure the linting passes by running `pnpm build && pnpm lint`. See https://github.com/vercel/next.js/blob/canary/contributing/repository/linting.md CC: @samcx Co-authored-by:
Sam Ko <sam@vercel.com>
-
Jude Gao authored
Add the implementation of https://nextjs.org/docs/app/api-reference/config/next-config-js/devIndicators to app router. Co-authored-by:
vercel-release-bot <infra+release@vercel.com>
-
Zack Tanner authored
### What When specifying a custom "use cache" handler via `experimental.cacheHandlers`, the handler is not used during `next start` ### Why Custom cache handlers are initialized after the first request in `getIncrementalCache`. But because `unstable_preloadEntries` is the default during `next start`, we won't have loaded the custom cache handlers and the app will be stuck using the default cache handler once its set on the global namespace. ### How This updates `unstable_preloadEntries` to load any custom cache handlers so they're used instead of the default. Fixes #72552
-
- 07 Jan, 2025 24 commits
-
-
vercel-release-bot authored
-
Jude Gao authored
- Decoupled pages router specific logic from the dev build indicator to extract a generic version - Created a pages router specific initialize function for dev build indicator to be called on pages router hydration - This prepares for upcoming work on the dev build indicator for App router - Covered by [e2e test](https://github.com/vercel/next.js/blob/jude/refactor-dev-build-indicator/test/integration/build-indicator/test/index.test.js)
-
Wyatt Johnson authored
Previously, we had code responsible for parsing and handling the `x-now-route-matches` header (sent by Vercel) that included the route matches used for parameter parsing that only read from the named parameters _if they were all present_. This doesn't apply to routes with optional parameters (such as `[[...rest]]`), so it wasn't utilizing that matching mechanism. It previously fell back onto the second stage of parsing that utilized numeric based group matching, but this was recently changed on Vercel, so the fallback no longer applies for Next.js applications that are running on 15+.
-
vercel-release-bot authored
-
Manoj M S authored
chore(examples): updated the example of with-styled-components-rtl to utlize the App router (#74180) This PR updates the with-styled-components-rtl example to use the App Router. Here are the changes that have been made: - Renamed the `pages` folder to the `app` folder. - Converted the `index.tsx` to `page.tsx` file as part of the App Router. - Created `layout.tsx` in app directory, merging functionality from both ` _app.tsx` and `_document.tsx`: - `ThemeProvider` setup from `_app.tsx` - `RTL` and `styled-components` setup from `_document.tsx` - Created `lib/registry.tsx` for styled-components server-side rendering and moved styled-components server-side rendering logic from `_document.tsx` - Updated the package.json file. The following actions were performed as part of this PR: - Ran `pnpm prettier-check` with no issues found. - Executed the `pnpm check-examples` script. CC: @samcx --------- Co-authored-by:samcx <sam@vercel.com>
-
Sam Ko authored
## Why? It turns out the `react/self-closing-comp` rule is not necessary to cover for JSX tags that are not properly closed.
-
Vercel Release Bot authored
-
Manoj M S authored
This PR updates the with-react-jss example to use the App Router. Here are the changes that have been made: - Renamed the `pages` folder to the `app` folder. - Converted the `index.tsx `to `page.tsx` file as part of the App Router. - Created `layout.tsx` in app directory, merging functionality from both `_app.tsx` and `_document.tsx`: - Wraps content with `StyledComponentsRegistry` - Created `app/registry.tsx` for JSS setup: - Moved JSS Provider and SheetsRegistry from _document.tsx - Moved style cleanup logic from _app.tsx - Handles server-side style generation - Updated the package.json file. The following actions were performed as part of this PR: - Ran `pnpm prettier-check` with no issues found. - Executed the `pnpm check-examples` script. CC: @samcx --------- Co-authored-by:samcx <sam@vercel.com>
-
Wyatt Johnson authored
Prerender errors triggered during development should be rethrown by the `unstable_rethrow` api. <!-- 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 # -->
-
Jiwon Choi authored
This PR allows `.stories.tsx` files to be viewed as nested when they share the same filename with `.ts` and `.tsx`, similar to the `.test.` files. https://github.com/user-attachments/assets/8e280369-984d-4d33-b91a-392b3c18b5d9
-
Will Binns-Smith authored
While many use case-specific graphs belong in Next.js, this primitive should be kept in Turbopack as it will be used for other core usecases like chunking. Test Plan: CI
-
JJ Kasper authored
This ensures we don't lose tags added to a page before `notFound()` is called as otherwise a fetch on the page that has been revalidated won't be able to be applied correctly if dropped from a `notFound()` call. This was broken recently in the refactors of handling rendering in app-render as it worked correctly in `v14`. x-ref: [slack thread](https://vercel.slack.com/archives/C04V3E1UYNQ/p1736200963684869) Closes https://linear.app/vercel/issue/ENET-1381 Closes https://linear.app/vercel/issue/NEXT-3946 Closes https://github.com/vercel/next.js/issues/73973 Closes https://github.com/vercel/next.js/issues/66540
-
vercel-release-bot authored
-
Tim Neutkens authored
## What? Skips the websocket ping for Turbopack. Currently the ping is only used by the webpack integration to keep track of "active" entrypoints that are still being viewed. Entrypoints that are no longer viewed will be disposed from the webpack compiler. With Turbopack this mechanism is not used and it keeps the entrypoints around. Removing the ping makes the websocket events easier to monitor and read while debugging. <!-- 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 # -->
-
Janka Uryga authored
this comment is a useful explanation, but was accidentally lost in #52846, when a bunch of loader stuff was unified between webpack and turbopack see: https://github.com/vercel/next.js/pull/52846/files#diff-173d1bc6424869c0d3c43f8fba124186427d03e5bd056587f141886a0075b1d3L699-L700
-
Jiwon Choi authored
This PR added style for Toolbar buttons, and moved files to `Errors/error-overlay-toolbar`. Will follow up with TBD: - Replace the Node.js button with the "Debugging" Icon - Add Docs Button? ### Light  ### Dark  Closes NDX-601 Closes NDX-602
-
Tobias Koppers authored
### What? updates shadow-rs dependency, which fixes the build.rs caching problem: https://github.com/baoyachi/shadow-rs/pull/195/files#diff-b335630551682c19a781afebcf4d07bf978fb1f8ac04c6bf87428ed5106870f5R40 Also prints the git version during the build
-
Jiachi Liu authored
-
Janka Uryga authored
Fixes #74062 (`jotai` ran into this error [when they added `"type": "commonjs"` to their package.json](https://github.com/pmndrs/jotai/discussions/2579#discussioncomment-9812492)) > this is a bug in the transform we do when a `'use client'` directive is encountered. I think what's happening is that we're creating a virtual file that uses ESM import/export syntax, but it's called proxy.js (not proxy.mjs), so the `"type": "commonjs" `makes turbopack "correctly" upset at the ESM syntax. https://github.com/vercel/next.js/issues/74062#issuecomment-2555922867 The (slightly kludgy) solution is to use `proxy.mjs` or `proxy.cjs` to force the module format, bypassing the issue where `proxy.js` changes meaning depending on `package.json#type`.
-
Noel Kim (김민혁) authored
-
Vercel Release Bot authored
-
Sam Ko authored
## Why? Updating from `STALE_TOKEN` to `RELEASE_BOT_TOKEN` because `STALE_TOKEN` has expired.
-
Sam Ko authored
## Why? - Update React in reproduction example templates to stable v19 - Switch `.ts` for `next.config` - Fixes https://github.com/vercel/next.js/issues/74422
-
Vercel Release Bot authored
This auto-generated PR updates font data with latest available
-
- 06 Jan, 2025 3 commits
-
-
vercel-release-bot authored
-
Jude Gao authored
## What? Added accessibility improvements to the error overlay voting buttons by making their icons properly hidden from screen readers. ## Why? To enhance accessibility for users relying on screen readers by preventing redundant icon announcements while maintaining the clear button labels "Mark as helpful" and "Mark as not helpful". ## How? - Added `ComponentProps<'svg'>` type to ThumbsUp and ThumbsDown components to allow passing SVG attributes - Spread props to SVG elements to enable aria attributes - Added test coverage to ensure icons have `aria-hidden="true"`
-
Jude Gao authored
Improved a11y (aria-live, aria-label) and simplified loading/error state to prevent double firing when feedback buttons get clicked multiple times while loading.
-