From 417ada21d591faa706c98f350b58e8fecfa1ae7a Mon Sep 17 00:00:00 2001 From: Tobias Koppers Date: Thu, 4 May 2023 10:10:23 +0000 Subject: [PATCH 1/2] render app pages with original url --- .../next-swc/crates/next-core/js/src/entry/app-renderer.tsx | 2 +- packages/next-swc/crates/next-core/js/types/turbopack.d.ts | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/packages/next-swc/crates/next-core/js/src/entry/app-renderer.tsx b/packages/next-swc/crates/next-core/js/src/entry/app-renderer.tsx index fdbea07b20562..66e16f8f105a7 100644 --- a/packages/next-swc/crates/next-core/js/src/entry/app-renderer.tsx +++ b/packages/next-swc/crates/next-core/js/src/entry/app-renderer.tsx @@ -245,7 +245,7 @@ async function runOperation(renderData: RenderData) { cssModules: {}, } const req: IncomingMessage = { - url: renderData.url, + url: renderData.originalUrl, method: renderData.method, headers: headersFromEntries(renderData.rawHeaders), } as any diff --git a/packages/next-swc/crates/next-core/js/types/turbopack.d.ts b/packages/next-swc/crates/next-core/js/types/turbopack.d.ts index cce40e027466a..9c18f88f39fac 100644 --- a/packages/next-swc/crates/next-core/js/types/turbopack.d.ts +++ b/packages/next-swc/crates/next-core/js/types/turbopack.d.ts @@ -4,6 +4,7 @@ export type RenderData = { params: Record method: string url: string + originalUrl: string path: string rawQuery: string rawHeaders: Array<[string, string]> From c7ec31765466c4720ae264f4e120e3fe9b6e2e1e Mon Sep 17 00:00:00 2001 From: Tobias Koppers Date: Thu, 4 May 2023 12:22:10 +0000 Subject: [PATCH 2/2] update turbopack --- Cargo.lock | 66 +++++++++---------- Cargo.toml | 6 +- .../next-swc/crates/next-core/js/package.json | 4 +- pnpm-lock.yaml | 18 ++--- 4 files changed, 47 insertions(+), 47 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 871e66f1d5328..7c259b851b747 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -400,7 +400,7 @@ dependencies = [ [[package]] name = "auto-hash-map" version = "0.1.0" -source = "git+https://github.com/vercel/turbo.git?tag=turbopack-230504.2#12dd16a99ac1b64b66219e593980aadc1f161352" +source = "git+https://github.com/vercel/turbo.git?tag=turbopack-230504.3#a68486bd15982ba1634a3f672d0808b061f72e28" dependencies = [ "serde", ] @@ -3413,7 +3413,7 @@ dependencies = [ [[package]] name = "node-file-trace" version = "0.1.0" -source = "git+https://github.com/vercel/turbo.git?tag=turbopack-230504.2#12dd16a99ac1b64b66219e593980aadc1f161352" +source = "git+https://github.com/vercel/turbo.git?tag=turbopack-230504.3#a68486bd15982ba1634a3f672d0808b061f72e28" dependencies = [ "anyhow", "serde", @@ -6980,7 +6980,7 @@ dependencies = [ [[package]] name = "turbo-binding" version = "0.1.0" -source = "git+https://github.com/vercel/turbo.git?tag=turbopack-230504.2#12dd16a99ac1b64b66219e593980aadc1f161352" +source = "git+https://github.com/vercel/turbo.git?tag=turbopack-230504.3#a68486bd15982ba1634a3f672d0808b061f72e28" dependencies = [ "auto-hash-map", "mdxjs", @@ -7020,7 +7020,7 @@ dependencies = [ [[package]] name = "turbo-malloc" version = "0.1.0" -source = "git+https://github.com/vercel/turbo.git?tag=turbopack-230504.2#12dd16a99ac1b64b66219e593980aadc1f161352" +source = "git+https://github.com/vercel/turbo.git?tag=turbopack-230504.3#a68486bd15982ba1634a3f672d0808b061f72e28" dependencies = [ "mimalloc", ] @@ -7028,7 +7028,7 @@ dependencies = [ [[package]] name = "turbo-tasks" version = "0.1.0" -source = "git+https://github.com/vercel/turbo.git?tag=turbopack-230504.2#12dd16a99ac1b64b66219e593980aadc1f161352" +source = "git+https://github.com/vercel/turbo.git?tag=turbopack-230504.3#a68486bd15982ba1634a3f672d0808b061f72e28" dependencies = [ "anyhow", "auto-hash-map", @@ -7058,7 +7058,7 @@ dependencies = [ [[package]] name = "turbo-tasks-build" version = "0.1.0" -source = "git+https://github.com/vercel/turbo.git?tag=turbopack-230504.2#12dd16a99ac1b64b66219e593980aadc1f161352" +source = "git+https://github.com/vercel/turbo.git?tag=turbopack-230504.3#a68486bd15982ba1634a3f672d0808b061f72e28" dependencies = [ "anyhow", "cargo-lock", @@ -7070,7 +7070,7 @@ dependencies = [ [[package]] name = "turbo-tasks-bytes" version = "0.1.0" -source = "git+https://github.com/vercel/turbo.git?tag=turbopack-230504.2#12dd16a99ac1b64b66219e593980aadc1f161352" +source = "git+https://github.com/vercel/turbo.git?tag=turbopack-230504.3#a68486bd15982ba1634a3f672d0808b061f72e28" dependencies = [ "anyhow", "bytes", @@ -7085,7 +7085,7 @@ dependencies = [ [[package]] name = "turbo-tasks-env" version = "0.1.0" -source = "git+https://github.com/vercel/turbo.git?tag=turbopack-230504.2#12dd16a99ac1b64b66219e593980aadc1f161352" +source = "git+https://github.com/vercel/turbo.git?tag=turbopack-230504.3#a68486bd15982ba1634a3f672d0808b061f72e28" dependencies = [ "anyhow", "dotenvy", @@ -7099,7 +7099,7 @@ dependencies = [ [[package]] name = "turbo-tasks-fetch" version = "0.1.0" -source = "git+https://github.com/vercel/turbo.git?tag=turbopack-230504.2#12dd16a99ac1b64b66219e593980aadc1f161352" +source = "git+https://github.com/vercel/turbo.git?tag=turbopack-230504.3#a68486bd15982ba1634a3f672d0808b061f72e28" dependencies = [ "anyhow", "indexmap", @@ -7116,7 +7116,7 @@ dependencies = [ [[package]] name = "turbo-tasks-fs" version = "0.1.0" -source = "git+https://github.com/vercel/turbo.git?tag=turbopack-230504.2#12dd16a99ac1b64b66219e593980aadc1f161352" +source = "git+https://github.com/vercel/turbo.git?tag=turbopack-230504.3#a68486bd15982ba1634a3f672d0808b061f72e28" dependencies = [ "anyhow", "auto-hash-map", @@ -7145,7 +7145,7 @@ dependencies = [ [[package]] name = "turbo-tasks-hash" version = "0.1.0" -source = "git+https://github.com/vercel/turbo.git?tag=turbopack-230504.2#12dd16a99ac1b64b66219e593980aadc1f161352" +source = "git+https://github.com/vercel/turbo.git?tag=turbopack-230504.3#a68486bd15982ba1634a3f672d0808b061f72e28" dependencies = [ "base16", "hex", @@ -7157,7 +7157,7 @@ dependencies = [ [[package]] name = "turbo-tasks-macros" version = "0.1.0" -source = "git+https://github.com/vercel/turbo.git?tag=turbopack-230504.2#12dd16a99ac1b64b66219e593980aadc1f161352" +source = "git+https://github.com/vercel/turbo.git?tag=turbopack-230504.3#a68486bd15982ba1634a3f672d0808b061f72e28" dependencies = [ "anyhow", "convert_case 0.6.0", @@ -7171,7 +7171,7 @@ dependencies = [ [[package]] name = "turbo-tasks-macros-shared" version = "0.1.0" -source = "git+https://github.com/vercel/turbo.git?tag=turbopack-230504.2#12dd16a99ac1b64b66219e593980aadc1f161352" +source = "git+https://github.com/vercel/turbo.git?tag=turbopack-230504.3#a68486bd15982ba1634a3f672d0808b061f72e28" dependencies = [ "proc-macro2", "quote", @@ -7181,7 +7181,7 @@ dependencies = [ [[package]] name = "turbo-tasks-memory" version = "0.1.0" -source = "git+https://github.com/vercel/turbo.git?tag=turbopack-230504.2#12dd16a99ac1b64b66219e593980aadc1f161352" +source = "git+https://github.com/vercel/turbo.git?tag=turbopack-230504.3#a68486bd15982ba1634a3f672d0808b061f72e28" dependencies = [ "anyhow", "auto-hash-map", @@ -7203,7 +7203,7 @@ dependencies = [ [[package]] name = "turbo-tasks-testing" version = "0.1.0" -source = "git+https://github.com/vercel/turbo.git?tag=turbopack-230504.2#12dd16a99ac1b64b66219e593980aadc1f161352" +source = "git+https://github.com/vercel/turbo.git?tag=turbopack-230504.3#a68486bd15982ba1634a3f672d0808b061f72e28" dependencies = [ "anyhow", "auto-hash-map", @@ -7215,7 +7215,7 @@ dependencies = [ [[package]] name = "turbopack" version = "0.1.0" -source = "git+https://github.com/vercel/turbo.git?tag=turbopack-230504.2#12dd16a99ac1b64b66219e593980aadc1f161352" +source = "git+https://github.com/vercel/turbo.git?tag=turbopack-230504.3#a68486bd15982ba1634a3f672d0808b061f72e28" dependencies = [ "anyhow", "async-recursion", @@ -7244,7 +7244,7 @@ dependencies = [ [[package]] name = "turbopack-bench" version = "0.1.0" -source = "git+https://github.com/vercel/turbo.git?tag=turbopack-230504.2#12dd16a99ac1b64b66219e593980aadc1f161352" +source = "git+https://github.com/vercel/turbo.git?tag=turbopack-230504.3#a68486bd15982ba1634a3f672d0808b061f72e28" dependencies = [ "anyhow", "chromiumoxide", @@ -7274,7 +7274,7 @@ dependencies = [ [[package]] name = "turbopack-cli-utils" version = "0.1.0" -source = "git+https://github.com/vercel/turbo.git?tag=turbopack-230504.2#12dd16a99ac1b64b66219e593980aadc1f161352" +source = "git+https://github.com/vercel/turbo.git?tag=turbopack-230504.3#a68486bd15982ba1634a3f672d0808b061f72e28" dependencies = [ "anyhow", "clap 4.1.11", @@ -7291,7 +7291,7 @@ dependencies = [ [[package]] name = "turbopack-core" version = "0.1.0" -source = "git+https://github.com/vercel/turbo.git?tag=turbopack-230504.2#12dd16a99ac1b64b66219e593980aadc1f161352" +source = "git+https://github.com/vercel/turbo.git?tag=turbopack-230504.3#a68486bd15982ba1634a3f672d0808b061f72e28" dependencies = [ "anyhow", "async-trait", @@ -7318,7 +7318,7 @@ dependencies = [ [[package]] name = "turbopack-create-test-app" version = "0.1.0" -source = "git+https://github.com/vercel/turbo.git?tag=turbopack-230504.2#12dd16a99ac1b64b66219e593980aadc1f161352" +source = "git+https://github.com/vercel/turbo.git?tag=turbopack-230504.3#a68486bd15982ba1634a3f672d0808b061f72e28" dependencies = [ "anyhow", "clap 4.1.11", @@ -7331,7 +7331,7 @@ dependencies = [ [[package]] name = "turbopack-css" version = "0.1.0" -source = "git+https://github.com/vercel/turbo.git?tag=turbopack-230504.2#12dd16a99ac1b64b66219e593980aadc1f161352" +source = "git+https://github.com/vercel/turbo.git?tag=turbopack-230504.3#a68486bd15982ba1634a3f672d0808b061f72e28" dependencies = [ "anyhow", "async-trait", @@ -7353,7 +7353,7 @@ dependencies = [ [[package]] name = "turbopack-dev" version = "0.1.0" -source = "git+https://github.com/vercel/turbo.git?tag=turbopack-230504.2#12dd16a99ac1b64b66219e593980aadc1f161352" +source = "git+https://github.com/vercel/turbo.git?tag=turbopack-230504.3#a68486bd15982ba1634a3f672d0808b061f72e28" dependencies = [ "anyhow", "indexmap", @@ -7374,7 +7374,7 @@ dependencies = [ [[package]] name = "turbopack-dev-server" version = "0.1.0" -source = "git+https://github.com/vercel/turbo.git?tag=turbopack-230504.2#12dd16a99ac1b64b66219e593980aadc1f161352" +source = "git+https://github.com/vercel/turbo.git?tag=turbopack-230504.3#a68486bd15982ba1634a3f672d0808b061f72e28" dependencies = [ "anyhow", "async-compression", @@ -7408,7 +7408,7 @@ dependencies = [ [[package]] name = "turbopack-ecmascript" version = "0.1.0" -source = "git+https://github.com/vercel/turbo.git?tag=turbopack-230504.2#12dd16a99ac1b64b66219e593980aadc1f161352" +source = "git+https://github.com/vercel/turbo.git?tag=turbopack-230504.3#a68486bd15982ba1634a3f672d0808b061f72e28" dependencies = [ "anyhow", "async-trait", @@ -7444,7 +7444,7 @@ dependencies = [ [[package]] name = "turbopack-ecmascript-plugins" version = "0.1.0" -source = "git+https://github.com/vercel/turbo.git?tag=turbopack-230504.2#12dd16a99ac1b64b66219e593980aadc1f161352" +source = "git+https://github.com/vercel/turbo.git?tag=turbopack-230504.3#a68486bd15982ba1634a3f672d0808b061f72e28" dependencies = [ "anyhow", "serde", @@ -7458,7 +7458,7 @@ dependencies = [ [[package]] name = "turbopack-env" version = "0.1.0" -source = "git+https://github.com/vercel/turbo.git?tag=turbopack-230504.2#12dd16a99ac1b64b66219e593980aadc1f161352" +source = "git+https://github.com/vercel/turbo.git?tag=turbopack-230504.3#a68486bd15982ba1634a3f672d0808b061f72e28" dependencies = [ "anyhow", "indexmap", @@ -7474,7 +7474,7 @@ dependencies = [ [[package]] name = "turbopack-image" version = "0.1.0" -source = "git+https://github.com/vercel/turbo.git?tag=turbopack-230504.2#12dd16a99ac1b64b66219e593980aadc1f161352" +source = "git+https://github.com/vercel/turbo.git?tag=turbopack-230504.3#a68486bd15982ba1634a3f672d0808b061f72e28" dependencies = [ "anyhow", "base64 0.21.0", @@ -7494,7 +7494,7 @@ dependencies = [ [[package]] name = "turbopack-json" version = "0.1.0" -source = "git+https://github.com/vercel/turbo.git?tag=turbopack-230504.2#12dd16a99ac1b64b66219e593980aadc1f161352" +source = "git+https://github.com/vercel/turbo.git?tag=turbopack-230504.3#a68486bd15982ba1634a3f672d0808b061f72e28" dependencies = [ "anyhow", "serde", @@ -7509,7 +7509,7 @@ dependencies = [ [[package]] name = "turbopack-mdx" version = "0.1.0" -source = "git+https://github.com/vercel/turbo.git?tag=turbopack-230504.2#12dd16a99ac1b64b66219e593980aadc1f161352" +source = "git+https://github.com/vercel/turbo.git?tag=turbopack-230504.3#a68486bd15982ba1634a3f672d0808b061f72e28" dependencies = [ "anyhow", "mdxjs", @@ -7524,7 +7524,7 @@ dependencies = [ [[package]] name = "turbopack-node" version = "0.1.0" -source = "git+https://github.com/vercel/turbo.git?tag=turbopack-230504.2#12dd16a99ac1b64b66219e593980aadc1f161352" +source = "git+https://github.com/vercel/turbo.git?tag=turbopack-230504.3#a68486bd15982ba1634a3f672d0808b061f72e28" dependencies = [ "anyhow", "async-stream", @@ -7558,7 +7558,7 @@ dependencies = [ [[package]] name = "turbopack-static" version = "0.1.0" -source = "git+https://github.com/vercel/turbo.git?tag=turbopack-230504.2#12dd16a99ac1b64b66219e593980aadc1f161352" +source = "git+https://github.com/vercel/turbo.git?tag=turbopack-230504.3#a68486bd15982ba1634a3f672d0808b061f72e28" dependencies = [ "anyhow", "serde", @@ -7574,7 +7574,7 @@ dependencies = [ [[package]] name = "turbopack-swc-utils" version = "0.1.0" -source = "git+https://github.com/vercel/turbo.git?tag=turbopack-230504.2#12dd16a99ac1b64b66219e593980aadc1f161352" +source = "git+https://github.com/vercel/turbo.git?tag=turbopack-230504.3#a68486bd15982ba1634a3f672d0808b061f72e28" dependencies = [ "swc_core", "turbo-tasks", @@ -7585,7 +7585,7 @@ dependencies = [ [[package]] name = "turbopack-test-utils" version = "0.1.0" -source = "git+https://github.com/vercel/turbo.git?tag=turbopack-230504.2#12dd16a99ac1b64b66219e593980aadc1f161352" +source = "git+https://github.com/vercel/turbo.git?tag=turbopack-230504.3#a68486bd15982ba1634a3f672d0808b061f72e28" dependencies = [ "anyhow", "once_cell", diff --git a/Cargo.toml b/Cargo.toml index 4d4e2bf97c80b..3b62544bad664 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -42,11 +42,11 @@ swc_relay = { version = "0.2.7" } testing = { version = "0.33.6" } # Turbo crates -turbo-binding = { git = "https://github.com/vercel/turbo.git", tag = "turbopack-230504.2" } +turbo-binding = { git = "https://github.com/vercel/turbo.git", tag = "turbopack-230504.3" } # [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-230504.2" } +turbo-tasks = { git = "https://github.com/vercel/turbo.git", tag = "turbopack-230504.3" } # [TODO]: need to refactor embed_directory! macro usage in next-core -turbo-tasks-fs = { git = "https://github.com/vercel/turbo.git", tag = "turbopack-230504.2" } +turbo-tasks-fs = { git = "https://github.com/vercel/turbo.git", tag = "turbopack-230504.3" } # General Deps diff --git a/packages/next-swc/crates/next-core/js/package.json b/packages/next-swc/crates/next-core/js/package.json index ecce114c6aecc..caf5358aa63e5 100644 --- a/packages/next-swc/crates/next-core/js/package.json +++ b/packages/next-swc/crates/next-core/js/package.json @@ -10,8 +10,8 @@ "check": "tsc --noEmit" }, "dependencies": { - "@vercel/turbopack-dev": "https://gitpkg.vercel.app/vercel/turbo/crates/turbopack-dev/js?turbopack-230504.2", - "@vercel/turbopack-node": "https://gitpkg.vercel.app/vercel/turbo/crates/turbopack-node/js?turbopack-230504.2", + "@vercel/turbopack-dev": "https://gitpkg.vercel.app/vercel/turbo/crates/turbopack-dev/js?turbopack-230504.3", + "@vercel/turbopack-node": "https://gitpkg.vercel.app/vercel/turbo/crates/turbopack-node/js?turbopack-230504.3", "anser": "^2.1.1", "css.escape": "^1.5.1", "next": "*", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 0c34db880b09b..7ebaedaeb963c 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -1020,8 +1020,8 @@ importers: '@types/react': 18.0.37 '@types/react-dom': 18.0.11 '@vercel/ncc': ^0.36.0 - '@vercel/turbopack-dev': https://gitpkg.vercel.app/vercel/turbo/crates/turbopack-dev/js?turbopack-230504.2 - '@vercel/turbopack-node': https://gitpkg.vercel.app/vercel/turbo/crates/turbopack-node/js?turbopack-230504.2 + '@vercel/turbopack-dev': https://gitpkg.vercel.app/vercel/turbo/crates/turbopack-dev/js?turbopack-230504.3 + '@vercel/turbopack-node': https://gitpkg.vercel.app/vercel/turbo/crates/turbopack-node/js?turbopack-230504.3 anser: ^2.1.1 css.escape: ^1.5.1 find-up: ^6.3.0 @@ -1033,8 +1033,8 @@ importers: stacktrace-parser: ^0.1.10 strip-ansi: ^7.0.1 dependencies: - '@vercel/turbopack-dev': '@gitpkg.vercel.app/vercel/turbo/crates/turbopack-dev/js?turbopack-230504.2_react-refresh@0.12.0' - '@vercel/turbopack-node': '@gitpkg.vercel.app/vercel/turbo/crates/turbopack-node/js?turbopack-230504.2' + '@vercel/turbopack-dev': '@gitpkg.vercel.app/vercel/turbo/crates/turbopack-dev/js?turbopack-230504.3_react-refresh@0.12.0' + '@vercel/turbopack-node': '@gitpkg.vercel.app/vercel/turbo/crates/turbopack-node/js?turbopack-230504.3' anser: 2.1.1 css.escape: 1.5.1 next: link:../../../../next @@ -25592,9 +25592,9 @@ packages: /zwitch/2.0.4: resolution: {integrity: sha512-bXE4cR/kVZhKZX/RjPEflHaKVhUVl85noU3v6b8apfQEc1x4A+zBxjZ4lN8LqGd6WZ3dl98pY4o717VFmoPp+A==} - '@gitpkg.vercel.app/vercel/turbo/crates/turbopack-dev/js?turbopack-230504.2_react-refresh@0.12.0': - resolution: {tarball: https://gitpkg.vercel.app/vercel/turbo/crates/turbopack-dev/js?turbopack-230504.2} - id: '@gitpkg.vercel.app/vercel/turbo/crates/turbopack-dev/js?turbopack-230504.2' + '@gitpkg.vercel.app/vercel/turbo/crates/turbopack-dev/js?turbopack-230504.3_react-refresh@0.12.0': + resolution: {tarball: https://gitpkg.vercel.app/vercel/turbo/crates/turbopack-dev/js?turbopack-230504.3} + id: '@gitpkg.vercel.app/vercel/turbo/crates/turbopack-dev/js?turbopack-230504.3' name: '@vercel/turbopack-dev' version: 0.0.0 dependencies: @@ -25604,8 +25604,8 @@ packages: - webpack dev: false - '@gitpkg.vercel.app/vercel/turbo/crates/turbopack-node/js?turbopack-230504.2': - resolution: {tarball: https://gitpkg.vercel.app/vercel/turbo/crates/turbopack-node/js?turbopack-230504.2} + '@gitpkg.vercel.app/vercel/turbo/crates/turbopack-node/js?turbopack-230504.3': + resolution: {tarball: https://gitpkg.vercel.app/vercel/turbo/crates/turbopack-node/js?turbopack-230504.3} name: '@vercel/turbopack-node' version: 0.0.0 dependencies: