Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: PowerShell/vscode-powershell
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: v2024.0.0
Choose a base ref
...
head repository: PowerShell/vscode-powershell
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: v2024.2.0
Choose a head ref
Loading
Showing with 2,997 additions and 7,510 deletions.
  1. +8 −0 .config/tsaoptions.json
  2. +7 −0 .eslintrc.json
  3. +9 −1 .github/dependabot.yml
  4. +16 −0 .github/release.yml
  5. +17 −4 .github/workflows/ci-test.yml
  6. +13 −0 .github/workflows/npmrc
  7. +7 −6 .gitignore
  8. +1 −1 .mocharc.json
  9. +3 −0 .npmrc
  10. +228 −0 .pipelines/vscode-powershell-Official.yml
  11. +7 −7 .vscode/launch.json
  12. +6 −6 .vscode/tasks.json
  13. +10 −28 .vscodeignore
  14. +0 −56 .vsts-ci/azure-pipelines-ci.yml
  15. +0 −90 .vsts-ci/azure-pipelines-release.yml
  16. +0 −20 .vsts-ci/misc-analysis.yml
  17. +0 −118 .vsts-ci/templates/ci-general.yml
  18. +0 −12 .vsts-ci/templates/publish-github.yml
  19. +0 −28 .vsts-ci/templates/publish-markets.yml
  20. +0 −55 .vsts-ci/templates/release-general.yml
  21. +68 −1 CHANGELOG.md
  22. +0 −16 Third Party Notices.txt
  23. +26 −18 docs/development.md
  24. +4 −7 docs/troubleshooting.md
  25. +0 −8 examples/ContentViewTest.ps1
  26. +12 −9 examples/PSScriptAnalyzerSettings.psd1
  27. +8 −7 extension-dev.code-workspace
  28. +1,980 −4,906 package-lock.json
  29. +50 −48 package.json
  30. +1 −13 src/{main.ts → extension.ts}
  31. +9 −21 src/features/CodeActions.ts
  32. +6 −6 src/features/Console.ts
  33. +0 −269 src/features/CustomViews.ts
  34. +128 −233 src/features/DebugSession.ts
  35. +10 −8 src/features/ExpandAlias.ts
  36. +26 −30 src/features/ExtensionCommands.ts
  37. +1 −3 src/features/ExternalApi.ts
  38. +9 −16 src/features/GetCommands.ts
  39. +12 −12 src/features/HelpCompletion.ts
  40. +13 −12 src/features/ISECompatibility.ts
  41. +41 −76 src/features/NewFileOrProject.ts
  42. +1 −1 src/features/OpenInISE.ts
  43. +7 −2 src/features/RemoteFiles.ts
  44. +0 −62 src/features/RunCode.ts
  45. +8 −2 src/features/ShowHelp.ts
  46. +51 −13 src/languageClientConsumer.ts
  47. +4 −9 src/logging.ts
  48. +1 −1 src/platform.ts
  49. +8 −7 src/process.ts
  50. +23 −8 src/session.ts
  51. +2 −1 src/settings.ts
  52. +1 −1 test/core/platform.test.ts
  53. +0 −140 test/features/CustomViews.test.ts
  54. +36 −22 test/features/DebugSession.test.ts
  55. +0 −56 test/features/RunCode.test.ts
  56. +7 −0 test/mocks/BinaryModule/NuGet.Config
  57. +2 −9 test/runTests.ts
  58. +11 −16 test/runTestsInner.ts
  59. +4 −6 test/utils.ts
  60. +0 −419 tools/ReleaseTools.psm1
  61. +0 −149 tools/VersionTools.psm1
  62. +0 −13 tools/credScan/suppress.json
  63. +11 −0 tools/installPSResources.ps1
  64. +0 −17 tools/setupReleaseTools.ps1
  65. +0 −379 tools/terms/FileTypeSet.xml
  66. +0 −12 tools/terms/UserExclusions.xml
  67. +73 −0 tools/updateVersion.ps1
  68. +0 −1 tsconfig.json
  69. +11 −13 vscode-powershell.build.ps1
