Handle `json!` panick trying to serialize non utf8 lines
Instead of panicking when trying to handle non utf8 lines we should
return null as line output.
This way we can on the frontend detect if a file has any lines the api
wasn’t able to parse and fallback to show a file as a Binary File
👉 Preview 👉 Workflow runs 👉 Branch on GitHub
6 files changed
+17
-21
856caf0e
→
c132855d
modified http-client/lib/repo/commit.ts
@@ -66,7 +66,7 @@ export type CommitBlob = z.infer<typeof commitBlobSchema>;
|
|
|
|
|
|
| - | |
| + | |
|
|
|
|
|
@@ -74,7 +74,7 @@ const additionHunkLineSchema = object({
|
|
|
|
|
|
| - | |
| + | |
|
|
|
|
|
@@ -95,7 +95,7 @@ const diffFileSchema = object({
|
|
|
|
|
|
| - | |
| + | |
|
|
|
|
|
modified radicle-httpd/build/Dockerfile
@@ -1,5 +1,5 @@
|
|
| - | |
| + | |
|
|
|
|
|
@@ -13,7 +13,7 @@ ARG GIT_HEAD
|
|
|
|
|
|
| - | |
| + | |
|
|
|
|
|
@@ -27,15 +27,8 @@ RUN rustup target add \
|
|
|
|
|
|
| - | |
|
|
| - | |
| - | |
| - | |
| - | |
| - | |
| - | |
| - | |
| + | |
|
|
|
|
|
@@ -54,7 +47,7 @@ RUN cargo zigbuild --locked --release \
|
|
|
|
|
|
| - | |
| + | |
|
|
|
|
|
modified radicle-httpd/rust-toolchain
@@ -1 +1 @@
| - | |
|
|
| + | |
|
modified radicle-httpd/src/api/json/diff.rs
@@ -1,4 +1,4 @@
| - | |
| + | |
|
|
|
|
|
@@ -194,14 +194,14 @@ impl<'a> Modification<'a> {
|
|
|
|
|
|
| - | |
| + | |
|
|
|
|
|
|
|
|
|
|
|
|
| - | |
| + | |
|
|
|
|
|
@@ -212,7 +212,7 @@ impl<'a> Modification<'a> {
|
|
|
|
|
|
| - | |
| + | |
|
|
|
|
|
modified radicle-httpd/src/api/json/thread.rs
@@ -12,7 +12,7 @@ pub(crate) enum Comment<'a> {
|
|
|
|
|
|
| - | |
| + | |
|
|
|
|
|
modified src/views/repos/Changeset/FileDiff.svelte
@@ -39,6 +39,9 @@
|
|
|
|
|
|
| + | |
| + | |
| + | |
|
|
|
|
|
@@ -449,7 +452,7 @@
|
|
|
|
|
|
| - | |
| + | |
|
|
|
|
|