Skip to content
Closed
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 package.json
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@
"dependencies": {
"@toon-format/toon": "^2.1.0",
"commander": "^12.1.0",
"undici": "^6.21.0",
"undici": "^7.22.0",

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Bug: The uploadBackup function uses the native FormData object, which is incompatible with undici v7, causing uploads to fail.
Severity: HIGH

Suggested Fix

Import FormData and Blob from the undici package instead of relying on the native global versions. Use these imported classes to construct the request body within the uploadBackup function to ensure compatibility with undici v7.

Prompt for AI Agent
Review the code at the location below. A potential bug has been identified by an AI
agent.
Verify if this is a real issue. If it is, propose a fix; if not, explain why it's not
valid.

Location: package.json#L55

Potential issue: The `uploadBackup` function in `src/api/system.ts` constructs a request
body using the native Node.js `FormData` and `Blob` objects. However, the project's
updated `undici` v7 dependency no longer supports third-party `FormData`
implementations. It requires using the `FormData` and `Blob` classes exported directly
from the `undici` package. The current implementation, which casts the request body as
`any`, will cause the backup upload request to fail at runtime because
`undici.request()` will not be able to process the native `FormData` object.

Did we get this right? 👍 / 👎 to inform future reviews.

"ws": "^8.19.0",
"yaml": "^2.8.2"
},
Expand Down
Loading