- Drop support for Fauna example with cookie auth
- Fixup GraphQL endpoints in Fauna example
## Testing
Deployed the example to my own Vercel account to ensure I was able to standup the sample guestbook. Confirmed that entries reached my database for various region groups.
## Documentation / Examples
- [x] Make sure the linting passes by running `pnpm lint`
- [x] The examples guidelines are followed from [our contributing doc](https://github.com/vercel/next.js/blob/canary/contributing.md#adding-examples)
In my last PR I removed the request library as it is obsolete and the application does not use it. The database setup utility does though, so I am reverting this change.
Co-authored-by: JJ Kasper <22380829+ijjk@users.noreply.github.com>
This is just a bump of tech stack used in the example and small rewrite of swr functionality.
## Bug
- [ ] Related issues linked using `fixes #number`
- [ ] Integration tests added
- [ ] Errors have 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 helpful link attached, see `contributing.md`
## Documentation / Examples
- [ ] Make sure the linting passes by running `pnpm lint`
- [ x ] The examples guidelines are followed from [our contributing doc](https://github.com/vercel/next.js/blob/canary/contributing.md#adding-examples)
Co-authored-by: JJ Kasper <22380829+ijjk@users.noreply.github.com>
This PR updates the docs and examples for `create-next-app` to include pnpm usage.
The following script was used to update every example README:
```js
const fs = require('fs')
const examples = fs.readdirSync('./examples')
for (let example of examples) {
const filename = `./examples/${example}/README.md`
const markdown = fs.readFileSync(filename, 'utf8')
const regex = new RegExp(`^yarn create next-app --example (.*)$`, 'gm')
const output = markdown.replace(regex, (yarn, group) => {
const pnpm = `pnpm create next-app -- --example ${group}`
return `${yarn}\n# or\n${pnpm}`
})
fs.writeFileSync(filename, output)
}
```
* Add ci script to check examples
* Install moreutils for `sponge` command.
It's not very pretty, but I'm not sure how to replace sponge in a good way in the shell script
* Prettier names in the workflow
* Move "check-examples" into build_test_deploy workflow
* Start breaking the jq script into multiple lines
* Add checks for cleanups in vercel/next.js#27121
* Run the `check-examples.sh` script to cleanup all remaining examples.
* Add licences to all example/package.json that lack them
* Revert "Add licences to all example/package.json that lack them"
This reverts commit 5d4e25012f7334772b8ef5924bc355277e827cba.
* Update check-examples to remove `license` field from examples
* Remove `license` from all examples.
This was mentioned in vercel/next.js#27121 but it looks like it didn't end up being in the merge?
Co-authored-by: JJ Kasper <jj@jjsweb.site>
Update the `check-exampels.sh` script to also ensure all examples has `private: true` (763d9979f7)
Update exampels (1) that did not have `private: true` (bcdc4a3ae0)
- fix `with-fauna` example to populate client secret properly when auto-deploy on changes happens
- improve security by avoiding usage of the `FAUNA_ADMIN_KEY` in the application, now it's used in the setup script only
Based on https://github.com/vercel/next.js/pull/26708
- Renames FaunaDB -> Fauna
- Moves to Tailwind instead of bespoke styling
- Use SWR instead of hand-rolled fetch wrapper
- List/Create API for Guestbook
- Preps for setting correct environment variables from Vercel integration