Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

update turbopack #54768

Merged
merged 2 commits into from
Aug 30, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
74 changes: 37 additions & 37 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 @@ -46,11 +46,11 @@ swc_core = { version = "0.79.70" }
testing = { version = "0.33.24" }

# Turbo crates
turbopack-binding = { git = "https://github.com/vercel/turbo.git", tag = "turbopack-230825.2" }
turbopack-binding = { git = "https://github.com/vercel/turbo.git", tag = "turbopack-230829.2" }
# [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-230825.2" }
turbo-tasks = { git = "https://github.com/vercel/turbo.git", tag = "turbopack-230829.2" }
# [TODO]: need to refactor embed_directory! macro usage in next-core
turbo-tasks-fs = { git = "https://github.com/vercel/turbo.git", tag = "turbopack-230825.2" }
turbo-tasks-fs = { git = "https://github.com/vercel/turbo.git", tag = "turbopack-230829.2" }

# 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-ecmascript-runtime": "https://gitpkg-fork.vercel.sh/vercel/turbo/crates/turbopack-ecmascript-runtime/js?turbopack-230825.2",
"@vercel/turbopack-node": "https://gitpkg-fork.vercel.sh/vercel/turbo/crates/turbopack-node/js?turbopack-230825.2",
"@vercel/turbopack-ecmascript-runtime": "https://gitpkg-fork.vercel.sh/vercel/turbo/crates/turbopack-ecmascript-runtime/js?turbopack-230829.2",
"@vercel/turbopack-node": "https://gitpkg-fork.vercel.sh/vercel/turbo/crates/turbopack-node/js?turbopack-230829.2",
"anser": "^2.1.1",
"css.escape": "^1.5.1",
"next": "*",
Expand Down
9 changes: 7 additions & 2 deletions packages/next-swc/crates/next-core/js/src/dev/client.ts
Original file line number Diff line number Diff line change
@@ -1,10 +1,15 @@
import { connect } from '@vercel/turbopack-ecmascript-runtime/dev/client/hmr-client'
import { connectHMR } from '@vercel/turbopack-ecmascript-runtime/dev/client/websocket'
import {
connectHMR,
addMessageListener,
sendMessage,
} from '@vercel/turbopack-ecmascript-runtime/dev/client/websocket'
import { register, ReactDevOverlay } from '../overlay/client'

export function initializeHMR(options: { assetPrefix: string }) {
connect({
assetPrefix: options.assetPrefix,
addMessageListener,
sendMessage,
})
connectHMR({
assetPrefix: options.assetPrefix,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import { useRouter, usePathname } from 'next/dist/client/components/navigation'
import { useEffect } from 'react'
import { subscribeToUpdate } from '@vercel/turbopack-ecmascript-runtime/dev/client/hmr-client'
import { ReactDevOverlay } from './client'
import { sendMessage } from '@vercel/turbopack-ecmascript-runtime/dev/client/websocket'

type HotReloadProps = React.PropsWithChildren<{
assetPrefix?: string
Expand All @@ -22,6 +23,7 @@ export default function HotReload({ children }: HotReloadProps) {
rsc: '1',
},
},
sendMessage,
(update) => {
if (update.type !== 'issues') {
router.refresh()
Expand Down
Loading