- 11 Feb, 2024 2 commits
-
-
vercel-release-bot authored
-
Sam Ko authored
## Changes - Update section title from `Next Info` to `Info` - Adds consistency with other section titles and fixes broken link → https://github.com/vercel/next.js/blob/09a764d0fc5d143e401526153d73fab901844a38/packages/next/src/cli/next-info.ts#L100 Closes NEXT-2425
-
- 10 Feb, 2024 5 commits
-
-
vercel-release-bot authored
-
Lee Robinson authored
-
Delba de Oliveira authored
Closes: - https://github.com/vercel/feedback/issues/54964 - https://github.com/vercel/feedback/issues/54580 - https://github.com/vercel/feedback/issues/54555 - https://github.com/vercel/feedback/issues/54341 - https://github.com/vercel/feedback/issues/54309 - https://github.com/vercel/feedback/issues/53751 - https://github.com/vercel/feedback/issues/55173 Add diagram: https://github.com/vercel/front/pull/29561
-
Tim Neutkens authored
## What? Currently going through all issues on the Turbo repository to check if they've been fixed already, this PR adds tests for the reports. - [x] https://github.com/vercel/turbo/issues/5913 <!-- 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 # --> Closes NEXT-2413
-
Lee Robinson authored
Co-authored-by:Michael Novotny <manovotny@gmail.com>
-
- 09 Feb, 2024 12 commits
-
-
vercel-release-bot authored
-
Ryota Murakami authored
v8.15.1 changelog - https://github.com/pnpm/pnpm/releases/tag/v8.15.1 - https://github.com/pnpm/pnpm/releases/tag/v8.15.0 nd Include v8.15.0 update --------- Co-authored-by:
Sam Ko <sam@vercel.com>
-
Josh Story authored
There was a bug where if the root hydrates and then an update happens the intitial server data response can be replaced by one that is completely empty and will never resolve. This can lead to a frozen hydration that blocks interactivity. This udpate makes it so it is impossible for the initial data response to ever be created more than once. Making a regression test is tricky because this relies on subtle timing of hydration, updates, and when the inline chunks arrive in the stream. The original implementation is just not safe in that it violates the rules of react and the new one is self-evidently unable to produce a similar situation so as long as our existing test suite passes that must be sufficient absent a good alternative to making a specific regression test Closes NEXT-2420
-
Sam Ko authored
## Changes - rename job from `popular_issues` to `popular_prs` Closes NEXT-2422
-
Sam Ko authored
## Changes - Fixes https://github.com/vercel/next.js/issues/61594 Closes NEXT-2421
-
Sam Ko authored
## Changes Updates `beforeInteractive` section in API Reference docs for Pages Router - https://nextjs.org/docs/pages/api-reference/components/script#beforeinteractive - Closes https://github.com/vercel/next.js/issues/61594
-
Zack Tanner authored
In #61794, the routes manifest is used to find the interception route rewrites in `next-server` and computed on the fly in `next-dev-server` based on `appPaths`. The edge runtime doesn't have access to the routes manifest nor a full list of app paths. This writes an entry for the edge runtime to make the interception routes readable, and adds plumbing to return them in the `getInterceptionRouteRewrites` handling in `web-server`. This is what we use to signal to the server whether to return ‘Next-URL’ in the Vary for RSC requests. This piggybacks on the existing interception routes test but adds an edge runtime case. Closes NEXT-2304
-
Zack Tanner authored
To ensure that we properly cache data for routes that change based on `Next-URL` (which is used for route interception), this adjusts how we set the `Vary` header to conditionally include `Next-URL`. The `Next-URL` request header only impacts the response for routes that are intercepted. When we detect that path we're handling could be intercepted, we add `Next-URL` to the vary. This signals in #61235 to prefix these cache entries with `nextUrl` if the response might vary based on it. Closes NEXT-2398
-
Tobias Koppers authored
### What? * https://github.com/vercel/turbo/pull/7302 <!-- Tobias Koppers - support exporting undefined --> * https://github.com/vercel/turbo/pull/7303 <!-- Tobias Koppers - improve HMR performance --> * https://github.com/vercel/turbo/pull/7306 <!-- OJ Kwon - ci(test): add wasi target check for the supported packages --> * https://github.com/vercel/turbo/pull/7308 <!-- OJ Kwon - build(cargo): apply formatting --> * https://github.com/vercel/turbo/pull/7117 <!-- Tobias Koppers - track RequestKey during resolving and avoid duplicate keys --> Closes PACK-2299
-
Steven authored
Since yarn@1 is no longer maintained, we shouldn't use it for tests that are not designed specifically for yarn@1 Closes NEXT-2397
-
vercel-release-bot authored
-
Zack Tanner authored
Updates React from 2bc7d336a to ba5e6a832. ### React upstream changes - https://github.com/facebook/react/pull/28283 - https://github.com/facebook/react/pull/28280 - https://github.com/facebook/react/pull/28079 - https://github.com/facebook/react/pull/28233 - https://github.com/facebook/react/pull/28276 - https://github.com/facebook/react/pull/28272 - https://github.com/facebook/react/pull/28265 - https://github.com/facebook/react/pull/28259 - https://github.com/facebook/react/pull/28153 - https://github.com/facebook/react/pull/28246 - https://github.com/facebook/react/pull/28218 - https://github.com/facebook/react/pull/28263 - https://github.com/facebook/react/pull/28257 - https://github.com/facebook/react/pull/28261 - https://github.com/facebook/react/pull/28262 - https://github.com/facebook/react/pull/28260 - https://github.com/facebook/react/pull/28258 - https://github.com/facebook/react/pull/27864 - https://github.com/facebook/react/pull/28254 - https://github.com/facebook/react/pull/28219 - https://github.com/facebook/react/pull/28248 - https://github.com/facebook/react/pull/28216 - https://github.com/facebook/react/pull/28249 - https://github.com/facebook/react/pull/28241 - https://github.com/facebook/react/pull/28243 - https://github.com/facebook/react/pull/28253 - https://github.com/facebook/react/pull/28256 - https://github.com/facebook/react/pull/28236 - https://github.com/facebook/react/pull/28237 - https://github.com/facebook/react/pull/28242 - https://github.com/facebook/react/pull/28251 - https://github.com/facebook/react/pull/28252 Closes NEXT-2411
-
- 08 Feb, 2024 19 commits
-
-
Alexander Savelyev authored
### Fixing a bug ### What? Fix remotePatterns when all paths and/or domains are allowed. ### Why? micromatch creates a very strange regex for all paths - `/^(?:(?!\.)(?:(?:(?!(?:^|[\\/])\.).)*?)[\\/]?)$/`. That is, paths cannot start with a dot or contain a slash followed by a dot. Interestingly, here are some valid paths: - /a/a.a/6a00d8341c4fbe53ef02c8d3a82122200d-600wi - ////a/a.a/6a00d8341c4fbe53ef02c8d3a82122200d-600wi - ///:?%;№%/a/a.a/6a00d8341c4fbe53ef02c8d3a82122200d-600wi.\/ - /:./6a00d8341c4fbe53ef02c8d3a82122200d-600wi.\/ And here are some invalid ones: - /.a/6a00d8341c4fbe53ef02c8d3a82122200d-600wi - /a/.a/6a00d8341c4fbe53ef02c8d3a82122200d-600wi - ./a/6a00d8341c4fbe53ef02c8d3a82122200d-600wi I don't think this check makes any sense. ### How? If the user allows all (`**`) - it means any path or domain will be considered valid. - Fixes #60483 - Fixes #58139 - Fixes #46903 --------- Co-authored-by:Steven <steven@ceriously.com>
-
Steven authored
### Why The `process/browser` lib was imported and being transformed, but `process.browser = true` turns to `true = true` that causes the compilation error, we need to exclude them from certain compilation layers ### What - Fixes https://github.com/vercel/next.js/issues/61116 Closes NEXT-2410 Closes NEXT-2328 --------- Co-authored-by:
Jiachi Liu <inbox@huozhi.im>
-
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 - 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 # --> ### What? https://vercel.slack.com/archives/C04DUD7EB1B/p1707296379554859 I hit this badly as well, pnpm cache grows > 300gb due to running test locally a bunch. Trying to adjust fixture setup to use tmpdir as cache location if the pkg installation is for the test. Closes PACK-2434
-
SaiGanesh21 authored
### What? Resolves issue #61695 ### Why? The `Building Your Application -> Data Fetching -> Server Actions and Mutations` section in the Next.js documentation has a few mismatches with respect to JS and TS codes. --------- Co-authored-by:
battuAshita <battua@iitbhilai.ac.in> Co-authored-by:
Sam Ko <sam@vercel.com>
-
Jon Meyers authored
### What? [1] Clean up `with-supabase` example following patterns from @leerob's recent video on authentication [2] Add images to matcher to reduce number of times a session is refreshed [3] Move instantiation of `cookieStore` into Supabase server helper ### Why? [1] Make template easier to understand and use [2] Reduce likelihood users will receive Auth Rate Limit Exceeded error [3] Makes creating a Supabase client much simpler in Server Components, Route Handlers and Server Actions ### How? [1] Refactor middleware and its helper function [2] Add image extensions to middleware matcher [3] Call `cookies()` function from `createClient` helper - this should still be in the [same execution context](https://nextjs.org/docs/messages/dynamic-server-error) and appears to work from my testing, but would be good to get the
👍 from someone at Vercel -
Zack Tanner authored
The docs mention using a `Link` to close the modal, but navigating away from a slot that was active won't automatically unmount unless it matches with a new page for that slot. This is because client-side navigations don't switch slots from active -> default. Default is only used on a hard navigation. I believe this example used to be in here but got removed, so I re-added with some extra clarity. Closes NEXT-2405
-
Zack Tanner authored
Unclear when this can happen currently (hence missing a test), but this adds a safeguard to `applyUrlFromHistoryPushReplace` to ensure that we don't potentially call `ACTION_RESTORE` with data that might be missing from `window.history.state`. This is consistent with other spots where we're reading this internal flag from state. The function that calls `applyUrlFromHistoryPushReplace` first calls `copyNextJsInternalHistoryState` to copy over `__PRIVATE_NEXTJS_INTERNALS_TREE` into the data argument of `pushState`/`replaceState`. But technically it does so with the possibility that `__PRIVATE_NEXTJS_INTERNALS_TREE` is undefined. Since that's the case, this is more typesafe. Closes NEXT-2406
-
Donny/강동윤 authored
### What? Add `styledJsx` option to the schema. ### Why? This is required to test `lightningcss` against internal apps. ### How? Closes PACK-2316
-
Jiachi Liu authored
### What Skipping module build error and module not found error in `onUnhandledError` handler from pages router dev overlay, to avoid the build error being caught twice by error overlay in both unhandled error and build error type. The unhandled error is slightly eariler than build error, which causes the flash. We skipped it to avoid display same duplicated errors. ### Why This change fixes a flashing UX on error overlay when build error occurred, it will go from a white background with red text to a source panel with actual code where triggered build error, such as synatx error. I recodered two videos to show them properly. Since it happens too fast, hard to address them with test, more like fixing a minor frustration in the UI. ### After https://github.com/vercel/next.js/assets/4800338/59dcde0f-3ac7-419f-ba5c-c28c9d5a7205 ### Before https://github.com/vercel/next.js/assets/4800338/e64e8855-2c5f-43a5-948c-8137cad538a1 Closes NEXT-2403 Closes NEXT-2145
-
Jiachi Liu authored
Add test that we can log the error trace when we found invalid dynamic usage when `dynamic = "error"`  Closes NEXT-2402 Closes NEXT-2383
-
vercel-release-bot authored
-
Jimmy Lai authored
Reverts vercel/next.js#61696 Closes NEXT-2401
-
Tim Neutkens authored
## What? Follow-up to #61781. That change doesn't apply so the packages we tested still crashed the process. This ensures the environment variable is set if it's not already set. <!-- 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 # --> Closes NEXT-2400
-
Will Binns-Smith authored
This implements falling back to try multiple locations loading chunks for sourcemap tracing. Unfortunately, when RSC replays server errors on the client, it does not carry over the [0] symbol used to annotate server frames. Instead, errors are recreated by React and only include the message and stack. This allows more tests to pass, as we are able to correctly trace stack frames by loading the appropriate server chunk. Closes PACK-2442
-
OJ Kwon authored
### What This PR injects a build-time error for the turbopack if `client|server-only` is imported in incorrect context. The basic idea is using resolve plugin, so in resolve time if matching context (which alises erroneous import), raise a build time error. Unfortunately this won't fix all of the tests in `invalid-imports`, due to 1. resolveplugin does not have way to trace import from transformed, so not able to detect `styled-jsx` from using `<styled..` tags 2. webpack (in our implementation) and turbopack's resolveplugin have different order of transform / module trace chain, so enabling resolve plugin in some context raises build error instead of runtime error in rsc-build-error. Closes PACK-2397
-
Will Binns-Smith authored
These are correct since #61735 fixed tracing these. Unfortunately they don’t pass yet as the overlay is not properly dismissed when these errors are fixed. Closes PACK-2439
-
Donny/강동윤 authored
### What? Patch cjs finder to detect `exports.foo` (instead of module.exports) ### Why? This causes an issue for `react.production.min.js`. x-ref: https://vercel.slack.com/archives/C02HY34AKME/p1707343215879979 ### How? Closes PACK-2443
-
Tyler Sebastian authored
Fixes: #47978 When an error occurs in getInitialProps, the error page's getInitialProps is run server-side and returned in `__NEXT_DATA__`. Following, there's no need to re-run `getInitialProps` client-side on the hydrate pass. --------- Co-authored-by:JJ Kasper <jj@jjsweb.site>
-
Zack Tanner authored
In preparation for the refactor of cache utils in subsequent PRs, this PR moves the one-off prefetch cache utils into a shared `prefetch-cache-utils` file, and also relocates the `buildCustomRoute` util into an isolated lib so that it can be imported into base-server (in a future PR). This PR does not make any changes to these functions. Closes NEXT-2394
-
- 07 Feb, 2024 2 commits
-
-
Jiachi Liu authored
### What Exclude precompiled react packages from browser layer loaders coverage. ### Why Since we're transpiling all the browser layer code now after #59569, then SWC will also compile react. But when it compiles `react.production.min.js` it gives me with the code and ESM helper inserted ```js import { _ as _type_of } from "@swc/helpers/_/_type_of"; // This is not correct var l = Symbol.for("react.element"), n = Symbol.for("react.portal"), p = Symbol.for("react.fragment"), q = Sym bol.for("react.strict_mode"), r = Symbol.for("react.profiler"), t = Symbol.for("react.provider"), u = Symbol.f ``` This makes bundler think it's a ESM package but actually it's CJS, which converts the module into `{ default: .., __esModule }` instead of the original react module. When you're using `React.useEffect` or other API through namespace import (`import * as React from 'react'`), this will break the module exports check in bundling as the property doesn't directly attached to the module now. This PR disabled the transform for precompiled react packages now and will see the deeper issue in next-swc side later. Fixes #60890 Fixes #61185 Closes NEXT-2362 -
Balázs Orbán authored
### What? Fix the user-facing `MiddlewareConfig` interface. ~While in the codebase, I also made the incoming config object type a bit more strict by converting from `any` to `unknown`.~ Reverted, as we do a config assertion already in a [different place](https://github.com/vercel/next.js/blob/canary/packages/next-swc/crates/next-custom-transforms/src/transforms/page_config.rs/#L171-L180). ### Why? The interface we previously exposed was the one we used internally, _after_ we did some parsing on the config object, which is different from what the user is expected to pass. ### How? I separated the internal type to its own `MiddlewareConfigParsed` interface. Closes NEXT-2375 Fixes #61705 Ref: #61576
-