SIGN IN SIGN UP
denoland / deno UNCLAIMED

A modern runtime for JavaScript and TypeScript.

0 0 3 Rust

refactor(lsp): use ToV8 derive for LoadResponse (#34240)

Replaces the `serde::Serialize` + `rename_all = "camelCase"` path on
`LoadResponse` with the v8 `ToV8` derive. The JS-visible shape stays `{
data, scriptKind, version, isCjs, isClassicScript }` since the derive's
default field-name casing matches.

`DocumentText` keeps its untagged-as-string shape via a manual `ToV8`
impl that delegates to `v8::String::new` through its `Deref<Target =
str>`; `serde::Serialize` is dropped since it had no other consumers.

`LoadError` swaps the `serde_v8::Error` variant for a `JsErrorBox`
variant to absorb the new `ToV8` derive's error type — there were no
other `serde_v8` calls left in `op_load`.

Part of the same migration as #34239 (move `serde_v8` call sites off
serde where the v8-derive traits can handle the conversion directly).
C
crowlbot committed
75c1ba0fb459574192023bf276beb95cee001497
Parent: 19e4288
Committed by GitHub <noreply@github.com> on 6/1/2026, 1:56:58 PM