@cloudflare/sandbox 1.0.2 → 1.0.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.mjs +4 -1
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -968,7 +968,10 @@ function readBytes(payload, offset, length) {
|
|
|
968
968
|
}
|
|
969
969
|
function decodeText(bytes) {
|
|
970
970
|
try {
|
|
971
|
-
return new TextDecoder("utf-8", {
|
|
971
|
+
return new TextDecoder("utf-8", {
|
|
972
|
+
fatal: true,
|
|
973
|
+
ignoreBOM: true
|
|
974
|
+
}).decode(bytes);
|
|
972
975
|
} catch (cause) {
|
|
973
976
|
throw protocolError("sandbox-shim returned invalid UTF-8 in directory entry name", cause);
|
|
974
977
|
}
|