Skip to content

Commit 45576ae

Browse files
authored
Turbopack: more tests and bugfixes for next.rs api (#53809)
### What? * adds more HMR test cases * fixes bugs found ### Why? ### Turbopack changes * vercel/turborepo#5668 <!-- OJ Kwon - ci(test): temporarily increase test timeout --> * vercel/turborepo#5696 <!-- Tobias Koppers - Cleanup minify -->
1 parent 7e16538 commit 45576ae

File tree

12 files changed

+368
-140
lines changed

12 files changed

+368
-140
lines changed

Cargo.lock

Lines changed: 37 additions & 37 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -44,11 +44,11 @@ swc_core = { version = "0.79.40" }
4444
testing = { version = "0.33.21" }
4545

4646
# Turbo crates
47-
turbopack-binding = { git = "https://github.com/vercel/turbo.git", tag = "turbopack-230808.2" }
47+
turbopack-binding = { git = "https://github.com/vercel/turbo.git", tag = "turbopack-230809.2" }
4848
# [TODO]: need to refactor embed_directory! macro usages, as well as resolving turbo_tasks::function, macros..
49-
turbo-tasks = { git = "https://github.com/vercel/turbo.git", tag = "turbopack-230808.2" }
49+
turbo-tasks = { git = "https://github.com/vercel/turbo.git", tag = "turbopack-230809.2" }
5050
# [TODO]: need to refactor embed_directory! macro usage in next-core
51-
turbo-tasks-fs = { git = "https://github.com/vercel/turbo.git", tag = "turbopack-230808.2" }
51+
turbo-tasks-fs = { git = "https://github.com/vercel/turbo.git", tag = "turbopack-230809.2" }
5252

5353
# General Deps
5454

packages/next-swc/crates/napi/src/next_api/endpoint.rs

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -94,21 +94,19 @@ pub async fn endpoint_write_to_disk(
9494

9595
#[napi(ts_return_type = "{ __napiType: \"RootTask\" }")]
9696
pub fn endpoint_changed_subscribe(
97-
#[napi(ts_arg_type = "{ __napiType: \"Endpoint\" }")] endpoint: External<
98-
VcArc<Vc<Box<dyn Endpoint>>>,
99-
>,
97+
#[napi(ts_arg_type = "{ __napiType: \"Endpoint\" }")] endpoint: External<ExternalEndpoint>,
10098
func: JsFunction,
10199
) -> napi::Result<External<RootTask>> {
102100
let turbo_tasks = endpoint.turbo_tasks().clone();
103-
let endpoint = **endpoint;
101+
let endpoint = ***endpoint;
104102
subscribe(
105103
turbo_tasks,
106104
func,
107105
move || async move {
108106
let changed = endpoint.changed();
109107
let issues = get_issues(changed).await?;
110108
let diags = get_diagnostics(changed).await?;
111-
changed.await?;
109+
changed.strongly_consistent().await?;
112110
Ok((issues, diags))
113111
},
114112
|ctx| {

0 commit comments

Comments
 (0)