Skip to content

Commit 50799c4

Browse files
committed
Upgrate node to v22 and fix lint errors
1 parent 421d7d5 commit 50799c4

4 files changed

Lines changed: 58 additions & 47 deletions

File tree

.github/workflows/main.yaml

Lines changed: 50 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -2,60 +2,72 @@ name: CI
22

33
on:
44
push:
5-
branches: [ master ]
5+
branches: [master]
66
pull_request:
7-
branches: [ master ]
7+
branches: [master]
88

99
jobs:
1010
setup:
1111
name: Setup
1212
runs-on: ubuntu-latest
1313
steps:
14-
- uses: actions/checkout@v3
15-
- name: Cache NPM Install
16-
id: cache-npm
17-
uses: actions/cache@v3
18-
with:
19-
path: ./node_modules
20-
key: npm-${{ hashFiles('./package-lock.json') }}
21-
- name: Install NPM dependencies
22-
if: steps.cache-npm.outputs.cache-hit != 'true'
23-
run: |
24-
npm install
14+
- uses: actions/checkout@v3
15+
- name: Setup Node.js
16+
uses: actions/setup-node@v4
17+
with:
18+
node-version: "22"
19+
- name: Cache NPM Install
20+
id: cache-npm
21+
uses: actions/cache@v3
22+
with:
23+
path: ./node_modules
24+
key: npm-${{ hashFiles('./package-lock.json') }}
25+
- name: Install NPM dependencies
26+
if: steps.cache-npm.outputs.cache-hit != 'true'
27+
run: |
28+
npm install
2529
2630
build:
2731
name: Build
2832
needs: setup
2933
runs-on: ubuntu-latest
3034
steps:
31-
- uses: actions/checkout@v3
32-
- name: Load NPM install
33-
id: cache-npm
34-
uses: actions/cache@v3
35-
with:
36-
path: ./node_modules
37-
key: npm-${{ hashFiles('./package-lock.json') }}
38-
- name: Install VSCE for packaging
39-
run: npm install vsce
40-
- name: Package Binary
41-
run: ./node_modules/vsce/vsce package -o cortex-debug.vsix
42-
- name: Upload Artifact
43-
uses: actions/upload-artifact@v4
44-
with:
45-
name: cortex-debug.vsix
46-
path: ./cortex-debug.vsix
35+
- uses: actions/checkout@v3
36+
- name: Setup Node.js
37+
uses: actions/setup-node@v4
38+
with:
39+
node-version: "22"
40+
- name: Load NPM install
41+
id: cache-npm
42+
uses: actions/cache@v3
43+
with:
44+
path: ./node_modules
45+
key: npm-${{ hashFiles('./package-lock.json') }}
46+
- name: Install VSCE for packaging
47+
run: npm install vsce
48+
- name: Package Binary
49+
run: ./node_modules/vsce/vsce package -o cortex-debug.vsix
50+
- name: Upload Artifact
51+
uses: actions/upload-artifact@v4
52+
with:
53+
name: cortex-debug.vsix
54+
path: ./cortex-debug.vsix
4755

4856
lint:
4957
name: Lint
5058
needs: setup
5159
runs-on: ubuntu-latest
5260
steps:
53-
- uses: actions/checkout@v3
54-
- name: Load NPM install
55-
id: cache-npm
56-
uses: actions/cache@v3
57-
with:
58-
path: ./node_modules
59-
key: npm-${{ hashFiles('./package-lock.json') }}
60-
- name: Lint Project
61-
run: npm run lint
61+
- uses: actions/checkout@v3
62+
- name: Setup Node.js
63+
uses: actions/setup-node@v4
64+
with:
65+
node-version: "22"
66+
- name: Load NPM install
67+
id: cache-npm
68+
uses: actions/cache@v3
69+
with:
70+
path: ./node_modules
71+
key: npm-${{ hashFiles('./package-lock.json') }}
72+
- name: Lint Project
73+
run: npm run lint

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3144,7 +3144,7 @@
31443144
"devDependencies": {
31453145
"@stylistic/eslint-plugin": "^2.13.0",
31463146
"@types/mocha": "^10.0.10",
3147-
"@types/node": "16.x",
3147+
"@types/node": "22.x",
31483148
"@types/vscode": "^1.69.0",
31493149
"@vscode/debugadapter": "^1.68.0",
31503150
"@vscode/debugprotocol": "^1.68.0",

src/backend/mi2/mi2.ts

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -756,18 +756,17 @@ export class MI2 extends EventEmitter implements IBackend {
756756
breakpoint.number = bkptNum;
757757

758758
if (breakpoint.condition) {
759-
this.setBreakPointCondition(bkptNum, breakpoint.condition).then((result) => {
759+
Promise.resolve(this.setBreakPointCondition(bkptNum, breakpoint.condition)).then((result) => {
760760
if (result.resultRecords.resultClass === 'done') {
761761
resolve(breakpoint);
762762
} else {
763763
reject(new MIError(result.result('msg') || 'Internal error', 'Setting breakpoint condition'));
764764
}
765-
},
766-
(reason) => {
767-
// Just delete the breakpoint we just created as the condition creation failed
768-
this.sendCommand(`break-delete ${bkptNum}`).then((x) => { }, (e) => { });
769-
reject(reason); // Use this reason as reason for failing to create the breakpoint
770-
});
765+
}).catch((reason) => {
766+
// Just delete the breakpoint we just created as the condition creation failed
767+
this.sendCommand(`break-delete ${bkptNum}`).then((x) => { }, (e) => { });
768+
reject(reason); // Use this reason as reason for failing to create the breakpoint
769+
});
771770
} else {
772771
resolve(breakpoint);
773772
}

src/remote/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@
4141
"@types/command-exists": "^1.2.0",
4242
"@types/glob": "^7.2.0",
4343
"@types/mocha": "^9.0.0",
44-
"@types/node": "14.x",
44+
"@types/node": "22.x",
4545
"@types/vscode": "^1.63.0",
4646
"@typescript-eslint/eslint-plugin": "^5.9.1",
4747
"@typescript-eslint/parser": "^5.9.1",

0 commit comments

Comments
 (0)