Skip to content

Commit 09026ab

Browse files
authored
Merge branch 'main' into main
2 parents fd178ef + 41b7e30 commit 09026ab

File tree

11 files changed

+482
-408
lines changed

11 files changed

+482
-408
lines changed

.eslintrc.json

Lines changed: 10 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -33,42 +33,28 @@
3333
"error",
3434
"always"
3535
],
36-
"@typescript-eslint/explicit-function-return-type": [
37-
"error"
38-
],
36+
"@typescript-eslint/explicit-function-return-type": "error",
37+
"@typescript-eslint/no-empty-object-type": "off",
3938
"@typescript-eslint/no-floating-promises": [
4039
"error",
4140
{
4241
"ignoreVoid": true
4342
}
4443
],
45-
"@typescript-eslint/no-non-null-assertion": [
46-
"off"
47-
],
44+
"@typescript-eslint/no-non-null-assertion": "off",
45+
"@typescript-eslint/no-require-imports": "off",
4846
"@typescript-eslint/no-unused-vars": [
4947
"error",
5048
{
5149
"argsIgnorePattern": "^_"
5250
}
5351
],
54-
"@typescript-eslint/no-unsafe-argument": [
55-
"off"
56-
],
57-
"@typescript-eslint/no-unsafe-assignment": [
58-
"off"
59-
],
60-
"@typescript-eslint/no-unsafe-call": [
61-
"off"
62-
],
63-
"@typescript-eslint/no-unsafe-member-access": [
64-
"off"
65-
],
66-
"@typescript-eslint/no-unsafe-return": [
67-
"off"
68-
],
69-
"@typescript-eslint/restrict-template-expressions": [
70-
"off"
71-
],
52+
"@typescript-eslint/no-unsafe-argument": "off",
53+
"@typescript-eslint/no-unsafe-assignment": "off",
54+
"@typescript-eslint/no-unsafe-call": "off",
55+
"@typescript-eslint/no-unsafe-member-access": "off",
56+
"@typescript-eslint/no-unsafe-return": "off",
57+
"@typescript-eslint/restrict-template-expressions": "off",
7258
"@typescript-eslint/prefer-nullish-coalescing": [
7359
"error",
7460
{

.github/workflows/ci-test.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ jobs:
4646

4747
- uses: actions/setup-node@v4
4848
with:
49-
node-version: 18
49+
node-version: 20
5050
cache: npm
5151
cache-dependency-path: vscode-powershell/package-lock.json
5252

.pipelines/vscode-powershell-Official.yml

Lines changed: 40 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,8 @@
88
# Support: https://aka.ms/onebranchsup #
99
#################################################################################
1010

11-
trigger: none
11+
trigger:
12+
- main
1213

1314
schedules:
1415
- cron: '25 9 * * 3'
@@ -53,9 +54,10 @@ extends:
5354
enabled: true
5455
forStages: [build]
5556
featureFlags:
57+
EnableCDPxPAT: false
5658
WindowsHostVersion:
5759
Version: 2022
58-
Network: Netlock
60+
Network: KS3
5961
stages:
6062
- stage: build
6163
jobs:
@@ -81,6 +83,10 @@ extends:
8183
inputs:
8284
system: Custom
8385
customVersion: $(package.version)
86+
- task: UseNode@1
87+
displayName: Use Node 20.x
88+
inputs:
89+
version: 20.x
8490
- task: DownloadPipelineArtifact@2
8591
displayName: Download PowerShellEditorServices
8692
inputs:
@@ -93,9 +99,10 @@ extends:
9399
targetPath: $(Build.SourcesDirectory)/modules
94100
- pwsh: |
95101
Register-PSRepository -Name CFS -SourceLocation "https://pkgs.dev.azure.com/powershell/PowerShell/_packaging/powershell/nuget/v2" -InstallationPolicy Trusted
96-
Install-Module -Name InvokeBuild -Repository CFS -RequiredVersion 5.11.3 -Verbose
97-
Invoke-Build Build -Configuration $(BuildConfiguration)
98-
# TODO: When the OneBuild container updates to 7.4, update to PSResourceGet
102+
Install-Module -Repository CFS -Name Microsoft.PowerShell.PSResourceGet
103+
./tools/installPSResources.ps1 -PSRepository CFS
104+
displayName: Install PSResources
105+
- pwsh: Invoke-Build Build -Configuration $(BuildConfiguration)
99106
displayName: Build
100107
- task: onebranch.pipeline.signing@1
101108
displayName: Sign 1st-party example PowerShell files
@@ -106,6 +113,18 @@ extends:
106113
files_to_sign: '**/*.ps1;**/*.psd1;**/*.psm1'
107114
- pwsh: Invoke-Build Package
108115
displayName: Create package
116+
- pwsh: |
117+
npx vsce generate-manifest --packagePath out/powershell-$(package.vsixVersion).vsix
118+
cp out/powershell-$(package.vsixVersion).manifest out/powershell-$(package.vsixVersion).signature.p7s
119+
displayName: Generate VSIX manifest
120+
- task: onebranch.pipeline.signing@1
121+
displayName: Sign VSIX manifest
122+
inputs:
123+
command: sign
124+
cp_code: 'CP-401405-VSCodePublisherSign'
125+
search_root: $(Build.SourcesDirectory)/out
126+
files_to_sign: |
127+
*.signature.p7s;
109128
- job: test
110129
displayName: Build and run tests
111130
pool:
@@ -118,19 +137,14 @@ extends:
118137
skipComponentGovernanceDetection: true
119138
steps:
120139
- task: UseNode@1
121-
displayName: Use Node 18.x
140+
displayName: Use Node 20.x
122141
inputs:
123-
version: 18.x
142+
version: 20.x
124143
- task: UseDotNet@2
125144
displayName: Use .NET 8.x SDK
126145
inputs:
127146
packageType: sdk
128147
version: 8.x
129-
- task: PowerShell@2
130-
displayName: Install PSResources
131-
inputs:
132-
pwsh: true
133-
filePath: tools/installPSResources.ps1
134148
- task: DownloadPipelineArtifact@2
135149
displayName: Download PowerShellEditorServices
136150
inputs:
@@ -141,11 +155,16 @@ extends:
141155
branchName: refs/heads/main
142156
artifact: drop_build_main
143157
targetPath: $(Build.SourcesDirectory)/modules
158+
- pwsh: |
159+
Register-PSRepository -Name CFS -SourceLocation "https://pkgs.dev.azure.com/powershell/PowerShell/_packaging/powershell/nuget/v2" -InstallationPolicy Trusted
160+
Install-Module -Repository CFS -Name Microsoft.PowerShell.PSResourceGet
161+
./tools/installPSResources.ps1 -PSRepository CFS
162+
displayName: Install PSResources
144163
- pwsh: Invoke-Build Test -Configuration $(BuildConfiguration)
145164
displayName: Run tests
146165
- stage: release
147166
dependsOn: build
148-
condition: ne(variables['Build.Reason'], 'Schedule')
167+
condition: eq(variables['Build.Reason'], 'Manual')
149168
variables:
150169
version: $[ stageDependencies.build.main.outputs['package.version'] ]
151170
vsixVersion: $[ stageDependencies.build.main.outputs['package.vsixVersion'] ]
@@ -196,6 +215,10 @@ extends:
196215
steps:
197216
- download: current
198217
displayName: Download artifacts
218+
- task: UseNode@1
219+
displayName: Use Node 20.x
220+
inputs:
221+
version: 20.x
199222
- pwsh: npm ci
200223
displayName: Install NPM packages (for vsce)
201224
- task: AzureCLI@2
@@ -209,6 +232,10 @@ extends:
209232
'--azure-credential'
210233
'--packagePath'
211234
'$(drop)/powershell-$(vsixVersion).vsix'
235+
'--manifestPath'
236+
'$(drop)/powershell-$(vsixVersion).manifest'
237+
'--signaturePath'
238+
'$(drop)/powershell-$(vsixVersion).signature.p7s'
212239
if ([bool]::Parse('$(prerelease)')) { '--pre-release' }
213240
)
214241
npm run publish -- @publishArgs

0 commit comments

Comments
 (0)