Merge remote-tracking branch 'upstream/dev' into dev

This commit is contained in:
thororen1234 2026-03-19 13:51:45 -04:00
commit c23c280558
No known key found for this signature in database
5 changed files with 75 additions and 35 deletions

View file

@ -1,7 +1,7 @@
{
"name": "equicord",
"private": "true",
"version": "1.14.5.1",
"version": "1.14.6.0",
"description": "The other cutest Discord client mod",
"homepage": "https://github.com/Equicord/Equicord#readme",
"bugs": {
@ -82,6 +82,7 @@
"highlight.js": "11.11.1",
"html-minifier-terser": "^7.2.0",
"moment": "^2.22.2",
"p-limit": "^7.3.0",
"puppeteer-core": "^24.30.0",
"standalone-electron-types": "^34.2.0",
"stylelint": "^16.25.0",
@ -95,7 +96,7 @@
"typescript-transform-paths": "^3.5.5",
"zip-local": "^0.3.5"
},
"packageManager": "pnpm@10.30.3",
"packageManager": "pnpm@10.32.1",
"pnpm": {
"patchedDependencies": {
"@types/less@3.0.8": "patches/@types__less@3.0.8.patch"

18
pnpm-lock.yaml generated
View file

@ -140,6 +140,9 @@ importers:
moment:
specifier: ^2.22.2
version: 2.30.1
p-limit:
specifier: ^7.3.0
version: 7.3.0
puppeteer-core:
specifier: ^24.30.0
version: 24.30.0
@ -1038,6 +1041,7 @@ packages:
basic-ftp@5.0.5:
resolution: {integrity: sha512-4Bcg1P8xhUuqcii/S0Z9wiHIrQVPMermM1any+MX5GeGD7faD3/msQUDGLol9wOcz4/jbg/WJnGqoJF6LiBdtg==}
engines: {node: '>=10.0.0'}
deprecated: Security vulnerability fixed in 5.2.0, please upgrade
brace-expansion@1.1.12:
resolution: {integrity: sha512-9T9UjW3r0UW5c1Q7GTwllptXwhvYmEzFhzMfZ9H7FQWt+uZePjZPjBP/W1ZEyZ1twGWom5/56TF4lPcqjnDHcg==}
@ -2069,6 +2073,10 @@ packages:
resolution: {integrity: sha512-TYOanM3wGwNGsZN2cVTYPArw454xnXj5qmWF1bEoAc4+cU/ol7GVh7odevjp1FNHduHc3KZMcFduxU5Xc6uJRQ==}
engines: {node: '>=10'}
p-limit@7.3.0:
resolution: {integrity: sha512-7cIXg/Z0M5WZRblrsOla88S4wAK+zOQQWeBYfV3qJuJXMr+LnbYjaadrFaS0JILfEDPVqHyKnZ1Z/1d6J9VVUw==}
engines: {node: '>=20'}
p-locate@5.0.0:
resolution: {integrity: sha512-LaNjtRWUBY++zB5nE/NwcaoMylSPk+S+ZHNB1TzdbMJMny6dynpAGt7X/tl/QYq3TIeE6nxHppbo2LGymrG5Pw==}
engines: {node: '>=10'}
@ -2684,6 +2692,10 @@ packages:
resolution: {integrity: sha512-rVksvsnNCdJ/ohGc6xgPwyN8eheCxsiLM8mxuE/t/mOVqJewPuO1miLpTHQiRgTKCLexL4MeAFVagts7HmNZ2Q==}
engines: {node: '>=10'}
yocto-queue@1.2.2:
resolution: {integrity: sha512-4LCcse/U2MHZ63HAJVE+v71o7yOdIe4cZ70Wpf8D/IyjDKYQLV5GD46B+hSTjJsvV5PztjvHoU580EftxjDZFQ==}
engines: {node: '>=12.20'}
zip-local@0.3.5:
resolution: {integrity: sha512-GRV3D5TJY+/PqyeRm5CYBs7xVrKTKzljBoEXvocZu0HJ7tPEcgpSOYa2zFIsCZWgKWMuc4U3yMFgFkERGFIB9w==}
@ -4669,6 +4681,10 @@ snapshots:
dependencies:
yocto-queue: 0.1.0
p-limit@7.3.0:
dependencies:
yocto-queue: 1.2.2
p-locate@5.0.0:
dependencies:
p-limit: 3.1.0
@ -5429,6 +5445,8 @@ snapshots:
yocto-queue@0.1.0: {}
yocto-queue@1.2.2: {}
zip-local@0.3.5:
dependencies:
async: 1.5.2

View file

@ -81,7 +81,6 @@ export function Updatable(props: CommonProps) {
<>
<Flex className={Margins.bottom8} gap="8px">
<Button
size="small"
disabled={isUpdating || isChecking}
onClick={runWithDispatch(setIsChecking, async () => {
const outdated = await checkForUpdates();

View file

@ -17,12 +17,15 @@
*/
import { useSettings } from "@api/Settings";
import { Button } from "@components/Button";
import { Card } from "@components/Card";
import { Divider } from "@components/Divider";
import { Flex } from "@components/Flex";
import { FormSwitch } from "@components/FormSwitch";
import { Heading } from "@components/Heading";
import { Heading, HeadingSecondary } from "@components/Heading";
import { Link } from "@components/Link";
import { Paragraph } from "@components/Paragraph";
import { SettingsTab, wrapTab } from "@components/settings";
import { SettingsTab, wrapTab } from "@components/settings/tabs/BaseTab";
import { Margins } from "@utils/margins";
import { useAwaiter } from "@utils/react";
import { getRepo, isNewer, UpdateLogger } from "@utils/updater";
@ -37,6 +40,34 @@ interface CommonProps {
repoPending: boolean;
}
function EquibopSection() {
if (!IS_EQUIBOP) return null;
const [isEquibopOutdated] = useAwaiter<boolean>(VesktopNative.app.isOutdated, { fallbackValue: false });
return (
<Flex className={Margins.bottom20} flexDirection="column" gap="1em">
<Card variant="brand">
<HeadingSecondary>Equibop & Equicord</HeadingSecondary>
<Paragraph>Equibop and Equicord are two separate things. This updater is for Equicord.</Paragraph>
<Paragraph className={Margins.top8}>
You receive separate popups for Equibop updates. You can also manually update by installing the <Link href="https://equibop.org/install">latest version</Link>.
</Paragraph>
</Card>
{isEquibopOutdated && (
<Card variant="warning">
<HeadingSecondary>Equibop Outdated</HeadingSecondary>
<Flex flexDirection="column" gap="0.5em">
<Paragraph>Your version of Equibop is outdated!</Paragraph>
<Button variant="link" onClick={() => VesktopNative.app.openUpdater()}>Open Equibop Updater</Button>
</Flex>
</Card>
)}
</Flex>
);
}
function Updater() {
const settings = useSettings(["autoUpdate", "autoUpdateNotification"]);
@ -54,6 +85,7 @@ function Updater() {
return (
<SettingsTab>
<EquibopSection />
<Heading className={Margins.top16}>Update Preferences</Heading>
<Paragraph className={Margins.bottom20}>
Control how Equicord keeps itself up to date. You can choose to update automatically in the background or be notified when new updates are available.

View file

@ -9,6 +9,7 @@ import { canonicalizeMatch } from "@utils/patches";
import { ModuleFactory } from "@vencord/discord-types/webpack";
import * as Webpack from "@webpack";
import { wreq } from "@webpack";
import pLimit from "p-limit";
import { AnyModuleFactory } from "webpack";
function getWebpackChunkMap() {
@ -43,6 +44,7 @@ async function promiseAllSettledBatched<T>(tasks: (() => Promise<T>)[], batchSiz
export async function loadLazyChunks() {
const LazyChunkLoaderLogger = new Logger("LazyChunkLoader");
const queue = pLimit(50);
try {
LazyChunkLoaderLogger.log("Loading all chunks...");
@ -72,10 +74,14 @@ export async function loadLazyChunks() {
const shouldForceDefer = false;
await promiseAllSettledBatched(Array.from(lazyChunks).map(([, rawChunkIds, entryPoint]) => async () => {
const chunkIds = rawChunkIds ? Array.from(rawChunkIds.matchAll(Webpack.ChunkIdsRegex)).map(m => {
const numChunkId = Number(m[1]);
return Number.isNaN(numChunkId) ? m[1] : numChunkId;
}) : [];
const chunkIds = rawChunkIds
?.matchAll(Webpack.ChunkIdsRegex)
.map(m => {
const numChunkId = Number(m[1]);
return Number.isNaN(numChunkId) ? m[1] : numChunkId;
})
.toArray()
?? [];
if (chunkIds.length === 0) {
return;
@ -96,18 +102,11 @@ export async function loadLazyChunks() {
if (wreq.u(id) == null || wreq.u(id) === "undefined.js") continue;
let isWorkerAsset = false;
for (let attempt = 0; attempt < 3; attempt++) {
try {
isWorkerAsset = await fetch(wreq.p + wreq.u(id))
.then(r => r.text())
.then(t => /importScripts\(|self\.postMessage/.test(t));
break;
} catch (err) {
if (attempt === 2) throw err;
await new Promise(resolve => setTimeout(resolve, 500 * (attempt + 1)));
}
}
const isWorkerAsset = await queue(() =>
fetch(wreq.p + wreq.u(id))
.then(r => r.text())
.then(t => /importScripts\(|self\.postMessage/.test(t))
);
if (isWorkerAsset) {
invalidChunks.add(id);
@ -203,25 +202,16 @@ export async function loadLazyChunks() {
return !(validChunks.has(id) || invalidChunks.has(id));
});
await promiseAllSettledBatched(chunksLeft.map(id => async () => {
let isWorkerAsset = false;
for (let attempt = 0; attempt < 3; attempt++) {
try {
isWorkerAsset = await fetch(wreq.p + wreq.u(id))
.then(r => r.text())
.then(t => /importScripts\(|self\.postMessage/.test(t));
break;
} catch (err) {
if (attempt === 2) throw err;
await new Promise(resolve => setTimeout(resolve, 500 * (attempt + 1)));
}
}
await promiseAllSettledBatched(chunksLeft.map(id => queue(async () => {
const isWorkerAsset = await fetch(wreq.p + wreq.u(id))
.then(r => r.text())
.then(t => /importScripts\(|self\.postMessage/.test(t));
// Loads the chunk. Currently this only happens with the language packs which are loaded differently
if (!isWorkerAsset) {
await wreq.e(id);
}
}));
})));
LazyChunkLoaderLogger.log("Finished loading all chunks!");
} catch (e) {