Skip to content

Commit

Permalink
Merge branch 'canary' into ci/windows-timeout
Browse files Browse the repository at this point in the history
  • Loading branch information
kodiakhq[bot] committed Sep 28, 2023
2 parents a3647e3 + 8f3eb01 commit 6d0c043
Show file tree
Hide file tree
Showing 21 changed files with 810 additions and 136 deletions.
2 changes: 2 additions & 0 deletions .github/CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
Expand Up @@ -36,3 +36,5 @@ Cargo.toml @timneutkens @ijjk @shu
Cargo.lock @timneutkens @ijjk @shuding @huozhi @vercel/web-tooling
/.cargo/config.toml @timneutkens @ijjk @shuding @huozhi @vercel/web-tooling
/.config/nextest.toml @timneutkens @ijjk @shuding @huozhi @vercel/web-tooling
/test/build-turbopack-tests-manifest.js @timneutkens @ijjk @shuding @huozhi @vercel/web-tooling
/test/turbopack-tests-manifest.json @timneutkens @ijjk @shuding @huozhi @vercel/web-tooling
2 changes: 0 additions & 2 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,6 @@
// Debugging.
"debug.javascript.unmapMissingSources": true,
"files.exclude": {
"**/node_modules": false,
"node_modules": true,
"*[!test]**/node_modules": true
},
// Ensure enough terminal history is preserved when running tests.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ description: API Reference for the revalidatePath function.
revalidatePath(path: string, type?: 'page' | 'layout'): void;
```

- `path`: A string representing the filesystem path associated with the data you want to revalidate. This is the literal route segment (for example, `/product/123`) not the path on the filesystem `/product/[slug]/page`. Must be less than 1024 characters.
- `path`: Either a string representing the filesystem path associated with the data you want to revalidate (for example, `/product/[slug]/page`), or the literal route segment (for example, `/product/123`). Must be less than 1024 characters.
- `type`: (optional) `'page'` or `'layout'` string to change the type of path to revalidate.

## Returns
Expand Down
91 changes: 79 additions & 12 deletions examples/with-supabase/README.md
Original file line number Diff line number Diff line change
@@ -1,24 +1,91 @@
# Supabase Starter
<a href="https://demo-nextjs-with-supabase.vercel.app/">
<img alt="Next.js 13 and app template Router-ready Supabase starter kit." src="https://demo-nextjs-with-supabase.vercel.app/opengraph-image.png">
<h1 align="center">Supabase starter kit</h1>
</a>

This starter configures Supabase Auth to use cookies, making the user's session available throughout the entire Next.js app - Client Components, Server Components, Route Handlers, Server Actions and Middleware.
<p align="center">
This starter configures Supabase Auth to use cookies, making the user's session available throughout the entire Next.js app - Client Components, Server Components, Route Handlers, Server Actions and Middleware.
</p>

## Deploy your own
<p align="center">
<a href="#features"><strong>Features</strong></a> ·
<a href="#demo"><strong>Demo</strong></a> ·
<a href="#deploy-to-vercel"><strong>Deploy to Vercel</strong></a> ·
<a href="#clone-and-run-locally"><strong>Clone and run locally</strong></a> ·
<a href="#how-to-use"><strong>How to use</strong></a> ·
<a href="#feedback-and-issues"><strong>Feedback and issues</strong></a>
</p>
<br/>

The Vercel deployment will guide you through creating a Supabase account and project. After installation of the Supabase integration, all relevant environment variables will be set up so that the project is usable immediately after deployment 🚀
## Features

[![Deploy with Vercel](https://vercel.com/button)](https://vercel.com/new/clone?repository-url=https://github.com/vercel/next.js/tree/canary/examples/with-supabase&project-name=nextjs-with-supabase&repository-name=nextjs-with-supabase&integration-ids=oac_jUduyjQgOyzev1fjrW83NYOv)
- [Next.js App router ready](https://nextjs.org) App Router
- Client Components examples
- React Server Components (RSCs) examples
- Route Handlers examples
- Server Actions examples
- [supabase-js](https://supabase.com/docs/reference/javascript). Supabase's
isomorphic JavaScript library.
- [Supabase Auth](https://supabase.com/auth) using cookies, making the user's session available throughout the entire Next.js app, for both client and server.
- Styling with [Tailwind CSS](https://tailwindcss.com)
- Optional deployment with [Supabase Vercel Integration and Vercel deploy](#deploy-your-own)
- Enviroment variables automatically assigned to Vercel project

## How to use
## Demo

You can view a fully working demo at [demo-nextjs-with-supabase.com](https://demo-nextjs-with-supabase.com).

## Deploy to Vercel

Vercel deployment will guide you through creating a Supabase account and project.

After installation of the Supabase integration, all relevant environment variables will be assigned to the project so the deployment is fully functioning.

[![Deploy with Vercel](https://vercel.com/button)](https://vercel.com/new/clone?repository-url=https%3A%2F%2Fgithub.com%2Fvercel%2Fnext.js%2Ftree%2Fcanary%2Fexamples%2Fwith-supabase&project-name=nextjs-with-supabase&repository-name=nextjs-with-supabase&demo-title=nextjs-with-supabase&demo-description=This%20starter%20configures%20Supabase%20Auth%20to%20use%20cookies%2C%20making%20the%20user's%20session%20available%20throughout%20the%20entire%20Next.js%20app%20-%20Client%20Components%2C%20Server%20Components%2C%20Route%20Handlers%2C%20Server%20Actions%20and%20Middleware.&demo-url=https%3A%2F%2Fdemo-nextjs-with-supabase.vercel.app%2F&external-id=https%3A%2F%2Fgithub.com%2Fvercel%2Fnext.js%2Ftree%2Fcanary%2Fexamples%2Fwith-supabase&demo-image=https%3A%2F%2Fdemo-nextjs-with-supabase.vercel.app%2Fopengraph-image.png&integration-ids=oac_VqOgBHqhEoFTPzGkPd7L0iH6)

The above will also clone the Starter kit to your GitHub, you can clone that locally and develop locally.

If you wish to just develop locally and not deploy to Vercel, [follow the steps below](#how-to-use).

## Clone and run locally

1. You'll first need a Supabase project which can be made [via the Supabase dashboard](https://database.new)

2. Create a Next.js app using the Supabase Starter template npx command

1. Create a [new Supabase project](https://database.new)
1. Run `npx create-next-app -e with-supabase` to create a Next.js app using the Supabase Starter template
1. Use `cd` to change into the app's directory
1. Run `npm install` to install dependencies
1. Rename `.env.local.example` to `.env.local` and update the values for `NEXT_PUBLIC_SUPABASE_URL` and `NEXT_PUBLIC_SUPABASE_ANON_KEY` from [your Supabase project's API settings](https://app.supabase.com/project/_/settings/api)
1. Run `npm run dev` to start the local development server
```bash
npx create-next-app -e with-supabase
```

3. Use `cd` to change into the app's directory

```bash
cd name-of-new-app
```

4. Rename `.env.local.example` to `.env.local` and update the following:

```
NEXT_PUBLIC_SUPABASE_URL=[INSERT SUPABASE PROJECT URL]
NEXT_PUBLIC_SUPABASE_ANON_KEY=[INSERT SUPABASE PROJECT API ANON KEY]
```

Both `NEXT_PUBLIC_SUPABASE_URL` and `NEXT_PUBLIC_SUPABASE_ANON_KEY` can be found in [your Supabase project's API settings](https://app.supabase.com/project/_/settings/api)

5. You can now run the Next.js local development server:

```bash
npm run dev
```

The starter kit should now be running on [localhost:3000](http://localhost:3000/).

> Check out [the docs for Local Development](https://supabase.com/docs/guides/getting-started/local-development) to also run Supabase locally.
## How to use

There are a variety of example files for you to copy and build your app with in the starter kit.

### Create a Supabase client

Check out the [`/app/_examples`](./app/_examples/) folder for an example of creating a Supabase client in:
Expand Down
Binary file added examples/with-supabase/app/opengraph-image.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
31 changes: 15 additions & 16 deletions examples/with-supabase/app/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import Link from 'next/link'
import LogoutButton from '../components/LogoutButton'
import SupabaseLogo from '../components/SupabaseLogo'
import NextJsLogo from '../components/NextJsLogo'
import DeployButton from '../components/DeployButton'

export const dynamic = 'force-dynamic'

Expand Down Expand Up @@ -49,22 +50,20 @@ export default async function Index() {
<div className="w-full flex flex-col items-center">
<nav className="w-full flex justify-center border-b border-b-foreground/10 h-16">
<div className="w-full max-w-4xl flex justify-between items-center p-3 text-sm text-foreground">
<div />
<div>
{user ? (
<div className="flex items-center gap-4">
Hey, {user.email}!
<LogoutButton />
</div>
) : (
<Link
href="/login"
className="py-2 px-4 rounded-md no-underline bg-btn-background hover:bg-btn-background-hover"
>
Login
</Link>
)}
</div>
<DeployButton />
{user ? (
<div className="flex items-center gap-4">
Hey, {user.email}!
<LogoutButton />
</div>
) : (
<Link
href="/login"
className="py-2 px-3 flex rounded-md no-underline bg-btn-background hover:bg-btn-background-hover"
>
Login
</Link>
)}
</div>
</nav>

Expand Down
25 changes: 25 additions & 0 deletions examples/with-supabase/components/DeployButton.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
'use client'

export default function DeployButton() {
return (
<a
className="py-2 px-3 flex rounded-md no-underline text-white bg-black transition-colors hover:bg-gray-700 border"
href="https://vercel.com/new/clone?repository-url=https%3A%2F%2Fgithub.com%2Fvercel%2Fnext.js%2Ftree%2Fcanary%2Fexamples%2Fwith-supabase&project-name=nextjs-with-supabase&repository-name=nextjs-with-supabase&demo-title=nextjs-with-supabase&demo-description=This%20starter%20configures%20Supabase%20Auth%20to%20use%20cookies%2C%20making%20the%20user's%20session%20available%20throughout%20the%20entire%20Next.js%20app%20-%20Client%20Components%2C%20Server%20Components%2C%20Route%20Handlers%2C%20Server%20Actions%20and%20Middleware.&demo-url=https%3A%2F%2Fdemo-nextjs-with-supabase.vercel.app%2F&external-id=https%3A%2F%2Fgithub.com%2Fvercel%2Fnext.js%2Ftree%2Fcanary%2Fexamples%2Fwith-supabase&demo-image=https%3A%2F%2Fdemo-nextjs-with-supabase.vercel.app%2Fopengraph-image.png&integration-ids=oac_VqOgBHqhEoFTPzGkPd7L0iH6"
target="_blank"
rel="noreferrer"
>
<svg
aria-label="Vercel logomark"
role="img"
viewBox="0 0 74 64"
className="h-4 w-4 mr-2"
>
<path
d="M37.5896 0.25L74.5396 64.25H0.639648L37.5896 0.25Z"
fill="currentColor"
></path>
</svg>
Deploy to Vercel
</a>
)
}
115 changes: 109 additions & 6 deletions packages/font/src/google/font-data.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,25 @@
"styles": ["normal"],
"subsets": ["adlam", "latin", "latin-ext"]
},
"AR One Sans": {
"weights": ["400", "500", "600", "700", "variable"],
"styles": ["normal"],
"axes": [
{
"tag": "ARRR",
"min": 10,
"max": 60,
"defaultValue": 10
},
{
"tag": "wght",
"min": 400,
"max": 700,
"defaultValue": 400
}
],
"subsets": ["latin", "latin-ext", "vietnamese"]
},
"Abel": {
"weights": ["400"],
"styles": ["normal"],
Expand Down Expand Up @@ -3853,6 +3872,19 @@
"styles": ["normal", "italic"],
"subsets": ["greek"]
},
"Gabarito": {
"weights": ["400", "500", "600", "700", "800", "900", "variable"],
"styles": ["normal"],
"axes": [
{
"tag": "wght",
"min": 400,
"max": 900,
"defaultValue": 400
}
],
"subsets": ["latin", "latin-ext"]
},
"Gabriela": {
"weights": ["400"],
"styles": ["normal"],
Expand Down Expand Up @@ -5260,9 +5292,17 @@
"subsets": ["devanagari", "latin", "latin-ext"]
},
"Kameron": {
"weights": ["400", "700"],
"weights": ["400", "500", "600", "700", "variable"],
"styles": ["normal"],
"subsets": ["latin"]
"axes": [
{
"tag": "wght",
"min": 400,
"max": 700,
"defaultValue": 400
}
],
"subsets": ["latin", "latin-ext"]
},
"Kanit": {
"weights": ["100", "200", "300", "400", "500", "600", "700", "800", "900"],
Expand Down Expand Up @@ -7421,7 +7461,7 @@
"Noto Sans Bhaiksuki": {
"weights": ["400"],
"styles": ["normal"],
"subsets": ["bhaiksuki"]
"subsets": ["bhaiksuki", "latin", "latin-ext"]
},
"Noto Sans Brahmi": {
"weights": ["400"],
Expand Down Expand Up @@ -7749,9 +7789,17 @@
"subsets": ["gujarati", "latin", "latin-ext"]
},
"Noto Sans Gunjala Gondi": {
"weights": ["400"],
"weights": ["400", "500", "600", "700", "variable"],
"styles": ["normal"],
"subsets": ["gunjala-gondi"]
"axes": [
{
"tag": "wght",
"min": 400,
"max": 700,
"defaultValue": 400
}
],
"subsets": ["gunjala-gondi", "latin", "latin-ext"]
},
"Noto Sans Gurmukhi": {
"weights": [
Expand Down Expand Up @@ -8322,6 +8370,19 @@
"styles": ["normal"],
"subsets": ["latin", "latin-ext", "nko"]
},
"Noto Sans NKo Unjoined": {
"weights": ["400", "500", "600", "700", "variable"],
"styles": ["normal"],
"axes": [
{
"tag": "wght",
"min": 400,
"max": 700,
"defaultValue": 400
}
],
"subsets": ["latin", "latin-ext", "nko"]
},
"Noto Sans Nabataean": {
"weights": ["400"],
"styles": ["normal"],
Expand Down Expand Up @@ -8658,7 +8719,7 @@
"Noto Sans Symbols 2": {
"weights": ["400"],
"styles": ["normal"],
"subsets": ["latin", "latin-ext", "symbols"]
"subsets": ["braille", "latin", "latin-ext", "mayan-numerals", "symbols"]
},
"Noto Sans Syriac": {
"weights": [
Expand Down Expand Up @@ -9858,6 +9919,30 @@
"styles": ["normal"],
"subsets": ["latin", "latin-ext"]
},
"Onest": {
"weights": [
"100",
"200",
"300",
"400",
"500",
"600",
"700",
"800",
"900",
"variable"
],
"styles": ["normal"],
"axes": [
{
"tag": "wght",
"min": 100,
"max": 900,
"defaultValue": 400
}
],
"subsets": ["cyrillic", "cyrillic-ext", "latin", "latin-ext"]
},
"Oooh Baby": {
"weights": ["400"],
"styles": ["normal"],
Expand Down Expand Up @@ -10332,6 +10417,19 @@
"styles": ["normal"],
"subsets": ["latin", "latin-ext"]
},
"Pixelify Sans": {
"weights": ["400", "500", "600", "700", "variable"],
"styles": ["normal"],
"axes": [
{
"tag": "wght",
"min": 400,
"max": 700,
"defaultValue": 400
}
],
"subsets": ["cyrillic", "latin", "latin-ext"]
},
"Plaster": {
"weights": ["400"],
"styles": ["normal"],
Expand Down Expand Up @@ -13465,6 +13563,11 @@
"styles": ["normal"],
"subsets": ["cyrillic", "latin", "latin-ext", "vietnamese"]
},
"Young Serif": {
"weights": ["400"],
"styles": ["normal"],
"subsets": ["latin", "latin-ext"]
},
"Yrsa": {
"weights": ["300", "400", "500", "600", "700", "variable"],
"styles": ["normal", "italic"],
Expand Down

0 comments on commit 6d0c043

Please sign in to comment.