mirror of
https://github.com/clusterio/clusterio.git
synced 2026-11-21 08:03:13 +09:00
Remove fs-extra and klaw (#882)
These packages are obsoleted by the promises API to the built-in Node fs module. The fs-extra package is also causing problems with broken APIs that don't behave the same as Node's fs module, and throwing errors without code properties on them.
This commit is contained in:
1 parent
130dca4261
commit
2e48b728dd
74 files changed
+570
-529
No files matched your search
+2
-2
@@ -4,7 +4,7 @@
|
||||
|
||||
"use strict";
|
||||
const FormData = require("form-data");
|
||||
const fs = require("fs-extra");
|
||||
const fs = require("node:fs/promises");
|
||||
const yargs = require("yargs");
|
||||
|
||||
let DRY = false;
|
||||
@@ -62,7 +62,7 @@ async function uploadModRelease(file, name) {
|
||||
// Upload the new version of the mod
|
||||
const uploadUrl = (await initResponse.json()).upload_url;
|
||||
const uploadFormData = new FormData();
|
||||
uploadFormData.append("file", fs.createReadStream(file));
|
||||
uploadFormData.append("file", (await fs.open(file)).createReadStream(file));
|
||||
|
||||
const uploadResponse = await fetch(uploadUrl, {
|
||||
method: "POST",
|
||||
|
||||
Reference in new issue
Block a user