- 10 May, 2023 2 commits
-
-
vercel-release-bot authored
-
JJ Kasper authored
This implements experimental`compile`/`generate` commands to allow separate the compilation and static generation steps of the build. Initially this is for testing and follows same experimental rules which aren't covered by semver. Note: most changes are just spacing changes so disabling that in the diff will be helpful. x-ref: [initial thread](https://www.notion.so/vercel/bbdbba2016ed464eb5263d325fecc02f?pvs=4) x-ref: [slack thread](https://vercel.slack.com/archives/C03DQ3QFV7C/p1676591260523589?thread_ts=1676554904.334789&cid=C03DQ3QFV7C)
-
- 09 May, 2023 17 commits
-
-
Jiachi Liu authored
The `pathname` in app-render was actually "page" (e.g. `/blog/[slug]`), with special url conventions. Instead we should use actual request url as pathname. Rename previous `pathname` arg to `pagePath` for better readability Also improved the url validation
-
Steven authored
``` ✕ should match query path (2857 ms) ● Middleware custom matchers basePath › should match query path expect(received).toBe(expected) // Object.is equality Expected: "random" Received: "" ``` https://github.com/vercel/next.js/actions/runs/4929337370/jobs/8809028722?pr=49529#step:6:201 -
OJ Kwon 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 ### Why? ### How? Closes NEXT- Fixes # --> #### What Part 1 for WEB-848. This PR implements initial path to enable relay compiler option in Turbopack. PR is based on approach WEB-955, that passing custom plugin transform itself instead of trying to pass down configuration into turbopack. In result, this PR requires counterpart turbopack PR at https://github.com/vercel/turbo/pull/4721. PR also refactors next-shared's transform bit, as we have grown number of custom transforms. Unfortunately there are some runtime errors with this transforms, so it is not possible to use relay actually yet. WEB-956 tracks this. (https://github.com/swc-project/plugins/pull/179) --------- Co-authored-by:
Tobias Koppers <tobias.koppers@googlemail.com> Co-authored-by:
JJ Kasper <jj@jjsweb.site>
-
OJ Kwon 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 ### Why? ### How? Closes NEXT- Fixes # --> ### What? closees WEB-1019. As discussed, this PR enables running a set of next.js integration tests with turbopack as blocking CI check. The tests listed as `enabled` is considered as stable, that should not fail in any case except upstream test flakyness. Current approach is simple as we have only small set of tests and does not consider it becomes a bottleneck. Adding a test under https://github.com/vercel/next.js/pull/49466/files#diff-fdc68d6039dbe36607cda253b318cd3598a09a94ccb8994f3695aa1d9e1e404bR2 will makes run with turbopack in the CI. in the future, I'll revise test suite itself so runner, or test case can mark & execute test with existing test group / scheduling.
-
Shu Ding authored
This PR implements initial support for `.bind` syntax for inline actions (not top-level `"use server"` files yet). For example: ```js export default function Page({ foo, x, y }) { async function action(a, b, c, d) { 'use server' console.log(a, b, c, d) } return <ClientComp action={action.bind(null, foo[0], foo[1], foo.x, foo[y])} /> } ``` Is now valid. Fixes NEXT-1109. -
Shu Ding authored
Closes #43396. https://github.com/vercel/next.js/issues/43396#issuecomment-1538638785 fix NEXT-684
-
Shu Ding authored
In Hot Reloader we use `mod.resource.replace(/\\/g, '/').includes(key)` to see if the module is the entry. However that `includes` check isn't solid. Say the entry key is `app/path/page`, these will all be matched: ``` app/path/page.js app/path/page.css app/unrelated/app/path/page/another/page.js ``` This PR fixes that and added a test case. I'm unsure if this fixes the newly reported cases in #43396. fix NEXT-1110
-
lijianan 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 # --> update React.CSSProperties type to Record --------- Co-authored-by:
Parbez <imranbarbhuiya.fsd@gmail.com>
-
Josh Parnham authored
We recently ran into hydration mismatch errors on iOS, which we realised was due to iOS automatically converting what it thought were phone numbers into links. We then found this GitHub issue, https://github.com/vercel/next.js/issues/38290, and thought it would be useful to add these details to the documentation page linked from the next.js error. --- Example from the linked issue:  ## Documentation / Examples - [x] Make sure the linting passes by running `pnpm build && pnpm lint` - [x] 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:
Tim Neutkens <tim@timneutkens.nl>
-
Darsh Patel authored
Fixes: #43598 This was a tricky one to find! Not sure why more people aren't complaining about this issue, was super annoying in my use case since links had the wrong URL. ## What? This issue only occurred when basepath was defined and middleware and dynamic pages are being used. Example from the reproduction repo mentioned in the issue tagged: <img width="686" alt="Screenshot 2023-04-23 at 9 32 55 PM" src="https://user-images.githubusercontent.com/11258286/233850968-e14f6b49-858b-410e-b8f9-93c90447090a.png"> ## Why? `nextConfig` wasn't passed to `getNextPathnameInfo` function, hence the basePath wasn't removed from a intermediate variable and that trickled down to cause this issue. Added test case based on the issue reproduction repo --------- Co-authored-by:
Jimmy Lai <laijimmy0@gmail.com>
-
Shu Ding authored
This PR adds a test case for `headers()` and `cookies().set()` in Client Component imported actions.
-
Jiachi Liu authored
testing react version in pages for deployment env
-
Cesar Kohl authored
Hey there :) I found this small issue. Replace `var` with `const` for block-scope variable declaration following the standard introduced by ES2015. <!-- 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 # -->
-
Wojciech Grzebieniowski authored
### What? Allow overwriting the `global.crypto` property when polyfilling it. ### Why? #48941 introduced `global.crypto` polyfill. The problem is that if some library (e.g. [xksuid](https://github.com/ValeriaVG/xksuid/blob/main/src/index.node.mjs)) tries to do the same thing, it breaks as `global.crypto` is defined as non-writable[^1]. Arguably libraries should check for `global.crypto` presence before overwriting it BUT I think polyfill should match the actual implementation[^2]. ### How? Make `global.crypto` `enumerable` and `configurable`, as well as define `set` implementation[^3]. [^1]:  [^2]:  [^3]:  --------- Co-authored-by:
Tim Neutkens <tim@timneutkens.nl>
-
-
vercel-release-bot authored
-
JJ Kasper authored
Uses the choice input type instead of requiring manually typing the values.
-
- 08 May, 2023 16 commits
-
-
Toru Kobayashi authored
fixes #47641 This adds a friendly error for loading a font error caused by the invalid `assetPrefix` setting. Current: <img width="747" alt="image" src="https://user-images.githubusercontent.com/250407/236685607-c03b6160-9e8c-4c88-80e1-714f6a140588.png"> This PR: <img width="890" alt="image" src="https://user-images.githubusercontent.com/250407/236685499-da4c3d69-0f97-458d-8709-dcc43475e0e9.png"> <!-- 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>
-
JJ Kasper authored
This ensures we use the proper body stream when rewriting to an external resource as currently it tries to consume an already read body stream. Fixes: https://github.com/vercel/next.js/issues/48040
-
Shu Ding authored
This PR extends `invalid_server_react_dom_apis` with `experimental_useOptimistic` and `experimental_useFormStatus` to create early compile-time errors.
-
JJ Kasper authored
This ensures we properly strip conflicting headers from being forwarded when handling the redirect request/response in actions. x-ref: [slack thread](https://vercel.slack.com/archives/C042LHPJ1NX/p1683218335368759) Fixes: ```sh failed to get redirect response TypeError: fetch failed at Object.fetch (node:internal/deps/undici/undici:11413:11) { cause: RequestContentLengthMismatchError: Request body length does not match content-length header at write (node:internal/deps/undici/undici:9907:41) at _resume (node:internal/deps/undici/undici:9885:33) at resume (node:internal/deps/undici/undici:9787:7) at connect (node:internal/deps/undici/undici:9776:7) { code: 'UND_ERR_REQ_CONTENT_LENGTH_MISMATCH' } } ```
-
Jiachi Liu authored
Fix the bad encoded buffer introduced in #49323
-
JJ Kasper authored
When revalidate isn't defined in the tree at all and a fetch without cache/revalidate fields is done we are incorrectly marking the initial revalidate period with a time based value when it should be `false`. This causes pages that should be fully static to revalidate unexpectedly. x-ref: [twitter thread](https://twitter.com/diegohaz/status/1655638433795014657) x-ref: [slack thread](https://vercel.slack.com/archives/C03S8ED1DKM/p1683566860136879)
-
vercel-release-bot authored
-
Shu Ding authored
This should fix the `requestAsyncStorage not available` error. [Related report](https://vercel.slack.com/archives/C03S8ED1DKM/p1683553422581859).
-
Jiachi Liu authored
-
Lee Robinson authored
To learn more
😄 Co-authored-by:JJ Kasper <jj@jjsweb.site>
-
Steven authored
- Reverts vercel/next.js#48291 - Fixes #49059 - TODO: move these tests to `./tests/e2e/*` to avoid flakes (that will be a follow up PR) fix NEXT-1092
-
vercel-release-bot authored
-
Jiachi Liu authored
-
Jimmy Lai authored
This PR wraps the server patch dispatcher with a transition, we generally want all router dispatch to go through one I'll follow up on tests properly later link NEXT-1096
-
vercel-release-bot authored
-
Tim Neutkens authored
## What? Removes the empty `next.config.js` warning. Given that `create-next-app` now ships with an empty config with the type definition comment the warning is no longer needed. ## How? Removed the warning, removed the tests. Fixes NEXT-1107
-
- 07 May, 2023 2 commits
-
-
Andrew Clark authored
Fixes a bug where `useFormStatus` crashed during SSR. Includes the following upstream changes: - [16d053d59](https://github.com/facebook/react/commits/16d053d59) Add useFormStatus to server rendering stub ([#26788](https://github.com/facebook/react/pull/26788)) (Andrew Clark) - [efb381bbf](https://github.com/facebook/react/commits/efb381bbf) [Release Script] Print a hint where to get the token ([#26783](https://github.com/facebook/react/pull/26783)) (dan) - [b00e27342](https://github.com/facebook/react/commits/b00e27342) Use native scheduler if defined in global scope ([#26554](https://github.com/facebook/react/pull/26554)) (Samuel Susla) - [783e7fcfa](https://github.com/facebook/react/commits/783e7fcfa) React DevTools 4.27.6 -> 4.27.7 ([#26780](https://github.com/facebook/react/pull/26780)) (Ruslan Lesiutin) - [377c5175f](https://github.com/facebook/react/commits/377c5175f) DevTools: fix backend activation ([#26779](https://github.com/facebook/react/pull/26779)) (Ruslan Lesiutin)
-
📝 Sanjaiyan Parthipan authored
-
- 06 May, 2023 1 commit
-
-
Jiachi Liu authored
typescript version could be helpful for determing user's problem with ts, especially typing with react
-
- 05 May, 2023 2 commits
-
-
Tim Neutkens authored
## What? Fixes a bug with iterating over the searchParams while `delete` and `append` are used. This is the minimal example of what happened: ```js const searchParams = new URLSearchParams('a=valueA&b=valueB&c=valueC') for(const key of searchParams.keys()) { console.log(key) if(key === 'b') { searchParams.delete('b') searchParams.append('bb', 'valueBB') } } ``` Output is: ``` a b bb ``` Instead of: ``` a b c bb ``` The reason seems to be that the iterator uses an internal count while iterating, e.g. the implementation in JavaScriptCore: https://github.com/WebKit/WebKit/blob/0743137c2f4f602963fc409ebc56ecd6690d204d/Source/WebCore/html/URLSearchParams.cpp#L155-L163 This can't be reproduced with `new Map()` or `new Set()`. This PR fixes it by only iterating over the keys that are known before the loop starts. Fixes an issue [reported by users](https://vercel.slack.com/archives/C03S8ED1DKM/p1683007482211449). <!-- 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 # --> -
Shu Ding authored
The `app-link-gc` module should treat the link with just pathname as the href and full URL as the same resource. This avoids duplicate styles during HMR: <img width="482" alt="CleanShot 2023-05-05 at 18 12 12@2x" src="https://user-images.githubusercontent.com/3676859/236511257-af510ed2-8e21-430a-bf71-24931b10e5de.png"> [Related bug report (internal)](https://vercel.slack.com/archives/C03KAR5DCKC/p1683295788069859).
-