Skip to content

Commit

Permalink
Update: prettier、eslint、node、npmを更新 (VOICEVOX#1992)
Browse files Browse the repository at this point in the history
* Update: prettierとeslintを更新

* Update: node、npmを更新

* Change: trailingCommasをallに

* Revert: テスト用のが紛れてた

* Update: Nodeを20に

* Code: 理由を追加

* Change: no-unsafe-declaration-mergingをなくす

* Fix: 型エラーを修正

* Code: コメントを追加

Co-authored-by: Hiroshiba <[email protected]>

* FIXMEの内容をより細かく

---------

Co-authored-by: Hiroshiba <[email protected]>
  • Loading branch information
sevenc-nanashi and Hiroshiba authored Apr 17, 2024
1 parent 5cb3455 commit 16f5b04
Show file tree
Hide file tree
Showing 134 changed files with 2,429 additions and 2,018 deletions.
2 changes: 1 addition & 1 deletion .node-version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
18.13.0
20.12.2
6 changes: 3 additions & 3 deletions build/download7z.js
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ const { spawnSync } = require("child_process");
const existingFiles = await fs.promises.readdir(distPath);

const notDownloaded = filesToExtract.filter(
(file) => !existingFiles.includes(file)
(file) => !existingFiles.includes(file),
);

if (notDownloaded.length === 0) {
Expand All @@ -74,14 +74,14 @@ const { spawnSync } = require("child_process");
["x", "-y", "-o" + distPath, sevenZipPath, ...filesToExtract],
{
stdio: ["ignore", "inherit", "inherit"],
}
},
)
: spawnSync(
"tar",
["xvf", sevenZipPath, "-v", "-C", distPath, ...filesToExtract],
{
stdio: ["ignore", "inherit", "inherit"],
}
},
);

if (extractor.status !== 0) {
Expand Down
6 changes: 3 additions & 3 deletions build/generateLicenses.js
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ const licenseJson = execFileSync(
{
encoding: "utf-8",
maxBuffer: 1024 * 1024 * 10, // FIXME: stdoutではなくファイル出力にする
}
},
);

const checkerLicenses = JSON.parse(licenseJson);
Expand All @@ -71,12 +71,12 @@ externalLicenses.push({
win32: "7za.exe",
linux: "7zzs",
darwin: "7zz",
}[process.platform]
}[process.platform],
),

{
encoding: "utf-8",
}
},
).match(/7-Zip\s+(?:\(.\))?\s*([0-9.]+)/)[1],
license: "LGPL-2.1",
text: fs.readFileSync(path.join(__dirname, "vendored", "7z", "License.txt"), {
Expand Down
6 changes: 3 additions & 3 deletions electron-builder.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -39,12 +39,12 @@ const sevenZipFile = fs
.readdirSync(path.resolve(__dirname, "build", "vendored", "7z"))
.find(
// Windows: 7za.exe, Linux: 7zzs, macOS: 7zz
(fileName) => ["7za.exe", "7zzs", "7zz"].includes(fileName)
(fileName) => ["7za.exe", "7zzs", "7zz"].includes(fileName),
);

if (!sevenZipFile) {
throw new Error(
"7z binary file not found. Run `node ./build/download7z.js` first."
"7z binary file not found. Run `node ./build/download7z.js` first.",
);
}

Expand Down Expand Up @@ -104,7 +104,7 @@ const builderOptions = {
afterAllArtifactBuild: path.resolve(
__dirname,
"build",
"afterAllArtifactBuild.js"
"afterAllArtifactBuild.js",
),
win: {
icon: "public/icon.png",
Expand Down
Loading

0 comments on commit 16f5b04

Please sign in to comment.