Skip to content

Commit cf8e455

Browse files
bwateratmsftCopilot
authored andcommitted
Migrate to use new shared eng package (#6600)
1 parent d273304 commit cf8e455

File tree

74 files changed

+2402
-3123
lines changed

Some content is hidden

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

74 files changed

+2402
-3123
lines changed

.github/workflows/vscode-ci.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ jobs:
2424
- uses: actions/checkout@v4
2525
- uses: actions/setup-node@v4
2626
with:
27-
node-version: "20"
27+
node-version: "22"
2828
- run: npm install -g cspell@8.13.1
2929
- name: Spell check for vscode extension
3030
run: cspell lint '**/*.ts' --config ./ext/vscode/.vscode/cspell.yaml --root ./ext/vscode --no-progress
@@ -33,7 +33,7 @@ jobs:
3333
runs-on: ${{ matrix.os }}
3434
strategy:
3535
matrix:
36-
node-version: [20.x]
36+
node-version: [22.x]
3737
os: [macos-latest, ubuntu-latest, windows-latest]
3838
include:
3939
- os: ubuntu-latest

eng/pipelines/templates/jobs/build-scan-vscode.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,15 +26,15 @@ jobs:
2626
demands: ImageOverride -equals ${{ build.value.OSVmImage }}
2727

2828
variables:
29-
NodeVersion: 20.x
29+
NodeVersion: 22.x
3030

3131
steps:
3232
- task: NodeTool@0
3333
inputs:
3434
versionSpec: $(NodeVersion)
3535

3636
- bash: |
37-
npm install -g npm vsce
37+
npm install -g npm @vscode/vsce
3838
npm ci --no-optional
3939
workingDirectory: ext/vscode
4040

eng/pipelines/templates/jobs/vscode-build.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ jobs:
2424
os: ${{ parameters.OS }}
2525

2626
variables:
27-
NodeVersion: 20.x
27+
NodeVersion: 22.x
2828
${{ insert }}: ${{ parameters.Variables }}
2929

3030
steps:
@@ -34,7 +34,7 @@ jobs:
3434
versionSpec: $(NodeVersion)
3535

3636
- pwsh: |
37-
npm i -g npm vsce
37+
npm i -g npm @vscode/vsce
3838
npm ci --no-optional
3939
workingDirectory: ext/vscode
4040
displayName: Install dependencies

ext/vscode/.vscode-test.mjs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
/*---------------------------------------------------------------------------------------------
2+
* Copyright (c) Microsoft Corporation. All rights reserved.
3+
* Licensed under the MIT License. See LICENSE.md in the project root for license information.
4+
*--------------------------------------------------------------------------------------------*/
5+
6+
export { azExtSrcTestConfig as default } from '@microsoft/vscode-azext-eng/vscode-test'; // Other configurations exist

ext/vscode/.vscode/extensions.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
// for the documentation about the extensions.json format
44
"recommendations": [
55
"dbaeumer.vscode-eslint",
6-
"amodio.tsl-problem-matcher",
6+
"connor4312.esbuild-problem-matchers",
77
"streetsidesoftware.code-spell-checker"
88
]
99
}

ext/vscode/.vscode/launch.json

