Merge branch 'main' into main
This commit is contained in:
commit
c9da552fa5
8 changed files with 858 additions and 1143 deletions
|
@ -1,69 +0,0 @@
|
||||||
{
|
|
||||||
"root": true,
|
|
||||||
"parser": "@typescript-eslint/parser",
|
|
||||||
"ignorePatterns": ["dist", "node_modules"],
|
|
||||||
"plugins": [
|
|
||||||
"@typescript-eslint",
|
|
||||||
"license-header",
|
|
||||||
"simple-import-sort",
|
|
||||||
"unused-imports",
|
|
||||||
"path-alias",
|
|
||||||
"prettier"
|
|
||||||
],
|
|
||||||
"settings": {
|
|
||||||
"import/resolver": {
|
|
||||||
"alias": {
|
|
||||||
"map": []
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"rules": {
|
|
||||||
"license-header/header": ["error", "scripts/header.txt"],
|
|
||||||
"eqeqeq": ["error", "always", { "null": "ignore" }],
|
|
||||||
"spaced-comment": ["error", "always", { "markers": ["!"] }],
|
|
||||||
"yoda": "error",
|
|
||||||
"prefer-destructuring": [
|
|
||||||
"error",
|
|
||||||
{
|
|
||||||
"VariableDeclarator": { "array": false, "object": true },
|
|
||||||
"AssignmentExpression": { "array": false, "object": false }
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"operator-assignment": ["error", "always"],
|
|
||||||
"no-useless-computed-key": "error",
|
|
||||||
"no-unneeded-ternary": ["error", { "defaultAssignment": false }],
|
|
||||||
"no-invalid-regexp": "error",
|
|
||||||
"no-constant-condition": ["error", { "checkLoops": false }],
|
|
||||||
"no-duplicate-imports": "error",
|
|
||||||
"no-extra-semi": "error",
|
|
||||||
"dot-notation": "error",
|
|
||||||
"no-useless-escape": "error",
|
|
||||||
"no-fallthrough": "error",
|
|
||||||
"for-direction": "error",
|
|
||||||
"no-async-promise-executor": "error",
|
|
||||||
"no-cond-assign": "error",
|
|
||||||
"no-dupe-else-if": "error",
|
|
||||||
"no-duplicate-case": "error",
|
|
||||||
"no-irregular-whitespace": "error",
|
|
||||||
"no-loss-of-precision": "error",
|
|
||||||
"no-misleading-character-class": "error",
|
|
||||||
"no-prototype-builtins": "error",
|
|
||||||
"no-regex-spaces": "error",
|
|
||||||
"no-shadow-restricted-names": "error",
|
|
||||||
"no-unexpected-multiline": "error",
|
|
||||||
"no-unsafe-optional-chaining": "error",
|
|
||||||
"no-useless-backreference": "error",
|
|
||||||
"use-isnan": "error",
|
|
||||||
"prefer-const": "error",
|
|
||||||
"prefer-spread": "error",
|
|
||||||
|
|
||||||
"simple-import-sort/imports": "error",
|
|
||||||
"simple-import-sort/exports": "error",
|
|
||||||
|
|
||||||
"unused-imports/no-unused-imports": "error",
|
|
||||||
|
|
||||||
"path-alias/no-relative": "error",
|
|
||||||
|
|
||||||
"prettier/prettier": "error"
|
|
||||||
}
|
|
||||||
}
|
|
2
.github/ISSUE_TEMPLATE/bug_report.yml
vendored
2
.github/ISSUE_TEMPLATE/bug_report.yml
vendored
|
@ -11,7 +11,7 @@ body:
|
||||||
|
|
||||||
Make sure a similar issue doesn't already exist by [searching the existing issues](https://github.com/Vencord/Vesktop/issues?q=is%3Aissue) for keywords!
|
Make sure a similar issue doesn't already exist by [searching the existing issues](https://github.com/Vencord/Vesktop/issues?q=is%3Aissue) for keywords!
|
||||||
|
|
||||||
Make sure both Vesktop and Vencord are fully up to date. You can update Vencord by right-clicking the Vesktop tray icon and pressing "Update Vencord"
|
Make sure both Vesktop and Vencord are fully up to date. You can update Vencord by right-clicking the Vesktop tray icon and pressing "Repair Vencord"
|
||||||
|
|
||||||
**DO NOT REPORT** any of the following issues:
|
**DO NOT REPORT** any of the following issues:
|
||||||
- Purely graphical glitches like flickering, scaling issues[^1]
|
- Purely graphical glitches like flickering, scaling issues[^1]
|
||||||
|
|
102
eslint.config.mjs
Normal file
102
eslint.config.mjs
Normal file
|
@ -0,0 +1,102 @@
|
||||||
|
/*
|
||||||
|
* SPDX-License-Identifier: GPL-3.0
|
||||||
|
* Vesktop, a desktop app aiming to give you a snappier Discord Experience
|
||||||
|
* Copyright (c) 2023 Vendicated and Vencord contributors
|
||||||
|
*/
|
||||||
|
|
||||||
|
//@ts-check
|
||||||
|
|
||||||
|
import stylistic from "@stylistic/eslint-plugin";
|
||||||
|
import pathAlias from "eslint-plugin-path-alias";
|
||||||
|
import header from "eslint-plugin-simple-header";
|
||||||
|
import importSort from "eslint-plugin-simple-import-sort";
|
||||||
|
import unusedImports from "eslint-plugin-unused-imports";
|
||||||
|
import tseslint from "typescript-eslint";
|
||||||
|
import prettier from "eslint-plugin-prettier";
|
||||||
|
|
||||||
|
export default tseslint.config(
|
||||||
|
{ ignores: ["dist"] },
|
||||||
|
|
||||||
|
{
|
||||||
|
files: ["src/**/*.{tsx,ts,mts,mjs,js,jsx}"],
|
||||||
|
plugins: {
|
||||||
|
header,
|
||||||
|
stylistic,
|
||||||
|
importSort,
|
||||||
|
unusedImports,
|
||||||
|
pathAlias,
|
||||||
|
prettier
|
||||||
|
},
|
||||||
|
settings: {
|
||||||
|
"import/resolver": {
|
||||||
|
alias: {
|
||||||
|
map: []
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
languageOptions: {
|
||||||
|
parser: tseslint.parser,
|
||||||
|
parserOptions: {
|
||||||
|
project: true,
|
||||||
|
tsconfigRootDir: import.meta.dirname
|
||||||
|
}
|
||||||
|
},
|
||||||
|
rules: {
|
||||||
|
"header/header": [
|
||||||
|
"error",
|
||||||
|
{
|
||||||
|
files: ["scripts/header.txt"]
|
||||||
|
}
|
||||||
|
],
|
||||||
|
|
||||||
|
// ESLint Rules
|
||||||
|
|
||||||
|
yoda: "error",
|
||||||
|
eqeqeq: ["error", "always", { null: "ignore" }],
|
||||||
|
"prefer-destructuring": [
|
||||||
|
"error",
|
||||||
|
{
|
||||||
|
VariableDeclarator: { array: false, object: true },
|
||||||
|
AssignmentExpression: { array: false, object: false }
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"operator-assignment": ["error", "always"],
|
||||||
|
"no-useless-computed-key": "error",
|
||||||
|
"no-unneeded-ternary": ["error", { defaultAssignment: false }],
|
||||||
|
"no-invalid-regexp": "error",
|
||||||
|
"no-constant-condition": ["error", { checkLoops: false }],
|
||||||
|
"no-duplicate-imports": "error",
|
||||||
|
"dot-notation": "error",
|
||||||
|
"no-useless-escape": "error",
|
||||||
|
"no-fallthrough": "error",
|
||||||
|
"for-direction": "error",
|
||||||
|
"no-async-promise-executor": "error",
|
||||||
|
"no-cond-assign": "error",
|
||||||
|
"no-dupe-else-if": "error",
|
||||||
|
"no-duplicate-case": "error",
|
||||||
|
"no-irregular-whitespace": "error",
|
||||||
|
"no-loss-of-precision": "error",
|
||||||
|
"no-misleading-character-class": "error",
|
||||||
|
"no-prototype-builtins": "error",
|
||||||
|
"no-regex-spaces": "error",
|
||||||
|
"no-shadow-restricted-names": "error",
|
||||||
|
"no-unexpected-multiline": "error",
|
||||||
|
"no-unsafe-optional-chaining": "error",
|
||||||
|
"no-useless-backreference": "error",
|
||||||
|
"use-isnan": "error",
|
||||||
|
"prefer-const": "error",
|
||||||
|
"prefer-spread": "error",
|
||||||
|
|
||||||
|
// Styling Rules
|
||||||
|
"stylistic/spaced-comment": ["error", "always", { markers: ["!"] }],
|
||||||
|
"stylistic/no-extra-semi": "error",
|
||||||
|
|
||||||
|
// Plugin Rules
|
||||||
|
"importSort/imports": "error",
|
||||||
|
"importSort/exports": "error",
|
||||||
|
"unusedImports/no-unused-imports": "error",
|
||||||
|
"pathAlias/no-relative": "error",
|
||||||
|
"prettier/prettier": "error"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
);
|
42
package.json
42
package.json
|
@ -13,7 +13,7 @@
|
||||||
"build:dev": "pnpm build --dev",
|
"build:dev": "pnpm build --dev",
|
||||||
"package": "pnpm build && electron-builder",
|
"package": "pnpm build && electron-builder",
|
||||||
"package:dir": "pnpm build && electron-builder --dir",
|
"package:dir": "pnpm build && electron-builder --dir",
|
||||||
"lint": "eslint . --ext .js,.jsx,.ts,.tsx,.mts,.mjs",
|
"lint": "eslint",
|
||||||
"lint:fix": "pnpm lint --fix",
|
"lint:fix": "pnpm lint --fix",
|
||||||
"start": "pnpm build && electron .",
|
"start": "pnpm build && electron .",
|
||||||
"start:dev": "pnpm build:dev && electron .",
|
"start:dev": "pnpm build:dev && electron .",
|
||||||
|
@ -24,36 +24,35 @@
|
||||||
"updateMeta": "tsx scripts/utils/updateMeta.mts"
|
"updateMeta": "tsx scripts/utils/updateMeta.mts"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"arrpc": "github:OpenAsar/arrpc#c62ec6a04c8d870530aa6944257fe745f6c59a24",
|
"arrpc": "github:OpenAsar/arrpc#5aadc307cb9bf4479f0a12364a253b07a77ace22",
|
||||||
"electron-updater": "^6.2.1"
|
"electron-updater": "^6.3.4"
|
||||||
},
|
},
|
||||||
"optionalDependencies": {
|
"optionalDependencies": {
|
||||||
"@vencord/venmic": "^6.1.0"
|
"@vencord/venmic": "^6.1.0"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@fal-works/esbuild-plugin-global-externals": "^2.1.2",
|
"@fal-works/esbuild-plugin-global-externals": "^2.1.2",
|
||||||
"@types/node": "^20.14.11",
|
"@stylistic/eslint-plugin": "^2.8.0",
|
||||||
"@types/react": "^18.3.3",
|
"@types/node": "^22.5.5",
|
||||||
"@typescript-eslint/eslint-plugin": "^7.17.0",
|
"@types/react": "^18.3.8",
|
||||||
"@typescript-eslint/parser": "^7.17.0",
|
|
||||||
"@vencord/types": "^1.8.4",
|
"@vencord/types": "^1.8.4",
|
||||||
"dotenv": "^16.4.5",
|
"dotenv": "^16.4.5",
|
||||||
"electron": "^31.2.1",
|
"electron": "^32.1.2",
|
||||||
"electron-builder": "^25.0.1",
|
"electron-builder": "^25.0.5",
|
||||||
"esbuild": "^0.20.2",
|
"esbuild": "^0.23.1",
|
||||||
"eslint": "^8.57.0",
|
"eslint": "^9.11.0",
|
||||||
"eslint-config-prettier": "^9.1.0",
|
|
||||||
"eslint-import-resolver-alias": "^1.1.2",
|
"eslint-import-resolver-alias": "^1.1.2",
|
||||||
"eslint-plugin-license-header": "^0.6.1",
|
"eslint-plugin-path-alias": "^2.1.0",
|
||||||
"eslint-plugin-path-alias": "^1.1.0",
|
|
||||||
"eslint-plugin-prettier": "^5.2.1",
|
"eslint-plugin-prettier": "^5.2.1",
|
||||||
|
"eslint-plugin-simple-header": "^1.2.1",
|
||||||
"eslint-plugin-simple-import-sort": "^12.1.1",
|
"eslint-plugin-simple-import-sort": "^12.1.1",
|
||||||
"eslint-plugin-unused-imports": "^3.2.0",
|
"eslint-plugin-unused-imports": "^4.1.4",
|
||||||
"prettier": "^3.3.3",
|
"prettier": "^3.3.3",
|
||||||
"source-map-support": "^0.5.21",
|
"source-map-support": "^0.5.21",
|
||||||
"tsx": "^4.16.2",
|
"tsx": "^4.19.1",
|
||||||
"type-fest": "^4.23.0",
|
"type-fest": "^4.26.1",
|
||||||
"typescript": "^5.5.4",
|
"typescript": "^5.6.2",
|
||||||
|
"typescript-eslint": "^8.6.0",
|
||||||
"xml-formatter": "^3.6.3"
|
"xml-formatter": "^3.6.3"
|
||||||
},
|
},
|
||||||
"packageManager": "pnpm@9.1.0",
|
"packageManager": "pnpm@9.1.0",
|
||||||
|
@ -181,15 +180,14 @@
|
||||||
"provider": "github"
|
"provider": "github"
|
||||||
},
|
},
|
||||||
"rpm": {
|
"rpm": {
|
||||||
"fpm": [
|
"fpm": [
|
||||||
"--rpm-rpmbuild-define=_build_id_links none"
|
"--rpm-rpmbuild-define=_build_id_links none"
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"pnpm": {
|
"pnpm": {
|
||||||
"patchedDependencies": {
|
"patchedDependencies": {
|
||||||
"arrpc@3.4.0": "patches/arrpc@3.4.0.patch"
|
"arrpc@3.5.0": "patches/arrpc@3.5.0.patch"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
1766
pnpm-lock.yaml
1766
pnpm-lock.yaml
File diff suppressed because it is too large
Load diff
|
@ -61,11 +61,11 @@ export const DEFAULT_HEIGHT = 720;
|
||||||
|
|
||||||
export const DISCORD_HOSTNAMES = ["discord.com", "canary.discord.com", "ptb.discord.com"];
|
export const DISCORD_HOSTNAMES = ["discord.com", "canary.discord.com", "ptb.discord.com"];
|
||||||
|
|
||||||
|
const VersionString = `AppleWebKit/537.36 (KHTML, like Gecko) Chrome/${process.versions.chrome.split(".")[0]}.0.0.0 Safari/537.36`;
|
||||||
const BrowserUserAgents = {
|
const BrowserUserAgents = {
|
||||||
darwin: "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/126.0.0.0 Safari/537.36",
|
darwin: `Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) ${VersionString}`,
|
||||||
linux: "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/126.0.0.0 Safari/537.36",
|
linux: `Mozilla/5.0 (X11; Linux x86_64) ${VersionString}`,
|
||||||
windows:
|
windows: `Mozilla/5.0 (Windows NT 10.0; Win64; x64) ${VersionString}`
|
||||||
"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/126.0.0.0 Safari/537.36"
|
|
||||||
};
|
};
|
||||||
|
|
||||||
export const BrowserUserAgent = BrowserUserAgents[process.platform] || BrowserUserAgents.windows;
|
export const BrowserUserAgent = BrowserUserAgents[process.platform] || BrowserUserAgents.windows;
|
||||||
|
|
|
@ -499,5 +499,17 @@ export async function createWindows() {
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
|
// evil hack to fix electron 32 regression that makes devtools always light theme
|
||||||
|
// https://github.com/electron/electron/issues/43367
|
||||||
|
// TODO: remove once fixed
|
||||||
|
mainWin.webContents.on("devtools-opened", () => {
|
||||||
|
if (!nativeTheme.shouldUseDarkColors) return;
|
||||||
|
|
||||||
|
nativeTheme.themeSource = "light";
|
||||||
|
setTimeout(() => {
|
||||||
|
nativeTheme.themeSource = "dark";
|
||||||
|
}, 100);
|
||||||
|
});
|
||||||
|
|
||||||
initArRPC();
|
initArRPC();
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue