Skip to content

Commit a8c4367

Browse files
authored
chore: bump nova + oxc -> 0.77 (#84)
1 parent 603a278 commit a8c4367

File tree

24 files changed

+402
-290
lines changed

24 files changed

+402
-290
lines changed

Cargo.lock

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

Cargo.toml

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -7,16 +7,16 @@ authors = ["the Andromeda team"]
77
edition = "2024"
88
license = "Mozilla Public License 2.0"
99
repository = "https://github.com/tryandromeda/andromeda"
10-
version = "0.1.0-draft3"
10+
version = "0.1.0-draft4"
1111

1212
[workspace.dependencies]
1313
andromeda-core = { path = "core" }
1414
andromeda-runtime = { path = "runtime", features = ["canvas", "crypto", "storage"] }
1515
anyhow = "1.0.98"
1616
anymap = "0.12.1"
1717
base64-simd = "0.8.0"
18-
clap = { version = "4.5.40", features = ["derive"] }
19-
clap_complete = "4.5.54"
18+
clap = { version = "4.5.41", features = ["derive"] }
19+
clap_complete = "4.5.55"
2020
console = "0.16.0"
2121
dprint-core = "0.67.4"
2222
dprint-plugin-typescript = "0.95.8"
@@ -25,30 +25,30 @@ indexmap = "2.10.0"
2525
image = "0.25.6"
2626
lazy_static = "1.5.0"
2727
libsui = "0.10.0"
28-
nova_vm = { git = "https://github.com/trynova/nova", rev = "58451921b0d350572a90cf63e8c6d476fd5c6855", features = [
28+
nova_vm = { git = "https://github.com/trynova/nova", rev = "508168f9db71082294c3d536c455dae166f5bfbe", features = [
2929
"typescript"
3030
] }
3131
nu-ansi-term = "0.50.1"
3232
owo-colors = "4.2.2"
33-
oxc_ast = "0.75.0"
34-
oxc_allocator = "0.75.0"
35-
oxc_diagnostics = "0.75.0"
33+
oxc_ast = "0.77.0"
34+
oxc_allocator = "0.77.0"
35+
oxc_diagnostics = "0.77.0"
3636
oxc-miette = { version = "2.3.1", features = ["fancy"] }
37-
oxc_parser = "0.75.0"
38-
oxc_semantic = "0.75.0"
39-
oxc_span = "0.75.0"
37+
oxc_parser = "0.77.0"
38+
oxc_semantic = "0.77.0"
39+
oxc_span = "0.77.0"
4040
rand = "0.9.1"
4141
reedline = "0.40.0"
4242
regex = "1.11.1"
4343
ring = "0.17.14"
44-
rusqlite = { version = "0.36.0", features = ["bundled"] }
44+
rusqlite = { version = "0.37.0", features = ["bundled"] }
4545
serde = { version = "1.0.219", features = ["derive"] }
4646
signal-hook = "0.3.18"
4747
thiserror = "2.0.12"
48-
tokio = { version = "1.46.0", features = ["rt", "sync", "time"] }
48+
tokio = { version = "1.46.1", features = ["rt", "sync", "time"] }
4949
ureq = { version = "3.0.12", features = ["json"] }
5050
url = { version = "2.5.4", features = ["serde", "expose_internals"] }
51-
wgpu = { version = "25.0.2", features = ["wgsl", "webgpu"] }
51+
wgpu = { version = "26.0.1", features = ["wgsl", "webgpu"] }
5252

5353
[profile.release]
5454
lto = true

cli/src/format.rs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@ fn get_file_info(path: &std::path::Path) -> Result<FileType> {
9494
"js" | "jsx" | "mjs" | "cjs" => Ok(FileType::JavaScript),
9595
"json" | "jsonc" => Ok(FileType::Json),
9696
_ => Err(AndromedaError::format_error(
97-
format!("Unsupported file type: .{}", extension),
97+
format!("Unsupported file type: .{extension}"),
9898
None::<std::io::Error>,
9999
)),
100100
}
@@ -150,11 +150,11 @@ fn format_ts_js_file(
150150
let error_msg = resolved_config
151151
.diagnostics
152152
.iter()
153-
.map(|d| format!("{}", d))
153+
.map(|d| format!("{d}"))
154154
.collect::<Vec<_>>()
155155
.join(", ");
156156
return Err(AndromedaError::format_error(
157-
format!("Failed to resolve dprint TS configuration: {}", error_msg),
157+
format!("Failed to resolve dprint TS configuration: {error_msg}"),
158158
None::<std::io::Error>,
159159
));
160160
}
@@ -190,11 +190,11 @@ fn format_json_file(
190190
let error_msg = resolved_config
191191
.diagnostics
192192
.iter()
193-
.map(|d| format!("{}", d))
193+
.map(|d| format!("{d}"))
194194
.collect::<Vec<_>>()
195195
.join(", ");
196196
return Err(AndromedaError::format_error(
197-
format!("Failed to resolve dprint JSON configuration: {}", error_msg),
197+
format!("Failed to resolve dprint JSON configuration: {error_msg}"),
198198
None::<std::io::Error>,
199199
));
200200
}

cli/src/main.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -162,22 +162,22 @@ fn run_main() -> Result<()> {
162162
Command::Compile { path, out } => {
163163
compile(out.as_path(), path.as_path()).map_err(|e| {
164164
AndromedaError::compile_error(
165-
format!("Compilation failed: {}", e),
165+
format!("Compilation failed: {e}"),
166166
path.clone(),
167167
out.clone(),
168168
Some(e),
169169
)
170170
})?;
171171

172-
println!("✅ Successfully created the output binary at {:?}", out);
172+
println!("✅ Successfully created the output binary at {out:?}");
173173
Ok(())
174174
}
175175
Command::Repl {
176176
expose_internals,
177177
print_internals,
178178
disable_gc,
179179
} => run_repl(expose_internals, print_internals, disable_gc)
180-
.map_err(|e| AndromedaError::repl_error(format!("REPL failed: {}", e), Some(e))),
180+
.map_err(|e| AndromedaError::repl_error(format!("REPL failed: {e}"), Some(e))),
181181
Command::Fmt { paths } => {
182182
let files_to_format = find_formattable_files(&paths)?;
183183

@@ -202,7 +202,7 @@ fn run_main() -> Result<()> {
202202
dry_run,
203203
} => upgrade::run_upgrade(force, version, dry_run).map_err(|e| {
204204
AndromedaError::runtime_error(
205-
format!("Upgrade failed: {}", e),
205+
format!("Upgrade failed: {e}"),
206206
None,
207207
None,
208208
None,

cli/src/repl.rs

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -668,7 +668,7 @@ pub fn run_repl(expose_internals: bool, print_internals: bool, disable_gc: bool)
668668
std::process::exit(0);
669669
}
670670
Err(err) => {
671-
println!("Error reading input: {}", err);
671+
println!("Error reading input: {err}");
672672
continue;
673673
}
674674
};
@@ -735,15 +735,15 @@ pub fn run_repl(expose_internals: bool, print_internals: bool, disable_gc: bool)
735735
let result_style = Style::new().green();
736736
let time_style = Style::new().dim();
737737
let type_style = Style::new().dim().italic();
738-
let output = val.as_str(agent);
738+
let output = val.as_str(agent).expect("String is not valid UTF-8");
739739

740740
if !output.is_empty() && output != "undefined" {
741741
let (formatted_value, value_type) = format_js_value(output);
742742
println!(
743743
"{} {} {}",
744744
result_style.apply_to("←"),
745745
formatted_value,
746-
type_style.apply_to(format!("({})", value_type))
746+
type_style.apply_to(format!("({value_type})"))
747747
);
748748
} else if output == "undefined" {
749749
let (formatted_value, _) = format_js_value(output);
@@ -768,6 +768,7 @@ pub fn run_repl(expose_internals: bool, print_internals: bool, disable_gc: bool)
768768
let error_message = error_value
769769
.string_repr(agent, gc.reborrow())
770770
.as_str(agent)
771+
.expect("String is not valid UTF-8")
771772
.to_string();
772773
handle_runtime_error_with_message(error_message);
773774
}

cli/src/run.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ pub fn run(verbose: bool, no_strict: bool, files: Vec<RuntimeFile>) -> Result<()
5656
match runtime_output.result {
5757
Ok(result) => {
5858
if verbose {
59-
println!("✅ Execution completed successfully: {:?}", result);
59+
println!("✅ Execution completed successfully: {result:?}");
6060
}
6161
Ok(())
6262
}
@@ -70,6 +70,7 @@ pub fn run(verbose: bool, no_strict: bool, files: Vec<RuntimeFile>) -> Result<()
7070
.value()
7171
.string_repr(agent, gc)
7272
.as_str(agent)
73+
.expect("String is not valid UTF-8")
7374
.to_string()
7475
});
7576

cli/src/upgrade.rs

Lines changed: 11 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ struct PlatformInfo {
4444
/// Run the upgrade process
4545
pub fn run_upgrade(force: bool, target_version: Option<String>, dry_run: bool) -> Result<()> {
4646
println!("🚀 Andromeda Upgrade Tool");
47-
println!("Current version: {}", CURRENT_VERSION);
47+
println!("Current version: {CURRENT_VERSION}");
4848
println!();
4949

5050
let platform = detect_platform()?;
@@ -64,10 +64,7 @@ pub fn run_upgrade(force: bool, target_version: Option<String>, dry_run: bool) -
6464
}
6565

6666
if release.tag_name == CURRENT_VERSION && !force {
67-
println!(
68-
"ℹ️ You are already on version {}. Use --force to reinstall.",
69-
CURRENT_VERSION
70-
);
67+
println!("ℹ️ You are already on version {CURRENT_VERSION}. Use --force to reinstall.");
7168
return Ok(());
7269
}
7370

@@ -143,9 +140,9 @@ fn detect_platform() -> Result<PlatformInfo> {
143140
};
144141

145142
let asset_name = if os == "windows" {
146-
format!("andromeda-{}-{}.exe", os, arch)
143+
format!("andromeda-{os}-{arch}.exe")
147144
} else {
148-
format!("andromeda-{}-{}", os, arch)
145+
format!("andromeda-{os}-{arch}")
149146
};
150147

151148
Ok(PlatformInfo {
@@ -157,13 +154,10 @@ fn detect_platform() -> Result<PlatformInfo> {
157154

158155
/// Get the latest release from GitHub
159156
fn get_latest_release() -> Result<GitHubRelease> {
160-
let url = format!(
161-
"https://api.github.com/repos/{}/{}/releases/latest",
162-
REPO_OWNER, REPO_NAME
163-
);
157+
let url = format!("https://api.github.com/repos/{REPO_OWNER}/{REPO_NAME}/releases/latest");
164158

165159
let response = ureq::get(&url)
166-
.header("User-Agent", &format!("andromeda-cli/{}", CURRENT_VERSION))
160+
.header("User-Agent", &format!("andromeda-cli/{CURRENT_VERSION}"))
167161
.call();
168162

169163
match response {
@@ -183,13 +177,10 @@ fn get_latest_release() -> Result<GitHubRelease> {
183177

184178
/// Get the most recent release (including drafts and prereleases)
185179
fn get_most_recent_release() -> Result<GitHubRelease> {
186-
let url = format!(
187-
"https://api.github.com/repos/{}/{}/releases",
188-
REPO_OWNER, REPO_NAME
189-
);
180+
let url = format!("https://api.github.com/repos/{REPO_OWNER}/{REPO_NAME}/releases");
190181

191182
let mut response = ureq::get(&url)
192-
.header("User-Agent", &format!("andromeda-cli/{}", CURRENT_VERSION))
183+
.header("User-Agent", &format!("andromeda-cli/{CURRENT_VERSION}"))
193184
.call()
194185
.context("Failed to fetch releases")?;
195186

@@ -206,13 +197,10 @@ fn get_most_recent_release() -> Result<GitHubRelease> {
206197

207198
/// Get a specific release by tag
208199
fn get_release_by_tag(tag: &str) -> Result<GitHubRelease> {
209-
let url = format!(
210-
"https://api.github.com/repos/{}/{}/releases/tags/{}",
211-
REPO_OWNER, REPO_NAME, tag
212-
);
200+
let url = format!("https://api.github.com/repos/{REPO_OWNER}/{REPO_NAME}/releases/tags/{tag}");
213201

214202
let mut response = ureq::get(&url)
215-
.header("User-Agent", &format!("andromeda-cli/{}", CURRENT_VERSION))
203+
.header("User-Agent", &format!("andromeda-cli/{CURRENT_VERSION}"))
216204
.call()
217205
.context("Failed to fetch release information")?;
218206

@@ -227,7 +215,7 @@ fn get_release_by_tag(tag: &str) -> Result<GitHubRelease> {
227215
/// Download an asset from the given URL
228216
fn download_asset(url: &str) -> Result<Vec<u8>> {
229217
let mut response = ureq::get(url)
230-
.header("User-Agent", &format!("andromeda-cli/{}", CURRENT_VERSION))
218+
.header("User-Agent", &format!("andromeda-cli/{CURRENT_VERSION}"))
231219
.call()
232220
.context("Failed to download asset")?;
233221

core/src/error.rs

Lines changed: 11 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -216,42 +216,38 @@ impl fmt::Display for AndromedaError {
216216
AndromedaError::FsError {
217217
operation, path, ..
218218
} => {
219-
write!(f, "File system error during {}: {}", operation, path)
219+
write!(f, "File system error during {operation}: {path}")
220220
}
221221
AndromedaError::ParseError { source_path, .. } => {
222-
write!(f, "Parse error in {}", source_path)
222+
write!(f, "Parse error in {source_path}")
223223
}
224224
AndromedaError::RuntimeError { message, .. } => {
225-
write!(f, "Runtime error: {}", message)
225+
write!(f, "Runtime error: {message}")
226226
}
227227
AndromedaError::ExtensionError {
228228
extension_name,
229229
message,
230230
} => {
231-
write!(f, "Extension '{}' error: {}", extension_name, message)
231+
write!(f, "Extension '{extension_name}' error: {message}")
232232
}
233233
AndromedaError::ResourceError {
234234
rid,
235235
operation,
236236
message,
237237
} => {
238-
write!(
239-
f,
240-
"Resource {} error during {}: {}",
241-
rid, operation, message
242-
)
238+
write!(f, "Resource {rid} error during {operation}: {message}")
243239
}
244240
AndromedaError::TaskError { task_id, message } => {
245-
write!(f, "Task {} error: {}", task_id, message)
241+
write!(f, "Task {task_id} error: {message}")
246242
}
247243
AndromedaError::NetworkError { url, operation, .. } => {
248-
write!(f, "Network error during {} for {}", operation, url)
244+
write!(f, "Network error during {operation} for {url}")
249245
}
250246
AndromedaError::EncodingError { format, message } => {
251-
write!(f, "Encoding error ({}): {}", format, message)
247+
write!(f, "Encoding error ({format}): {message}")
252248
}
253249
AndromedaError::ConfigError { field, message } => {
254-
write!(f, "Configuration error in field '{}': {}", field, message)
250+
write!(f, "Configuration error in field '{field}': {message}")
255251
}
256252
}
257253
}
@@ -277,7 +273,7 @@ impl ErrorReporter {
277273
eprintln!("{}", "─".repeat(50).red());
278274

279275
// Use Display instead of miette for now to avoid trait issues
280-
eprintln!("{}", error);
276+
eprintln!("{error}");
281277
}
282278

283279
/// Print multiple errors
@@ -302,7 +298,7 @@ impl ErrorReporter {
302298
errors.len().to_string().bright_cyan()
303299
);
304300
}
305-
eprintln!("{}", error);
301+
eprintln!("{error}");
306302
}
307303
}
308304

core/src/helper.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ pub fn create_parse_error_report(
3535
source: &str,
3636
) -> String {
3737
let mut output = String::new();
38-
output.push_str(&format!(" Parse Error in {}:\n", source_path));
38+
output.push_str(&format!(" Parse Error in {source_path}:\n"));
3939
output.push_str("────────────────────────────────────────────────\n");
4040
let source_owned = source.to_string();
4141
let source_path_owned = source_path.to_string();
@@ -47,7 +47,7 @@ pub fn create_parse_error_report(
4747
output.push_str(&format!("\n Error {} of {}:\n", index + 1, errors.len()));
4848
}
4949
let report = error.clone().with_source_code(named_source.clone());
50-
output.push_str(&format!("{}\n", report));
50+
output.push_str(&format!("{report}\n"));
5151
}
5252

5353
output

core/src/runtime.rs

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,7 @@ impl RuntimeFile {
111111
return Err(AndromedaError::fs_error(
112112
std::io::Error::new(
113113
std::io::ErrorKind::NotFound,
114-
format!("File not found: {}", path),
114+
format!("File not found: {path}"),
115115
),
116116
"validate",
117117
path,
@@ -121,7 +121,7 @@ impl RuntimeFile {
121121
return Err(AndromedaError::fs_error(
122122
std::io::Error::new(
123123
std::io::ErrorKind::InvalidInput,
124-
format!("Path is not a file: {}", path),
124+
format!("Path is not a file: {path}"),
125125
),
126126
"validate",
127127
path,
@@ -265,9 +265,13 @@ impl<UserMacroTask> Runtime<UserMacroTask> {
265265
gc.nogc(),
266266
) {
267267
Ok(script) => script,
268-
Err(errors) => {
269-
exit_with_parse_errors(errors, file.get_path(), source_text.as_str(agent))
270-
}
268+
Err(errors) => exit_with_parse_errors(
269+
errors,
270+
file.get_path(),
271+
source_text
272+
.as_str(agent)
273+
.expect("String is not valid UTF-8"),
274+
),
271275
};
272276

273277
script_evaluation(agent, script.unbind(), gc.reborrow()).unbind()

0 commit comments

Comments
 (0)