Commit graph

3057 commits

Author SHA1 Message Date
Joseph
6fb3993fdc
fix: Check if the GET comments response was ok, otherwise throw (#62041)
Fixes #61941 example blog-with-comment.

The root issue is that the SWR fetcher does not check the `ok` status of the response, and that way we end up putting the error message object into the SWR data. And then `.map` is invoked in the object.

Since this is a learning kind of example, I think perhaps the presented change is just about enough to understand what's going on. Whether or not the people using the example want to gain access to the message from the server is up to them.
2024-02-14 15:03:40 +00:00
akfm
10599a4e1e
fix(examples): cache-handler-redis implementation may cause error "Socket already opened" on production (#61978)
### What?

I copied the contents of `cache-handler.js` and tried it, and got an
error `"Socket already opened"`.
ref: https://github.com/caching-tools/next-shared-cache/issues/284
It should be fixed so that it doesn't matter if it is copied.

### Why?

Because `Socket already opened`, so a condition is needed before `await
client.connect()`.

### How?

Add environment variable(`process.env.REDIS_AVAILABLE`) check.
ref:
https://caching-tools.github.io/next-shared-cache/configuration/opt-out-cache-on-build

Co-authored-by: akfm.sato <01047245@CF0286.local>
2024-02-13 23:45:11 +00:00
Tim Neutkens
2b7f50ff55
Turbopack issue report tests (#61845)
## 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
2024-02-10 12:59:31 +01:00
Jon Meyers
1da90c2756
Clean up with-supabase example (#61799)
### 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
2024-02-08 19:07:57 +00:00
Anders D. Johnson
1f0f5d51ed
chore(examples): deduplicate react-dom imports in add-form.tsx (#61751)
<!-- 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 #

-->

Simple cleanup of duplicative import of `react-dom` in add form example.
Some editors, linters, or bundlers take issue with this.
2024-02-07 03:30:38 +00:00
theItalianDev
29e7227362
enhancement(with-supabase): replace getSession() with getUser() (#61564)
### What?
Enhancement of _with-supabase example_. Replacing in **middelware.ts**,
**supabase.auth.getSession()** with **supabase.auth.getUser()**

### Why?
**Never trust supabase.auth.getSession() inside server code such as
middleware**. It isn't guaranteed to revalidate the Auth token.
**It's safe to trust getUser()** because it sends a request to the
Supabase Auth server every time to revalidate the Auth token.

[Setting up Server-Side Auth for
Next.js](https://supabase.com/docs/guides/auth/server-side/nextjs)
2024-02-05 00:24:39 +00:00
Abdul Haseeb
f59540fedc
Fixing a case sensitivity error (#61563)
Fixing a simple case sensitivity error in the import statement,
"storeProvider" should be "StoreProvider".

Co-authored-by: Steven <steven@ceriously.com>
2024-02-02 09:33:32 -05:00
JA
b654effd53
fix(with-docker): resolve build with pnpm (#61529)
### Adding or Updating Examples

- Example:
[with-docker](https://github.com/vercel/next.js/tree/canary/examples/with-docker)
- Update: The latest change introduced in #61466 on the building process
of NextJS when the package manager is PNPM is currently throwing an
error (it works for npm though).

**To replicate the error:**

1. Checkout on the **with-docker** example
2. Install with PNPM so that it generates the pnpm-lock.yaml
3. Build the Docker image -> This will fail on the _builder stage_ step
that runs `pnpm run build`.

**Possible Solution:**
- Run `corepack enable pnpm` before building with pnpm
2024-02-01 19:32:57 +00:00
Stefan Generalao
e0c63aca99
fix: dockerfile npm run build (#61466) 2024-01-31 18:46:33 +00:00
Shane
9c35f21f38
Update blog-starter to App Router (#61170)
### What?

This updates the `blog-starter` example to Next 14.1 App Router.

### Why?

I checked out a new `blog-starter` project on Vercel and was surprised
it was using the Pages Router. I believe the App Router is a better
choice.

### How?

I tried to keep the implementation logic as close to the original Pages
`blog-starter`.

---------

Co-authored-by: Sam Ko <sam@vercel.com>
2024-01-30 17:16:55 +00:00
Sam Ko
8d13ab925e
chore(examples): switch default from yarn to npm in Dockerfiles (#61348)
## Changes

- Switch default package manager to npm
- Fixes https://github.com/vercel/next.js/issues/61293

Closes NEXT-2291
2024-01-29 14:38:31 -08:00
Jonathan Steele
b5750cfc80
fix(with-stripe-typescript): Bump apiVersion when initialising Stripe client (#61217)
### What?

* fix(with-stripe-typescript): Bump `apiVersion` when initialising
Stripe client
2024-01-26 22:23:37 +00:00
Jonathan Steele
ec9ab1b5d5
example(with-stripe-typescript): use client required for error components (#61214) 2024-01-26 15:49:03 +00:00
Jonathan Steele
f82445b01c
example: Add Stripe embedded Checkout example (#60378) 2024-01-23 16:09:04 +00:00
Yuto Yoshino
04860649da
examples: Change "pages" to "apps" in the Image Component Example description. (#60929) 2024-01-21 09:52:10 -06:00
Arseny
3b46f22bb1
Update Redis Cache example with stabilized API (#60800)
This pull request updates the `cache-handler-redis` example with a
stabilized API. The updated `next.config.js` now uses the stable
`cacheHandler` option instead of the
`experimental.incrementalCacheHandlerPath`.
2024-01-21 02:40:54 +00:00
Sam Ko
43227c0dd5
chore: remove lock from with-algolia-react-instantsearch example (#60910)
## Changes

- Remove `pnpm-lock.yaml` from with-algolia-react-instantsearch example

Closes NEXT-2174
2024-01-20 20:34:37 -06:00
Rishabh Poddar
7d4888d961
Updates with-supertokens example app (#60901)
Refactors with-supertokens example app to move some of the helper
functions into the SDK.
2024-01-20 00:35:28 +00:00
Taishi
f000352723
upgrade @types/react-dom to v18.2.18 to import useFormState for server actions in with-supabase example (#60822)
### Adding or Updating Examples

I can't import `useFormState` from `react-dom` with
`@types/react-dom@18.2.5`, so I upgrade it to the latest version of it.

---------

Co-authored-by: Sam Ko <sam@vercel.com>
2024-01-19 04:19:11 +00:00
Augustin Mauroy
c0282712ae
chore(example): update storybook (#60737)
### What?

- update storybook version
- use `SWC` for perf
- pinging dep for security of the example
- update readme to have correct link

Co-authored-by: Sam Ko <sam@vercel.com>
2024-01-16 18:02:13 -08:00
Elyees T
5e29dfc881
Update README.md (#60595)
### Improving Documentation

necessary update for agilitycms readme file to enhance clarity

<!-- 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 #

-->
2024-01-17 00:23:05 +00:00
Lee Robinson
b177ff6488
examples: Update redis example with useOptimistic (#60596) 2024-01-15 21:19:59 -06:00
Steven
4466ba436b
chore(examples): use default prettier for examples/templates (#60530)
## Description
This PR ensures that the default prettier config is used for examples
and templates.

This config is compatible with `prettier@3` as well (upgrading prettier
is bigger change that can be a future PR).

## Changes
- Updated `.prettierrc.json` in root with `"trailingComma": "es5"` (will
be needed upgrading to prettier@3)
- Added `examples/.prettierrc.json` with default config (this will
change every example)
- Added `packages/create-next-app/templates/.prettierrc.json` with
default config (this will change every template)

## Related

- Fixes #54402
- Closes #54409
2024-01-11 16:01:44 -07:00
hugo-syn
601eaf0e87
chore: Fix multiple typos (#60531)
## For Contributors

Fix multiple typos
2024-01-11 10:44:55 -08:00
hugo-syn
b21a2b9445
chore: Fix typo s/desireable/desirable/ (#60518)
Fix typo s/desireable/desirable/ in 2 README.md files

Co-authored-by: Steven <steven@ceriously.com>
2024-01-11 14:43:13 +00:00
Lee Robinson
bf63ddb4d9
examples: Update hello world (#60502) 2024-01-10 22:15:21 -06:00
Arseny
8694ed6a40
Update cache-handler-redis example dependencies (#59458)
This pull request updates the dependencies in the cache-handler-redis
example. It updates the versions of the `@neshca/cache-handler`, which
introduces new features.

---------

Co-authored-by: Delba de Oliveira <32464864+delbaoliveira@users.noreply.github.com>
2024-01-10 18:43:03 +00:00
oxxd
6740f2f891
chore(examples): fix image-component example viewsource paths, shimmer page filename (#60451)
This PR fix `image-component` example viewsource paths and shimmer page
filename. Which would result a Github 404 page in the current live
example.

A flow up fix on this PR #60289
2024-01-10 10:13:42 -05:00
rmathew8-gh
af24c45398
fixed import path in with-jest template. (#60332)
<!-- 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: Roy Mathew <rmathew8@gmail.com>
Co-authored-by: Sam Ko <sam@vercel.com>
2024-01-06 23:26:59 +00:00
Luke Schlangen
0ea127c642
examples: add allow-unauthenticated option to cloud run deploy (#58792)
Co-authored-by: Lee Robinson <me@leerob.io>
2024-01-06 11:08:27 -06:00
Niklas Ziermann
781fa7745d
examples: improve zustand example (#58696)
Co-authored-by: Lee Robinson <me@leerob.io>
2024-01-06 11:07:54 -06:00
Steven
bb7af2a0d4
chore(examples): migrate image-component example to App Router (#60289)
This PR migrates the `image-component` example from Pages Router to App
Router.

It also upgrades a couple dependencies and regenerates tsconfig.json
2024-01-06 11:03:01 -06:00
Nicolas Froidure
2d52962dfd
examples: improve typings for i18n app dir (#60160) 2024-01-03 08:42:12 -06:00
Tibor Szász
2eda0140e3
examples: fix contentful install instructions (#60050) 2023-12-31 17:22:46 -06:00
Lee Robinson
9986e82263
examples: Update next-forms example (#60052)
- Remove `experimental_` import for `useFormStatus`
- Update all dependencies
- Move to `postgres` so it works with any Postgres provider
- Fix a TypeScript issue
- Use `next dev --turbo`
2023-12-30 11:17:14 -06:00
Ian Macartney
7343af9deb
examples: Update Convex Example (#59789)
Co-authored-by: Lee Robinson <me@leerob.io>
2023-12-28 00:25:14 -06:00
Ankit Kashyap
4b68d55b39
examples: Supabase rename .env.local.example to .env.example (#59984) 2023-12-27 22:47:45 -06:00
Dhaya
2c811af22e
examples: Upgrade with-algolia-react-instantsearch example to latest major version and use app router (#59961)
Co-authored-by: Lee Robinson <me@leerob.io>
2023-12-27 10:44:32 -06:00
Mohammed Gadi
bc41a7f829
examples: Update .env.local.example of with-firebase (#59954) 2023-12-27 10:43:52 -06:00
Lee Robinson
7c7d981b2d
examples: progressive enhancement for Redis example (#59937)
The example had `useOptimistic` and wasn't structured so that the
browser could fall back to `action` if JS was still loading or disabled.
2023-12-25 20:07:13 -06:00
Luke Schlangen
a0b661de8d
examples: remove broken deploy button (#58794) 2023-12-25 09:03:27 -06:00
Lee Robinson
0fc1d9e982
examples: update Redis to App Router (#59311) 2023-12-24 10:09:23 -06:00
Lee Robinson
3d9a1b481e
examples: add required env vars to auth example. (#59901) 2023-12-23 10:27:33 -06:00
Lee Robinson
4225da8cba
examples: Add new NextAuth.js example (#56914) 2023-12-23 10:21:26 -06:00
Jon Meyers
4462354da1
Fix: Add matcher for middleware (#59651)
### What?
- exclude assets from middleware

### Why?
- avoid refreshing session logic running unnecessarily

### How?
- export matcher config from middleware

Co-authored-by: JJ Kasper <jj@jjsweb.site>
2023-12-18 09:40:44 -08:00
Joseph
7eac1c8ee9
fix: Invalid next version tag name in with-cypress example (#59647)
<!-- 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 #

-->

Hi,

Fix for the accidental change, introduced in this PR
https://github.com/vercel/next.js/pull/59572, which set the `next`
version tag for the with-cypress example, to `^latest`, which causes the
`create-next-app` step to fail:

```shell
npx create-next-app --example with-cypress with-cypress-app
Creating a new Next.js app in /Users/<user>/<Project-Path>/with-cypress-app.

Downloading files for example with-cypress. This might take a moment.

Installing packages. This might take a couple of minutes.

npm ERR! code EINVALIDTAGNAME
npm ERR! Invalid tag name "^latest" of package "next@^latest": Tags may not have any characters that encodeURIComponent encodes.
```

Yarn instead, shows a list of next.js packages to select from instead.

Co-authored-by: JJ Kasper <jj@jjsweb.site>
2023-12-18 09:37:33 -08:00
Delba de Oliveira
f518fd81b3
Docs: Fix formatting in testing docs and update examples dependencies (#59572)
Follow-up from: https://github.com/vercel/next.js/pull/59268
2023-12-13 07:02:53 -08:00
Delba de Oliveira
0ddc7e8fad
Docs: Add App Router Testing Guides and update /examples (#59268)
This PR updates the testing guides to use App Router and TypeScript,
also updates `/examples` to show `app` and `pages` examples.

## Overview

- [x] Create a new "Testing" section that is shared between `app` and
`pages`.
- [x] Explain the differences between E2E, unit testing, component
testing, etc.
- [x] Recommend E2E for `async` components as currently none of the
tools support it.
- [x] Update setup guides for **Cypress**, **Playwright**, and **Jest**
with latest config options, and examples for `app` and `pages`.
- [x] Add new guide for **Vitest**
- [x] Clean up `/examples`: use TS, show `app` and `pages` examples,
match docs config

## Cypress

- [x] E2E Tests
- [x] Component Testing
  - [x] Client Components
  - [x] Server Components
  - [ ] `async` components

**Blockers:** 
- TS: `Option 'bundler' can only be used when 'module' is set to
'es2015' or later`. In **tsconfig.json** compilerOptions, Next.js uses
"moduleResolution": "bundler", changing it to "node" fixes the issue but
it can have repercussions.
  - https://github.com/cypress-io/cypress/issues/27731 
- Version 14 is currently not supported for component testing
  - https://github.com/cypress-io/cypress/issues/28185

## Playwright

- [x] E2E Tests

## Jest

- [x] Unit Testing
   - [x] Client Components
   - [x] Server Components
- [ ] `async` components:
https://github.com/testing-library/react-testing-library/issues/1209
   - [x]  'server-only': https://github.com/vercel/next.js/pull/54891
- [x] Snapshot Testing

**Blockers:**
- TS: https://github.com/testing-library/jest-dom/issues/546
- None of the solutions in the issue work with Next.js v14.0.4 and TS v5

## Vitest 

- [x] Unit Testing
  - [x] Client Components
  - [x] Server Components
  - [ ] `async` components
  - [x] 'server-only'
 - [x] Update vitest example
- [x] Handles CSS, and CSS modules imports
- [x] Handles next/image

## Other

- https://github.com/vercel/next.js/issues/47448
- https://github.com/vercel/next.js/issues/47299
2023-12-12 22:30:23 -06:00
John Pham
d96a7e56a6
Add text-wrap: balance to CNA template for card descriptions (#59384)
### What?
This prevents the descriptions from having orphans at different viewport
widths.

### Why?

| Default | Pretty | Balance |
|--------|-------| --- |
|
![image](https://github.com/vercel/next.js/assets/16027268/66c8eac4-b995-4c30-9bdc-fd44a4a7fdda)
|
![image](https://github.com/vercel/next.js/assets/16027268/07a2e45a-728b-438f-a4e5-98f7c1c5c33a)
|
![image](https://github.com/vercel/next.js/assets/16027268/153fe94a-2b10-4e39-bb19-b1ca702bcea8)
|
2023-12-11 17:41:01 -08:00
Sebastian Silbermann
79a8d01ae6
Use new JSX transform (#56294)
Co-authored-by: Jimmy Lai <laijimmy0@gmail.com>
Co-authored-by: Jiachi Liu <inbox@huozhi.im>
2023-12-09 00:17:50 +01:00