diff --git a/Cargo.lock b/Cargo.lock index a143c06e75d01..9a1a7f76b2462 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -321,7 +321,7 @@ dependencies = [ [[package]] name = "auto-hash-map" version = "0.1.0" -source = "git+https://github.com/vercel/turbo.git?tag=turbopack-240216.2#d6aadf377226db84a4c222b6bde2415516a2e501" +source = "git+https://github.com/vercel/turbo.git?tag=turbopack-240219.1#7b77d1b56339c5a976f75029c1e8e2bf593e8691" dependencies = [ "serde", "smallvec", @@ -3421,7 +3421,7 @@ dependencies = [ [[package]] name = "node-file-trace" version = "0.1.0" -source = "git+https://github.com/vercel/turbo.git?tag=turbopack-240216.2#d6aadf377226db84a4c222b6bde2415516a2e501" +source = "git+https://github.com/vercel/turbo.git?tag=turbopack-240219.1#7b77d1b56339c5a976f75029c1e8e2bf593e8691" dependencies = [ "anyhow", "serde", @@ -7408,7 +7408,7 @@ dependencies = [ [[package]] name = "turbo-tasks" version = "0.1.0" -source = "git+https://github.com/vercel/turbo.git?tag=turbopack-240216.2#d6aadf377226db84a4c222b6bde2415516a2e501" +source = "git+https://github.com/vercel/turbo.git?tag=turbopack-240219.1#7b77d1b56339c5a976f75029c1e8e2bf593e8691" dependencies = [ "anyhow", "async-trait", @@ -7440,7 +7440,7 @@ dependencies = [ [[package]] name = "turbo-tasks-build" version = "0.1.0" -source = "git+https://github.com/vercel/turbo.git?tag=turbopack-240216.2#d6aadf377226db84a4c222b6bde2415516a2e501" +source = "git+https://github.com/vercel/turbo.git?tag=turbopack-240219.1#7b77d1b56339c5a976f75029c1e8e2bf593e8691" dependencies = [ "anyhow", "cargo-lock", @@ -7452,7 +7452,7 @@ dependencies = [ [[package]] name = "turbo-tasks-bytes" version = "0.1.0" -source = "git+https://github.com/vercel/turbo.git?tag=turbopack-240216.2#d6aadf377226db84a4c222b6bde2415516a2e501" +source = "git+https://github.com/vercel/turbo.git?tag=turbopack-240219.1#7b77d1b56339c5a976f75029c1e8e2bf593e8691" dependencies = [ "anyhow", "bytes", @@ -7467,7 +7467,7 @@ dependencies = [ [[package]] name = "turbo-tasks-env" version = "0.1.0" -source = "git+https://github.com/vercel/turbo.git?tag=turbopack-240216.2#d6aadf377226db84a4c222b6bde2415516a2e501" +source = "git+https://github.com/vercel/turbo.git?tag=turbopack-240219.1#7b77d1b56339c5a976f75029c1e8e2bf593e8691" dependencies = [ "anyhow", "dotenvs", @@ -7481,7 +7481,7 @@ dependencies = [ [[package]] name = "turbo-tasks-fetch" version = "0.1.0" -source = "git+https://github.com/vercel/turbo.git?tag=turbopack-240216.2#d6aadf377226db84a4c222b6bde2415516a2e501" +source = "git+https://github.com/vercel/turbo.git?tag=turbopack-240219.1#7b77d1b56339c5a976f75029c1e8e2bf593e8691" dependencies = [ "anyhow", "indexmap 1.9.3", @@ -7498,7 +7498,7 @@ dependencies = [ [[package]] name = "turbo-tasks-fs" version = "0.1.0" -source = "git+https://github.com/vercel/turbo.git?tag=turbopack-240216.2#d6aadf377226db84a4c222b6bde2415516a2e501" +source = "git+https://github.com/vercel/turbo.git?tag=turbopack-240219.1#7b77d1b56339c5a976f75029c1e8e2bf593e8691" dependencies = [ "anyhow", "auto-hash-map", @@ -7529,7 +7529,7 @@ dependencies = [ [[package]] name = "turbo-tasks-hash" version = "0.1.0" -source = "git+https://github.com/vercel/turbo.git?tag=turbopack-240216.2#d6aadf377226db84a4c222b6bde2415516a2e501" +source = "git+https://github.com/vercel/turbo.git?tag=turbopack-240219.1#7b77d1b56339c5a976f75029c1e8e2bf593e8691" dependencies = [ "base16", "hex", @@ -7541,7 +7541,7 @@ dependencies = [ [[package]] name = "turbo-tasks-macros" version = "0.1.0" -source = "git+https://github.com/vercel/turbo.git?tag=turbopack-240216.2#d6aadf377226db84a4c222b6bde2415516a2e501" +source = "git+https://github.com/vercel/turbo.git?tag=turbopack-240219.1#7b77d1b56339c5a976f75029c1e8e2bf593e8691" dependencies = [ "anyhow", "convert_case 0.6.0", @@ -7555,7 +7555,7 @@ dependencies = [ [[package]] name = "turbo-tasks-macros-shared" version = "0.1.0" -source = "git+https://github.com/vercel/turbo.git?tag=turbopack-240216.2#d6aadf377226db84a4c222b6bde2415516a2e501" +source = "git+https://github.com/vercel/turbo.git?tag=turbopack-240219.1#7b77d1b56339c5a976f75029c1e8e2bf593e8691" dependencies = [ "proc-macro2", "quote", @@ -7565,7 +7565,7 @@ dependencies = [ [[package]] name = "turbo-tasks-malloc" version = "0.1.0" -source = "git+https://github.com/vercel/turbo.git?tag=turbopack-240216.2#d6aadf377226db84a4c222b6bde2415516a2e501" +source = "git+https://github.com/vercel/turbo.git?tag=turbopack-240219.1#7b77d1b56339c5a976f75029c1e8e2bf593e8691" dependencies = [ "mimalloc", ] @@ -7573,7 +7573,7 @@ dependencies = [ [[package]] name = "turbo-tasks-memory" version = "0.1.0" -source = "git+https://github.com/vercel/turbo.git?tag=turbopack-240216.2#d6aadf377226db84a4c222b6bde2415516a2e501" +source = "git+https://github.com/vercel/turbo.git?tag=turbopack-240219.1#7b77d1b56339c5a976f75029c1e8e2bf593e8691" dependencies = [ "anyhow", "auto-hash-map", @@ -7598,7 +7598,7 @@ dependencies = [ [[package]] name = "turbopack" version = "0.1.0" -source = "git+https://github.com/vercel/turbo.git?tag=turbopack-240216.2#d6aadf377226db84a4c222b6bde2415516a2e501" +source = "git+https://github.com/vercel/turbo.git?tag=turbopack-240219.1#7b77d1b56339c5a976f75029c1e8e2bf593e8691" dependencies = [ "anyhow", "async-recursion", @@ -7630,7 +7630,7 @@ dependencies = [ [[package]] name = "turbopack-binding" version = "0.1.0" -source = "git+https://github.com/vercel/turbo.git?tag=turbopack-240216.2#d6aadf377226db84a4c222b6bde2415516a2e501" +source = "git+https://github.com/vercel/turbo.git?tag=turbopack-240219.1#7b77d1b56339c5a976f75029c1e8e2bf593e8691" dependencies = [ "auto-hash-map", "mdxjs", @@ -7671,7 +7671,7 @@ dependencies = [ [[package]] name = "turbopack-build" version = "0.1.0" -source = "git+https://github.com/vercel/turbo.git?tag=turbopack-240216.2#d6aadf377226db84a4c222b6bde2415516a2e501" +source = "git+https://github.com/vercel/turbo.git?tag=turbopack-240219.1#7b77d1b56339c5a976f75029c1e8e2bf593e8691" dependencies = [ "anyhow", "indexmap 1.9.3", @@ -7696,7 +7696,7 @@ dependencies = [ [[package]] name = "turbopack-cli-utils" version = "0.1.0" -source = "git+https://github.com/vercel/turbo.git?tag=turbopack-240216.2#d6aadf377226db84a4c222b6bde2415516a2e501" +source = "git+https://github.com/vercel/turbo.git?tag=turbopack-240219.1#7b77d1b56339c5a976f75029c1e8e2bf593e8691" dependencies = [ "anyhow", "clap 4.4.2", @@ -7714,7 +7714,7 @@ dependencies = [ [[package]] name = "turbopack-core" version = "0.1.0" -source = "git+https://github.com/vercel/turbo.git?tag=turbopack-240216.2#d6aadf377226db84a4c222b6bde2415516a2e501" +source = "git+https://github.com/vercel/turbo.git?tag=turbopack-240219.1#7b77d1b56339c5a976f75029c1e8e2bf593e8691" dependencies = [ "anyhow", "async-recursion", @@ -7745,7 +7745,7 @@ dependencies = [ [[package]] name = "turbopack-css" version = "0.1.0" -source = "git+https://github.com/vercel/turbo.git?tag=turbopack-240216.2#d6aadf377226db84a4c222b6bde2415516a2e501" +source = "git+https://github.com/vercel/turbo.git?tag=turbopack-240219.1#7b77d1b56339c5a976f75029c1e8e2bf593e8691" dependencies = [ "anyhow", "async-trait", @@ -7773,7 +7773,7 @@ dependencies = [ [[package]] name = "turbopack-dev" version = "0.1.0" -source = "git+https://github.com/vercel/turbo.git?tag=turbopack-240216.2#d6aadf377226db84a4c222b6bde2415516a2e501" +source = "git+https://github.com/vercel/turbo.git?tag=turbopack-240219.1#7b77d1b56339c5a976f75029c1e8e2bf593e8691" dependencies = [ "anyhow", "indexmap 1.9.3", @@ -7798,7 +7798,7 @@ dependencies = [ [[package]] name = "turbopack-dev-server" version = "0.1.0" -source = "git+https://github.com/vercel/turbo.git?tag=turbopack-240216.2#d6aadf377226db84a4c222b6bde2415516a2e501" +source = "git+https://github.com/vercel/turbo.git?tag=turbopack-240219.1#7b77d1b56339c5a976f75029c1e8e2bf593e8691" dependencies = [ "anyhow", "async-compression", @@ -7835,7 +7835,7 @@ dependencies = [ [[package]] name = "turbopack-ecmascript" version = "0.1.0" -source = "git+https://github.com/vercel/turbo.git?tag=turbopack-240216.2#d6aadf377226db84a4c222b6bde2415516a2e501" +source = "git+https://github.com/vercel/turbo.git?tag=turbopack-240219.1#7b77d1b56339c5a976f75029c1e8e2bf593e8691" dependencies = [ "anyhow", "async-trait", @@ -7871,7 +7871,7 @@ dependencies = [ [[package]] name = "turbopack-ecmascript-hmr-protocol" version = "0.1.0" -source = "git+https://github.com/vercel/turbo.git?tag=turbopack-240216.2#d6aadf377226db84a4c222b6bde2415516a2e501" +source = "git+https://github.com/vercel/turbo.git?tag=turbopack-240219.1#7b77d1b56339c5a976f75029c1e8e2bf593e8691" dependencies = [ "serde", "serde_json", @@ -7882,7 +7882,7 @@ dependencies = [ [[package]] name = "turbopack-ecmascript-plugins" version = "0.1.0" -source = "git+https://github.com/vercel/turbo.git?tag=turbopack-240216.2#d6aadf377226db84a4c222b6bde2415516a2e501" +source = "git+https://github.com/vercel/turbo.git?tag=turbopack-240219.1#7b77d1b56339c5a976f75029c1e8e2bf593e8691" dependencies = [ "anyhow", "async-trait", @@ -7907,7 +7907,7 @@ dependencies = [ [[package]] name = "turbopack-ecmascript-runtime" version = "0.1.0" -source = "git+https://github.com/vercel/turbo.git?tag=turbopack-240216.2#d6aadf377226db84a4c222b6bde2415516a2e501" +source = "git+https://github.com/vercel/turbo.git?tag=turbopack-240219.1#7b77d1b56339c5a976f75029c1e8e2bf593e8691" dependencies = [ "anyhow", "indoc", @@ -7924,7 +7924,7 @@ dependencies = [ [[package]] name = "turbopack-env" version = "0.1.0" -source = "git+https://github.com/vercel/turbo.git?tag=turbopack-240216.2#d6aadf377226db84a4c222b6bde2415516a2e501" +source = "git+https://github.com/vercel/turbo.git?tag=turbopack-240219.1#7b77d1b56339c5a976f75029c1e8e2bf593e8691" dependencies = [ "anyhow", "indexmap 1.9.3", @@ -7940,7 +7940,7 @@ dependencies = [ [[package]] name = "turbopack-image" version = "0.1.0" -source = "git+https://github.com/vercel/turbo.git?tag=turbopack-240216.2#d6aadf377226db84a4c222b6bde2415516a2e501" +source = "git+https://github.com/vercel/turbo.git?tag=turbopack-240219.1#7b77d1b56339c5a976f75029c1e8e2bf593e8691" dependencies = [ "anyhow", "base64 0.21.4", @@ -7960,7 +7960,7 @@ dependencies = [ [[package]] name = "turbopack-json" version = "0.1.0" -source = "git+https://github.com/vercel/turbo.git?tag=turbopack-240216.2#d6aadf377226db84a4c222b6bde2415516a2e501" +source = "git+https://github.com/vercel/turbo.git?tag=turbopack-240219.1#7b77d1b56339c5a976f75029c1e8e2bf593e8691" dependencies = [ "anyhow", "serde", @@ -7975,7 +7975,7 @@ dependencies = [ [[package]] name = "turbopack-mdx" version = "0.1.0" -source = "git+https://github.com/vercel/turbo.git?tag=turbopack-240216.2#d6aadf377226db84a4c222b6bde2415516a2e501" +source = "git+https://github.com/vercel/turbo.git?tag=turbopack-240219.1#7b77d1b56339c5a976f75029c1e8e2bf593e8691" dependencies = [ "anyhow", "mdxjs", @@ -7990,7 +7990,7 @@ dependencies = [ [[package]] name = "turbopack-node" version = "0.1.0" -source = "git+https://github.com/vercel/turbo.git?tag=turbopack-240216.2#d6aadf377226db84a4c222b6bde2415516a2e501" +source = "git+https://github.com/vercel/turbo.git?tag=turbopack-240219.1#7b77d1b56339c5a976f75029c1e8e2bf593e8691" dependencies = [ "anyhow", "async-stream", @@ -8025,7 +8025,7 @@ dependencies = [ [[package]] name = "turbopack-static" version = "0.1.0" -source = "git+https://github.com/vercel/turbo.git?tag=turbopack-240216.2#d6aadf377226db84a4c222b6bde2415516a2e501" +source = "git+https://github.com/vercel/turbo.git?tag=turbopack-240219.1#7b77d1b56339c5a976f75029c1e8e2bf593e8691" dependencies = [ "anyhow", "serde", @@ -8041,7 +8041,7 @@ dependencies = [ [[package]] name = "turbopack-swc-utils" version = "0.1.0" -source = "git+https://github.com/vercel/turbo.git?tag=turbopack-240216.2#d6aadf377226db84a4c222b6bde2415516a2e501" +source = "git+https://github.com/vercel/turbo.git?tag=turbopack-240219.1#7b77d1b56339c5a976f75029c1e8e2bf593e8691" dependencies = [ "swc_core", "turbo-tasks", @@ -8052,7 +8052,7 @@ dependencies = [ [[package]] name = "turbopack-trace-utils" version = "0.1.0" -source = "git+https://github.com/vercel/turbo.git?tag=turbopack-240216.2#d6aadf377226db84a4c222b6bde2415516a2e501" +source = "git+https://github.com/vercel/turbo.git?tag=turbopack-240219.1#7b77d1b56339c5a976f75029c1e8e2bf593e8691" dependencies = [ "anyhow", "crossbeam-channel", @@ -8068,7 +8068,7 @@ dependencies = [ [[package]] name = "turbopack-wasm" version = "0.1.0" -source = "git+https://github.com/vercel/turbo.git?tag=turbopack-240216.2#d6aadf377226db84a4c222b6bde2415516a2e501" +source = "git+https://github.com/vercel/turbo.git?tag=turbopack-240219.1#7b77d1b56339c5a976f75029c1e8e2bf593e8691" dependencies = [ "anyhow", "indexmap 1.9.3", diff --git a/Cargo.toml b/Cargo.toml index 1da256202e756..a6a524dd87d63 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -37,11 +37,11 @@ swc_core = { version = "0.90.8", features = [ testing = { version = "0.35.18" } # Turbo crates -turbopack-binding = { git = "https://github.com/vercel/turbo.git", tag = "turbopack-240216.2" } +turbopack-binding = { git = "https://github.com/vercel/turbo.git", tag = "turbopack-240219.1" } # [TODO]: need to refactor embed_directory! macro usages, as well as resolving turbo_tasks::function, macros.. -turbo-tasks = { git = "https://github.com/vercel/turbo.git", tag = "turbopack-240216.2" } +turbo-tasks = { git = "https://github.com/vercel/turbo.git", tag = "turbopack-240219.1" } # [TODO]: need to refactor embed_directory! macro usage in next-core -turbo-tasks-fs = { git = "https://github.com/vercel/turbo.git", tag = "turbopack-240216.2" } +turbo-tasks-fs = { git = "https://github.com/vercel/turbo.git", tag = "turbopack-240219.1" } # General Deps diff --git a/docs/02-app/01-building-your-application/01-routing/02-pages-and-layouts.mdx b/docs/02-app/01-building-your-application/01-routing/02-pages-and-layouts.mdx index 9a3e22f6157a6..4c326d59d2005 100644 --- a/docs/02-app/01-building-your-application/01-routing/02-pages-and-layouts.mdx +++ b/docs/02-app/01-building-your-application/01-routing/02-pages-and-layouts.mdx @@ -5,7 +5,7 @@ description: Create your first page and shared layout with the App Router. > We recommend reading the [Routing Fundamentals](/docs/app/building-your-application/routing) and [Defining Routes](/docs/app/building-your-application/routing/defining-routes) pages before continuing. -The special files [layout.js](#layouts), [pages.js](#pages), and [template.js](#templates) allow you to create UI for a [route](/docs/app/building-your-application/routing/defining-routes#creating-routes). This page will guide you through how and when to use these special files. +The special files [layout.js](#layouts), [page.js](#pages), and [template.js](#templates) allow you to create UI for a [route](/docs/app/building-your-application/routing/defining-routes#creating-routes). This page will guide you through how and when to use these special files. ## Pages diff --git a/examples/with-supabase/app/auth/callback/route.ts b/examples/with-supabase/app/auth/callback/route.ts index c30a560eb9c4b..b3877c6516af4 100644 --- a/examples/with-supabase/app/auth/callback/route.ts +++ b/examples/with-supabase/app/auth/callback/route.ts @@ -7,12 +7,13 @@ export async function GET(request: Request) { // https://supabase.com/docs/guides/auth/server-side/nextjs const requestUrl = new URL(request.url); const code = requestUrl.searchParams.get("code"); + const origin = requestUrl.origin; if (code) { const supabase = createClient(); await supabase.auth.exchangeCodeForSession(code); } - // URL to redirect to after sign in process completes - return NextResponse.redirect(requestUrl.origin); + // URL to redirect to after sign up process completes + return NextResponse.redirect(`${origin}/protected`); } diff --git a/examples/with-supabase/app/login/page.tsx b/examples/with-supabase/app/login/page.tsx index 43af1f669076e..7358f05420d84 100644 --- a/examples/with-supabase/app/login/page.tsx +++ b/examples/with-supabase/app/login/page.tsx @@ -2,6 +2,7 @@ import Link from "next/link"; import { headers } from "next/headers"; import { createClient } from "@/utils/supabase/server"; import { redirect } from "next/navigation"; +import { SubmitButton } from "./submit-button"; export default function Login({ searchParams, @@ -24,7 +25,7 @@ export default function Login({ return redirect("/login?message=Could not authenticate user"); } - return redirect("/"); + return redirect("/protected"); }; const signUp = async (formData: FormData) => { @@ -73,10 +74,7 @@ export default function Login({ Back -