Skip to content

Commit b6345fc

Browse files
authored
fix: 2025 modernization (#202)
* chore: Package upgrade * chore: Remove PlayNotificationTwo tests * fix: Smapi client after new xml library Fixed BUG: SmapiClient does not store new token on tokenRefreshRequired fault #200 * tests: Moved all tests to other folder * tests: More tests for AV
1 parent c6d6e5d commit b6345fc

File tree

54 files changed

+6559
-15366
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

54 files changed

+6559
-15366
lines changed

.devcontainer/devcontainer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
{
44
"name": "Node.js & TypeScript",
55
// Or use a Dockerfile or Docker Compose file. More info: https://containers.dev/guide/dockerfile
6-
"image": "mcr.microsoft.com/devcontainers/typescript-node:1-18-bookworm",
6+
"image": "mcr.microsoft.com/devcontainers/typescript-node:22-bookworm",
77

88
// Features to add to the dev container. More info: https://containers.dev/features.
99
// "features": {},

.eslintignore

Lines changed: 0 additions & 2 deletions
This file was deleted.

.eslintrc.js

Lines changed: 0 additions & 63 deletions
This file was deleted.

.github/workflows/test-and-release.yml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ jobs:
2222
runs-on: ubuntu-latest
2323
strategy:
2424
matrix:
25-
node: [16, 18]
25+
node: [22, 20, 18]
2626
steps:
2727
- uses: actions/checkout@v4
2828
- uses: actions/setup-node@v4
@@ -43,7 +43,7 @@ jobs:
4343
run: npm run test:jest
4444

4545
- name: Send data to Coveralls
46-
if: always() && matrix.node == 16
46+
if: always() && matrix.node == 22
4747
uses: coverallsapp/github-action@master
4848
with:
4949
github-token: ${{ secrets.GITHUB_TOKEN }}
@@ -57,10 +57,10 @@ jobs:
5757
- name: Checkout
5858
uses: actions/checkout@v4
5959

60-
- name: Use node 18
60+
- name: Use node 22
6161
uses: actions/setup-node@v4
6262
with:
63-
node-version: 18
63+
node-version: 22
6464

6565
- name: Install dependencies
6666
run: npm ci
@@ -87,7 +87,7 @@ jobs:
8787
if: steps.semantic.outputs.new_release_published == 'true'
8888
uses: actions/setup-node@v4
8989
with:
90-
node-version: 18
90+
node-version: 22
9191
registry-url: 'https://npm.pkg.github.com'
9292
scope: 'svrooij'
9393

eslint.config.mjs

Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
import tsParser from "@typescript-eslint/parser";
2+
import path from "node:path";
3+
import { fileURLToPath } from "node:url";
4+
import js from "@eslint/js";
5+
import { FlatCompat } from "@eslint/eslintrc";
6+
7+
const __filename = fileURLToPath(import.meta.url);
8+
const __dirname = path.dirname(__filename);
9+
const compat = new FlatCompat({
10+
baseDirectory: __dirname,
11+
recommendedConfig: js.configs.recommended,
12+
allConfig: js.configs.all
13+
});
14+
15+
export default [...compat.extends(
16+
"eslint:recommended",
17+
"plugin:@typescript-eslint/recommended",
18+
// "plugin:prettier/recommended",
19+
), {
20+
languageOptions: {
21+
parser: tsParser,
22+
ecmaVersion: 2020,
23+
sourceType: "module",
24+
},
25+
26+
rules: {
27+
"@typescript-eslint/explicit-module-boundary-types": "off",
28+
"@typescript-eslint/no-explicit-any": "warn",
29+
30+
"@typescript-eslint/no-unused-vars": ["warn", {
31+
argsIgnorePattern: "^_",
32+
varsIgnorePattern: "^_",
33+
}],
34+
35+
// "prettier/prettier": ["error", {
36+
// endOfLine: "auto",
37+
// }],
38+
},
39+
}, {
40+
files: ["**/*.ts", "**/*.tsx"],
41+
42+
rules: {
43+
'@typescript-eslint/no-explicit-any': 'off',
44+
'@typescript-eslint/no-duplicate-enum-values': 'off',
45+
},
46+
},
47+
{
48+
files: ["src/tests/helpers/metadata-helper.test.ts", "src/tests/helpers/legacy-helpers.js"],
49+
rules: {
50+
'@typescript-eslint/no-require-imports':'off',
51+
'no-undef':'off',
52+
}
53+
}];

jest.config.js renamed to jest.config.ts

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,7 @@
1-
module.exports = {
1+
import type {Config} from 'jest';
2+
3+
const config: Config = {
4+
verbose: true,
25
transform: {
36
'.tsx?$': 'ts-jest'
47
},
@@ -14,4 +17,6 @@ module.exports = {
1417
'src/models/*.ts',
1518
'src/services/*.ts'
1619
]
17-
}
20+
};
21+
22+
export default config;

0 commit comments

Comments
 (0)