Commit graph

2725 commits

Author SHA1 Message Date
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
Steven Tey
0d2a3de336
Convert blog cover images to next/image (#42908)
## 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 17:29:54 +00:00
Lee Robinson
ad61e84101
Update SFCC example to use TypeScript + @next/font (#42865)
This is now ready for review.

Co-authored-by: Hassan El Mghari <hassan4709@gmail.com>
2022-11-14 09:46:31 -06:00
Max Proske
994089fcc2
Improve with-algolia-react-instantsearch example and convert to TypeScript (#42617)
Converted to TypeScript to match Contribution docs, and updated/simplified the example.

- Replaced stylesheets in Head component with imported styles
- Removed `style-loader`, `css-loader`, `cross-env`, `prop-types` packages
- Removed custom webpack config

## 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-14 12:30:57 +00:00
Horacio Valencia
081b8fba67
Updates Apollo Server Examples to use Apollo Server 4 & @as-integrations/next (#42771)
Closes https://github.com/vercel/next.js/issues/42769

## Description 

This PR address https://github.com/vercel/next.js/issues/42769 by updating the `api-routes-apollo-server`, `api-routes-apollo-server-and-client` and `api-routes-apollo-server-and-client-auth` examples to use Apollo Server 4 and [@as-integrations/next](https://github.com/apollo-server-integrations/apollo-server-integration-next), which is the Apollo Server Next integration package. The PR also updates the three examples to use Typescript. The functionality of the examples is the same.


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


closes https://github.com/vercel/next.js/pull/33545
closes https://github.com/vercel/next.js/pull/30082
closes https://github.com/vercel/next.js/issues/21984
closes #10413
2022-11-14 12:13:31 +00:00
Andy Kenward
0bc94466b0
docs(examples): auth0 update callback URL (#42855) 2022-11-14 12:59:24 +01:00
Balázs Orbán
f5031a48c8
chore(examples): next/future/image -> next/image (#42794) 2022-11-11 15:14:25 +01:00
Adem ilter
c1b76bd36d
example fix url (#42695)
Co-authored-by: Steven Tey <stevensteel97@gmail.com>
Co-authored-by: JJ Kasper <jj@jjsweb.site>
2022-11-09 12:51:22 -06:00
Artem
1f6c0d0f57
chore: update scripts to work on windows (#42632)
Update `package.json` for Windows users.
1. `concurrently` isn't working with single quotes 🤷🏻
2. `--watch` isn't actually passed, because of that `tailwind` compiles only once and exits.

## 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-08 19:43:45 +00:00
Rishabh Poddar
90ddc248a5
(with-supertokens example): Fixes infinite redirect issue for unauthorised error during SSR (#42634)
If there is an unauthorised error during `getServerSideProps`, then we
return the same response as the try refresh token error so that all
cookies are cleared from the frontend due to refreshing failure.

If we did not do this, it would cause an infinite loop if the session
was removed in offline mode as the frontend would still think that the
session exists, and would redirect back to the protected route which
would fail verification again.
2022-11-08 07:58:04 -08:00
Max Proske
6f136f6a7e
Convert with-absolute-imports example to TypeScript (#42529)
Converted example to TypeScript to match Contribution docs.

- ~~Renamed `with-absolute-imports` example to
`absolute-imports-and-aliases` to match Contribution docs~~
- ~~Replaced deprecated example with a `README.md` file~~
- Used module path aliases in example, to help developers decide which
import strategy to use

## Documentation / Examples

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

Co-authored-by: JJ Kasper <jj@jjsweb.site>
2022-11-07 14:19:42 -08:00
Max Proske
984627a65e
Remove all custom server integration examples (#42549)
Fixes @leerob's comment https://github.com/vercel/next.js/pull/42110#issuecomment-1304897491

~~Deprecated~~ Removed all custom server integration examples (Express, Fastify, etc.) in favour of the main `custom-server` example, ~~and left behind a helpful `README.md` in case they might be linked to.~~

## 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-07 01:08:51 +00:00
bot08
a9f79980db
Example: fixed tailwind ver in readme (#42551)
- [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-07 01:03:03 +00:00
Max Proske
48dbdf930f
Convert custom-server-express example to TypeScript (#42110)
Converted Express example to TypeScript to match Contribution docs.

- Added `nodemon` to match the `custom-server` example, and allow live reloading of `server.ts`
- Updated README with explainer for non-standard `<Link href="/a" as="/b">` routing

## 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-06 21:32:41 +00:00