Skip to content

Commit eb93214

Browse files
authored
feat: update deps (#194)
* fix: change package.json to intended license to match repo * feat: update dependencies * ci: use pnpm version in package.json & cache pnpm store * fix eslint & update peer requirements * fix linting errors
1 parent 8cafd4b commit eb93214

14 files changed

Lines changed: 745 additions & 801 deletions

.github/workflows/CI.yml

Lines changed: 19 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -12,17 +12,21 @@ jobs:
1212
runs-on: ubuntu-latest
1313
steps:
1414
- name: Checkout Project
15-
uses: actions/checkout@2541b1294d2704b0964813337f33b291d3f8596b # tag=v3
15+
uses: actions/checkout@v4
16+
17+
- uses: pnpm/action-setup@v4
18+
name: Install pnpm
19+
with:
20+
run_install: false
21+
1622
- name: Add problem matcher
17-
run: echo "::add-matcher::.github/problemMatchers/eslint.json"
23+
run: echo "::add-matcher::.github/problemMatchers/tsc.json"
24+
1825
- name: Use Node.js v20
1926
uses: actions/setup-node@v4
2027
with:
2128
node-version: 20
22-
23-
- uses: pnpm/action-setup@v3
24-
with:
25-
version: 8
29+
cache: 'pnpm'
2630

2731
- name: Install Dependencies
2832
run: pnpm install --frozen-lockfile
@@ -35,16 +39,21 @@ jobs:
3539
runs-on: ubuntu-latest
3640
steps:
3741
- name: Checkout Project
38-
uses: actions/checkout@2541b1294d2704b0964813337f33b291d3f8596b # tag=v3
42+
uses: actions/checkout@v4
43+
44+
- uses: pnpm/action-setup@v4
45+
name: Install pnpm
46+
with:
47+
run_install: false
48+
3949
- name: Add problem matcher
4050
run: echo "::add-matcher::.github/problemMatchers/tsc.json"
51+
4152
- name: Use Node.js v20
4253
uses: actions/setup-node@v4
4354
with:
4455
node-version: 20
45-
- uses: pnpm/action-setup@v3
46-
with:
47-
version: 8
56+
cache: 'pnpm'
4857

4958
- name: Install Dependencies
5059
run: pnpm install --frozen-lockfile

eslint.config.mjs

Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
import { defineConfig, globalIgnores } from 'eslint/config';
2+
import typescriptEslint from '@typescript-eslint/eslint-plugin';
3+
import globals from 'globals';
4+
import tsParser from '@typescript-eslint/parser';
5+
import path from 'node:path';
6+
import { fileURLToPath } from 'node:url';
7+
import js from '@eslint/js';
8+
import { FlatCompat } from '@eslint/eslintrc';
9+
10+
const __filename = fileURLToPath(import.meta.url);
11+
const __dirname = path.dirname(__filename);
12+
const compat = new FlatCompat({
13+
baseDirectory: __dirname,
14+
recommendedConfig: js.configs.recommended,
15+
allConfig: js.configs.all,
16+
});
17+
18+
export default defineConfig([
19+
globalIgnores(['**/dist']),
20+
{
21+
extends: compat.extends('eslint:recommended', 'plugin:@typescript-eslint/recommended'),
22+
23+
plugins: {
24+
'@typescript-eslint': typescriptEslint,
25+
},
26+
27+
languageOptions: {
28+
globals: {
29+
...globals.browser,
30+
},
31+
32+
parser: tsParser,
33+
ecmaVersion: 5,
34+
sourceType: 'script',
35+
36+
parserOptions: {
37+
project: './tsconfig.eslint.json',
38+
},
39+
},
40+
41+
rules: {
42+
'@typescript-eslint/switch-exhaustiveness-check': 'error',
43+
'@typescript-eslint/consistent-type-imports': 'error',
44+
'@typescript-eslint/no-non-null-assertion': 'off',
45+
},
46+
},
47+
]);

package.json

Lines changed: 32 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -26,45 +26,57 @@
2626
"discord-transcripts"
2727
],
2828
"author": "Derock <derock@derock.dev>",
29-
"license": "GNU GPLv3",
29+
"license": "Apache-2.0",
3030
"files": [
3131
"dist/**/*.js",
3232
"dist/**/*.d.ts",
3333
"dist/**/*.js.map"
3434
],
3535
"devDependencies": {
36+
"@eslint/eslintrc": "^3.3.1",
37+
"@eslint/js": "^9.35.0",
3638
"@types/debug": "^4.1.12",
37-
"@types/node": "^20.11.17",
38-
"@types/react": "^18.2.47",
39-
"@types/react-dom": "^18.2.18",
40-
"@typescript-eslint/eslint-plugin": "^5.62.0",
41-
"@typescript-eslint/parser": "^5.62.0",
42-
"debug": "^4.3.4",
43-
"discord.js": "^14.14.1",
44-
"dotenv": "^16.3.1",
45-
"eslint": "^8.56.0",
46-
"husky": "^8.0.3",
47-
"prettier": "^2.8.8",
48-
"pretty-quick": "^3.1.3",
49-
"sharp": "^0.33.2",
39+
"@types/node": "^24.3.1",
40+
"@types/react": "^19.1.12",
41+
"@types/react-dom": "^19.1.9",
42+
"@typescript-eslint/eslint-plugin": "^8.43.0",
43+
"@typescript-eslint/parser": "^8.43.0",
44+
"debug": "^4.4.1",
45+
"discord.js": "^14.22.1",
46+
"dotenv": "^17.2.2",
47+
"eslint": "^9.35.0",
48+
"globals": "^16.4.0",
49+
"husky": "^9.1.7",
50+
"prettier": "^3.6.2",
51+
"pretty-quick": "^4.2.2",
52+
"sharp": "^0.34.3",
5053
"ts-node": "^10.9.2",
51-
"typescript": "^5.3.3"
54+
"typescript": "^5.9.2"
5255
},
5356
"dependencies": {
5457
"@derockdev/discord-components-core": "^3.6.1",
5558
"@derockdev/discord-components-react": "^3.6.1",
56-
"discord-markdown-parser": "~1.1.0",
57-
"react": "0.0.0-experimental-6639ed3b3-20240111",
58-
"react-dom": "0.0.0-experimental-6639ed3b3-20240111",
59+
"discord-markdown-parser": "~1.2.0",
60+
"react": "19.1.1",
61+
"react-dom": "19.1.1",
5962
"simple-markdown": "^0.7.3",
6063
"twemoji": "^14.0.2",
61-
"undici": "^7.9.0"
64+
"undici": "^7.15.0"
6265
},
6366
"peerDependencies": {
6467
"discord.js": "^14.0.0 || ^15.0.0"
6568
},
6669
"overrides": {
67-
"react": "$react"
70+
"react": "$react",
71+
"react-dom": "$react-dom"
72+
},
73+
"pnpm": {
74+
"peerDependencyRules": {
75+
"allowedVersions": {
76+
"react": "$react",
77+
"react-dom": "$react-dom"
78+
}
79+
}
6880
},
6981
"packageManager": "pnpm@10.11.0+sha512.6540583f41cc5f628eb3d9773ecee802f4f9ef9923cc45b69890fb47991d4b092964694ec3a4f738a420c918a333062c8b925d312f42e4f0c263eb603551f977"
7082
}

0 commit comments

Comments
 (0)