Skip to content

Commit 9a32ca1

Browse files
authored
feat!: Migrate to node 24 (#228)
1 parent bd90151 commit 9a32ca1

File tree

12 files changed

+5665
-7941
lines changed

12 files changed

+5665
-7941
lines changed

.eslintignore

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

.eslintrc.json

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

.github/workflows/codeql-analysis.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -40,19 +40,19 @@ jobs:
4040

4141
steps:
4242
- name: Checkout repository
43-
uses: actions/checkout@v3
43+
uses: actions/checkout@v6
4444

4545
# Initializes the CodeQL tools for scanning.
4646
- name: Initialize CodeQL
47-
uses: github/codeql-action/init@v2
47+
uses: github/codeql-action/init@v4
4848
with:
4949
config-file: ./.github/codeql/codeql-config-${{ matrix.language }}.yml
5050
languages: ${{ matrix.language }}
5151

5252
# Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
5353
# If this step fails, then you should remove it and run the build manually (see below)
5454
- name: Autobuild
55-
uses: github/codeql-action/autobuild@v2
55+
uses: github/codeql-action/autobuild@v4
5656

5757
# ℹ️ Command-line programs to run using the OS shell.
5858
# 📚 https://git.io/JvXDl
@@ -66,4 +66,4 @@ jobs:
6666
# make release
6767

6868
- name: Perform CodeQL Analysis
69-
uses: github/codeql-action/analyze@v2
69+
uses: github/codeql-action/analyze@v4

.github/workflows/dist.yml

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7,15 +7,14 @@ jobs:
77
build:
88
runs-on: ubuntu-latest
99
steps:
10-
- uses: actions/checkout@v3
10+
- uses: actions/checkout@v6
1111
with:
1212
token: ${{ secrets.DEVEX_BOT_TOKEN }}
1313

14-
- name: Setup node 20
15-
uses: actions/setup-node@v3
14+
- name: Setup node 24
15+
uses: actions/setup-node@v6
1616
with:
17-
node-version: 20.19.6
18-
17+
node-version: 24.11.1
1918
- name: install
2019
run: npm ci
2120

.github/workflows/release-please.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ jobs:
1616
release-type: node
1717
token: ${{ github.token }}
1818
command: github-release
19-
- uses: actions/checkout@v3
19+
- uses: actions/checkout@v6
2020
- name: Tag major and minor versions
2121
if: ${{ steps.release.outputs.release_created }}
2222
run: |

.github/workflows/test.yml

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -48,13 +48,12 @@ jobs:
4848
server_tasks: ${{ steps.self_test.outputs.server_tasks }}
4949

5050
steps:
51-
- uses: actions/checkout@v3
51+
- uses: actions/checkout@v6
5252

53-
- name: Setup node 20
54-
uses: actions/setup-node@v3
53+
- name: Setup node 24
54+
uses: actions/setup-node@v6
5555
with:
56-
node-version: 20.19.6
57-
56+
node-version: 24.11.1
5857
- name: Install package dependencies
5958
run: npm install
6059

.github/workflows/update-dependencies.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ jobs:
1616
runs-on: ubuntu-latest
1717
steps:
1818
- name: Checkout
19-
uses: actions/checkout@v3
19+
uses: actions/checkout@v6
2020

2121
- name: Self-hosted Renovate
2222
uses: renovatebot/github-action@f9c81dddc9b589e4e6ae0326d1e36f6bc415d230 # v39.2.4

.vscode/settings.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
{
2+
"eslint.useFlatConfig": true
3+
}

action.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ inputs:
2020
tenant_tags:
2121
description: 'A multi-line list of tenant tags (canonical names) to use to locate tenants to deploy to.'
2222
use_guided_failure:
23-
default: false
23+
default: 'false'
2424
description: 'Whether to use guided failure mode if errors occur during the deployment.'
2525
variables:
2626
description: 'A multi-line list of prompted variable values. Format: name:value'
@@ -36,5 +36,5 @@ outputs:
3636
description: 'JSON string for an array of objects having a `serverTaskId` and an `tenantName`'
3737

3838
runs:
39-
using: 'node20'
39+
using: 'node24'
4040
main: 'dist/index.js'

eslint.config.mjs

Lines changed: 100 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,100 @@
1+
import jest from "eslint-plugin-jest";
2+
import typescriptEslint from "@typescript-eslint/eslint-plugin";
3+
import stylistic from "@stylistic/eslint-plugin";
4+
import globals from "globals";
5+
import tsParser from "@typescript-eslint/parser";
6+
import github from "eslint-plugin-github";
7+
8+
export default [
9+
{
10+
ignores: ["**/dist/", "**/lib/", "**/node_modules/", "**/jest.config.js", "**/out/", "eslint.config.mjs"],
11+
},
12+
github.getFlatConfigs().recommended,
13+
{
14+
files: ["**/*.ts"],
15+
plugins: {
16+
jest,
17+
"@typescript-eslint": typescriptEslint,
18+
"@stylistic": stylistic,
19+
},
20+
21+
languageOptions: {
22+
globals: {
23+
...globals.node,
24+
...globals.jest,
25+
NodeJS: true,
26+
},
27+
28+
parser: tsParser,
29+
ecmaVersion: 9,
30+
sourceType: "module",
31+
32+
parserOptions: {
33+
project: "./tsconfig.eslint.json",
34+
},
35+
},
36+
37+
rules: {
38+
"@typescript-eslint/array-type": "error",
39+
"@typescript-eslint/await-thenable": "error",
40+
"@typescript-eslint/ban-ts-comment": "error",
41+
"@typescript-eslint/consistent-type-assertions": "error",
42+
43+
"@typescript-eslint/explicit-function-return-type": ["error", {
44+
allowExpressions: true,
45+
}],
46+
47+
"@typescript-eslint/explicit-member-accessibility": ["error", {
48+
accessibility: "no-public",
49+
}],
50+
51+
"@typescript-eslint/no-array-constructor": "error",
52+
"@typescript-eslint/no-empty-interface": "error",
53+
"@typescript-eslint/no-explicit-any": "error",
54+
"@typescript-eslint/no-extraneous-class": "error",
55+
"@typescript-eslint/no-for-in-array": "error",
56+
"@typescript-eslint/no-inferrable-types": "error",
57+
"@typescript-eslint/no-misused-new": "error",
58+
"@typescript-eslint/no-namespace": "error",
59+
"@typescript-eslint/no-non-null-assertion": "error",
60+
"@typescript-eslint/no-require-imports": "error",
61+
"@typescript-eslint/no-unnecessary-qualifier": "error",
62+
"@typescript-eslint/no-unnecessary-type-assertion": "error",
63+
"@typescript-eslint/no-unused-vars": "error",
64+
"@typescript-eslint/no-useless-constructor": "error",
65+
"@typescript-eslint/prefer-for-of": "error",
66+
"@typescript-eslint/prefer-function-type": "error",
67+
"@typescript-eslint/prefer-includes": "error",
68+
"@typescript-eslint/prefer-string-starts-ends-with": "error",
69+
"@typescript-eslint/promise-function-async": "error",
70+
"@typescript-eslint/require-array-sort-compare": "error",
71+
"@typescript-eslint/restrict-plus-operands": "error",
72+
"@typescript-eslint/unbound-method": "error",
73+
camelcase: "error",
74+
"eslint-comments/no-use": "error",
75+
"i18n-text/no-en": "off",
76+
"import/no-namespace": "error",
77+
"prefer-const": "error",
78+
"no-var": "error",
79+
"no-unused-vars": "off",
80+
"@stylistic/function-call-spacing": ["error", "never"],
81+
"@stylistic/semi": ["error", "never"],
82+
"@stylistic/type-annotation-spacing": "error",
83+
"@typescript-eslint/no-var-requires": "error",
84+
},
85+
},
86+
{
87+
files: ["__tests__/**/*.ts"],
88+
89+
languageOptions: {
90+
globals: {
91+
...globals.jest,
92+
...globals.node,
93+
},
94+
},
95+
96+
rules: {
97+
"filenames/match-regex": 0,
98+
},
99+
},
100+
];

0 commit comments

Comments
 (0)