8 changes: 8 additions & 0 deletions .config/tsaoptions.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"instanceUrl": "https://msazure.visualstudio.com",
"projectName": "One",
"areaPath": "One\\MGMT\\Compute\\Powershell\\Powershell",
"notificationAliases": [ "andschwa@microsoft.com", "slee@microsoft.com" ],
"codebaseName": "PowerShell_vscode-powershell_20240328",
"tools": [ "CredScan", "PoliCheck", "BinSkim" ]
}
7 changes: 7 additions & 0 deletions .eslintrc.json
Original file line number Diff line number Diff line change
@@ -69,6 +69,13 @@
"@typescript-eslint/restrict-template-expressions": [
"off"
],
"@typescript-eslint/prefer-nullish-coalescing": [
"error",
{
"ignoreConditionalTests": true,
"ignoreMixedLogicalExpressions": true
}
],
"header/header": [
2,
"line",
10 changes: 9 additions & 1 deletion .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,15 @@
version: 2
registries:
npm-azure:
type: npm-registry
url: https://pkgs.dev.azure.com/mscodehub/PowerShellCore/_packaging/PowerShellCore_PublicPackages/npm/registry/
username: powershell
password: ${{ secrets.AZURE_NPM_PASSWORD }}
updates:
- package-ecosystem: npm
directory: "/"
registries:
- npm-azure
labels: [ ]
schedule:
interval: weekly
@@ -17,7 +25,7 @@ updates:
- "@types/*"
ignore:
- dependency-name: "untildify"
versions: ["5.x"]
versions: [ "5.x" ]
- package-ecosystem: github-actions
directory: "/"
labels: [ ]
16 changes: 16 additions & 0 deletions .github/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
changelog:
exclude:
labels:
- Ignore
authors:
- dependabot
categories:
- title: Enhancements & Features ✨
labels:
- Issue-Enhancement
- title: Squashed Bugs 🐛
labels:
- Issue-Bug
- title: Other Changes 🙏
labels:
- "*"
21 changes: 17 additions & 4 deletions .github/workflows/ci-test.yml
Original file line number Diff line number Diff line change
@@ -6,7 +6,6 @@ on:
pull_request:
# The branches below must be a subset of the branches above
branches: [ main ]
paths-ignore: [ '**/*.md' ]
merge_group:
types: [ checks_requested ]

@@ -43,10 +42,22 @@ jobs:
cache: true
cache-dependency-path: 'PowerShellEditorServices/**/packages.lock.json'
global-json-file: PowerShellEditorServices/global.json
source-url: https://pkgs.dev.azure.com/mscodehub/PowerShellCore/_packaging/PowerShellCore_PublicPackages/nuget/v3/index.json
config-file: PowerShellEditorServices/NuGet.config
env:
NUGET_AUTH_TOKEN: ${{ secrets.AZURE_NUGET_TOKEN }}

- name: Install PSResources
shell: pwsh
run: ../PowerShellEditorServices/tools/installPSResources.ps1
run: ./tools/installPSResources.ps1

- name: Deploy generated NuGet configuration
shell: pwsh
run: Copy-Item ../../nuget.config ../PowerShellEditorServices/NuGet.config

- name: Deploy NPM configuration
shell: pwsh
run: Copy-Item .github/workflows/npmrc .npmrc

- uses: actions/setup-node@v4
with:
@@ -60,14 +71,16 @@ jobs:

- name: Build, test and package
shell: pwsh
run: Invoke-Build
run: Invoke-Build -Configuration Release
env:
NPM_PASSWORD: ${{ secrets.AZURE_NPM_PASSWORD_BASE64 }}

- name: Upload build artifacts
uses: actions/upload-artifact@v4
if: always()
with:
name: vscode-powershell-vsix-${{ matrix.os }}
path: vscode-powershell/powershell-*.vsix
path: '**/*.vsix'

- name: Upload test results
uses: actions/upload-artifact@v4
13 changes: 13 additions & 0 deletions .github/workflows/npmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
; This requires NPM_PASSWORD to be available as a base64 encoded secret, since
; Azure DevOps does not support actual auth tokens.

; begin auth token
//pkgs.dev.azure.com/mscodehub/PowerShellCore/_packaging/PowerShellCore_PublicPackages/npm/registry/:username=powershell
//pkgs.dev.azure.com/mscodehub/PowerShellCore/_packaging/PowerShellCore_PublicPackages/npm/registry/:_password=${NPM_PASSWORD}
//pkgs.dev.azure.com/mscodehub/PowerShellCore/_packaging/PowerShellCore_PublicPackages/npm/registry/:email=powershell
//pkgs.dev.azure.com/mscodehub/PowerShellCore/_packaging/PowerShellCore_PublicPackages/npm/:username=powershell
//pkgs.dev.azure.com/mscodehub/PowerShellCore/_packaging/PowerShellCore_PublicPackages/npm/:_password=${NPM_PASSWORD}
//pkgs.dev.azure.com/mscodehub/PowerShellCore/_packaging/PowerShellCore_PublicPackages/npm/:email=powershell
; end auth token
registry=https://pkgs.dev.azure.com/mscodehub/PowerShellCore/_packaging/PowerShellCore_PublicPackages/npm/registry/
always-auth=true
13 changes: 7 additions & 6 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
**.js
**.js.map
.vscode-test/
logs/
*.vsix
dist/
modules
modules/
node_modules/
obj/
bin/
out/
sessions/
test/mocks/BinaryModule/bin/
test/mocks/BinaryModule/obj/
test-results.xml
*.vsix
*.DS_Store
tsconfig.tsbuildinfo
2 changes: 1 addition & 1 deletion .mocharc.json
Original file line number Diff line number Diff line change
@@ -8,5 +8,5 @@
"require": "source-map-support/register",
"timeout": 600000,
"slow": 2000,
"spec": "out/test/**/*.test.js"
"spec": "test/**/*.test.js"
}
3 changes: 3 additions & 0 deletions .npmrc
Original file line number Diff line number Diff line change
@@ -1,2 +1,5 @@
; We use Dependabot to update our packages, so we want to add without a prefix
save-exact=true
; We download from a private feed during the release process
registry=https://pkgs.dev.azure.com/mscodehub/PowerShellCore/_packaging/PowerShellCore_PublicPackages/npm/registry/
always-auth=true
228 changes: 228 additions & 0 deletions .pipelines/vscode-powershell-Official.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,228 @@
#################################################################################
# OneBranch Pipelines #
# This pipeline was created by EasyStart from a sample located at: #
# https://aka.ms/obpipelines/easystart/samples #
# Documentation: https://aka.ms/obpipelines #
# Yaml Schema: https://aka.ms/obpipelines/yaml/schema #
# Retail Tasks: https://aka.ms/obpipelines/tasks #
# Support: https://aka.ms/onebranchsup #
#################################################################################

