Migrate to Biome for linting and formatting (#107)

This commit is contained in:
Charlie Marsh 2024-09-30 02:55:24 -04:00 committed by GitHub
parent 023eb7875f
commit c11f8674f8
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
17 changed files with 331 additions and 5772 deletions

22
dist/update-known-checksums/index.js generated vendored
View file

@ -32708,24 +32708,24 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
};
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.updateChecksums = updateChecksums;
const fs_1 = __nccwpck_require__(7147);
const node_fs_1 = __nccwpck_require__(7561);
const tc = __importStar(__nccwpck_require__(7784));
function updateChecksums(filePath, downloadUrls) {
return __awaiter(this, void 0, void 0, function* () {
yield fs_1.promises.rm(filePath);
yield fs_1.promises.appendFile(filePath, "// AUTOGENERATED_DO_NOT_EDIT\nexport const KNOWN_CHECKSUMS: {[key: string]: string} = {\n");
yield node_fs_1.promises.rm(filePath);
yield node_fs_1.promises.appendFile(filePath, "// AUTOGENERATED_DO_NOT_EDIT\nexport const KNOWN_CHECKSUMS: {[key: string]: string} = {\n");
let firstLine = true;
for (const downloadUrl of downloadUrls) {
const content = yield downloadAssetContent(downloadUrl);
const checksum = content.split(" ")[0].trim();
const key = getKey(downloadUrl);
if (!firstLine) {
yield fs_1.promises.appendFile(filePath, ",\n");
yield node_fs_1.promises.appendFile(filePath, ",\n");
}
yield fs_1.promises.appendFile(filePath, ` '${key}':\n '${checksum}'`);
yield node_fs_1.promises.appendFile(filePath, ` '${key}':\n '${checksum}'`);
firstLine = false;
}
yield fs_1.promises.appendFile(filePath, "}\n");
yield node_fs_1.promises.appendFile(filePath, "}\n");
});
}
function getKey(downloadUrl) {
@ -32739,7 +32739,7 @@ function getKey(downloadUrl) {
function downloadAssetContent(downloadUrl) {
return __awaiter(this, void 0, void 0, function* () {
const downloadPath = yield tc.downloadTool(downloadUrl);
const content = yield fs_1.promises.readFile(downloadPath, "utf8");
const content = yield node_fs_1.promises.readFile(downloadPath, "utf8");
return content;
});
}
@ -32940,6 +32940,14 @@ module.exports = require("node:events");
/***/ }),
/***/ 7561:
/***/ ((module) => {
"use strict";
module.exports = require("node:fs");
/***/ }),
/***/ 4492:
/***/ ((module) => {