Skip to content

Commit cc3efec

Browse files
committed
refactor: globの依存を外す
1 parent 2d96c34 commit cc3efec

File tree

3 files changed

+13
-65
lines changed

3 files changed

+13
-65
lines changed

package.json

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,6 @@
6060
"encoding-japanese": "1.0.30",
6161
"fast-array-diff": "1.1.0",
6262
"fast-base64": "0.1.8",
63-
"glob": "11.0.0",
6463
"hotkeys-js": "3.13.6",
6564
"immer": "9.0.21",
6665
"kuromoji": "github:VOICEVOX/kuromoji.js#0.0.1",
@@ -99,7 +98,6 @@
9998
"@storybook/vue3-vite": "8.4.4",
10099
"@types/async-lock": "1.4.0",
101100
"@types/encoding-japanese": "1.0.18",
102-
"@types/glob": "8.0.0",
103101
"@types/markdown-it": "12.2.0",
104102
"@types/multistream": "4.1.0",
105103
"@types/semver": "7.3.9",

pnpm-lock.yaml

Lines changed: 10 additions & 61 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/backend/electron/vvppFile.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@ import fs from "node:fs";
66
import path from "node:path";
77
import { spawn } from "node:child_process";
88
import MultiStream from "multistream";
9-
import { glob } from "glob";
109
import { app } from "electron";
1110
import {
1211
minimumEngineManifestSchema,
@@ -79,7 +78,9 @@ export class VvppFileExtractor {
7978
.replace(/\.[0-9]+\.vvppp$/, ".*.vvppp")
8079
.replace(/\\/g, "/"); // node-globはバックスラッシュを使えないので、スラッシュに置換する
8180
const filePaths: string[] = [];
82-
const matchingFiles = await glob(vvpppPathGlob);
81+
const matchingFiles = await Array.fromAsync(
82+
fs.promises.glob(vvpppPathGlob),
83+
);
8384
for (const p of matchingFiles) {
8485
if (!p.match(/\.[0-9]+\.vvppp$/)) {
8586
continue;

0 commit comments

Comments
 (0)