trigger: none

parameters:
- name: debug
displayName: Enable debug output
type: boolean
default: false

variables:
system.debug: ${{ parameters.debug }}
BuildConfiguration: Release
WindowsContainerImage: onebranch.azurecr.io/windows/ltsc2019/vse2022:latest

resources:
repositories:
- repository: templates
type: git
name: OneBranch.Pipelines/GovernedTemplates
ref: refs/heads/main
pipelines:
- pipeline: PowerShellEditorServices-Official
source: PowerShellEditorServices-Official
trigger:
branches:
- main

extends:
# https://aka.ms/obpipelines/templates
template: v2/OneBranch.Official.CrossPlat.yml@templates
parameters:
globalSdl: # https://aka.ms/obpipelines/sdl
asyncSdl:
enabled: true
forStages: [build]
stages:
- stage: build
jobs:
- job: main
displayName: Build package
pool:
type: windows
variables:
ob_outputDirectory: $(Build.SourcesDirectory)/out
steps:
- pwsh: |
$version = (Get-Content -Raw -Path package.json | ConvertFrom-Json).version
Write-Output "##vso[task.setvariable variable=vsixVersion;isOutput=true]$version"
$prerelease = ([semver]$version).Minor % 2 -ne 0
if ($prerelease) { $version += "-preview" }
Write-Output "##vso[task.setvariable variable=version;isOutput=true]$version"
Write-Output "##vso[task.setvariable variable=prerelease;isOutput=true]$prerelease"
name: package
displayName: Get version from package.json
- task: onebranch.pipeline.version@1
displayName: Set OneBranch version
inputs:
system: Custom
customVersion: $(package.version)
- task: UseNode@1
displayName: Use Node 18.x
inputs:
version: 18.x
- task: npmAuthenticate@0
displayName: Authenticate NPM with Azure Artifacts
inputs:
workingFile: .npmrc
- task: PowerShell@2
displayName: Install PSResources
inputs:
pwsh: true
filePath: tools/installPSResources.ps1
- task: DownloadPipelineArtifact@2
displayName: Download PowerShellEditorServices
inputs:
source: specific
project: PowerShellCore
definition: 2905
specificBuildWithTriggering: true
artifact: drop_release_github
itemPattern: PowerShellEditorServices.zip
- task: ExtractFiles@1
displayName: Extract PowerShellEditorServices module
inputs:
archiveFilePatterns: $(Pipeline.Workspace)/PowerShellEditorServices.zip
destinationFolder: $(Build.SourcesDirectory)/modules
- pwsh: Invoke-Build Build -Configuration $(BuildConfiguration)
displayName: Build
- task: onebranch.pipeline.signing@1
displayName: Sign 1st-party extension files
inputs:
command: sign
signing_environment: external_distribution
search_root: $(Build.SourcesDirectory)/dist
files_to_sign: '**/*.js'
- task: onebranch.pipeline.signing@1
displayName: Sign 1st-party example files
inputs:
command: sign
signing_environment: external_distribution
search_root: $(Build.SourcesDirectory)/examples
files_to_sign: '**/*.js;**/*.ps1;**/*.psd1;**/*.psm1'
- pwsh: Invoke-Build Package
displayName: Create package
- job: test
displayName: Build and run tests
pool:
type: windows
isCustom: true
name: Azure Pipelines
vmImage: windows-latest
variables:
ob_outputDirectory: $(Build.SourcesDirectory)/out
skipComponentGovernanceDetection: true
steps:
- task: UseNode@1
displayName: Use Node 18.x
inputs:
version: 18.x
- task: npmAuthenticate@0
displayName: Authenticate NPM with Azure Artifacts
inputs:
workingFile: .npmrc
- task: UseDotNet@2
displayName: Use .NET 8.x SDK
inputs:
packageType: sdk
version: 8.x
- task: PowerShell@2
displayName: Install PSResources
inputs:
pwsh: true
filePath: tools/installPSResources.ps1
- task: DownloadPipelineArtifact@2
displayName: Download PowerShellEditorServices
inputs:
source: specific
project: PowerShellCore
definition: 2905
specificBuildWithTriggering: true
artifact: drop_release_github
itemPattern: PowerShellEditorServices.zip
- task: ExtractFiles@1
displayName: Extract PowerShellEditorServices module
inputs:
archiveFilePatterns: $(Pipeline.Workspace)/PowerShellEditorServices.zip
destinationFolder: $(Build.SourcesDirectory)/modules
- pwsh: Invoke-Build Test -Configuration $(BuildConfiguration)
displayName: Run tests
- stage: release
dependsOn: build
variables:
version: $[ stageDependencies.build.main.outputs['package.version'] ]
vsixVersion: $[ stageDependencies.build.main.outputs['package.vsixVersion'] ]
prerelease: $[ stageDependencies.build.main.outputs['package.prerelease'] ]
drop: $(Pipeline.Workspace)/drop_build_main
jobs:
- job: github
displayName: Publish draft to GitHub
pool:
type: windows
variables:
ob_outputDirectory: $(Build.SourcesDirectory)/out
steps:
- download: current
displayName: Download artifacts
- task: GitHubRelease@1
displayName: Create GitHub release
inputs:
gitHubConnection: GitHub
repositoryName: PowerShell/vscode-powershell
assets: $(drop)/powershell-$(vsixVersion).vsix
tagSource: userSpecifiedTag
tag: v$(version)
isDraft: true
isPreRelease: $(prerelease)
addChangeLog: false
releaseNotesSource: inline
releaseNotesInline: "<!-- TODO: Generate release notes on GitHub! -->"
- job: validation
displayName: Manual validation
pool:
type: agentless
timeoutInMinutes: 1440
steps:
- task: ManualValidation@0
displayName: Wait 24 hours for validation
inputs:
notifyUsers: $(Build.RequestedForEmail)
instructions: Please validate the release and then publish it!
timeoutInMinutes: 1440
- job: vscode
dependsOn: validation
displayName: Publish to VS Code Marketplace
pool:
type: windows
variables:
- group: VSCodeMarketplace
- name: ob_outputDirectory
value: $(Build.SourcesDirectory)/out
steps:
- download: current
displayName: Download artifacts
- task: npmAuthenticate@0
displayName: Authenticate NPM with Azure Artifacts (for vsce)
inputs:
workingFile: .npmrc
- pwsh: npm ci
displayName: Install NPM packages (for vsce)
- pwsh: |
$publishArgs = @(
'--pat'
'$(token)'
'--packagePath'
'$(drop)/powershell-$(vsixVersion).vsix'
if ([bool]::Parse('$(prerelease)')) { '--pre-release' }
)
npm run publish -- @publishArgs
displayName: Run vsce publish
Loading