- 19 Aug, 2023 1 commit
-
-
vercel-release-bot authored
-
- 18 Aug, 2023 16 commits
-
-
vercel-release-bot authored
-
Corey Larson authored
Fixes https://github.com/vercel/next.js/issues/54240 The Link component in App Router is not respecting `scroll-behavior: smooth` when only the hash changes. It appears to be caused by `focusAndScrollRef.onlyHashChange = false` being set before `handleSmoothScroll` is called, causing `htmlElement.style.scrollBehavior` to be overridden to `auto` before `scrollIntoView` is called. Moving `focusAndScrollRef.onlyHashChange = false` to after `handleSmoothScroll` invocation resolves the issue.
-
Shu Ding authored
This fixes the compilation of `export { action as renamed }` syntax. Previously it's compiled as `export var action = ...` and with this fix, it will be `export var renamed = ...`. Closes #54229. -
-
David Goguen authored
Image Optimization API currently does not work if a custom loaderFile is specified in next.config.js, even if loader is explicitly set to 'default', because it is currently being overridden to 'custom' simply because a loaderFile is specified. This is unnecessary and causing the Image Optimization API routes not to be initialized since the change to the config happens before the routes are initialized. [Sandbox Reproduction](https://codesandbox.io/p/sandbox/purple-pine-t7hhgl?file=%2Fimage-loader.js%3A8%2C1) - Fixes #53415
-
Balázs Orbán authored
Running the action added in #53541 on forks will result in always failing, so we can skip it. Fixes #54210
-
vinay authored
Fixes #54223
-
Jiachi Liu authored
For group routes, unlike normal routes, the root layout is located in the "group"'s segment instead of root layer. To make it also able to leverage the default not found error component as root not found component, we need to determine if we're in the root group segment in the loader tree, and add the not-found boundary for it. If you compre the loader tree visually they will look like this: Normal route tree structure ``` ['', { children: [segment, {...}, {...}]}, { layout: ..., 'not-found': ... } ] ``` Group routes ``` ['' { children: ['(group)', {...}, { layout, 'not-found': ... }]} {} ] ``` Comparing to normal case, we go 1 layer down in the tree for group routes, then insert the not-found boundary there Fixes #52255 Closes NEXT-1532 -
Shu Ding authored
This PR removes our client module reference proxy implementation to directly use the one from the upstream Flight server, as it's added here: https://github.com/facebook/react/pull/27033. Also updated the server reference creation code a bit to use `defineProperties` - we can't switch to the upstream `registerServerReference` API yet as our Server Actions compiler needs to change a bit to adapt that API since we might have existing `bound` and/or `originalAction` provided.
-
Shu Ding authored
Closes #53732. Closes #52929. When using the statically typed routes feature, we might have code like: ```ts export function Card<T extends string>({ href }: { href: Route<T> | URL })... export function Card<T extends string>({ href }: LinkProps<T>)... ``` To statically check `<Card href={...}>` and make sure it's `href` is an existing route. However, in certain cases these route types are not generated (e.g. running `tsc` directly w/o a `next dev` or `next build`), which results in TS errors. This PR adds stub generics to `Route` and `LinkProps` so even if that plugin isn't executed, these types will not block type checking. -
Shu Ding authored
Closes #54168. This was accidentally removed from a code refactoring.
-
Zack Tanner authored
### What? When running Next in standalone mode, `process.env` is not made available to the render workers, making it impossible to access environment variables that aren't provided in `.env` files. ### Why? `initialEnv` is undefined in `createWorkers` when the server is started in standalone mode. ### How? This initializes the workers with `process.env` in case `initialEnv` is unavailable, similar to the behavior of `loadEnvConfig()` Closes NEXT-1508 Fixes #53367
-
Tim Neutkens authored
This is only used for internal tools
👍 -
Steven authored
I accidentally left this type cast in from previous PR https://github.com/vercel/next.js/pull/54074 but it is unnecessary.
-
Kim In Seop authored
occured since #54188 - `*`: use kebabcase instead of lowercase - Transition: `components/transitions/transition` - Tab: `components/tabs/tabs` ```plain - wait compiling /not-found (client and server)... - error ./node_modules/.pnpm/@headlessui+react@1.7.17_react-dom@18.2.0_react@18.2.0/node_modules/@headlessui/react/dist/headlessui.esm.js:2:0 Module not found: Can't resolve '/Projects/node_modules/.pnpm/@headlessui+react@1.7.17_react-dom@18.2.0_react@18.2.0/node_modules/@headlessui/react/dist/components/tab/tab' ``` Co-authored-by:Shu Ding <3676859+shuding@users.noreply.github.com>
-
vercel-release-bot authored
-
- 17 Aug, 2023 18 commits
-
-
vercel-release-bot authored
-
Zack Tanner authored
Follow up to https://github.com/vercel/next.js/pull/54081 -- this was restoring the router tree improperly causing an error on bfcache hits Had to override some default behaviors to prevent `forward` / `back` in playwright from hanging indefinitely since no load event is firing in these cases Fixes #54184 Closes NEXT-1528
-
Malte Ubl authored
`import { Listbox } from "@headlessui-float/react";` becomes `import { Listbox } from "@headlessui/react/dist/components/listbox/listbox";` -
Jiachi Liu authored
Fixes #52365 In #52275 that eslint config changed to a fixed canary version to leverage the improvement of `react-hooks` eslint plugin but breaks the installation when 3rd party packages having strict matching for certain version of eslint plugin. This PR allows both previous version and the canary version be present.
-
Jiachi Liu authored
Fixes #54174 We should only add default not-found boundary to loader tree components for root layout. It was accidently added for children routes before
-
Ben Brook authored
Closes #49774 (and my dupe https://github.com/vercel/next.js/issues/53141), where there's a type error when attempting to construct URLSearchParams from ReadonlyURLSearchParams, [as recommended in the Next docs here](https://nextjs.org/docs/app/api-reference/functions/use-search-params#updating-searchparams) and breaks `next build` on Node v18.16.0+, including on Vercel. This is blocked by TS publishing the new `dom` types (https://github.com/microsoft/TypeScript/issues/54466). The [URL Standard](https://url.spec.whatwg.org/#dom-urlsearchparams-size) added the size property to URLSearchParams (https://github.com/whatwg/url/pull/734) and this now has wide [browser support](https://developer.mozilla.org/en-US/docs/Web/API/URLSearchParams/size).
-
Justin Ridgewell authored
### What? Strip the relative path prefix (`_next/`) when generating the `PageLoaderAsset`. This is necessary because the page loader will internally use `__turbopack_load__`, which prepends the prefix back onto the path. ### Why? Without this, we'd try loading `_next/_next/path/to/file.js`, because we'd prepend the prefix onto a path that already contains it. ### How? When generating the page loader asset, we "proxy" the `OutputAsset` onto a path which has the prefix removed. ~~Depends on https://github.com/vercel/turbo/pull/5717~~ Closes WEB-1377
-
Justin Ridgewell authored
The current toolchain is very buggy. Closes WEB-1400
-
Steven authored
- Follow up to https://github.com/vercel/next.js/pull/54074
-
Shu Ding authored
These are not referenced anywhere in the codebase.
-
Jiachi Liu authored
For edge-runtime we always bundle, and all the mapping of internal ESM files are configured in webpack. Adding a new alias of "next/dist/build" so we don't have to manually check the mapping path for module proxy
-
vercel-release-bot authored
-
vercel-release-bot authored
-
Jiachi Liu authored
Reverts vercel/next.js#53578 This PR (#53578) will break client components test, revert it for now. Can repro by adding `"use client"` to `app/page.tsx` in `test/production/jest/server-only.test.ts` ``` FAIL app/page.test.jsx ● Test suite failed to run· Cannot find module 'private-next-rsc-mod-ref-proxy' from 'app/page.jsx'· Require stack: ``` -
vercel-release-bot authored
-
Jiwon Choi authored
- Added `has` to ResponseCookies in [edge-runtime/cookies#533](https://github.com/vercel/edge-runtime/pull/533) - Upgraded edge-runtime/cookies to 3.3.0 #54117 - Added a test case Fixes #54005 #54111
-
Will Binns-Smith authored
This: - Adds a simple, generic tracer in the client that can be subscribed to in order to report spans - Reports client spans through the HMR socket in the dev server - Receives these spans and includes them in `.next/trace` Closes WEB-1387
-
Max Leiter authored
### What? ~The `setTimeout(() => {}, 0)` was used in place of `setImmediate` due to lack of support in the Edge Runtime. This is no longer a problem.~ Not working like I expected. `ReadableStream.tee` should be widely supported as well as of [Node 16.5](https://developer.mozilla.org/en-US/docs/Web/API/ReadableStream/tee#browser_compatibility) ### Why? Use the platform! ### How? Use the built-in `ReadableStream.tee()`
-
- 16 Aug, 2023 5 commits
-
-
vercel-release-bot authored
-
Will Binns-Smith authored
Note: depends on next Turbopack publish https://github.com/vercel/turbo/pull/5487 exports a reusable `handle_issues` function for reporting issues and erroring when failing issues are encountered. This uses it for `next build` with a failing severity level of error.
-
Zack Tanner authored
Accidentally left this in after making some changes in: - https://github.com/vercel/next.js/pull/54081
-
Dima Voytenko authored
The internal IPC fetches are an internal framework detail and they shouldn't pollute the tracing in a non-verbose mode. Examples of internal fetch output: <img width="600" alt="image" src="https://github.com/vercel/next.js/assets/726049/64a25c02-bf39-4f54-8fe3-86018c7720dc"> <img width="1369" alt="image" src="https://github.com/vercel/next.js/assets/726049/f8f1d65c-5444-42c7-9e7d-6cdf9865eace">
-
Balázs Orbán authored
### What? When cloning a `Request` with `NextRequest` the second argument needs to take precedence over the `Headers` set on the original request. ### Why? Follow-up of #53157 I checked the `Request` spec https://fetch.spec.whatwg.org/#request-class and following the order of execution, `init.headers` should indeed override the headers if the first param was `Request`. I verified this in the browser too: ```js const req1 = new Request("http://n", {headers: {"x-header": "foo"}}) const req2 = new Request(req1, {headers: {"x-header-2": "bar"}}) Object.fromEntries(req2.headers) // {x-header-2: "bar"} ``` So we should match `NextRequest` with this behavior. ### How? Pass the `init` to `super` when cloning the request. Closes NEXT-1521 Fixes #54094
-