Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Pull suggested updates #2184

Merged
merged 5 commits into from
Oct 8, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 2 additions & 4 deletions .github/workflows/ci-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,10 +30,8 @@ jobs:
with:
cache: true
cache-dependency-path: '**/*.csproj'
dotnet-version: |
6.0.x
7.0.x
8.0.x
dotnet-version: 6.0.x
global-json-file: "./global.json"

- name: Install PSResources
shell: pwsh
Expand Down
3 changes: 2 additions & 1 deletion .pipelines/PowerShellEditorServices-Official.yml
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ extends:
enabled: true
forStages: [build]
featureFlags:
EnableCDPxPAT: false
WindowsHostVersion:
Version: 2022
Network: Netlock
Expand Down Expand Up @@ -79,7 +80,7 @@ extends:
displayName: Use .NET 8.x SDK
inputs:
packageType: sdk
version: 8.x
useGlobalJson: true
- task: UseDotNet@2
displayName: Use .NET 6.x runtime (for tests)
inputs:
Expand Down
5 changes: 5 additions & 0 deletions Directory.Build.props
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
<Project>
<PropertyGroup>
<ManagePackageVersionsCentrally>true</ManagePackageVersionsCentrally>
</PropertyGroup>
</Project>
28 changes: 28 additions & 0 deletions Directory.Packages.props
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
<Project>
<ItemGroup>
<PackageVersion Include="Microsoft.CSharp" Version="4.7.0" />
<PackageVersion Include="Microsoft.Extensions.FileSystemGlobbing" Version="8.0.0" />
<PackageVersion Include="Microsoft.Extensions.Logging" Version="8.0.0" />
<PackageVersion Include="Microsoft.NET.Test.Sdk" Version="17.10.0" />
<PackageVersion Include="Microsoft.PowerShell.5.ReferenceAssemblies" Version="1.1.0" />
<PackageVersion Include="Microsoft.PowerShell.SDK" Version="7.4.5" />
<PackageVersion Include="Newtonsoft.Json" Version="13.0.3" />
<PackageVersion Include="OmniSharp.Extensions.DebugAdapter.Client" Version="0.19.9" />
<PackageVersion Include="OmniSharp.Extensions.DebugAdapter.Server" Version="0.19.9" />
<PackageVersion Include="OmniSharp.Extensions.LanguageClient" Version="0.19.9" />
<PackageVersion Include="OmniSharp.Extensions.LanguageServer" Version="0.19.9" />
<PackageVersion Include="PowerShellStandard.Library" Version="5.1.1" />
<PackageVersion Include="Serilog" Version="4.0.0" />
<PackageVersion Include="Serilog.Extensions.Logging" Version="8.0.0" />
<PackageVersion Include="Serilog.Sinks.Async" Version="2.0.0" />
<PackageVersion Include="Serilog.Sinks.File" Version="6.0.0" />
<PackageVersion Include="System.IO.Pipes.AccessControl" Version="5.0.0" />
<PackageVersion Include="System.Runtime.InteropServices.RuntimeInformation" Version="4.3.0" />
<PackageVersion Include="System.Security.Principal" Version="4.3.0" />
<PackageVersion Include="System.Security.Principal.Windows" Version="5.0.0" />
<PackageVersion Include="System.ValueTuple" Version="4.5.0" />
<PackageVersion Include="xunit" Version="2.9.0" />
<PackageVersion Include="xunit.runner.visualstudio" Version="2.8.2" />
<PackageVersion Include="Xunit.SkippableFact" Version="1.4.13" />
</ItemGroup>
</Project>
160 changes: 0 additions & 160 deletions PowerShellEditorServices.sln

This file was deleted.

