From 9ef378dac416b6872abc20dc4ad3d558c28d11bf Mon Sep 17 00:00:00 2001 From: David Dal Busco Date: Mon, 27 Apr 2026 17:08:41 +0900 Subject: [PATCH] feat(sputnik): trim --- scripts/sputnik.polyfills.mjs | 2 +- src/sputnik/src/js/apis/node/llrt/llrt_utils/bytes.rs | 2 +- src/sputnik/src/js/apis/node/llrt/llrt_utils/class.rs | 2 +- src/sputnik/src/js/apis/node/llrt/llrt_utils/error_messages.rs | 2 +- src/sputnik/src/js/apis/node/llrt/llrt_utils/object.rs | 2 +- src/sputnik/src/js/apis/node/llrt/llrt_utils/primordials.rs | 2 +- src/sputnik/src/js/apis/node/llrt/llrt_utils/result.rs | 2 +- src/sputnik/src/js/apis/node/llrt/llrt_utils/time.rs | 2 +- 8 files changed, 8 insertions(+), 8 deletions(-) diff --git a/scripts/sputnik.polyfills.mjs b/scripts/sputnik.polyfills.mjs index 0b67f3230c..2955fb7b8f 100644 --- a/scripts/sputnik.polyfills.mjs +++ b/scripts/sputnik.polyfills.mjs @@ -89,7 +89,7 @@ const transformLlrtUrlSearchParams = (content) => { const savePolyfill = async ({ dest, content, transform }) => { const customUseContent = nonNullish(transform) ? transform(content) : content; - await writeFile(dest, customUseContent, 'utf-8'); + await writeFile(dest, customUseContent.trim(), 'utf-8'); }; const resources = [ diff --git a/src/sputnik/src/js/apis/node/llrt/llrt_utils/bytes.rs b/src/sputnik/src/js/apis/node/llrt/llrt_utils/bytes.rs index 21683ce17c..718f63e18e 100644 --- a/src/sputnik/src/js/apis/node/llrt/llrt_utils/bytes.rs +++ b/src/sputnik/src/js/apis/node/llrt/llrt_utils/bytes.rs @@ -379,4 +379,4 @@ pub fn get_string_bytes( pub fn bytes_to_typed_array<'js>(ctx: Ctx<'js>, bytes: &[u8]) -> Result> { TypedArray::::new(ctx.clone(), bytes).into_js(&ctx) -} +} \ No newline at end of file diff --git a/src/sputnik/src/js/apis/node/llrt/llrt_utils/class.rs b/src/sputnik/src/js/apis/node/llrt/llrt_utils/class.rs index 510597e032..7d69281450 100644 --- a/src/sputnik/src/js/apis/node/llrt/llrt_utils/class.rs +++ b/src/sputnik/src/js/apis/node/llrt/llrt_utils/class.rs @@ -73,4 +73,4 @@ where } Ok(()) } -} +} \ No newline at end of file diff --git a/src/sputnik/src/js/apis/node/llrt/llrt_utils/error_messages.rs b/src/sputnik/src/js/apis/node/llrt/llrt_utils/error_messages.rs index 61380a1d8e..4fbcb94213 100644 --- a/src/sputnik/src/js/apis/node/llrt/llrt_utils/error_messages.rs +++ b/src/sputnik/src/js/apis/node/llrt/llrt_utils/error_messages.rs @@ -2,4 +2,4 @@ pub const ERROR_MSG_NOT_ARRAY_BUFFER: &str = "Not an ArrayBuffer"; pub const ERROR_MSG_ARRAY_BUFFER_DETACHED: &str = "ArrayBuffer is detached"; -pub const ERROR_MSG_BROADCAST_LAGGED: &str = "Lagged too much behind"; +pub const ERROR_MSG_BROADCAST_LAGGED: &str = "Lagged too much behind"; \ No newline at end of file diff --git a/src/sputnik/src/js/apis/node/llrt/llrt_utils/object.rs b/src/sputnik/src/js/apis/node/llrt/llrt_utils/object.rs index 050651b7e4..42c5ffa17d 100644 --- a/src/sputnik/src/js/apis/node/llrt/llrt_utils/object.rs +++ b/src/sputnik/src/js/apis/node/llrt/llrt_utils/object.rs @@ -163,4 +163,4 @@ pub fn object_from_entries<'js>(ctx: &Ctx<'js>, array: Array<'js>) -> Result Primordial<'js> for BasePrimordials<'js> { function_parse_int, }) } -} +} \ No newline at end of file diff --git a/src/sputnik/src/js/apis/node/llrt/llrt_utils/result.rs b/src/sputnik/src/js/apis/node/llrt/llrt_utils/result.rs index eca166d6f9..4b392b2bd9 100644 --- a/src/sputnik/src/js/apis/node/llrt/llrt_utils/result.rs +++ b/src/sputnik/src/js/apis/node/llrt/llrt_utils/result.rs @@ -103,4 +103,4 @@ impl OptionExt for Option { None => f(), } } -} +} \ No newline at end of file diff --git a/src/sputnik/src/js/apis/node/llrt/llrt_utils/time.rs b/src/sputnik/src/js/apis/node/llrt/llrt_utils/time.rs index 794b02eb5b..a8168f63b1 100644 --- a/src/sputnik/src/js/apis/node/llrt/llrt_utils/time.rs +++ b/src/sputnik/src/js/apis/node/llrt/llrt_utils/time.rs @@ -46,4 +46,4 @@ pub fn init() { let time_origin = now_nanos(); TIME_ORIGIN.store(time_origin, Ordering::Relaxed) } -} +} \ No newline at end of file