Skip to content

Commit

Permalink
render app pages with original url (#49198)
Browse files Browse the repository at this point in the history
### What?

Use pre-rewrite URL for rendering

### Why?

Rendering app pages needs the original user facing URL.

### Turbopack changes

* vercel/turborepo#4818 <!-- Tobias Koppers - pass
original url with content source data -->
* vercel/turborepo#4817 <!-- Tobias Koppers - avoid
errors in computing issue details -->
  • Loading branch information
sokra authored May 4, 2023
1 parent aabc1d9 commit e96fce4
Show file tree
Hide file tree
Showing 6 changed files with 49 additions and 48 deletions.
66 changes: 33 additions & 33 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 3 additions & 3 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
4 changes: 2 additions & 2 deletions packages/next-swc/crates/next-core/js/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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": "*",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
1 change: 1 addition & 0 deletions packages/next-swc/crates/next-core/js/types/turbopack.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ export type RenderData = {
params: Record<string, string | string[]>
method: string
url: string
originalUrl: string
path: string
rawQuery: string
rawHeaders: Array<[string, string]>
Expand Down
18 changes: 9 additions & 9 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit e96fce4

Please sign in to comment.