diff --git a/package.json b/package.json index 408b59b1d..b6cf047d0 100644 --- a/package.json +++ b/package.json @@ -14,9 +14,9 @@ "license": "GPL-3.0-or-later", "author": "Equicord", "scripts": { - "build": "pnpm depCheck && node --require=./scripts/suppressExperimentalWarnings.js scripts/build/build.mjs", + "build": "node --require=./scripts/suppressExperimentalWarnings.js scripts/build/build.mjs", "buildStandalone": "pnpm build --standalone", - "buildWeb": "pnpm depCheck && node --require=./scripts/suppressExperimentalWarnings.js scripts/build/buildWeb.mjs", + "buildWeb": "node --require=./scripts/suppressExperimentalWarnings.js scripts/build/buildWeb.mjs", "buildWebStandalone": "pnpm buildWeb --standalone", "buildReporter": "pnpm buildWebStandalone --reporter --skip-extension", "buildReporterDesktop": "pnpm build --reporter", @@ -39,8 +39,7 @@ "lint:patches": "node scripts/lintPatches.mjs", "test": "pnpm buildStandalone && pnpm testTsc && pnpm lint:fix && pnpm lint-styles && pnpm lint:intl && pnpm lint:patches && pnpm generatePluginJson", "testWeb": "pnpm lint:fix && pnpm buildWeb && pnpm testTsc", - "testTsc": "tsc --noEmit", - "depCheck": "node scripts/depCheck.mjs" + "testTsc": "tsc --noEmit" }, "dependencies": { "@ffmpeg/ffmpeg": "^0.12.10", @@ -105,4 +104,4 @@ "engines": { "node": ">=18" } -} \ No newline at end of file +} diff --git a/pnpm-workspace.yaml b/pnpm-workspace.yaml index 0e9faf0f1..122d59507 100644 --- a/pnpm-workspace.yaml +++ b/pnpm-workspace.yaml @@ -21,3 +21,5 @@ allowedDeprecatedVersions: source-map-url: "*" urix: "*" q: "*" + +verifyDepsBeforeRun: prompt diff --git a/scripts/depCheck.mjs b/scripts/depCheck.mjs deleted file mode 100644 index 0a333a900..000000000 --- a/scripts/depCheck.mjs +++ /dev/null @@ -1,33 +0,0 @@ -/* - * Vencord, a Discord client mod - * Copyright (c) 2026 Vendicated and contributors - * SPDX-License-Identifier: GPL-3.0-or-later - */ - -import { execSync } from "child_process"; -import { existsSync, readFileSync } from "fs"; -import { createInterface } from "readline/promises"; -import { dirname, join } from "path"; -import { fileURLToPath } from "url"; - -const root = join(dirname(fileURLToPath(import.meta.url)), ".."); -const PackageJSON = JSON.parse(readFileSync(join(root, "package.json"), "utf-8")); - -const allDeps = { ...PackageJSON.dependencies, ...PackageJSON.devDependencies }; -const requiredDeps = Object.keys(allDeps); -const missing = requiredDeps.filter(d => { - const v = allDeps[d]; - return !v.startsWith("link:") && !v.startsWith("workspace:") && !existsSync(join(root, "node_modules", d, "package.json")); -}); - -if (missing.length) { - console.error(`\x1b[31mMissing ${missing.length} package(s): ${missing.join(", ")}\x1b[0m`); - const rl = createInterface({ input: process.stdin, output: process.stderr }); - rl.on("SIGINT", () => { rl.close(); process.exit(1); }); - try { - const ans = await rl.question("\x1b[33mRun 'pnpm install'? [Y/n]: \x1b[0m"); - if (!ans || /^y/i.test(ans)) execSync("pnpm install --frozen-lockfile", { cwd: root, stdio: "inherit" }); - } finally { rl.close(); } -} else { - console.log("\x1b[32mAll dependencies are installed.\x1b[0m"); -}