mirror of https://github.com/sveltejs/svelte
feat: improve text/binary file detection in hash.js (#17543)
* Improve text/binary file detection in hash.js Replace hardcoded text: true with proper detection logic that: - Checks for null bytes to identify binary files - Validates UTF-8 encoding with round-trip verification - Handles binary files by encoding them as base64 This fixes the TODO comment and makes the script more robust. * tweak * snake_case --------- Co-authored-by: Gittensor Miner <miner@gittensor.io> Co-authored-by: Rich Harris <rich.harris@vercel.com>pull/17546/head
parent
6e4820dcf6
commit
c3fcc15cfa
Loading…
Reference in new issue