Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(package): @vencord/discord-types #2446

Open
wants to merge 211 commits into
base: dev
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
211 commits
Select commit Hold shift + click to select a range
d4783ff
Initial commit
ryan-0324 May 12, 2024
a2afaa4
Merge branch 'dev' into discord-types
ryan-0324 May 13, 2024
4ef9a22
Progress
ryan-0324 May 13, 2024
6c444fc
Lint
ryan-0324 May 13, 2024
9f6725f
Progress
ryan-0324 May 14, 2024
abf6942
Progress
ryan-0324 May 17, 2024
2cb83df
Merge branch 'dev' into discord-types
ryan-0324 May 17, 2024
8732f5d
Merge branch 'dev' into discord-types
ryan-0324 May 18, 2024
67569af
Progress
ryan-0324 May 18, 2024
54bd8cd
Merge branch 'dev' into discord-types
ryan-0324 May 21, 2024
619d1b1
Progress
ryan-0324 May 21, 2024
5881b65
Merge branch 'dev' into discord-types
ryan-0324 May 24, 2024
8821d78
Progress
ryan-0324 May 24, 2024
5bb416d
Progress
ryan-0324 May 24, 2024
f6c07d1
Progress
ryan-0324 May 25, 2024
10f3d21
Progress
ryan-0324 May 25, 2024
5570ce1
Progress
ryan-0324 May 27, 2024
c8602ef
Fix reporter breaking because of ConsoleShortcuts
Nuckyz May 29, 2024
0c86f13
Moved types to `packages/discord-types`
ryan-0324 May 29, 2024
9da127c
Merge branch 'dev' into discord-types
ryan-0324 May 29, 2024
0c951e8
Progress
ryan-0324 May 31, 2024
fa252b5
Merge branch 'dev' into discord-types
ryan-0324 May 31, 2024
f183b77
Progress
ryan-0324 Jun 1, 2024
7f1775c
Merge branch 'dev' into discord-types
ryan-0324 Jun 1, 2024
78fd37a
fix(css): brand-experiment is now brand-500
Vendicated Jun 1, 2024
d8524b0
Add shortcut for lazy loading chunks
Nuckyz Jun 1, 2024
c68fba4
Merge branch 'dev' into discord-types
ryan-0324 Jun 1, 2024
66b0e72
Progress
ryan-0324 Jun 2, 2024
6e1d32d
Fixed workflow
ryan-0324 Jun 2, 2024
ef8d490
Hopefully actually fixed workflow this time
ryan-0324 Jun 2, 2024
6e6ee4d
NoPendingCount: Fix for message requests
Nuckyz Jun 2, 2024
ba4db25
Progress
ryan-0324 Jun 3, 2024
cc2a9e5
Merge branch 'dev' into discord-types
ryan-0324 Jun 4, 2024
2c9b6e9
Progress
ryan-0324 Jun 4, 2024
4bab6cc
Fixed file in wrong folder
ryan-0324 Jun 4, 2024
2a07a5f
Fixes
ryan-0324 Jun 4, 2024
fecb9c5
Progress
ryan-0324 Jun 5, 2024
ef09e60
Merge branch 'dev' into discord-types
ryan-0324 Jun 6, 2024
0cc59f1
Progress
ryan-0324 Jun 6, 2024
8d2abbe
Fixes
ryan-0324 Jun 6, 2024
d422d04
Merge branch 'dev' into discord-types
ryan-0324 Jun 7, 2024
b990457
Progress
ryan-0324 Jun 7, 2024
c1ee99b
Merge branch 'dev' into discord-types
ryan-0324 Jun 8, 2024
f5bed65
Progress
ryan-0324 Jun 8, 2024
2090f62
@vencord/discord-types 1.0.0
ryan-0324 Jun 15, 2024
c618bbb
Migration
ryan-0324 Jun 15, 2024
8298967
Migration
ryan-0324 Jun 15, 2024
1d77dc1
Migration
ryan-0324 Jun 15, 2024
7fa3f10
Migration
ryan-0324 Jun 15, 2024
4483634
Merge branch 'dev' of https://github.com/Vendicated/Vencord into disc…
ryan-0324 Jun 15, 2024
ad9c682
Update dependencies
ryan-0324 Jun 15, 2024
9dac73d
Update pnpm-lock.yaml
ryan-0324 Jun 15, 2024
e192a50
discord-types is now only needed for WebpackInstance
ryan-0324 Jun 16, 2024
08a78a7
Merge branch 'dev' of https://github.com/Vendicated/Vencord into disc…
ryan-0324 Jun 17, 2024
656c455
Update dependencies
ryan-0324 Jun 17, 2024
242367f
Merge branch 'dev' of https://github.com/Vendicated/Vencord into disc…
ryan-0324 Jun 17, 2024
4a104dd
Merge branch 'dev' of https://github.com/Vendicated/Vencord into disc…
ryan-0324 Jun 18, 2024
8226b16
Merge branch 'dev' of https://github.com/Vendicated/Vencord into disc…
ryan-0324 Jun 19, 2024
a9e031f
Merge branch 'dev' of https://github.com/Vendicated/Vencord into disc…
ryan-0324 Jun 20, 2024
87e3d32
feat: i18n types
ryan-0324 Jun 22, 2024
98afd55
Merge branch 'dev' of https://github.com/Vendicated/Vencord into disc…
ryan-0324 Jun 22, 2024
c7c417a
@ryan-0324
ryan-0324 Jun 22, 2024
43e493c
chore: update dependencies & misc. changes
ryan-0324 Jun 23, 2024
50441c1
Merge branch 'dev' of https://github.com/Vendicated/Vencord into disc…
ryan-0324 Jun 23, 2024
805baa5
feat: record constructor types
ryan-0324 Jun 24, 2024
91aa450
chore: update dependencies
ryan-0324 Jun 24, 2024
296375a
fix: regression where RelationshipNotifier errors when `CHANNEL_DELET…
ryan-0324 Jun 25, 2024
9afdf31
refactor: misc. changes
ryan-0324 Jun 25, 2024
d5dd31f
Merge branch 'dev' of https://github.com/Vendicated/Vencord into disc…
ryan-0324 Jun 25, 2024
a73277e
chore: update dependencies
ryan-0324 Jun 25, 2024
d2deaec
Merge branch 'dev' of https://github.com/Vendicated/Vencord into disc…
ryan-0324 Jun 27, 2024
3fb3de1
Merge branch 'dev' of https://github.com/Vendicated/Vencord into disc…
ryan-0324 Jun 27, 2024
748a456
Delete patching properties after used
Nuckyz Jun 28, 2024
2254382
Merge branch 'dev' of https://github.com/Vendicated/Vencord into disc…
ryan-0324 Jun 28, 2024
450efac
Merge branch 'dev' of https://github.com/Vendicated/Vencord into disc…
ryan-0324 Jun 29, 2024
366da53
fix: regression where ShowHiddenChannels errors when `isHiddenChannel…
ryan-0324 Jun 30, 2024
a9916d1
chore: ChangeReporter
ryan-0324 Jul 7, 2024
2324014
Merge branch 'dev' of https://github.com/Vendicated/Vencord into disc…
ryan-0324 Jul 7, 2024
3efd9db
chore: update lockfile
ryan-0324 Jul 7, 2024
00c35d1
chore: fix eslint trying to parse `.json` files
ryan-0324 Jul 7, 2024
3913cc6
fix: apply reported changes
ryan-0324 Jul 7, 2024
627ee47
chore: ChangeReporter webhook support
ryan-0324 Jul 8, 2024
5fb88c2
fix: apply reported changes
ryan-0324 Jul 8, 2024
cef9fc7
fix: regression where ShowHiddenChannels treats non-guild channels as…
ryan-0324 Jul 8, 2024
a21c37d
chore: ChangeReporter output improvements
ryan-0324 Jul 9, 2024
810ad09
Merge branch 'dev' of https://github.com/Vendicated/Vencord into disc…
ryan-0324 Jul 10, 2024
1fbde89
chore: fix ChangeReporter summary output
ryan-0324 Jul 10, 2024
bf930b1
chore: ChangeReporter minor refactor
ryan-0324 Jul 10, 2024
9b97442
chore: update dependencies
ryan-0324 Jul 11, 2024
e45d0bc
Merge branch 'dev' of https://github.com/Vendicated/Vencord into disc…
ryan-0324 Jul 11, 2024
591741e
Merge branch 'dev' of https://github.com/Vendicated/Vencord into disc…
ryan-0324 Jul 13, 2024
8f8e964
fix: apply reported changes
ryan-0324 Jul 13, 2024
3110a3c
Merge branch 'dev' of https://github.com/Vendicated/Vencord into disc…
ryan-0324 Jul 13, 2024
64e8ed4
Merge branch 'dev' of https://github.com/Vendicated/Vencord into disc…
ryan-0324 Jul 13, 2024
514668d
fix: update FluxActionType and I18NMessages
ryan-0324 Jul 13, 2024
79da1d2
chore: update dependencies
ryan-0324 Jul 13, 2024
057cd87
feat: DisplayProfile
ryan-0324 Jul 14, 2024
56f45c0
Merge branch 'dev' of https://github.com/Vendicated/Vencord into disc…
ryan-0324 Jul 16, 2024
99d7ed0
fix: apply reported changes
ryan-0324 Jul 16, 2024
0c8e91b
chore: update eslint to 9.7.0 and stylelint to 16.7.0
ryan-0324 Jul 17, 2024
2243e67
chore: delete `.eslintrc.json`
ryan-0324 Jul 17, 2024
5d70313
fix: apply reported changes
ryan-0324 Jul 17, 2024
8be697c
Merge branch 'dev' into discord-types
ryan-0324 Jul 17, 2024
d2ed5b1
chore: ChangeReporter refactor
ryan-0324 Jul 17, 2024
c5d95d1
Merge branch 'dev' of https://github.com/Vendicated/Vencord into disc…
ryan-0324 Jul 17, 2024
5cd3235
chore: fix hidden TS errors in `scripts` and `eslint.config.mjs` & ad…
ryan-0324 Jul 18, 2024
7b399ef
chore: fix lint
ryan-0324 Jul 18, 2024
6c8eeed
chore: enable some eslint rules
ryan-0324 Jul 18, 2024
5a4f4fa
chore: improve generateFluxActionType
ryan-0324 Jul 18, 2024
fb40c39
chore: update dependencies
ryan-0324 Jul 18, 2024
01bd414
FriendsSince: Fix broken patch
Nuckyz Jul 19, 2024
f77169b
Merge branch 'dev' of https://github.com/Vendicated/Vencord into disc…
ryan-0324 Jul 19, 2024
ba9a951
chore: update dependencies
ryan-0324 Jul 19, 2024
e5de2a1
refactor: misc. changes
ryan-0324 Jul 20, 2024
5c751c9
fix: apply reported changes
ryan-0324 Jul 24, 2024
01226f3
Merge branch 'dev' into discord-types
ryan-0324 Jul 24, 2024
117e36c
refactor: misc. changes
ryan-0324 Jul 25, 2024
cc58bcf
fix(FakeProfileThemes): make profile theme colors regex more strict t…
ryan-0324 Jul 25, 2024
d029582
fix(FakeProfileThemes): correct profile theme colors regex
ryan-0324 Jul 25, 2024
41cd19a
fix: apply reported changes
ryan-0324 Jul 26, 2024
f27bc4e
Merge branch 'dev' into discord-types
ryan-0324 Jul 26, 2024
043b4ff
Merge branch 'dev' into discord-types
ryan-0324 Jul 26, 2024
bb62875
chore: enable some eslint rules
ryan-0324 Jul 28, 2024
b81b561
chore: update dependencies
ryan-0324 Jul 29, 2024
0edd477
chore: fix declaration emit
ryan-0324 Jul 29, 2024
df49208
chore: fix lint
ryan-0324 Jul 29, 2024
1f99f82
chore: update dependencies
ryan-0324 Jul 30, 2024
3e10ba4
Merge branch 'dev' of https://github.com/Vendicated/Vencord into disc…
ryan-0324 Jul 31, 2024
97a25bf
Merge branch 'dev' into discord-types
ryan-0324 Jul 31, 2024
2cf37bd
chore: update dependencies
ryan-0324 Jul 31, 2024
9e9d465
refactor: misc. changes
ryan-0324 Aug 1, 2024
fcb2488
Merge branch 'dev' of https://github.com/Vendicated/Vencord into disc…
ryan-0324 Aug 2, 2024
8309a42
refactor: misc. changes
ryan-0324 Aug 2, 2024
00edf0e
Merge branch 'dev' of https://github.com/Vendicated/Vencord into disc…
ryan-0324 Aug 2, 2024
04ae33e
refactor: misc. changes
ryan-0324 Aug 3, 2024
41f1366
Merge branch 'dev' of https://github.com/Vendicated/Vencord into disc…
ryan-0324 Aug 3, 2024
91a8539
Merge branch 'dev' of https://github.com/Vendicated/Vencord into disc…
ryan-0324 Aug 3, 2024
1cd4473
fix: regressions in 9e9d465 and 04ae33e where VencordDesktopMain erro…
ryan-0324 Aug 3, 2024
daaf205
fix: apply reported changes
ryan-0324 Aug 8, 2024
8329b40
refactor: misc. changes
ryan-0324 Aug 9, 2024
1310f66
chore: fix declaration emit
ryan-0324 Aug 9, 2024
cde937a
refactor: misc. changes
ryan-0324 Aug 10, 2024
1ae49f4
Merge branch 'dev' of https://github.com/Vendicated/Vencord into disc…
ryan-0324 Aug 10, 2024
85837de
Merge branch 'dev' of https://github.com/Vendicated/Vencord into disc…
ryan-0324 Aug 10, 2024
b8cf37b
Merge branch 'dev' of https://github.com/Vendicated/Vencord into disc…
ryan-0324 Aug 13, 2024
fabaf72
fix: apply reported changes
ryan-0324 Aug 24, 2024
c2d39df
Merge branch 'dev' of https://github.com/Vendicated/Vencord into disc…
ryan-0324 Aug 24, 2024
8f64b43
feat: more flux and i18n related types
ryan-0324 Aug 25, 2024
398cba4
chore(ChangeReporter): fix `getEnumReport` not reporting changes to m…
ryan-0324 Aug 26, 2024
faf1728
Merge branch 'dev' of https://github.com/Vendicated/Vencord into disc…
ryan-0324 Aug 26, 2024
297afce
refactor: misc. changes
ryan-0324 Aug 27, 2024
f7970fe
fix: apply reported changes
ryan-0324 Aug 27, 2024
0009287
fix: apply reported changes
ryan-0324 Aug 28, 2024
1710f84
Merge branch 'dev' into discord-types
ryan-0324 Aug 28, 2024
3e9bb57
Merge branch 'dev' into discord-types
ryan-0324 Aug 29, 2024
a5819f7
chore: update dependencies
ryan-0324 Aug 29, 2024
571b09b
chore: fix type error caused by new @stylistic/eslint-plugin version
ryan-0324 Aug 29, 2024
7f3539b
Merge branch 'dev' of https://github.com/Vendicated/Vencord into disc…
ryan-0324 Aug 30, 2024
180ccfd
chore: update dependencies
ryan-0324 Aug 30, 2024
351fbf8
Merge branch 'dev' of https://github.com/Vendicated/Vencord into disc…
ryan-0324 Sep 1, 2024
de815b7
Merge branch 'dev' of https://github.com/Vendicated/Vencord into disc…
ryan-0324 Sep 2, 2024
798886e
refactor: remove leftover from merge
ryan-0324 Sep 2, 2024
4087f43
fix: correct merge
ryan-0324 Sep 2, 2024
4a4e7f7
refactor: misc. changes
ryan-0324 Sep 2, 2024
a2dee27
Merge branch 'dev' of https://github.com/Vendicated/Vencord into disc…
ryan-0324 Sep 3, 2024
7172c8d
Merge branch 'dev' into discord-types
ryan-0324 Sep 3, 2024
8fd7c50
feat: ThemeStore
ryan-0324 Sep 3, 2024
4489c73
Merge branch 'dev' of https://github.com/Vendicated/Vencord into disc…
ryan-0324 Sep 4, 2024
25522c1
fix: apply reported changes
ryan-0324 Sep 4, 2024
f0730b3
chore: update dependencies
ryan-0324 Sep 4, 2024
8d2dd91
Merge branch 'dev' of https://github.com/Vendicated/Vencord into disc…
ryan-0324 Sep 5, 2024
b26e583
fix: apply reported changes
ryan-0324 Sep 5, 2024
f12156e
Merge branch 'dev' of https://github.com/Vendicated/Vencord into disc…
ryan-0324 Sep 6, 2024
07ec513
refactor: misc. changes
ryan-0324 Sep 6, 2024
044953e
Merge branch 'dev' into discord-types
ryan-0324 Sep 6, 2024
3414d75
chore: fix declaration emit
ryan-0324 Sep 6, 2024
a375741
fix: apply reported changes
ryan-0324 Sep 7, 2024
f9e446f
feat: types for tokens and useToken
ryan-0324 Sep 8, 2024
7588ba9
Merge branch 'dev' into discord-types
ryan-0324 Sep 11, 2024
44a3ebc
chore: update dependencies
ryan-0324 Sep 11, 2024
f577a9b
fix: apply reported changes
ryan-0324 Sep 11, 2024
9b1840a
chore: fix test workflows
ryan-0324 Sep 11, 2024
69ea49f
Merge branch 'dev' of https://github.com/Vendicated/Vencord into disc…
ryan-0324 Sep 13, 2024
92dca5c
fix: apply reported changes
ryan-0324 Sep 13, 2024
18d5a49
Merge branch 'dev' of https://github.com/Vendicated/Vencord into disc…
ryan-0324 Sep 14, 2024
fcf858f
chore: update dependencies
ryan-0324 Sep 14, 2024
702aad0
Merge branch 'dev' into discord-types
ryan-0324 Sep 16, 2024
61ffbd6
Merge branch 'dev' of https://github.com/Vendicated/Vencord into disc…
ryan-0324 Sep 17, 2024
387d897
chore: update dependencies
ryan-0324 Sep 17, 2024
a0e10a2
Merge branch 'dev' of https://github.com/Vendicated/Vencord into disc…
ryan-0324 Sep 18, 2024
225c673
fix: apply reported changes
ryan-0324 Sep 18, 2024
b875ebf
UserVoiceShow: Fix setting name
Nuckyz Sep 19, 2024
9bcd772
Merge branch 'dev' of https://github.com/Vendicated/Vencord into disc…
ryan-0324 Sep 19, 2024
43cdb33
fix: apply reported changes
ryan-0324 Sep 19, 2024
fb17853
Merge branch 'dev' of https://github.com/Vendicated/Vencord into disc…
ryan-0324 Sep 20, 2024
f2e13f2
fix: apply reported changes
ryan-0324 Sep 20, 2024
c894a2b
Merge branch 'dev' of https://github.com/Vendicated/Vencord into disc…
ryan-0324 Sep 22, 2024
9360273
chore: update dependencies
ryan-0324 Sep 22, 2024
9239afd
FullSearchContext: Re-add Copy Author ID
Nuckyz Sep 22, 2024
1defaac
FakeNitro: Fix wrongfully allowed emojis in voice calls (#2901)
sadan4 Sep 23, 2024
b37b0d5
RoleColorEverywhere: Fix unneeded restart on setting change (#2899)
lewisakura Sep 23, 2024
a0298f6
Merge branch 'dev' of https://github.com/Vendicated/Vencord into disc…
ryan-0324 Sep 23, 2024
612e567
chore: update dependencies
ryan-0324 Sep 23, 2024
fbebd4c
Merge branch 'dev' of https://github.com/Vendicated/Vencord into disc…
ryan-0324 Sep 25, 2024
aff8c85
fix: apply reported changes
ryan-0324 Sep 25, 2024
f4147be
Merge branch 'dev' of https://github.com/Vendicated/Vencord into disc…
ryan-0324 Sep 26, 2024
80f7802
chore: update dependencies
ryan-0324 Sep 26, 2024
9fde764
Merge branch 'dev' of https://github.com/Vendicated/Vencord into disc…
ryan-0324 Sep 27, 2024
047b392
fix: apply reported changes
ryan-0324 Sep 27, 2024
0add0a5
Merge branch 'dev' into discord-types
ryan-0324 Oct 3, 2024
f035c59
fix: apply reported changes
ryan-0324 Oct 4, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
4 changes: 2 additions & 2 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,13 +20,13 @@ jobs:
steps:
- uses: actions/checkout@v4

- uses: pnpm/action-setup@v3 # Install pnpm using packageManager key in package.json
- uses: pnpm/action-setup@v4 # Install pnpm using packageManager key in package.json

- name: Use Node.js 20
uses: actions/setup-node@v4
with:
node-version: 20
cache: "pnpm"
cache: pnpm

- name: Install dependencies
run: pnpm install --frozen-lockfile
Expand Down
68 changes: 68 additions & 0 deletions .github/workflows/change-reporter.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
name: Change Reporter
on:
workflow_dispatch:
schedule:
# Every day at midnight
- cron: 0 0 * * *

jobs:
change-reporter:
if: github.repository == 'Vendicated/Vencord'
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4
if: ${{ github.event_name == 'schedule' }}
with:
ref: dev

- uses: actions/checkout@v4
if: ${{ github.event_name == 'workflow_dispatch' }}

- uses: pnpm/action-setup@v4 # Install pnpm using packageManager key in package.json

- name: Use Node.js 20
uses: actions/setup-node@v4
with:
node-version: ^20.11.0
cache: pnpm

- name: Install dependencies
run: pnpm install --frozen-lockfile

- name: Install Google Chrome
id: setup-chrome
uses: browser-actions/setup-chrome@v1
with:
chrome-version: stable
install-dependencies: true

- name: Build Vencord web standalone
run: pnpm buildWebStandalone --skip-extension

- name: Create Report (Stable)
timeout-minutes: 10
run: |
cd packages/discord-types
pnpm change-reporter
env:
CHANNEL: stable
CHROMIUM_BIN: ${{ steps.setup-chrome.outputs.chrome-path }}
CHROMIUM_VERSION: ${{ steps.setup-chrome.outputs.chrome-version }}
DISCORD_TOKEN: ${{ secrets.DISCORD_TOKEN }}
DISCORD_WEBHOOK: ${{ secrets.DISCORD_WEBHOOK }}
VENCORD_DIST: ../../dist/browser.js

- name: Create Report (Canary)
timeout-minutes: 10
if: ${{ !cancelled() }} # run even if previous one failed
run: |
cd packages/discord-types
pnpm change-reporter
env:
CHANNEL: canary
CHROMIUM_BIN: ${{ steps.setup-chrome.outputs.chrome-path }}
CHROMIUM_VERSION: ${{ steps.setup-chrome.outputs.chrome-version }}
DISCORD_TOKEN: ${{ secrets.DISCORD_TOKEN }}
DISCORD_WEBHOOK: ${{ secrets.DISCORD_WEBHOOK }}
VENCORD_DIST: ../../dist/browser.js
6 changes: 3 additions & 3 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,13 +20,13 @@ jobs:
exit 1
fi

- uses: pnpm/action-setup@v3 # Install pnpm using packageManager key in package.json
- uses: pnpm/action-setup@v4 # Install pnpm using packageManager key in package.json

- name: Use Node.js 19
- name: Use Node.js 20
uses: actions/setup-node@v4
with:
node-version: 20
cache: "pnpm"
cache: pnpm

- name: Install dependencies
run: pnpm install --frozen-lockfile
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/reportBrokenPlugins.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,13 +19,13 @@ jobs:
- uses: actions/checkout@v4
if: ${{ github.event_name == 'workflow_dispatch' }}

- uses: pnpm/action-setup@v3 # Install pnpm using packageManager key in package.json
- uses: pnpm/action-setup@v4 # Install pnpm using packageManager key in package.json

- name: Use Node.js 20
uses: actions/setup-node@v4
with:
node-version: 20
cache: "pnpm"
cache: pnpm

- name: Install dependencies
run: |
Expand Down
34 changes: 34 additions & 0 deletions .github/workflows/test-packages-discord-types.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
name: Test packages/discord-types
on:
pull_request:
paths:
- packages/discord-types/**
push:
paths:
- packages/discord-types/**
jobs:
test:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4

- uses: pnpm/action-setup@v4 # Install pnpm using packageManager key in package.json

- name: Use Node.js 20
uses: actions/setup-node@v4
with:
node-version: ^20.9.0
cache: pnpm

- name: Install dependencies
run: pnpm install --frozen-lockfile

- name: Check packages/discord-types for TypeScript errors and lint
run: | # https://github.com/microsoft/TypeScript/issues/40431
pnpm tspc --emitDeclarationOnly
cd packages/discord-types
pnpm test

- name: Check if packages/discord-types is compatible with Vencord
run: pnpm testTsc && pnpm lint
33 changes: 33 additions & 0 deletions .github/workflows/test-scripts.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
name: Test scripts
on:
pull_request:
paths:
- scripts/**
- eslint.config.mjs
push:
paths:
- scripts/**
- eslint.config.mjs
jobs:
test:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4

- uses: pnpm/action-setup@v4 # Install pnpm using packageManager key in package.json

- name: Use Node.js 20
uses: actions/setup-node@v4
with:
node-version: ^20.9.0
cache: pnpm

- name: Install dependencies
run: pnpm install --frozen-lockfile

- name: Check scripts for TypeScript errors
run: | # https://github.com/microsoft/TypeScript/issues/40431
pnpm tspc --emitDeclarationOnly
cd scripts
pnpm tsc --noEmit
10 changes: 7 additions & 3 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -1,23 +1,27 @@
name: test
on:
push:
paths-ignore:
- packages/discord-types
pull_request:
branches:
- main
- dev
paths-ignore:
- packages/discord-types
jobs:
test:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4
- uses: pnpm/action-setup@v3 # Install pnpm using packageManager key in package.json
- uses: pnpm/action-setup@v4 # Install pnpm using packageManager key in package.json

- name: Use Node.js 20
uses: actions/setup-node@v4
with:
node-version: 20
cache: "pnpm"
node-version: ^20.9.0
cache: pnpm

- name: Install dependencies
run: pnpm install --frozen-lockfile
Expand Down
9 changes: 8 additions & 1 deletion .stylelintrc.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,13 @@
{
"extends": "stylelint-config-standard",
"extends": [
"stylelint-config-standard",
"@stylistic/stylelint-config"
],
"plugins": [
"@stylistic/stylelint-plugin"
],
"rules": {
"@stylistic/indentation": 4,
"selector-class-pattern": [
"^[a-z][a-zA-Z0-9]*(-[a-z0-9][a-zA-Z0-9]*)*$",
{
Expand Down
8 changes: 6 additions & 2 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
{
"editor.formatOnSave": true,
"editor.codeActionsOnSave": {
"source.fixAll.eslint": "explicit"
},
Expand All @@ -9,6 +8,8 @@
"[typescriptreact]": {
"editor.defaultFormatter": "vscode.typescript-language-features"
},
"files.eol": "\n",
"files.insertFinalNewline": true,
"javascript.format.semicolons": "insert",
"typescript.format.semicolons": "insert",
"typescript.preferences.quoteStyle": "double",
Expand All @@ -19,5 +20,8 @@
"domain": "codeberg.org",
"type": "Gitea"
}
]
],

"typescript.tsdk": "./node_modules/typescript/lib",
"typescript.enablePromptUseWorkspaceTsdk": true
}
13 changes: 6 additions & 7 deletions browser/VencordNativeStub.ts
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ const cssListeners = new Set<(css: string) => void>();
const NOOP = () => { };
const NOOP_ASYNC = async () => { };

const setCssDebounced = debounce((css: string) => VencordNative.quickCss.set(css));
const setCssDebounced = debounce((css: string) => { VencordNative.quickCss.set(css); });

const themeStore = DataStore.createStore("VencordThemes", "VencordThemeData");

Expand All @@ -46,9 +46,8 @@ window.VencordNative = {
uploadTheme: (fileName: string, fileData: string) => DataStore.set(fileName, fileData, themeStore),
deleteTheme: (fileName: string) => DataStore.del(fileName, themeStore),
getThemesDir: async () => "",
getThemesList: () => DataStore.entries(themeStore).then(entries =>
entries.map(([name, css]) => getThemeInfo(css, name.toString()))
),
getThemesList: async () => (await DataStore.entries(themeStore))
.map(([name, css]) => getThemeInfo(css, name.toString())),
getThemeData: (fileName: string) => DataStore.get(fileName, themeStore),
getSystemValues: async () => ({}),
},
Expand All @@ -66,10 +65,10 @@ window.VencordNative = {
},

quickCss: {
get: () => DataStore.get("VencordQuickCss").then(s => s ?? ""),
get: async () => await DataStore.get("VencordQuickCss") ?? "",
set: async (css: string) => {
await DataStore.set("VencordQuickCss", css);
cssListeners.forEach(l => l(css));
cssListeners.forEach(l => { l(css); });
},
addChangeListener(cb) {
cssListeners.add(cb);
Expand Down Expand Up @@ -109,5 +108,5 @@ window.VencordNative = {
getSettingsDir: async () => "LocalStorage"
},

pluginHelpers: {} as any,
pluginHelpers: {},
};
2 changes: 2 additions & 0 deletions browser/monaco.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,9 @@

import "./patch-worker";

// @ts-expect-error
import * as monaco from "monaco-editor/esm/vs/editor/editor.main.js";
declare const monaco: typeof import("monaco-editor");

declare global {
const baseUrl: string;
Expand Down
Loading