Lines changed: 18 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -6,22 +6,19 @@
66
"version": "0.2.0",
77
"configurations": [
88
{
9-
"name": "Run AZD Extension",
9+
"name": "Run Extension",
1010
"type": "extensionHost",
1111
"request": "launch",
1212
"args": [
13-
"--extensionDevelopmentPath=${workspaceFolder}"
13+
"--extensionDevelopmentPath=${workspaceFolder}",
1414
],
15-
"preLaunchTask": "${defaultBuildTask}",
1615
"env": {
17-
// Disable telemetry when running the extension under the debugger.
18-
// Set this to "verbose" to show telemetry in the console during debugging.
19-
"DEBUGTELEMETRY": "true"
16+
"DEBUGTELEMETRY": "1",
2017
},
2118
"outFiles": [
22-
"${workspaceFolder}/dist/**/*.js",
23-
"${workspaceFolder}/*.js"
19+
"${workspaceFolder}/dist/**/*.{js,mjs,cjs}",
2420
],
21+
"preLaunchTask": "Watch: ESBuild",
2522
},
2623
{
2724
"name": "Run AZD + Azure Resources Extensions",
@@ -31,36 +28,28 @@
3128
"--extensionDevelopmentPath=${workspaceFolder}/../../../vscode-azureresourcegroups",
3229
"--extensionDevelopmentPath=${workspaceFolder}",
3330
],
34-
"preLaunchTask": "${defaultBuildTask}",
3531
"env": {
36-
// Disable telemetry when running the extension under the debugger.
37-
// Set this to "verbose" to show telemetry in the console during debugging.
38-
"DEBUGTELEMETRY": "true"
32+
"DEBUGTELEMETRY": "1",
3933
},
4034
"outFiles": [
41-
"${workspaceFolder}/dist/**/*.js",
42-
"${workspaceFolder}/*.js",
43-
"${workspaceFolder}/../../../vscode-azureresourcegroups/dist/**/*.js",
44-
"${workspaceFolder}/../../../vscode-azureresourcegroups/*.js"
35+
"${workspaceFolder}/dist/**/*.{js,mjs,cjs}",
36+
"${workspaceFolder}/../../../vscode-azureresourcegroups/dist/**/*.{js,mjs,cjs}",
4537
],
38+
"preLaunchTask": "Watch: ESBuild",
4639
},
4740
{
48-
"name": "Debug Unit Tests",
41+
"name": "Run Tests",
4942
"type": "extensionHost",
5043
"request": "launch",
51-
"args": [
52-
"--extensionDevelopmentPath=${workspaceFolder}",
53-
"--extensionTestsPath=${workspaceFolder}/out/test/suite/unitTests"
54-
],
44+
"testConfiguration": "${workspaceFolder}/.vscode-test.mjs",
45+
"env": {
46+
"DEBUGTELEMETRY": "1",
47+
},
5548
"outFiles": [
56-
"${workspaceFolder}/out/test/**/*.js"
49+
"${workspaceFolder}/dist/**/*.{js,mjs,cjs}",
50+
"${workspaceFolder}/src/**/*.{ts,mts,cts}", // We are using TSX so out files *are* the source files
5751
],
58-
"preLaunchTask": "${defaultBuildTask}",
59-
"env": {
60-
// Disable test timeouts and telemetry when debugging tests.
61-
"TEST_TIMEOUT": "0",
62-
"DEBUGTELEMETRY": "true"
63-
}
64-
}
52+
"preLaunchTask": "Watch: ESBuild",
53+
},
6554
]
6655
}

ext/vscode/.vscode/tasks.json

Lines changed: 30 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -1,38 +1,46 @@
1+
// See https://go.microsoft.com/fwlink/?LinkId=733558
2+
// for the documentation about the tasks.json format
13
{
24
"version": "2.0.0",
35
"tasks": [
46
{
5-
"label": "npm watch",
6-
"type": "npm",
7-
"script": "watch",
8-
"problemMatcher": [
9-
"$ts-webpack-watch",
10-
"$tslint-webpack-watch"
7+
"label": "Watch: ESBuild",
8+
"type": "shell",
9+
"command": "npm",
10+
"args": [
11+
"run",
12+
"build:esbuild",
13+
"--",
14+
"--watch"
1115
],
12-
"isBackground": true,
16+
"problemMatcher": "$esbuild-watch",
1317
"presentation": {
14-
"reveal": "never"
18+
"reveal": "silent",
1519
},
1620
"group": {
1721
"kind": "build",
18-
"isDefault": true
19-
}
22+
},
23+
"isBackground": true,
2024
},
21-
2225
{
23-
"label": "npm dev-build",
24-
"type": "npm",
25-
"script": "dev-build",
26-
"problemMatcher": [
27-
"$ts-webpack-watch",
28-
"$tslint-webpack-watch"
26+
"label": "Watch: Check Types",
27+
"type": "shell",
28+
"command": "npm",
29+
"args": [
30+
"run",
31+
"build:check",
32+
"--",
33+
"--watch"
2934
],
35+
"problemMatcher": "$tsc-watch",
3036
"presentation": {
31-
"reveal": "never"
37+
"revealProblems": "onProblem",
3238
},
3339
"group": {
34-
"kind": "build"
35-
}
36-
}
37-
]
40+
"kind": "build",
41+
"isDefault": true,
42+
},
43+
"isBackground": true,
44+
},
45+
],
3846
}

ext/vscode/.vscodeignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,3 +18,6 @@ webpack.config.js
1818
**/*.map
1919
**/*.ts
2020
**/*.ps1
21+
.vscode-test.mjs
22+
AGENTS.md
23+
esbuild.mjs

ext/vscode/ci-test.ps1

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
if ($IsLinux) {
2-
xvfb-run -a npm run unit-test
2+
xvfb-run -a npm run ci-test
33
} else {
4-
npm run unit-test
4+
npm run ci-test
55
}

ext/vscode/esbuild.mjs

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
/*---------------------------------------------------------------------------------------------
2+
* Copyright (c) Microsoft Corporation. All rights reserved.
3+
* Licensed under the MIT License. See LICENSE.md in the project root for license information.
4+
*--------------------------------------------------------------------------------------------*/
5+
6+
import { autoEsbuildOrWatch, autoSelectEsbuildConfig } from '@microsoft/vscode-azext-eng/esbuild';
7+
await autoEsbuildOrWatch(autoSelectEsbuildConfig());

0 commit comments

Comments
 (0)