2 changes: 1 addition & 1 deletion global.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"sdk": {
"version": "8.0.100",
"version": "8.0.110",
"rollForward": "latestFeature",
"allowPrerelease": false
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,18 +11,17 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="NETStandard.Library" Version="2.0.3" />
<PackageReference Include="PowerShellStandard.Library" Version="5.1.1" PrivateAssets="all" />
<PackageReference Include="System.IO.Pipes.AccessControl" Version="5.0.0" />
<PackageReference Include="System.Runtime.InteropServices.RuntimeInformation" Version="4.3.0" />
<PackageReference Include="PowerShellStandard.Library" PrivateAssets="all" />
<PackageReference Include="System.IO.Pipes.AccessControl" />
<PackageReference Include="System.Runtime.InteropServices.RuntimeInformation" />
</ItemGroup>

<ItemGroup>
<ProjectReference Include="..\PowerShellEditorServices\PowerShellEditorServices.csproj" PrivateAssets="all" />
</ItemGroup>

<ItemGroup Condition=" '$(TargetFramework)' == 'net462' ">
<PackageReference Include="System.ValueTuple" Version="4.5.0" />
<PackageReference Include="System.ValueTuple" />

<Compile Remove="Internal/PsesLoadContext.cs" />
</ItemGroup>
Expand Down
33 changes: 13 additions & 20 deletions src/PowerShellEditorServices/PowerShellEditorServices.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -32,17 +32,17 @@
</ItemGroup>

<ItemGroup>
<PackageReference Include="Microsoft.CSharp" Version="4.7.0" />
<PackageReference Include="Microsoft.Extensions.FileSystemGlobbing" Version="8.0.0" />
<PackageReference Include="Microsoft.Extensions.Logging" Version="8.0.0" />
<PackageReference Include="PowerShellStandard.Library" Version="5.1.1" />
<PackageReference Include="Serilog" Version="4.0.0" />
<PackageReference Include="Serilog.Extensions.Logging" Version="8.0.0" />
<PackageReference Include="Serilog.Sinks.Async" Version="2.0.0" />
<PackageReference Include="Serilog.Sinks.File" Version="6.0.0" />
<PackageReference Include="System.IO.Pipes.AccessControl" Version="5.0.0" />
<PackageReference Include="System.Security.Principal" Version="4.3.0" />
<PackageReference Include="System.Security.Principal.Windows" Version="5.0.0" />
<PackageReference Include="Microsoft.CSharp" />
<PackageReference Include="Microsoft.Extensions.FileSystemGlobbing" />
<PackageReference Include="Microsoft.Extensions.Logging" />
<PackageReference Include="PowerShellStandard.Library" />
<PackageReference Include="Serilog" />
<PackageReference Include="Serilog.Extensions.Logging" />
<PackageReference Include="Serilog.Sinks.Async" />
<PackageReference Include="Serilog.Sinks.File" />
<PackageReference Include="System.IO.Pipes.AccessControl" />
<PackageReference Include="System.Security.Principal" />
<PackageReference Include="System.Security.Principal.Windows" />
</ItemGroup>

<Choose>
Expand All @@ -54,16 +54,9 @@
</When>
<Otherwise>
<ItemGroup>
<PackageReference Include="OmniSharp.Extensions.LanguageServer" Version="0.19.9" />
<PackageReference Include="OmniSharp.Extensions.DebugAdapter.Server" Version="0.19.9" />
<PackageReference Include="OmniSharp.Extensions.LanguageServer" />
<PackageReference Include="OmniSharp.Extensions.DebugAdapter.Server" />
</ItemGroup>
</Otherwise>
</Choose>

<!-- TODO: Remove these entirely. -->
<ItemGroup>
<Compile Remove="Services\Extension\Templating\**" />
<EmbeddedResource Remove="Services\Extension\Templating\**" />
<None Remove="Services\Extension\Templating\**" />
</ItemGroup>
</Project>
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
using System;
using System.IO;
using System.Linq;
using System.Reflection;
using System.Runtime.InteropServices;
using System.Text;
using System.Threading;
Expand All @@ -21,11 +20,8 @@ namespace PowerShellEditorServices.Test.E2E
[Trait("Category", "DAP")]
public class DebugAdapterProtocolMessageTests : IAsyncLifetime, IDisposable
{
private const string TestOutputFileName = "__dapTestOutputFile.txt";
private static readonly bool s_isWindows = RuntimeInformation.IsOSPlatform(OSPlatform.Windows);
private static readonly string s_binDir =
Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location);
private static readonly string s_testOutputPath = Path.Combine(s_binDir, TestOutputFileName);
private static readonly string s_testOutputPath = Path.Combine(Path.GetTempPath(), Path.GetRandomFileName());

private readonly ITestOutputHelper _output;
private DebugAdapterClient PsesDebugAdapterClient;
Expand Down Expand Up @@ -116,7 +112,7 @@ public void Dispose()
private static string NewTestFile(string script, bool isPester = false)
{
string fileExt = isPester ? ".Tests.ps1" : ".ps1";
string filePath = Path.Combine(s_binDir, Path.GetRandomFileName() + fileExt);
string filePath = Path.Combine(Path.GetTempPath(), Path.GetRandomFileName() + fileExt);
File.WriteAllText(filePath, script);

return filePath;
Expand Down
Loading