Skip to content
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
2 changes: 1 addition & 1 deletion scripts/sputnik.polyfills.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -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 = [
Expand Down
2 changes: 1 addition & 1 deletion src/sputnik/src/js/apis/node/llrt/llrt_utils/bytes.rs
Original file line number Diff line number Diff line change
Expand Up @@ -379,4 +379,4 @@ pub fn get_string_bytes(

pub fn bytes_to_typed_array<'js>(ctx: Ctx<'js>, bytes: &[u8]) -> Result<Value<'js>> {
TypedArray::<u8>::new(ctx.clone(), bytes).into_js(&ctx)
}
}
2 changes: 1 addition & 1 deletion src/sputnik/src/js/apis/node/llrt/llrt_utils/class.rs
Original file line number Diff line number Diff line change
Expand Up @@ -73,4 +73,4 @@ where
}
Ok(())
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -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";
2 changes: 1 addition & 1 deletion src/sputnik/src/js/apis/node/llrt/llrt_utils/object.rs
Original file line number Diff line number Diff line change
Expand Up @@ -163,4 +163,4 @@ pub fn object_from_entries<'js>(ctx: &Ctx<'js>, array: Array<'js>) -> Result<Obj
}
}
Ok(obj)
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -146,4 +146,4 @@ impl<'js> Primordial<'js> for BasePrimordials<'js> {
function_parse_int,
})
}
}
}
2 changes: 1 addition & 1 deletion src/sputnik/src/js/apis/node/llrt/llrt_utils/result.rs
Original file line number Diff line number Diff line change
Expand Up @@ -103,4 +103,4 @@ impl<T> OptionExt<T> for Option<T> {
None => f(),
}
}
}
}
2 changes: 1 addition & 1 deletion src/sputnik/src/js/apis/node/llrt/llrt_utils/time.rs
Original file line number Diff line number Diff line change
Expand Up @@ -46,4 +46,4 @@ pub fn init() {
let time_origin = now_nanos();
TIME_ORIGIN.store(time_origin, Ordering::Relaxed)
}
}
}
Loading