Commit graph

2838 commits

Author SHA1 Message Date
Michael Webb
4faf579c4f
[EXAMPLES] Update with-apollo-neo4j-graphql (#44570)
We replace neo4j-graphql-js with @neo4j/graphql and update Apollo server to version 4.

This refactor also changes the code from Javascript to Typescript.



## Bug

- [ ] Related issues linked using `fixes #number`
- [ ] Integration tests added
- [ ] Errors have a helpful link attached, see [`contributing.md`](https://github.com/vercel/next.js/blob/canary/contributing.md)

## Feature

- [ ] Implements an existing feature request or RFC. Make sure the feature request has been accepted for implementation before opening a PR.
- [ ] Related issues linked using `fixes #number`
- [ ] [e2e](https://github.com/vercel/next.js/blob/canary/contributing/core/testing.md#writing-tests-for-nextjs) tests added
- [ ] Documentation added
- [ ] Telemetry added. In case of a feature if it's used or not.
- [ ] Errors have a helpful link attached, see [`contributing.md`](https://github.com/vercel/next.js/blob/canary/contributing.md)

## 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)
2023-02-23 13:37:22 +00:00
Jimmy Lai
4072955eba
feat: add OTEL instrumentation for next-server + OTEL example (#46198)
fixes NEXT-479

## content

This PR adds a `getTracer` API to Next.js that uses the `otel/api` under
the hood to provide Next.js level instrumentation through Open
Telemetry.

This also adds an example `with-opentelemetry` to demonstrate how it can
be used, assuming you have a collector.

This allows most notably to have `getServerSideProps` and `fetch` calls
inside Server Components traced.

## details

- we hide most internals spans, if you want to see all of them, use the
NEXT_OTEL_VERBOSE=1 env var
- if you want to use this, you'll need to rely on the
`config.experimental.instrumentationHook` config option to initialise
OTEL, like in the example

## Bug

- [ ] Related issues linked using `fixes #number`
- [ ] Integration tests added
- [ ] Errors have a helpful link attached, see
[`contributing.md`](https://github.com/vercel/next.js/blob/canary/contributing.md)

## Feature

- [ ] Implements an existing feature request or RFC. Make sure the
feature request has been accepted for implementation before opening a
PR.
- [ ] Related issues linked using `fixes #number`
- [ ]
[e2e](https://github.com/vercel/next.js/blob/canary/contributing/core/testing.md#writing-tests-for-nextjs)
tests added
- [ ] Documentation added
- [ ] Telemetry added. In case of a feature if it's used or not.
- [ ] Errors have a helpful link attached, see
[`contributing.md`](https://github.com/vercel/next.js/blob/canary/contributing.md)

## Documentation / Examples

- [ ] Make sure the linting passes by running `pnpm build && pnpm lint`
- [ ] The "examples guidelines" are followed from [our contributing
doc](https://github.com/vercel/next.js/blob/canary/contributing/examples/adding-examples.md)
2023-02-22 16:08:22 +01:00
Abe Chen
cb03a79968
fix: <title> problem in example/blog-starter (#46122)
## Bug

Relate discussions: #38256

Occur in blog starter template. 

```
Warning: A title element received an array with more than 1 element as children. In browsers title Elements can only have Text Nodes as children. If the children being rendered output more than a single text node in aggregate the browser will display markup and comments as text in the title and hydration will likely fail and fall back to client rendering
    at title
    at head
    at Head (webpack-internal:///./node_modules/.pnpm/next@13.1.6_biqbaboplfbrettd7655fr4n2y/node_modules/next/dist/pages/_document.js:279:1)
    at html
    at Html (webpack-internal:///./node_modules/.pnpm/next@13.1.6_biqbaboplfbrettd7655fr4n2y/node_modules/next/dist/pages/_document.js:678:104)
    at Document
```
2023-02-19 20:20:26 +00:00
Vasu Singh
f9346f15d7
Update @testing-library/react in with-redux example (#46085)
<!--
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:
-->

Updating the @testing-library/react as the older one is not compatible
with react-18.
<img width="926" alt="Screenshot 2023-02-18 at 12 26 55 PM"
src="https://user-images.githubusercontent.com/85363195/219846347-74a11525-1938-4fb2-aa4a-f97a81a8d4ab.png">


## Bug

- [ ] Related issues linked using `fixes #number`
- [ ] Integration tests added
- [ ] Errors have a helpful link attached, see
[`contributing.md`](https://github.com/vercel/next.js/blob/canary/contributing.md)

## Feature

- [ ] Implements an existing feature request or RFC. Make sure the
feature request has been accepted for implementation before opening a
PR.
- [ ] Related issues linked using `fixes #number`
- [ ]
[e2e](https://github.com/vercel/next.js/blob/canary/contributing/core/testing.md#writing-tests-for-nextjs)
tests added
- [ ] Documentation added
- [ ] Telemetry added. In case of a feature if it's used or not.
- [ ] Errors have a helpful link attached, see
[`contributing.md`](https://github.com/vercel/next.js/blob/canary/contributing.md)

## Documentation / Examples

- [ ] Make sure the linting passes by running `pnpm build && pnpm lint`
- [ ] The "examples guidelines" are followed from [our contributing
doc](https://github.com/vercel/next.js/blob/canary/contributing/examples/adding-examples.md)
2023-02-17 23:21:43 -08:00
Will Binns-Smith
7230258898
Add loader-runner to compiled packages (#45962)
This adds `loader-runner` to the compiled packages distributed with
Next.js

This is a dependency of Turbopack's webpack loader support. Currently,
users have to manually install `loader-runner` in their application to
use webpack loaders with Turbopack. This will allow Turbopack to require
loader-runner from within the installed version of Next.js instead.

Test Plan: `require('./packages/next/dist/compiled/loader-runner/')`

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

## Bug

- [ ] Related issues linked using `fixes #number`
- [ ] Integration tests added
- [ ] Errors have a helpful link attached, see
[`contributing.md`](https://github.com/vercel/next.js/blob/canary/contributing.md)

## Feature

- [ ] Implements an existing feature request or RFC. Make sure the
feature request has been accepted for implementation before opening a
PR.
- [ ] Related issues linked using `fixes #number`
- [ ]
[e2e](https://github.com/vercel/next.js/blob/canary/contributing/core/testing.md#writing-tests-for-nextjs)
tests added
- [ ] Documentation added
- [ ] Telemetry added. In case of a feature if it's used or not.
- [ ] Errors have a helpful link attached, see
[`contributing.md`](https://github.com/vercel/next.js/blob/canary/contributing.md)

## Documentation / Examples

- [ ] Make sure the linting passes by running `pnpm build && pnpm lint`
- [ ] 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: JJ Kasper <jj@jjsweb.site>
2023-02-17 22:24:40 -08:00
Gergely Nemeth
ebcde03648
[examples] Use styletron-react 6.1.0 (#45810)
Co-authored-by: Jan Kaifer <jan@kaifer.cz>
2023-02-17 08:33:14 +00:00
Vasu Singh
5023e7fb7e
Fixing nextjs-recoil example (#46024) 2023-02-17 09:19:56 +01:00
Andrii Bodnar
c55345267e
chore(examples): update with-lingui example (#46007)
This PR updates the `with-lingui` example's dependencies and the actual Lingui site URL

## 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)
2023-02-16 22:15:53 +00:00
Vasu Singh
8d84dca5a9
chore(examples): more practical jotai example (#45973)
<!--
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:
-->

The previous jotai example is a very basic counter-example, I updated
this to an example in which we can draw points on a canvas using the
cursor.


![next-jotai](https://user-images.githubusercontent.com/85363195/219225036-98461698-f1c1-4b85-8b0d-1fc42a463846.gif)


## Bug

- [ ] Related issues linked using `fixes #number`
- [ ] Integration tests added
- [ ] Errors have a helpful link attached, see
[`contributing.md`](https://github.com/vercel/next.js/blob/canary/contributing.md)

## Feature

- [ ] Implements an existing feature request or RFC. Make sure the
feature request has been accepted for implementation before opening a
PR.
- [ ] Related issues linked using `fixes #number`
- [ ]
[e2e](https://github.com/vercel/next.js/blob/canary/contributing/core/testing.md#writing-tests-for-nextjs)
tests added
- [ ] Documentation added
- [ ] Telemetry added. In case of a feature if it's used or not.
- [ ] Errors have a helpful link attached, see
[`contributing.md`](https://github.com/vercel/next.js/blob/canary/contributing.md)

## Documentation / Examples

- [ ] Make sure the linting passes by running `pnpm build && pnpm lint`
- [ ] 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: Balázs Orbán <info@balazsorban.com>
2023-02-16 12:33:30 +00:00
Rishabh Poddar
d2c7930992
chore(examples): updates supertokens dependencies (#45985)
Co-authored-by: NkxxkN <kevin@supertokens.io>
Co-authored-by: NkxxkN <kevin.antoine@protonmail.com>
Co-authored-by: Lee Robinson <me@leerob.io>
Co-authored-by: Rishabh <rishabh@supertokens.io>
Co-authored-by: Bhumil Sarvaiya <sarvaiyabhumil@gmail.com>
Co-authored-by: jscyo <joelsteve97@hotmail.com>
Co-authored-by: Mihaly Lengyel <mihaly.lengyel@tresorit.com>
Co-authored-by: Balázs Orbán <info@balazsorban.com>
Co-authored-by: Mihaly Lengyel <mihaly@lengyel.tech>
Co-authored-by: Alisher <alisher@supertokens.com>
2023-02-16 13:21:31 +01:00
Kiichi Tachibana
65390b5c17
Update Material UI examples (#45974)
The links to the material-ui examples were broken and have been corrected.

## Documentation / Examples

- [ ] ~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)
2023-02-16 03:14:16 +00:00
Matt Cote
08aafe4b2e
Fix syntax error in supabase auth example (#45926) 2023-02-14 19:46:08 -08:00
Michael Oliver
8af2881a29
Add MDXComponents type to useMDXComponents (#45737)
MDX publishes types which includes a proper `MDXComponents` type,
provides nicer autocomplete for users and also includes the `wrapper`
option:


![image](https://user-images.githubusercontent.com/55017335/217798272-2fc5e574-5a0b-49e5-92d8-62b56ad4d043.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:
-->

## Bug

- [ ] Related issues linked using `fixes #number`
- [ ] Integration tests added
- [ ] Errors have a helpful link attached, see
[`contributing.md`](https://github.com/vercel/next.js/blob/canary/contributing.md)

## Feature

- [ ] Implements an existing feature request or RFC. Make sure the
feature request has been accepted for implementation before opening a
PR.
- [ ] Related issues linked using `fixes #number`
- [ ]
[e2e](https://github.com/vercel/next.js/blob/canary/contributing/core/testing.md#writing-tests-for-nextjs)
tests added
- [ ] Documentation added
- [ ] Telemetry added. In case of a feature if it's used or not.
- [ ] Errors have a helpful link attached, see
[`contributing.md`](https://github.com/vercel/next.js/blob/canary/contributing.md)

## 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)
2023-02-14 16:41:49 -08:00
Tom Ballinger
d83a3c8e24
Update Convex demo to 0.9.1 (#45866)
Update Convex to 0.9.1

## 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)
2023-02-13 19:41:44 +00:00
Duc Tran
a8b3e7809a
chores(examples): Define base image for multi-stage build (#45862)
Just define base docker image for multi-stage build

## Bug

- [ ] Related issues linked using `fixes #number`
- [ ] Integration tests added
- [ ] Errors have a helpful link attached, see [`contributing.md`](https://github.com/vercel/next.js/blob/canary/contributing.md)

## Feature

- [ ] Implements an existing feature request or RFC. Make sure the feature request has been accepted for implementation before opening a PR.
- [ ] Related issues linked using `fixes #number`
- [ ] [e2e](https://github.com/vercel/next.js/blob/canary/contributing/core/testing.md#writing-tests-for-nextjs) tests added
- [ ] Documentation added
- [ ] Telemetry added. In case of a feature if it's used or not.
- [ ] Errors have a helpful link attached, see [`contributing.md`](https://github.com/vercel/next.js/blob/canary/contributing.md)

## Documentation / Examples

- [ ] Make sure the linting passes by running `pnpm build && pnpm lint`
- [ ] The "examples guidelines" are followed from [our contributing doc](https://github.com/vercel/next.js/blob/canary/contributing/examples/adding-examples.md)
2023-02-13 18:14:26 +00:00
jomeswang
31cd027d3d
Fix 404 link in example with-turbopack (#45843)
Change 404 project codebase link in example with-turbopack to the
correct one

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

## Bug

- [ ] Related issues linked using `fixes #number`
- [ ] Integration tests added
- [ ] Errors have a helpful link attached, see
[`contributing.md`](https://github.com/vercel/next.js/blob/canary/contributing.md)

## Feature

- [ ] Implements an existing feature request or RFC. Make sure the
feature request has been accepted for implementation before opening a
PR.
- [ ] Related issues linked using `fixes #number`
- [ ]
[e2e](https://github.com/vercel/next.js/blob/canary/contributing/core/testing.md#writing-tests-for-nextjs)
tests added
- [ ] Documentation added
- [ ] Telemetry added. In case of a feature if it's used or not.
- [ ] Errors have a helpful link attached, see
[`contributing.md`](https://github.com/vercel/next.js/blob/canary/contributing.md)

## Documentation / Examples

- [ ] Make sure the linting passes by running `pnpm build && pnpm lint`
- [ ] The "examples guidelines" are followed from [our contributing
doc](https://github.com/vercel/next.js/blob/canary/contributing/examples/adding-examples.md)
2023-02-13 14:47:05 +00:00
Jonas A Walden
81164fb912
Update README for cms-kontent-ai (#45796) 2023-02-10 14:35:35 -08:00
Balázs Orbán
25466918e9
fix(next-mdx): mark mdx-js/* as optional (#45440)
Realized when I was checking out
https://github.com/vercel/next.js/issues/45431 that the package manager
will complain about missing peer deps, even though they are not required
with the `experimental.mdxRs` option.

Fixing a small visual issue too:
<details>
<summary>Before:</summary>
<img
src="https://user-images.githubusercontent.com/18369201/215777932-caf133c0-1459-4c25-a438-11020e41f879.png"/>
</details>
<details>
<summary>After:</summary>
<img
src="https://user-images.githubusercontent.com/18369201/215777802-d3f245ae-af56-46e9-8ccd-3bac241bdcfa.png"/>
</details>


## Bug

- [ ] Related issues linked using `fixes #number`
- [ ] Integration tests added
- [ ] Errors have a helpful link attached, see
[`contributing.md`](https://github.com/vercel/next.js/blob/canary/contributing.md)

## Feature

- [ ] Implements an existing feature request or RFC. Make sure the
feature request has been accepted for implementation before opening a
PR.
- [ ] Related issues linked using `fixes #number`
- [ ]
[e2e](https://github.com/vercel/next.js/blob/canary/contributing/core/testing.md#writing-tests-for-nextjs)
tests added
- [ ] Documentation added
- [ ] Telemetry added. In case of a feature if it's used or not.
- [ ] Errors have a helpful link attached, see
[`contributing.md`](https://github.com/vercel/next.js/blob/canary/contributing.md)

## Documentation / Examples

- [ ] Make sure the linting passes by running `pnpm build && pnpm lint`
- [ ] The "examples guidelines" are followed from [our contributing
doc](https://github.com/vercel/next.js/blob/canary/contributing/examples/adding-examples.md)
2023-02-07 15:59:22 -08:00
Mike Plummer
2246db680e
Add Cypress component testing to docs & example (#44869)
[Cypress](https://www.cypress.io/) recently went GA with a Component Testing offering which supports Next.js. This PR adds a brief section on what and how to use Cypress for component-level testing and updates the example project with a component test.

Any feedback on content or the example is welcome, thanks for considering!

## 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)
2023-02-07 23:42:35 +00:00
Bennett Dams
7fde79a9e8
Define base image for multi-stage build (#45090)
Co-authored-by: JJ Kasper <jj@jjsweb.site>
2023-02-07 15:21:20 -08:00
José Fernando Höwer Barbosa
268dd6e80b
Simplify with-google-analytics example (#43894)
<!--
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 that you're making:
-->
## 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)

First of all thanks for this amazing project and all the help you
provide with these examples.

It seems there is code duplication in this example. After some tests
locally seem to _document.js is not necessary for `gtag` to work
properly.


9d97a1e34a/examples/with-google-analytics/pages/_app.js (L30-L34)


9d97a1e34a/examples/with-google-analytics/pages/_document.js (L13-L17)

I am aware of https://github.com/vercel/next.js/pull/40645 and I would
like to ask @dave-hay, @SukkaW and @ijjk to consider this is still
necessary. If so why then not move all content of the scripts from _app
to _document?

In any case, I am open to adding here some comments explaining what is
the reason for this code duplication if necessary.

<hr/>

Changes that come from  https://github.com/vercel/next.js/pull/43897

1. The `event` hashChangeComplete should be removed since `/home` and
`/home/#section` is not new pageview, but just reference to the same
page.

If we go from /home to /home/#section (with a button click or a link for
example) this shouldn't trigger a new page visit on `gtag`.

For this reason, I think we should revert the changes from
https://github.com/vercel/next.js/pull/36079. If there is a better
argument of why this should stay I am also open to creating comments to
clarify this on the example since I don't think should be the default
behavior and not useful in most cases.

2. The `id="gtag-init"` was added with no context to the example from
https://github.com/vercel/next.js/pull/29530

If there is a reason for this id in the script to existing I am open to
adding a comment that clarifies this since in my experience is not
necessary at all.


Edit: Batching with https://github.com/vercel/next.js/pull/43897 as
recommended by
https://github.com/vercel/next.js/pull/43897#issuecomment-1344635000

---------

Co-authored-by: JJ Kasper <jj@jjsweb.site>
2023-02-07 14:58:52 -08:00
Jan Kaifer
fc9b7d7791
Fix ts config in reproduction-template-app-dir (#45653)
Commited tsconfig generated by running `next build`.



## Bug

- [ ] Related issues linked using `fixes #number`
- [ ] Integration tests added
- [ ] Errors have a helpful link attached, see [`contributing.md`](https://github.com/vercel/next.js/blob/canary/contributing.md)

## Feature

- [ ] Implements an existing feature request or RFC. Make sure the feature request has been accepted for implementation before opening a PR.
- [ ] Related issues linked using `fixes #number`
- [ ] [e2e](https://github.com/vercel/next.js/blob/canary/contributing/core/testing.md#writing-tests-for-nextjs) tests added
- [ ] Documentation added
- [ ] Telemetry added. In case of a feature if it's used or not.
- [ ] Errors have a helpful link attached, see [`contributing.md`](https://github.com/vercel/next.js/blob/canary/contributing.md)

## Documentation / Examples

- [ ] Make sure the linting passes by running `pnpm build && pnpm lint`
- [ ] The "examples guidelines" are followed from [our contributing doc](https://github.com/vercel/next.js/blob/canary/contributing/examples/adding-examples.md)
2023-02-07 12:18:05 +00:00
Luke Schlangen
836ac9cc7f
bump node alpine to version 18 (LTS) (#45643)
Updating node version to LTS https://nodejs.org/
I tested locally and deploying to Google Cloud Run and build and deploy steps were successful in both cases.

## 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)
2023-02-07 02:31:38 +00:00
Ivan Kiráľ
7c15278cc2
Upgrade librabries and rebranding kontent.ai (#45260)
Co-authored-by: JJ Kasper <jj@jjsweb.site>
2023-02-06 13:21:52 -08:00
Yohann MARTZOLFF
8ad018fb35
Example/with apivideo (#45272)
### Documentation / Examples
Hello Next.js 👋🏼

This PR aims to update the with-apivideo example by:
- Updating images domain name
- Switch to `export default function` for pages
- Updating the uploader playable and ingested status

### What do we use
In this example, we use several Next.js features:
- Routes and dynamic routes
- API and dynamic API routes

And api.video tools:
- NodeJS client
- React player (instead of our Player SDK)
- TypeScript uploader

Thank's in advance for your review 🙏🏼
2023-02-02 13:44:37 +00:00
Jan Kaifer
5127e8376d
Create reproduction template for app dir (#45412)
Co-authored-by: Balázs Orbán <info@balazsorban.com>
2023-02-02 12:02:06 +00:00
William Mbotta
87e0c3d6ee
Update example path for authsignal/passwordless-login (#45387) 2023-01-29 11:34:18 -08:00
Sean Coker
09f235d9be
Update with-redux example tsconfig to use strict: true (#45325)
I was updating one of my old next.js v3 apps to v13, and decided to play
around with RTK. Using the with-redux example sort of sets users up for
some weird typing issues as mentioned here:
https://github.com/reduxjs/redux-toolkit/issues/2862

I found that github issue _after_ reading through all the official RTK x
TS docs, and it seems it could have all been avoided with stricter
typing. I'm hoping RTK can add this bit to their docs soon.
2023-01-28 10:50:36 -08:00
Jan Kaifer
deb3b0237b
Update i18n example to handle public files and /api routes (#45266)
> Update i18n example to handle `public` files and `/api` routes
2023-01-28 01:38:10 +00:00
Rishabh Poddar
9a82bba86e
Updates with-supertokens example app (#45214) 2023-01-25 16:41:07 -08:00
Thomas Ballinger
0670d8b283
Pin library version in Convex example (#45206)
The version spec for [convex](https://www.npmjs.com/package/convex) in the convex example was `latest`, which meant developers who created a project with this example during the period of time between a new convex release with non-back compatible changes and an update to the demo in this repo would have broken projects. For less stress all around, let's pin the version here!

## 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)
2023-01-24 03:16:54 +00:00
Cachorro Cami
1fa16e6dee
Update README.md for examples/with-mqtt-js (#45162)
Co-authored-by: JJ Kasper <jj@jjsweb.site>
2023-01-23 12:22:11 -08:00
Dylan Jhaveri
3659b5e737
update Mux Player to latest, pin to ^1 and pin upchunk to ^3 add Mux … (#45121)
Co-authored-by: JJ Kasper <jj@jjsweb.site>
2023-01-20 15:56:57 -08:00
Adil Ansari
06ed494480
refactor: Latest Tigris sdk and example using decorators (#44256) 2023-01-18 20:44:18 -08:00
Kristian Djaković
1e0b5bf23d
Fix with-stencil example (#44964)
Co-authored-by: JJ Kasper <jj@jjsweb.site>
2023-01-17 09:11:16 -08:00
Raja Vijaya Saradhi Ch
c35aec8d93
Removes title warning from cms example (#44894)
Warning: Title element received an array with more than 1 element as children.



## Bug

- [ ] Related issues linked using `fixes #number`
- [ ] Integration tests added
- [ ] Errors have a helpful link attached, see [`contributing.md`](https://github.com/vercel/next.js/blob/canary/contributing.md)

## Feature

- [ ] Implements an existing feature request or RFC. Make sure the feature request has been accepted for implementation before opening a PR.
- [ ] Related issues linked using `fixes #number`
- [ ] [e2e](https://github.com/vercel/next.js/blob/canary/contributing/core/testing.md#writing-tests-for-nextjs) tests added
- [ ] Documentation added
- [ ] Telemetry added. In case of a feature if it's used or not.
- [ ] Errors have a helpful link attached, see [`contributing.md`](https://github.com/vercel/next.js/blob/canary/contributing.md)

## Documentation / Examples

- [ ] Make sure the linting passes by running `pnpm build && pnpm lint`
- [ ] 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: JJ Kasper <22380829+ijjk@users.noreply.github.com>
2023-01-15 22:47:49 +00:00
Valentin Politov
9168dffc02
examples: Bump SWR to v2.0.0 (#44790) 2023-01-12 09:36:29 -08:00
Delba de Oliveira
e0aac6f46e
[example] Add missing package in app dir i18n example (#44820)
<!--
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 that you're making:
-->

## Bug

- [ ] Related issues linked using `fixes #number`
- [ ] Integration tests added
- [ ] Errors have a helpful link attached, see
[`contributing.md`](https://github.com/vercel/next.js/blob/canary/contributing.md)

## Feature

- [ ] Implements an existing feature request or RFC. Make sure the
feature request has been accepted for implementation before opening a
PR.
- [ ] Related issues linked using `fixes #number`
- [ ]
[e2e](https://github.com/vercel/next.js/blob/canary/contributing/core/testing.md#writing-tests-for-nextjs)
tests added
- [ ] Documentation added
- [ ] Telemetry added. In case of a feature if it's used or not.
- [ ] Errors have a helpful link attached, see
[`contributing.md`](https://github.com/vercel/next.js/blob/canary/contributing.md)

## 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)
2023-01-12 14:24:27 +00:00
Emiliano Garcia
975d96afdd
Update: SharedModal.tsx swipe bug in with-cloudinary (#44771)
Co-authored-by: JJ Kasper <jj@jjsweb.site>
2023-01-11 15:53:34 -08:00
Tim Neutkens
35264c3659
Add support for rendering MDX as a server component (#44651)
Adds support for rendering MDX as a Server Component.

The main reason a MDX file couldn't be rendered as a Server Component is
that `@mdx-js/react` has a legacy/deprecated context setup in the file.
Because of calling `React.createContext` the MDX file couldn't be a
Server Component.

I've added support for a special file `mdx-components.tsx` (or `.js`) at
the root of the project (can be `src` dir too).
By using mdx-components you don't need a global context provider which
in turn makes MDX compatible to be rendered as a Server Component.

Note: this changes `@next/mdx` to add support for that file so it has to
be landed first before the example works.

<!--
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 that you're making:
-->

## Bug

- [ ] Related issues linked using `fixes #number`
- [ ] Integration tests added
- [ ] Errors have a helpful link attached, see
[`contributing.md`](https://github.com/vercel/next.js/blob/canary/contributing.md)

## Feature

- [ ] Implements an existing feature request or RFC. Make sure the
feature request has been accepted for implementation before opening a
PR.
- [ ] Related issues linked using `fixes #number`
- [ ]
[e2e](https://github.com/vercel/next.js/blob/canary/contributing/core/testing.md#writing-tests-for-nextjs)
tests added
- [ ] Documentation added
- [ ] Telemetry added. In case of a feature if it's used or not.
- [ ] Errors have a helpful link attached, see
[`contributing.md`](https://github.com/vercel/next.js/blob/canary/contributing.md)

## Documentation / Examples

- [ ] Make sure the linting passes by running `pnpm build && pnpm lint`
- [ ] 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: JJ Kasper <jj@jjsweb.site>
2023-01-06 13:09:05 -08:00
Rishabh Poddar
d1db92c791
Update to with-supertokens example (#44640)
Update dependency version
2023-01-06 11:35:41 -08:00
Daiki Nishikawa
6da04448bd
remove unnecessary babel.config.js in react native web example (#43939)
<!--
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 that you're making:
-->

## Documentation / Examples

Based on https://github.com/necolas/react-native-web/discussions/2217,
the `babel-plugin-react-native-web` is not necessary. Therefore, I
remove babel.config.js and npm package from package.json. This
modification will improve build performance and bundle size.

- [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)
2023-01-05 17:31:03 -08:00
Tim Neutkens
0f004312d3
Add lang, generateStaticParams, and server-only for i18n example (#44597)
Ensures static generation is used and the dictionary is not accidentally used in client components



## Bug

- [ ] Related issues linked using `fixes #number`
- [ ] Integration tests added
- [ ] Errors have a helpful link attached, see [`contributing.md`](https://github.com/vercel/next.js/blob/canary/contributing.md)

## Feature

- [ ] Implements an existing feature request or RFC. Make sure the feature request has been accepted for implementation before opening a PR.
- [ ] Related issues linked using `fixes #number`
- [ ] [e2e](https://github.com/vercel/next.js/blob/canary/contributing/core/testing.md#writing-tests-for-nextjs) tests added
- [ ] Documentation added
- [ ] Telemetry added. In case of a feature if it's used or not.
- [ ] Errors have a helpful link attached, see [`contributing.md`](https://github.com/vercel/next.js/blob/canary/contributing.md)

## Documentation / Examples

- [ ] Make sure the linting passes by running `pnpm build && pnpm lint`
- [ ] The "examples guidelines" are followed from [our contributing doc](https://github.com/vercel/next.js/blob/canary/contributing/examples/adding-examples.md)
2023-01-05 16:29:04 +00:00
Jan Kaifer
5fb56312d5
Create i18n example using app-dir and middleware (#44257)
Co-authored-by: Vu Van Dung <joulev.vvd@yahoo.com>
Co-authored-by: Tim Neutkens <tim@timneutkens.nl>
2023-01-05 16:15:29 +01:00
Shu Uesugi
c5453453ac
Improve modularized imports docs and add config options to example (#44560)
This PR improves the [Modularize Imports](https://nextjs.org/docs/advanced-features/compiler#modularize-imports) section of Next.js Compiler docs as well as [the `modularize-imports` example](https://github.com/vercel/next.js/tree/canary/examples/modularize-imports). They were originally added in [this PR](https://github.com/vercel/next.js/pull/34969).

- Link to [the `modularize-imports` example](https://github.com/vercel/next.js/tree/canary/examples/modularize-imports) was missing from the docs.
- Clarified some explanations and reorganized the content so it's easier to understand.
- Added docs for `skipDefaultConversion`.
- Added docs for `preventFullImport`.
- Illustrated how to use `kebabCase` and `skipDefaultConversion` on the [the `modularize-imports` example](https://github.com/vercel/next.js/tree/canary/examples/modularize-imports).

## 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)
2023-01-04 21:39:38 +00:00
Hassan El Mghari
ca73cbf657
Improvements to Cloudinary Example (#44572)
## Improvements to Image Gallery

- Added blur image optimization that cuts initial page size by more than half
- Added masonry layout to handle images of different sizes
- Converted querySelector to use refs
2023-01-04 20:37:32 +00:00
Jesse Jafa
c0986eed06
[examples] add @types/testing-library__jest-dom package (#44533)
## Documentation / Examples

- [ ] Make sure the linting passes by running `pnpm build && pnpm lint`
- [ ] The "examples guidelines" are followed from [our contributing
doc](https://github.com/vercel/next.js/blob/canary/contributing/examples/adding-examples.md)

The https://www.npmjs.com/package/@testing-library/jest-dom is included
in the `with-jest` and `with-jest-babel` examples, but that package has
DT types which are not included and may cause TS errors. This PR adds
them
2023-01-03 15:55:40 -08:00
Arda TANRIKULU
00d7a35ed7
Use the stable GraphQL Yoga v3 in the GraphQL example (#44488)
Use the stable GraphQL Yoga v3 in the GraphQL example, and also disable body parser for fully functionality as in GraphQL Yoga's recipe for Next.js;
https://the-guild.dev/graphql/yoga-server/docs/integrations/integration-with-nextjs#example


Co-authored-by: JJ Kasper <22380829+ijjk@users.noreply.github.com>
2023-01-03 00:53:12 +00:00
김형록
3dfb85d082
Update .gitignore in pwa example (#44391)
The files created when running the app using next-pwa should not be added to git, so I added them to `.gitignore`.

Updated by referring to https://github.com/shadowwalker/next-pwa/blob/master/.gitignore.
2023-01-03 00:39:44 +00:00
Bradley Dirheimer
f7b654e875
Update get-api-cookie.ts (#44466)
Added the types for req and res.



## Bug

- [ ] Related issues linked using `fixes #number`
- [ ] Integration tests added
- [ ] Errors have a helpful link attached, see [`contributing.md`](https://github.com/vercel/next.js/blob/canary/contributing.md)

## Feature

- [ ] Implements an existing feature request or RFC. Make sure the feature request has been accepted for implementation before opening a PR.
- [ ] Related issues linked using `fixes #number`
- [ ] [e2e](https://github.com/vercel/next.js/blob/canary/contributing/core/testing.md#writing-tests-for-nextjs) tests added
- [ ] Documentation added
- [ ] Telemetry added. In case of a feature if it's used or not.
- [ ] Errors have a helpful link attached, see [`contributing.md`](https://github.com/vercel/next.js/blob/canary/contributing.md)

## Documentation / Examples

- [ ] Make sure the linting passes by running `pnpm build && pnpm lint`
- [x] The "examples guidelines" are followed from [our contributing doc]

Here is the documentation followed [Nextjs Link](https://nextjs.org/docs/basic-features/typescript)


Co-authored-by: JJ Kasper <22380829+ijjk@users.noreply.github.com>
2023-01-01 00:58:38 +00:00
Dmitry
87a419f821
fix link to index page in Image Component Example (#44388)
## Documentation / Examples
On [Image Component Example README](https://github.com/vercel/next.js/tree/canary/examples/image-component) was a old link to index.js file, instead of index.tsx, changed old link to a new, now page exist, insteadof 404.

- [x] Make sure the linting passes by running `pnpm build && pnpm lint`
- [x] The "examples guidelines" are followed from [our contributing doc]
2022-12-28 15:35:23 +00:00
Steven Eubank
d3c292dd4a
Update with-sentry README.md Next.js version (#44374)
Clarify requirement and move down, since Next.js versions <10 are already quite dated
2022-12-27 14:40:43 +00:00
Shu Uesugi
f0aa10b216
Remove experimental for modularizeImports from docs and example (#44311)
When `modularizeImports` was moved out of experiimental [on this PR](https://github.com/vercel/next.js/pull/44240), `docs` and `examples` were not updated.

- Update `modularize-imports` example by removing `experimental` from `next.config.js`, as it's currently failing when deployed
- For docs: https://nextjs.org/docs/advanced-features/compiler#modularize-imports
  - Move `Modularize Imports` section outside of `Experimental Features` section 
  - Remove `experimental` from code snippets
  - Added to version history, just like when SWC Minifier became stable.

## 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)
2022-12-23 20:46:18 +00:00
Hassan El Mghari
8a9133ddb3
Updated dependencies for with-tailwindcss example (#44289)
Updated dependencies for tailwindcss and typescript.
2022-12-23 02:08:26 +00:00
Tobias Koppers
3020c44df1
update with-turbopack example for postcss/tailwind support (#44261) 2022-12-22 13:20:15 +01:00
Jiachi Liu
ea7d85687b
Fix styled-components setup in turbo example (#44165)
Closes: #44164

Sync to the latest setup doc on https://beta.nextjs.org/docs/styling/css-in-js#styled-components

## 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)
2022-12-19 20:59:16 +00:00
Rishabh Poddar
064bd14371
Updates with-supertokens example (#44042)
Updated dependency of supertokens-auth-react
2022-12-15 22:59:37 -08:00
Damien Simonin Feugas
35f1a3501a
feat: enables 'edge' as a possible runtime for API routes (#44045) 2022-12-15 10:08:03 +01:00
Aaron Adler
ee266b9d9b
Move Google Analytics script to the <Head/> (#43838)
Fixes #[37957](https://github.com/vercel/next.js/issues/37957)

Google cannot read the Google Analytics script if it is placed at the bottom of the `<body />`.

It can only be read when it's placed here in the `<Head />`

This has been documented by other NextJS users online, and by Google themselves, which directs users to place the script in the head.

Hope this helps NextJS users!



## Bug

- [x] Related issues linked using `fixes #number`
- [ ] Integration tests added
- [ ] Errors have a helpful link attached, see [`contributing.md`](https://github.com/vercel/next.js/blob/canary/contributing.md)

## Feature

- [ ] Implements an existing feature request or RFC. Make sure the feature request has been accepted for implementation before opening a PR.
- [ ] Related issues linked using `fixes #number`
- [ ] [e2e](https://github.com/vercel/next.js/blob/canary/contributing/core/testing.md#writing-tests-for-nextjs) tests added
- [ ] Documentation added
- [ ] Telemetry added. In case of a feature if it's used or not.
- [ ] Errors have a helpful link attached, see [`contributing.md`](https://github.com/vercel/next.js/blob/canary/contributing.md)

## Documentation / Examples

- [ ] Make sure the linting passes by running `pnpm build && pnpm lint`
- [ ] The "examples guidelines" are followed from [our contributing doc](https://github.com/vercel/next.js/blob/canary/contributing/examples/adding-examples.md)
2022-12-13 02:53:42 +00:00
Balázs Orbán
5e3bb45f55
chore: add repro links in "verify canary" comment (#43979)
[Slack
thread](https://vercel.slack.com/archives/C03KAR5DCKC/p1669918824743499)

## Bug

- [ ] Related issues linked using `fixes #number`
- [ ] Integration tests added
- [ ] Errors have a helpful link attached, see
[`contributing.md`](https://github.com/vercel/next.js/blob/canary/contributing.md)

## Feature

- [ ] Implements an existing feature request or RFC. Make sure the
feature request has been accepted for implementation before opening a
PR.
- [ ] Related issues linked using `fixes #number`
- [ ]
[e2e](https://github.com/vercel/next.js/blob/canary/contributing/core/testing.md#writing-tests-for-nextjs)
tests added
- [ ] Documentation added
- [ ] Telemetry added. In case of a feature if it's used or not.
- [ ] Errors have a helpful link attached, see
[`contributing.md`](https://github.com/vercel/next.js/blob/canary/contributing.md)

## Documentation / Examples

- [ ] Make sure the linting passes by running `pnpm build && pnpm lint`
- [ ] The "examples guidelines" are followed from [our contributing
doc](https://github.com/vercel/next.js/blob/canary/contributing/examples/adding-examples.md)
2022-12-12 14:26:40 -08:00
labyrinthitis
af0ac941de
corrected /examples/github-pages readme (#43766)
`branch` is the correct subheading direction; the `source` subheading represents `deploying from a branch` or from a `github action`



## Bug

- [ ] Related issues linked using `fixes #number`
- [ ] Integration tests added
- [ ] Errors have a helpful link attached, see [`contributing.md`](https://github.com/vercel/next.js/blob/canary/contributing.md)

## Feature

- [ ] Implements an existing feature request or RFC. Make sure the feature request has been accepted for implementation before opening a PR.
- [ ] Related issues linked using `fixes #number`
- [ ] [e2e](https://github.com/vercel/next.js/blob/canary/contributing/core/testing.md#writing-tests-for-nextjs) tests added
- [ ] Documentation added
- [ ] Telemetry added. In case of a feature if it's used or not.
- [ ] Errors have a helpful link attached, see [`contributing.md`](https://github.com/vercel/next.js/blob/canary/contributing.md)

## Documentation / Examples

- [ ] Make sure the linting passes by running `pnpm build && pnpm lint`
- [ ] The "examples guidelines" are followed from [our contributing doc](https://github.com/vercel/next.js/blob/canary/contributing/examples/adding-examples.md)
2022-12-12 02:33:38 +00:00
Max Proske
bfd96ac012
Fix with-webassembly example and convert to Typescript (#43677)
- Fixes `with-webassembly` example unable to build with the current
`next.config.js`.
https://github.com/vercel/next.js/issues/29362#issuecomment-932767530
- Converted example to TypeScript

```js
// Before
config.output.webassemblyModuleFilename = 'static/wasm/[modulehash].wasm'

// After
config.output.webassemblyModuleFilename =
  isServer && !dev
    ? '../static/wasm/[modulehash].wasm'
    : 'static/wasm/[modulehash].wasm'
```

```
> Build error occurred
Error: Export encountered errors on following paths:
        /
    at /Users/max/dev/next.js/examples/with-webassembly/node_modules/next/dist/export/index.js:408:19
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
    at async Span.traceAsyncFn (/Users/max/dev/next.js/examples/with-webassembly/node_modules/next/dist/trace/trace.js:79:20)
    at async /Users/max/dev/next.js/examples/with-webassembly/node_modules/next/dist/build/index.js:1342:21
    at async Span.traceAsyncFn (/Users/max/dev/next.js/examples/with-webassembly/node_modules/next/dist/trace/trace.js:79:20)
    at async /Users/max/dev/next.js/examples/with-webassembly/node_modules/next/dist/build/index.js:1202:17
    at async Span.traceAsyncFn (/Users/max/dev/next.js/examples/with-webassembly/node_modules/next/dist/trace/trace.js:79:20)
    at async Object.build [as default] (/Users/max/dev/next.js/examples/with-webassembly/node_modules/next/dist/build/index.js:65:29)
 ELIFECYCLE  Command failed with exit code 1.
```

## 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)
2022-12-11 20:10:14 -06:00
Max Proske
ce0bcd38f2
Convert with-gsap, with-mqtt-js, with-mux-video examples to Typescript (#43874)
Converted three more examples to TypeScript.

Changes to individual examples pushed as separate commits.

## 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)
2022-12-12 01:53:08 +00:00
Thomas Ballinger
aa4b4bf8ae
Update dependencies for Convex demo (#43855)
Resolves the issue described in
https://github.com/microsoft/TypeScript/issues/51567 in the Convex demo
by updating type definitions.

## 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)**
- actually updated dependencies this time
2022-12-08 12:43:56 -08:00
Thomas Ballinger
dbc833440c
chore(examples): Update convex example (#43741) 2022-12-07 14:12:36 +01:00
Anuj Singh
8006dbc741
chore(examples): Remove deprecated function from chakra (#43784)
Co-authored-by: Balázs Orbán <info@balazsorban.com>
2022-12-07 14:10:32 +01:00
Max Proske
f56e5c942d
Convert with-why-did-you-render example to TypeScript (#43736) 2022-12-07 14:10:04 +01:00
Hassan El Mghari
c6ec490eb1
Fixed broken Cloudinary example (#43646)
Adding TypeScript as a dependency to fix the Cloudinary example
2022-12-02 17:12:54 +00:00
7yue
5fb243d2ad
examples(with-turbopack): Fix styling page default active stylingNav (#42739)
<!--
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 that you're making:
-->

Closes: https://github.com/vercel/next.js/pull/42768

## Bug

- [ ] Related issues linked using `fixes #number`
- [ ] Integration tests added
- [ ] Errors have a helpful link attached, see `contributing.md`

## Feature

- [ ] Implements an existing feature request or RFC. Make sure the
feature request has been accepted for implementation before opening a
PR.
- [ ] Related issues linked using `fixes #number`
- [ ] Integration tests added
- [ ] Documentation added
- [ ] Telemetry added. In case of a feature if it's used or not.
- [ ] Errors have a helpful link attached, see `contributing.md`

## Documentation / Examples

- [ ] Make sure the linting passes by running `pnpm build && pnpm lint`
- [ ] 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: JJ Kasper <jj@jjsweb.site>
2022-12-01 20:18:14 -08:00
Hassan El Mghari
57dc7207e6
Add with-cloudinary example (#43250)
Added an image gallery example using Next.js and Cloudinary.

Edit: This is now ready to ship!

Co-authored-by: Balázs Orbán <18369201+balazsorban44@users.noreply.github.com>
Co-authored-by: JJ Kasper <22380829+ijjk@users.noreply.github.com>
2022-12-02 04:05:34 +00:00
Alexis Rico
a45bf8c93b
Fix deploy button in with-xata example (#43608)
The deploy button of the `with-xata` example is not working properly
because we were lacking the integration to configure the env variables.

[![Deploy with
Vercel](https://vercel.com/button)](https://vercel.com/new/git/external?repository-url=https://github.com/SferaDev/nextjs-demo/tree/fix-with-xata-deploy/examples/with-xata&project-name=with-xata&repository-name=with-xata&integration-ids=oac_IDpMECDuYqBvAtu3wXXMQe0J)

Taking advantage of the PR, some other changes:

- Adding `alt` to `next/image` to fix build with latest version
- Update readme to add more information in the Xata CLI section
- Use a new command to initialize the database schema on first
deployment
- Remove hardcoded URL in `xata.codegen.ts`
- Remove deprecated `formatVersion` in `schema.template.json`
- Update dependencies

Note: The integration is still work in progress, it works for the
`Deploy to Vercel` button but we want to improve the UI/UX before
submitting it to the Marketplace, keeping it unlisted for a while.
2022-12-01 11:34:23 -08:00
Josh Slate
b2df2cff26
chore(examples): Update active-class-name example (#43581)
I updated the `active-class-name` example to stop using the legacy behavior.

## 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)
2022-12-01 12:21:57 +00:00
Aaron Yarborough
55e35c5144
chore(examples): reference main prop in README.md in Firebase example (#43434)
Co-authored-by: Balázs Orbán <info@balazsorban.com>
2022-11-30 12:47:39 +01:00
Max Proske
faaba0f8ec
Simplify and convert with-vercel-fetch example to TypeScript (#43403)
Simplified the example to just the specific feature, and converted to TypeScript.

- `node-fetch@2` is either polyfilled by Next.js or a peerDep of `@vercel/fetch`, I can't quite tell, but either way it can be removed from the dependencies.

## 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)
2022-11-30 11:41:14 +00:00
Max
f15b5d0af7
chore(examples): fix CLI commands for MobX examples (#43534)
Fixes https://github.com/vercel/next.js/issues/43512
2022-11-29 18:10:33 +01:00
Max Proske
d5c922b3ec
Fix with-docker-compose example (#43419)
1. Fixes example unable to build with the latest version of Next.
- Next.js 13 bumped the minimum React version to [18.2.0](https://nextjs.org/docs/upgrading), but this example seems to have gotten missed.

2. Fixes example unable to run by default on Linux. 
- Reverts #39372 
- Fixes @balazsorban44 comment https://github.com/vercel/next.js/pull/39372#issuecomment-1208012860
- Added a comment to the README to prevent this issue from being re-introduced. 

3. Build and start Next.js based on the preferred package manager.

4. Allow dependencies to install without lockfile present. 
- Outputs a warning instead of exiting.  
- Keeps the example faithful to the README "Develop locally without Node.js or TypeScript installed".

5. Added `next.config.js` types that got missed.

6. Updated README links now that output standalone is stable.

## 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)
2022-11-28 00:13:22 +00:00
Rishabh Poddar
08e6ceb594
updates with-supertokens example (#43379)
Prevents infinite redirect loop if someone is logged in and visits a
route like `/auth/random`
2022-11-27 16:04:43 -08:00
Jan Kaifer
1dd34620fd
Add example commands for creating reproductions (#43375)
To reduce friction when creating reproductions. It allso allows me to link to this file when I'm asking people to create reproductions



## Bug

- [ ] Related issues linked using `fixes #number`
- [ ] Integration tests added
- [ ] Errors have a helpful link attached, see [`contributing.md`](https://github.com/vercel/next.js/blob/canary/contributing.md)

## Feature

- [ ] Implements an existing feature request or RFC. Make sure the feature request has been accepted for implementation before opening a PR.
- [ ] Related issues linked using `fixes #number`
- [ ] [e2e](https://github.com/vercel/next.js/blob/canary/contributing/core/testing.md#writing-tests-for-nextjs) tests added
- [ ] Documentation added
- [ ] Telemetry added. In case of a feature if it's used or not.
- [ ] Errors have a helpful link attached, see [`contributing.md`](https://github.com/vercel/next.js/blob/canary/contributing.md)

## Documentation / Examples

- [x] Make sure the linting passes by running `pnpm build && pnpm lint`
- [ ] The "examples guidelines" are followed from [our contributing doc](https://github.com/vercel/next.js/blob/canary/contributing/examples/adding-examples.md)
2022-11-25 12:01:39 +00:00
Shu Uesugi
a746597430
chore(examples): Deprecate cms-strapi (#43325)
Co-authored-by: Balázs Orbán <info@balazsorban.com>
2022-11-24 12:01:10 +01:00
Max Proske
093354c6d3
Convert with-videojs, with-yoga, with-zones examples to TypeScript (#43280) 2022-11-23 13:46:54 +01:00
Max Proske
8eb82b3891
Convert more jsx/styled-components examples to TypeScript (#43117)
Converted 3 more examples to TypeScript. Individual contributions pushed as separate commits.

## 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)
2022-11-23 05:45:26 +00:00
Artur Bień
ef7a6e1210
docs: add missing AppProps import (#43136) 2022-11-22 14:33:29 +01:00
Rishabh Poddar
08ee7b22ec
Updates supertokens example app SSR behaviour (#43218)
Co-authored-by: Rishabh <rishabh@supertokens.io>
Co-authored-by: Balázs Orbán <info@balazsorban.com>
2022-11-22 14:32:49 +01:00
FomichRoman
807c59a215
chore(examples): update Next.js in with-redux-reducer (#43237)
Co-authored-by: Balázs Orbán <info@balazsorban.com>
2022-11-22 14:28:07 +01:00
Mateus Etto
3a2af8fb0b
Fix With Passport example (#43232) 2022-11-22 13:45:19 +01:00
Andy Kenward
f400adf5e9
chore(examples): with-msw update msw (#43224)
CLOSES https://github.com/vercel/next.js/issues/43221
2022-11-22 11:33:44 +01:00
Bennett Dams
37d5abaa94
fix: Wrong link to source in "responsive" image example (#43081) 2022-11-18 18:16:37 +01:00
Chuns Chen
e701c715f9
examples(with-ant-design): bump antd v5.0.0 (#43062) 2022-11-18 13:48:47 +01:00
Adil Ansari
b94b5beb70
chore: Updating Tigris example to use stable release (#43058) 2022-11-18 13:48:20 +01:00
Jamie Barton
0440404893
feat(examples): use experimental edge runtime with grafbase (#42992)
This PR adds the experimental runtime as shown in a guide that links to
this example.

##  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)
2022-11-17 14:02:55 -08:00
Max Proske
07d3da102d
Convert with-cssed, with-csx, with-styled-jsx examples to TypeScript (#43018)
Updated 3 more examples to TypeScript. Changes to individual examples
pushed as separate commits.

- Swapped `cxs/lite` for `cxs`, as it's the only mode supported by
`@types/cxs`.

## 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)
2022-11-17 10:28:57 -08:00
Max Proske
809303be59
Remove swcMinify option from example configs (#43012)
SWC minification is now [enabled by
default](https://nextjs.org/docs/advanced-features/compiler) in the
Next.js compiler.

## 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)
2022-11-16 13:39:26 -08:00
Max Proske
3fe9b4c867
Remove with-cerebral example (#42980) 2022-11-16 09:32:54 +01:00
Max Proske
365b164b48
Remove with-carbon-components example (#42976) 2022-11-16 09:18:00 +01:00
Max Proske
a916553420
Remove with-atlaskit example (#42973) 2022-11-16 09:17:56 +01:00
Silvio Clécio
10b635ea60
docs(examples): add postgres.js example (#42962) 2022-11-16 09:17:43 +01:00
Jamie Barton
fbf6bfa04f
feat(examples): with-grafbase (#42898) 2022-11-15 19:18:31 +01:00
Adil Ansari
0f8b3d6c8b
Tigris example with Next.js (#42662) 2022-11-15 12:00:29 +01:00
Max Proske
efbabd2a5e
Convert with-app-layout example to TypeScript (#42930)
Converted example to TypeScript to match Contribution docs.

## 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)
2022-11-15 10:44:38 +00:00
Steven Tey
71fa80b665
Make cover image full width (#42916)
<!--
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 that you're making:
-->

## Bug

- [ ] Related issues linked using `fixes #number`
- [ ] Integration tests added
- [ ] Errors have a helpful link attached, see `contributing.md`

## Feature

- [ ] Implements an existing feature request or RFC. Make sure the
feature request has been accepted for implementation before opening a
PR.
- [ ] Related issues linked using `fixes #number`
- [ ] Integration tests added
- [ ] Documentation added
- [ ] Telemetry added. In case of a feature if it's used or not.
- [ ] Errors have a helpful link attached, see `contributing.md`

## Documentation / Examples

- [ ] Make sure the linting passes by running `pnpm build && pnpm lint`
- [ ] The "examples guidelines" are followed from [our contributing
doc](https://github.com/vercel/next.js/blob/canary/contributing/examples/adding-examples.md)
2022-11-14 12:48:48 -08:00