Skip to content

Commit c73f76d

Browse files
authored
Merge pull request #42 from piraces/fix/node-upgrade-and-deps
fix: upgrade Node runtime to Node20 and update all dependencies
2 parents 0931145 + 2d1ca40 commit c73f76d

File tree

15 files changed

+2766
-2368
lines changed

15 files changed

+2766
-2368
lines changed

.eslintrc.js

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

.github/workflows/codeql-analysis.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,11 +22,11 @@ jobs:
2222

2323
steps:
2424
- name: Checkout repository
25-
uses: actions/checkout@v3
25+
uses: actions/checkout@v4
2626

2727
# Initializes the CodeQL tools for scanning.
2828
- name: Initialize CodeQL
29-
uses: github/codeql-action/init@v2
29+
uses: github/codeql-action/init@v3
3030
with:
3131
languages: ${{ matrix.language }}
3232

@@ -35,4 +35,4 @@ jobs:
3535
npm run build --if-present
3636
3737
- name: Perform CodeQL Analysis
38-
uses: github/codeql-action/analyze@v2
38+
uses: github/codeql-action/analyze@v3

.github/workflows/extension.yml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -10,17 +10,17 @@ jobs:
1010
build:
1111
runs-on: ubuntu-latest
1212
steps:
13-
- uses: actions/checkout@v3
14-
- name: Use Node.js 18.x
15-
uses: actions/setup-node@v3
13+
- uses: actions/checkout@v4
14+
- name: Use Node.js 20.x
15+
uses: actions/setup-node@v4
1616
with:
17-
node-version: 18
17+
node-version: 20
1818
- run: npm ci
1919
- run: npm run build --if-present
2020
- run: rm -rf node_modules
2121
- run: npm ci --omit=dev
2222
- run: npm run publish
23-
- uses: actions/upload-artifact@v3
23+
- uses: actions/upload-artifact@v4
2424
with:
2525
name: extension
2626
path: '*.vsix'

.github/workflows/node-ci.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,11 +11,11 @@ jobs:
1111
runs-on: ubuntu-latest
1212
strategy:
1313
matrix:
14-
node-version: [18, 19]
14+
node-version: [20, 22]
1515
steps:
16-
- uses: actions/checkout@v3
16+
- uses: actions/checkout@v4
1717
- name: Use Node.js ${{ matrix.node-version }}
18-
uses: actions/setup-node@v3
18+
uses: actions/setup-node@v4
1919
with:
2020
node-version: ${{ matrix.node-version }}
2121
- run: npm ci

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
*.js
33
!jest.config.js
44
!.eslintrc.js
5+
!eslint.config.js
56
!.prettierrc.js
67
node_modules
78
.taskkey

azure-pipelines-publish.yml

Lines changed: 84 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,84 @@
1+
# Azure DevOps Pipeline for publishing to Visual Studio Marketplace
2+
# Triggers on version tags (v*)
3+
# Requires: MARKETPLACE_PAT variable (Personal Access Token with Marketplace Publish scope)
4+
5+
trigger:
6+
tags:
7+
include:
8+
- 'v*'
9+
10+
pr: none
11+
12+
pool:
13+
vmImage: 'ubuntu-latest'
14+
15+
stages:
16+
- stage: Build
17+
displayName: 'Build Extension'
18+
jobs:
19+
- job: BuildJob
20+
displayName: 'Build and Package'
21+
steps:
22+
- task: NodeTool@0
23+
displayName: 'Use Node.js 20.x'
24+
inputs:
25+
versionSpec: '20.x'
26+
27+
- script: npm ci
28+
displayName: 'Install dependencies'
29+
30+
- script: npm run build
31+
displayName: 'Build TypeScript'
32+
33+
- script: npm test
34+
displayName: 'Run tests'
35+
36+
- script: npm run lint:no-fix
37+
displayName: 'Lint check'
38+
39+
- script: npm run publish
40+
displayName: 'Create extension package (VSIX)'
41+
42+
- task: CopyFiles@2
43+
displayName: 'Copy VSIX to staging'
44+
inputs:
45+
Contents: '*.vsix'
46+
TargetFolder: '$(Build.ArtifactStagingDirectory)'
47+
48+
- task: PublishBuildArtifacts@1
49+
displayName: 'Publish VSIX artifact'
50+
inputs:
51+
PathtoPublish: '$(Build.ArtifactStagingDirectory)'
52+
ArtifactName: 'vsix'
53+
54+
- stage: Publish
55+
displayName: 'Publish to Marketplace'
56+
dependsOn: Build
57+
condition: and(succeeded(), startsWith(variables['Build.SourceBranch'], 'refs/tags/v'))
58+
jobs:
59+
- job: PublishJob
60+
displayName: 'Publish Extension'
61+
steps:
62+
- task: DownloadBuildArtifacts@1
63+
displayName: 'Download VSIX artifact'
64+
inputs:
65+
buildType: 'current'
66+
downloadType: 'single'
67+
artifactName: 'vsix'
68+
downloadPath: '$(System.ArtifactsDirectory)'
69+
70+
- task: NodeTool@0
71+
displayName: 'Use Node.js 20.x'
72+
inputs:
73+
versionSpec: '20.x'
74+
75+
- script: npm install -g tfx-cli
76+
displayName: 'Install tfx-cli'
77+
78+
- script: |
79+
VSIX_FILE=$(find $(System.ArtifactsDirectory)/vsix -name "*.vsix" | head -1)
80+
echo "Publishing: $VSIX_FILE"
81+
tfx extension publish --vsix "$VSIX_FILE" --token $(MARKETPLACE_PAT) --no-prompt
82+
displayName: 'Publish to VS Marketplace'
83+
env:
84+
MARKETPLACE_PAT: $(MARKETPLACE_PAT)

eslint.config.js

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
const eslint = require('@eslint/js');
2+
const tseslint = require('@typescript-eslint/eslint-plugin');
3+
const tsparser = require('@typescript-eslint/parser');
4+
const prettierConfig = require('eslint-config-prettier');
5+
const prettierPlugin = require('eslint-plugin-prettier');
6+
7+
module.exports = [
8+
eslint.configs.recommended,
9+
{
10+
files: ['**/*.ts'],
11+
languageOptions: {
12+
parser: tsparser,
13+
parserOptions: {
14+
ecmaVersion: 2020,
15+
sourceType: 'module',
16+
},
17+
},
18+
plugins: {
19+
'@typescript-eslint': tseslint,
20+
'prettier': prettierPlugin,
21+
},
22+
rules: {
23+
...tseslint.configs.recommended.rules,
24+
...prettierConfig.rules,
25+
'prettier/prettier': 'error',
26+
'@typescript-eslint/no-var-requires': 'off',
27+
'@typescript-eslint/no-explicit-any': 'off',
28+
'@typescript-eslint/no-require-imports': 'off',
29+
'@typescript-eslint/no-unused-vars': ['error', { argsIgnorePattern: '^_', varsIgnorePattern: '^_', caughtErrorsIgnorePattern: '^_' }],
30+
'no-undef': 'off', // TypeScript handles this
31+
'no-unused-vars': 'off' // TypeScript handles this
32+
},
33+
},
34+
{
35+
ignores: ['node_modules/**', '**/*.js', '!eslint.config.js'],
36+
},
37+
];

0 commit comments

Comments
 (0)