- 14 Mar, 2023 8 commits
-
-
JJ Kasper authored
-
Talha Zekeriya Durmuş authored
Fixes #46621 As explained here https://github.com/vercel/next.js/issues/46621, > Using fetch to retrieve data inside a page on server side, the response status code is incorrect when simply loading/reloading the page. It looks like nextjs is caching the response without taking into account the status code. In following code we do not add status code information to the cache. https://github.com/vercel/next.js/blob/canary/packages/next/src/server/lib/patch-fetch.ts#L189-L206 However we are accessing this status code in https://github.com/vercel/next.js/blob/canary/packages/next/src/server/lib/patch-fetch.ts#L247-L250 --------- Co-authored-by:
JJ Kasper <jj@jjsweb.site>
-
Mojtaba authored
updated zustand example to 4.3.6 changed out zustand's deprecated methods (createContext, create) converted the example to typescript ## Why zustand's example in nextjs repo is for zustand v3 which is quite different to how things are done in v4, it was also in javascript. back when when I started to use zustand in my nextjs app, this example helped me a lot and now, I wanna do the same for devs that come here to see how they can integrate next and zustand. ## Documentation / Examples [✓] Make sure the linting passes by running pnpm build && pnpm lint [✓] The "examples guidelines" are followed from [our contributing doc](https://github.com/vercel/next.js/blob/canary/contributing/examples/adding-examples.md) --------- Co-authored-by:
JJ Kasper <jj@jjsweb.site>
-
Sacha Stafyniak authored
## Description This allow to type mdx option externaly ```js /** @type {import('@next/mdx').NextMDXOptions} */ export const options = {} ``` ## Bug - [ ] Related issues linked using `fixes #number` - [ ] Integration tests added - [ ] Errors have a helpful link attached, see [`contributing.md`](https://github.com/vercel/next.js/blob/canary/contributing.md) ## Feature - [ ] Implements an existing feature request or RFC. Make sure the feature request has been accepted for implementation before opening a PR. - [ ] Related issues linked using `fixes #number` - [ ] [e2e](https://github.com/vercel/next.js/blob/canary/contributing/core/testing.md#writing-tests-for-nextjs) tests added - [ ] Documentation added - [ ] Telemetry added. In case of a feature if it's used or not. - [ ] Errors have a helpful link attached, see [`contributing.md`](https://github.com/vercel/next.js/blob/canary/contributing.md) ## Documentation / Examples - [ ] Make sure the linting passes by running `pnpm build && pnpm lint` - [ ] The "examples guidelines" are followed from [our contributing doc](https://github.com/vercel/next.js/blob/canary/contributing/examples/adding-examples.md) -
Shu Ding authored
This moves the position of action handling so it can continue page rendering afterwards. And a `asNotFound` option is added to `LayoutRouter` to indicate the router to opt into the root not-found boundary, so not found pages can be programmatically rendered instead of relying on route mismatching (this is also needed by NEXT-463 later). Fixes NEXT-467.
-
Maia Teegarden authored
* Fixes an issue where unsupported experimental options were not listed correctly * Fixes formatting if more than one unsupported option is configured * Shows unsupported options first and makes it slightly more clear blue options are supported Before:  After:  ---------
-
Jiachi Liu authored
Support top-level `robots.[ext]` and `sitemap.[ext]` with dynamic api routes * Use isAppRoute to determine api routes and metadata routes as metadata routes are normalized as `<metadata>/route` * Normalize path to auto append extension to pathname for sitemap.js and robots.js * Add typings `SitemapFile` and `RobotsFile` * move the normalize logic together, reuse the `absolutePathToPage`. Changes less when touching both dev-server/hot-reloader and next-server, use the same utils to handle paths Closes NEXT-262 ---------
-
Ngô Đức Anh authored
Fix(typedRoutes): fixed empty DynamicRoutes or StaticRoutes causing Route to turn into type string (#46980) Fixes #46974 When `dynamicRouteTypes` or `staticRouteTypes` is empty, type `DynamicRoutes`/`StaticRoutes` fallbacks to type `string`, causing type `Route` to resolve to type `string` as well, meaning that the user can use any string as `href`. This fixes that by making those types fallback to type `never` instead, and if both `dynamicRouteTypes` and `staticRouteTypes` are empty, fallback to type `string`. ## Bug - [ ] Related issues linked using `fixes #number` - [ ] Integration tests added - [ ] Errors have a helpful link attached, see [`contributing.md`](https://github.com/vercel/next.js/blob/canary/contributing.md) ## Feature - [ ] Implements an existing feature request or RFC. Make sure the feature request has been accepted for implementation before opening a PR. - [ ] Related issues linked using `fixes #number` - [ ] [e2e](https://github.com/vercel/next.js/blob/canary/contributing/core/testing.md#writing-tests-for-nextjs) tests added - [ ] Documentation added - [ ] Telemetry added. In case of a feature if it's used or not. - [ ] Errors have a helpful link attached, see [`contributing.md`](https://github.com/vercel/next.js/blob/canary/contributing.md) ## Documentation / Examples - [ ] Make sure the linting passes by running `pnpm build && pnpm lint` - [ ] The "examples guidelines" are followed from [our contributing doc](https://github.com/vercel/next.js/blob/canary/contributing/examples/adding-examples.md)
-
- 13 Mar, 2023 24 commits
-
-
Shu Ding authored
Not certainly sure about the reasonable limitation of this header. For example https://app-dir.vercel.app/context/books sends a state query of size ~110, consider an app with 100x more complicated nested, parallel and named segments, we still have a 3x extra room which should be enough. Fixes NEXT-137.
-
Hannes Bornö authored
Currently there's an experimental option in `next.config.js` that lets you define default subset(s) to preload for all your fonts. [docs](https://nextjs.org/docs/basic-features/font-optimization#specifying-a-subset) Over time we haven't seen much use of this option, and we are defining the subsets in the font function call in all our examples/docs. Imo it would be fine to drop this option. This PR removes that experimental option. If you happen to use it you'll get a build error with [a link](https://github.com/vercel/next.js/blob/f67af163cd625ad7a2d6141edd2b8e2679e14996/errors/google-fonts-missing-subsets.md). Next step (breaking change for next major) would probably be to remove the preload and subsets properties from `next/font/google` calls, and just have something like [`preloadSubsets´](https://vercel.slack.com/archives/C8EAN8A94/p1674868993169559?thread_ts=1674707555.461809&cid=C8EAN8A94) that is required.
-
Timon Jurschitsch authored
Hi everyone! Thank you for your work on this awesome framework
🙌 This short PR will add a short description on how to install the `canary` version of `next` to the `bug issue template`. It's only affecting this issue template and nothing else. Closes #47080 Co-authored-by:Steven <229881+styfle@users.noreply.github.com>
-
Bradley Dirheimer authored
This change will remove the typescript error. cloudinary.config doesn't exist, it should be updated to cloudinary.v2.config <!-- 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 or adding/fixing 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 # --> ---------
-
Steamed_EGG authored
To make them up to date with other templates <!-- 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 or adding/fixing 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? ### How? Closes NEXT- Fixes # --> ### Why? I was using `create-next-app` to create my new app using the new `app` directory but found out that `README.md` is outdated: It shows informations for API Routes, which removed in #45819 in favor of route handlers. ---------
-
Shu Ding authored
This PR implements the route announcer for app directory. It almost uses the same logic as the route announcer inside pages, with one notable difference that the inner content node is now inside a shadow root. This makes sure that it does as little impact as possible, to the application. This is important as we no longer have the `__next` wrapper. Another thing worth mentioning is that the announced title is a global singleton of the website. It shouldn't be affected by the concept of layouts, but should be triggered when the router state (not just URL) changes. Closes NEXT-208. --------- Co-authored-by:JJ Kasper <jj@jjsweb.site>
-
Shu Ding authored
It will be crucial to detect these common problems and abort compilation, because it's intended to be using a server boundary but these problems might cause it ending up in the client. Fixes NEXT-762.
-
JJ Kasper authored
-
JJ Kasper authored
This ensures our Proxy wrapping request fields works properly in the edge-runtime by explicitly binding to the correct request instance. x-ref: [slack thread](https://vercel.slack.com/archives/C03UR7US95F/p1678730563467089?thread_ts=1678662292.695769&cid=C03UR7US95F)
-
Shu Ding authored
This PR does two major changes: 1. Make sure both pages renderer and app renderer return `RenderResult`, no more `null`. This was achieved with a new `null` type in the constructor `new RenderResult(null)`, and a `.isNull()` method. 2. Remove all mutations of the `renderOpts` object inside renderers. To pass extra information out, they need to be attached to the `RenderResult` now. This also requires 1) to be done. These changes are the initial steps to the isolated rendering worker architecture. Besides those there're also some type improvements. Fixes NEXT-807. ---------
-
Johannes Obermair authored
Fixes #39330. I've not added a new test, but extended the existing test instead (and re-enabled it). It seems to me that a custom next/image config was not considered during static generation (which itself uses `next export`?) before. Adding the config to `renderOpts` in `packages/next/src/export/index.ts` resolves the issue.
-
Benjie authored
### Fixing a bug When a timeout occurs the `handleDisconnect` can be called twice on my machine (Chrome 110.0.5481.178). Once by the timeout code, and once by the `onerror` handler, possibly triggered by the `source.close()` call. This leads to every timeout triggering twice as many clients, which quickly explodes to websocket reconnections spamming the network tab of devtools. This trivial fix resolves the issue. Co-authored-by:JJ Kasper <jj@jjsweb.site>
-
Abhiyan Dhakal authored
Fixes #46983. The type of `_mongoClientPromise` has been added as Promise<MongoClient> which fixes the error. … file @/examples/with-mongodb/lib/mongodb.ts  <!-- 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 or adding/fixing 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:
JJ Kasper <jj@jjsweb.site>
-
John Daly authored
<!-- 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 or adding/fixing 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 # --> Updating the `with-jest` example to make use of the automatic path alias feature that was added in https://github.com/vercel/next.js/pull/45815 I've also updated the dependencies in the example --------- Co-authored-by:
JJ Kasper <jj@jjsweb.site>
-
JJ Kasper authored
Move `next-*` crates from Turbopack
-
JJ Kasper authored
-
zlrlyy authored
Co-authored-by:zhenglr <zhenglr@rd.netease.com>
-
Justin Ridgewell authored
Update workspace cargo deps Update cargo deps to point to local workspace Ignore too-many-arguments warnings Fix clippy errors Update pnpm workspaces exclude integration tests from unit tests CI rust-analyzer settings add rust flags and env vars
-
Tobias Koppers authored
-
Shu Ding authored
This is an initial implementation of POST-driven redirection handling: https://vercel.slack.com/archives/C035J346QQL/p1678321389089839. Highly experimental. Fixes NEXT-803, fixes NEXT-804.
-
LongYinan authored
Reduce `unwrap` and `clone` usages
-
Shu Ding authored
This is almost a rewrite of the transform to simply some logic. For a `"use server"` file we now simply annotate every exported identifier and will later do runtime checks. This is because that we can't statically know the source of exported values. This rewrite also makes it possible to annotate anonymous arrow functions. Thanks to @kdy1 for some of the suggestions here. Closes NEXT-708, closes NEXT-421.
-
konomae authored
Fix an anchor currently not working properly.
-
JJ Kasper authored
This ensures our `params` checking works properly with `app` dir. x-ref: [slack thread](https://vercel.slack.com/archives/C03KAR5DCKC/p1678659475821299)
-
- 12 Mar, 2023 1 commit
-
-
Jiachi Liu authored
-
- 11 Mar, 2023 3 commits
-
-
Tim Neutkens authored
-
Jiachi Liu authored
Set the output bundle file path to `/<metadata route>/route.js` to align with other custom app routes, in order to make it easier being handled by app routes in both nextjs and vercel
-
Yangshun Tay authored
`mdx-bundler` is used for server-side transformation of MDX files and currently using it within server components will throw a `Module parse failed: Unexpected token` error. Adding `serverComponentsExternalPackages: ['mdx-bundler']` to `next.config.js` fixes the issue, but it's probably good to add to the default exclusion list as `mdx-bundler` is a relatively popular approach for using MDX in Next.js apps.
-
- 10 Mar, 2023 4 commits
-
-
Maksym Anisimov authored
Added auto-detection of image/x-icon content type by analyzing response buffer fixes https://github.com/vercel/next.js/discussions/45998Co-authored-by:
Steven <229881+styfle@users.noreply.github.com>
-
Tobias Koppers authored
### Description Keeps track of available modules when importing new chunk groups. Omits assets that are already available in the parent chunk group(s) when determining assets to be included in chunks. ### Testing Instructions Dynamic imports should not include modules that are already in the parent chunks <!-- When the below is checked (default) our PR bot will automatically assign labels to your PR based on the content to help the team organize and review it faster. --> - [x] Auto label fixes WEB-599
-
Jesse Koldewijn authored
fixes #46893 ### What? fixing compile issue reguarding the dompurify package. ### Why? To allow the usage of dompurify ### How? Added jsdom and canvas to the external packages list which are used by dompurify and throw errors if not added to this list.
-
Hannes Bornö authored
Add the new fonts to `next/font/google`.
-