- 31 Jul, 2024 16 commits
-
-
vercel-release-bot authored
-
Jiwon Choi authored
### Why? Porting some refactors from https://github.com/vercel/next.js/pull/63750 Closes NDX-122
-
Tobias Koppers authored
### What? Reduce the number of tasks needed for emitting. Simplify emitting. Reverts #62324 Closes PACK-2564 fixes PACK-2552
-
JJ Kasper authored
We aren't running this check for docs only changes but this can fail if a docs change occurs so this ensures we always run it as https://github.com/vercel/next.js/pull/67839 renamed one of the files we checked but wasn't updated until after merge when we saw it fail on unrelated PRs.
-
Tobias Koppers authored
### What? When renaming a page from `page.js` to `page.tsx` it can temporarily have both variants which end up writing the same files. Also fixes symlinked page files Depends on https://github.com/vercel/turbo/pull/8851 fixes PACK-2718
-
Jiwon Choi authored
### Why? `types-and-precompiled` is failing on CI: https://github.com/vercel/next.js/actions/runs/10186089792/job/28178038314 ### How? The script `validate-externals-doc.js` was validating the `docs/.../03-next-config-js/...mdx` page, but the page was moved to `docs/.../04-next-config-js/...mdx` in https://github.com/vercel/next.js/pull/67839
-
Jinhyung Lee 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? - Fixed typo of filename on a codeblock. ``` mdx tsx filename="page.ts" switcher -> tsx filename="page.tsx" switcher on file docs/02-app/01-building-your-application/05-styling/01-stylesheets.mdx ``` ### Why? - Based on docs codeblock rules, a typescript component needs a `tsx` file extension. ### How? - Editing plain text on docs. no related issues yet Co-authored-by:
Jiwon Choi <devjiwonchoi@gmail.com>
-
マルコメ 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 Closes NEXT- Fixes # --> # Summary Delete unnecessary [fast-xml-parser](https://github.com/NaturalIntelligence/fast-xml-parser) package. ## Description https://github.com/aws/aws-sdk-js-v3/issues/5866 issue forces to add `fast-xml-parser@4.2.5`. We have had no trouble until now. However, the old versions have a [vulnerability issue](https://github.com/NaturalIntelligence/fast-xml-parser/security/advisories/GHSA-mpg4-rc92-vx8v). The latest [aws-sdk](https://github.com/aws/aws-sdk-js-v3/blob/main/packages/core/package.json#L85) includes `fast-xml-parser@4.4.1`. In addition, this package is a patched version. In conclusion, `fast-xml-parser@4.2.5` is no longer needed. x-ref: #63023 Co-authored-by:
Jiwon Choi <devjiwonchoi@gmail.com>
-
Tobias Koppers authored
* https://github.com/vercel/turbo/pull/8875 <!-- Tobias Koppers - improve test glob to exclude output folder --> * https://github.com/vercel/turbo/pull/8874 <!-- Tobias Koppers - only add import references when they are used --> * https://github.com/vercel/turbo/pull/8766 <!-- Niklas Mischkulnig - Replace MDX ModuleType with MDX SourceTransform --> * https://github.com/vercel/turbo/pull/8090 <!-- DevMirza - fix(ci): Trying to fix `benchmark-turbopack` workflow --> * https://github.com/vercel/turbo/pull/8837 <!-- Niklas Mischkulnig - Make JS Lints have lower severity -->
-
Delba de Oliveira authored
[DOC-3018](https://linear.app/vercel/issue/DOC-3018/nextjs-15-rc-updates) New APIs: - Fetch HMR cache - Static Indicator - `onRequestError` --------- Co-authored-by:
Hendrik Liebau <mail@hendrik-liebau.de> Co-authored-by:
JJ Kasper <jj@jjsweb.site>
-
Jiwon Choi authored
### Why? When passing an empty string value `''` to `metadata.openGraph.authors`, it gives an error: ``` Error: n.map is not a function ``` It is because we set the value to the `ResolvedOpenGraph` if it is truthy. ```ts if (value) { // ... } ``` ### How? Assign the resolved value from `resolveArray` and only if not nullish. https://github.com/vercel/next.js/blob/571597d8ee464113e24494591ed693f82b710d16/packages/next/src/lib/metadata/generate/utils.ts#L1-L6 Fixes https://github.com/vercel/next.js/issues/68259 Fixes NDX-125 --------- Co-authored-by:Jiachi Liu <inbox@huozhi.im>
-
Janka Uryga authored
This PR adds `typedRoutes` support for Form's `action` prop. The implementation closely follows the way it's done for Link.
-
Janka Uryga authored
This PR fixes a test that typechecks, but crashes when actually running the page, because 1. `new URL("/relative")` will throw (so we change it to absolute) 2. We cannot pass a URL object from RSC to a client component (so we just make the page 'use client', which also requires removing `metadata`, but that wasn't used for anything) See https://github.com/vercel/next.js/pull/68323#discussion_r1698468251, where this was split from -
Tim Neutkens authored
## What? Adds documentation for the `:import` and `:export` ICSS rules which are not supported by Lightning CSS (and thus not by Turbopack) Closes #65367 Closes PACK-3040 <!-- 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 # -->
-
- 30 Jul, 2024 20 commits
-
-
niketchandivade authored
This PR updates the react-remove-properties example to use the App Router. Here are the changes that have been made: Renamed the "pages" folder to the "app" folder. Updated the routing for / files to align with the App Router. Added the layout.tsx file as part of the App Router. CC @samcx --------- Co-authored-by:
niket <niket.chandivade@qed42.com> Co-authored-by:
samcx <sam@vercel.com>
-
vercel-release-bot authored
-
Josh Story authored
This relands #67929 with an additional fix for unhandled rejection The extra fix was to add a throwaway catch handler on the promise representing the pending metadata render. We don't actually await this promise until later and if it rejects too early it will result in an unhandled promise rejection
-
vercel-release-bot authored
-
Sebastian Silbermann authored
Co-authored-by:Hendrik Liebau <mail@hendrik-liebau.de>
-
Joseph authored
-
Lee Robinson authored
Co-authored-by:Delba de Oliveira <32464864+delbaoliveira@users.noreply.github.com>
-
Sebastian Silbermann authored
-
Tim Neutkens authored
## What? Removes the warning shown in Pages Router when you use the `prefetch` prop on `next/link`. In App Router using `prefetch={true}` opts in to full page prefetching even when the route is dynamically rendered. When you're working on an application that uses both pages router and app router where the components are shared using `<Link prefetch>` would then cause this warning in Pages Router but not in App Router. With this change there won't be a warning in Pages Router. <!-- 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 # --> --------- Co-authored-by:JJ Kasper <jj@jjsweb.site>
-
Janka Uryga authored
## What This PR introduces `<Form>`, a form component integrated with the Next.js router. Form has two modes of operation. ### When `action` is a path/url ```jsx <Form action="/search"> ``` In essence, this is a progressively enhanced GET form. - it will prefetch the target route (or, more commonly in this case, its loading state) - when submitted, it will perform a **client navigation** to the target URL, encoding input fields from the form into the URL as search params. ### When `action` is a function ```jsx <Form action={myReactAction}> ``` This is a progressively enhanced POST form. In this case, `<Form>` will act just like `<form>` (i.e. execute the action function when submitted). This is mostly here for convenience/consistency with React. ## Notes ### Notable props (or lack thereof) - `replace` - same as Link, call `router.replace` instead of `router.push` when navigating. This only works in "GET mode". - `scroll` - same as Link, control the `scroll` option of router when navigating. This only works in "GET mode". - `onSubmit` - same as the usual, but notably, **calling `event.preventDefault()` inside it will prevent Next from navigating** (this matches how Link's `onClick` works) We disallow passing certain form props (`method`, `encType`, `target`) because both the GET and POST cases have specific requirements for these that can't be overridden. There is currently no way to control/disable the prefetching behavior (like `<Link prefetch={false}>`) or render a custom component instead of `<form>` (like Link's `passHref` behavior). These may be added in the future. ### Submitter overrides We have partial support for overriding the `action` via ```jsx <button type="submit" formAction="/other-search"> ``` It will also client-navigate, but can't be prefetched (because we don't know the route to prefetch until a submit occurs), so this isn't really recommended (unless the prefetch is triggered in some other way). Unfortunately, just like `formAction`, all of the "banned" props mentioned in the previous section (`method`, `encType`, `target`) are overridable by the submitting element (the ["submitter"](https://developer.mozilla.org/en-US/docs/Web/API/SubmitEvent/submitter)) via `formMethod` , `formEncType` and `formTarget` respectively. We don't have a good way of banning these within a `<Form>`, because we don't have control over `<button>` props. So in this case the best we can do is just warn and fall back to native browser behavior (because this is what'd happen before hydration). Which means that **if the submitter specifies a `formMethod` , `formEncType` and `formTarget` that Form don't support, we will not client-navigate.** ### handling `<input type="file">` Surprisingly, this works in a url-encoded form, even if it makes very little sense. But same as submitter props, we have no good way of banning it, so we match the browser behavior and submit _the filename_ instead of the file object. -
vercel-release-bot authored
-
Tim Neutkens authored
Donny/강동윤 - fix: Fix tree shaking even more (#8864) Benjamin Woodruff - Fix `ReadRef<T>::cell` when `T` != `T::Read::Repr` (#8845) Benjamin Woodruff - Add/move tests for Vc generics (#8843) Niklas Mischkulnig - Support `module_resolution: "nodenext"` (#8748) Tobias Koppers - fix symlinks and dotfiles while reading glob (#8865) Tobias Koppers - allow to resolve symlinks on DirectoryEntry (#8851) Niklas Mischkulnig - Support monorepo package self-references (#8820) Tobias Koppers - fix: Use `hygiene_with_config` instead of `hygiene` (#8848) Benjamin Woodruff - Reduce macro usage in turbo-tasks-testing (#8832) Tobias Koppers - GC auto increase memory limit on inefficient GC (#8687) Donny/강동윤 - feat: Improve tree shaking (#8781) Tobias Koppers - avoid implementing Eq on Completion (#8818) Alexander Lyon - reduce memory and consolidate shared vs transient cells (#8263) <!-- 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 # -->
-
Hendrik Liebau authored
In #67925 we decided not to log any fetches during HMR refreshes (i.e. when editing server components). With this PR, we introduce a new logging config (`logging.fetches.hmrRefreshes`) so that users can opt in to logging of `fetch` requests that are restored from the Server Components HMR cache. <img width="806" alt="hmr cache logs" src="https://github.com/user-attachments/assets/ea789520-8490-479a-a4f0-1febb42388e2">
-
JJ Kasper authored
This seems to be causing an crash on vercel-site for our [one of our top-level pages](https://vercel-site-git-update-next-v15-0-0-canary-89.vercel.sh/ai) Reverts https://github.com/vercel/next.js/pull/68149
-
Niklas Mischkulnig authored
Adds a test for the change in https://github.com/vercel/next.js/pull/67948
-
Will Binns-Smith authored
While we currently refetch RSC updates on changes to the environment (e.g. `.env` files), we never cleared the require cache to re-evaluate RSCs with the new environment. This implements that. Test Plan: Added tests. `TURBOPACK=1 pnpm test-dev test/development/app-hmr/hmr.test.ts`
-
Jiachi Liu authored
Add deployment id for skew protection into RSC payload --------- Co-authored-by:JJ Kasper <jj@jjsweb.site>
-
JJ Kasper authored
This test is currently a known failure case in deploy mode which is being investigated but we should disable to reduce noise while it's investigated. x-ref: [slack thread](https://vercel.slack.com/archives/C07BVA6HM17/p1722011813463959) x-ref: [slack thread](https://vercel.slack.com/archives/C02K2HCH5V4/p1722035835457319) x-ref: https://github.com/vercel/next.js/actions/runs/10153430071/job/28077706487
-
Filip Kudła 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 # --> ### Fixing a bug fixes #63820 fixes #55320 fixes #52931 In one of the issues, there was a suggestion to delete `assetPrefix` from `next.config`. It helps if you have `assetPrefix: '/'`. Otherwise, you probably won't face this problem. **Explanation:** The problem lies where the browser tries to connect and where websocket is available on the server. Adjust the condition for `prefix` in `get-socket-url` as it can return `''` which will lead to `//` in the url. The browser wants to connect to `ws://localhost:3000/_next/webpack-hmr` While internally next exposes the web socket under `ws://localhost:3000//_next/webpack-hmr` - you can connect to it via wscat, postman or whatever. As the path is different it does not handle HMR requests in the browser. In addition to that - Reuse logic and extract separate files as a helper in shared/lib. | Before | After | | ------ | ------- | |  before - latest canary branch - we can't establish a connection to HMR ws |  same example with local changes - connected to ws | --------- Co-authored-by:
Jiwon Choi <devjiwonchoi@gmail.com> Co-authored-by:
JJ Kasper <jj@jjsweb.site>
-
- 29 Jul, 2024 4 commits
-
-
vercel-release-bot authored
-
Sam Ko authored
## Why? There is no way to test opening an issue without clever hacks. So need to initialize again to see the payload object, which will be necessary when I set up a Tool Call → Zod Schema with the :ai-stonks: SDK. --------- Co-authored-by:JJ Kasper <jj@jjsweb.site>
-
JJ Kasper authored
This test is flaking pretty hard recently so marking as so in our manifest. x-ref: https://github.com/vercel/next.js/actions/runs/10151820867/job/28071977443#step:28:303 x-ref: [slack thread](https://vercel.slack.com/archives/C04KC8A53T7/p1722287367424049)
-
Hendrik Liebau authored
This moves the dev-only request logging from the `NextNodeServer` into `DevServer`, and also extracts the logging logic into its own module to declutter the server class. It should not contain any behavioral changes.
-