Skip to content

Commit b925ab9

Browse files
authored
QoL changes (#22)
* QoL changes: - switch to artifacts folder - add public api baselines - update pathes to use / - update dependencies - remove .net 7 testing - use netfx 4.6.2 for tests - bump copyright - add nuget.config - use collection literals * typo
1 parent 91f1330 commit b925ab9

26 files changed

Lines changed: 351 additions & 126 deletions

Directory.Build.props

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
<ErrorReport>prompt</ErrorReport>
1717

1818
<SignAssembly>true</SignAssembly>
19-
<AssemblyOriginatorKeyFile>..\..\SourceMapTools.snk</AssemblyOriginatorKeyFile>
19+
<AssemblyOriginatorKeyFile>../../SourceMapTools.snk</AssemblyOriginatorKeyFile>
2020

2121
<GenerateAssemblyCompanyAttribute>False</GenerateAssemblyCompanyAttribute>
2222
<GenerateAssemblyConfigurationAttribute>False</GenerateAssemblyConfigurationAttribute>
@@ -29,6 +29,9 @@
2929
<RepositoryType>git</RepositoryType>
3030

3131
<ManagePackageVersionsCentrally>true</ManagePackageVersionsCentrally>
32+
33+
<ArtifactsPath>$(MSBuildThisFileDirectory).build</ArtifactsPath>
34+
<ArtifactsPivots>$(Configuration)/$(TargetFramework)</ArtifactsPivots>
3235
</PropertyGroup>
3336

3437
<PropertyGroup Label="Code Analyzers Settings">

Directory.Packages.props

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,19 @@
11
<Project>
22
<ItemGroup>
3-
<PackageVersion Include="esprima" Version="3.0.1" />
4-
<PackageVersion Include="System.Text.Json" Version="7.0.3" />
3+
<PackageVersion Include="esprima" Version="3.0.5" />
4+
<PackageVersion Include="System.Text.Json" Version="6.0.9" />
55

6-
<PackageVersion Include="PolySharp" Version="1.13.2" />
6+
<PackageVersion Include="PolySharp" Version="1.14.1" />
77

88
<PackageVersion Include="NUnit3TestAdapter" Version="4.5.0" />
9-
<PackageVersion Include="NUnit" Version="3.13.3" />
10-
<PackageVersion Include="NUnit.Analyzers" Version="3.8.0" />
11-
<PackageVersion Include="Microsoft.NET.Test.Sdk" Version="17.7.2" />
9+
<PackageVersion Include="NUnit" Version="4.1.0" />
10+
<PackageVersion Include="NUnit.Analyzers" Version="4.2.0" />
11+
<PackageVersion Include="Microsoft.NET.Test.Sdk" Version="17.10.0" />
1212

13-
<PackageVersion Include="Microsoft.SourceLink.GitHub" Version="1.1.1" />
13+
<PackageVersion Include="Microsoft.SourceLink.GitHub" Version="8.0.0" />
1414

15-
<PackageVersion Include="Microsoft.CodeAnalysis.NetAnalyzers" Version="8.0.0-preview.23472.1" />
15+
<PackageVersion Include="Microsoft.CodeAnalysis.NetAnalyzers" Version="9.0.0-preview.24225.1" />
16+
<PackageVersion Include="Microsoft.CodeAnalysis.PublicApiAnalyzers" Version="3.11.0-beta1.24225.1" />
17+
<PackageVersion Include="Lindhart.Analyser.MissingAwaitWarning" Version="3.1.0-beta" />
1618
</ItemGroup>
1719
</Project>

LICENSE.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
The MIT License (MIT)
22

33
Copyright (c) Microsoft Corporation
4-
Copyright (c) 2023 MaceWindu@github.com
4+
Copyright (c) 2024 MaceWindu@github.com
55

66
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation
77
files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy,

SourcemapTools.sln

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "root", "root", "{38BD9C43-B
1616
Directory.Build.props = Directory.Build.props
1717
Directory.Packages.props = Directory.Packages.props
1818
LICENSE.txt = LICENSE.txt
19+
nuget.config = nuget.config
1920
README.md = README.md
2021
spellcheck.txt = spellcheck.txt
2122
EndProjectSection

ci/SourceMapTools.nuspec

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
<description>A C# library that allows for the consumption of source maps and the deminification of JavaScript stack traces.</description>
77
<summary />
88
<tags>sourcemap callstack stackframe deminify</tags>
9-
<copyright>Copyright &#169; 2023</copyright>
9+
<copyright>Copyright &#169; 2024</copyright>
1010
<authors>MaceWindu@github.com</authors>
1111
<owners>MaceWindu@github.com</owners>
1212
<license type="file">LICENSE.txt</license>
@@ -16,18 +16,18 @@
1616

1717
<dependencies>
1818
<group targetFramework=".NETStandard2.0">
19-
<dependency id="esprima" version="3.0.1" />
20-
<dependency id="System.Text.Json" version="7.0.3" />
19+
<dependency id="esprima" version="3.0.5" />
20+
<dependency id="System.Text.Json" version="6.0.9" />
2121
</group>
2222
</dependencies>
2323
</metadata>
2424

2525
<files>
26-
<file src="..\LICENSE.txt" />
26+
<file src="../LICENSE.txt" />
2727

28-
<file src="..\src\SourceMapTools\bin\Release\**\SourcemapTools.pdb" target="lib\" />
29-
<file src="..\src\SourceMapTools\bin\Release\**\SourcemapTools.xml" target="lib\" />
30-
<file src="..\src\SourceMapTools\bin\Release\**\SourcemapTools.dll" target="lib\" />
31-
<file src="README.md" />
28+
<file src="../.build/bin/SourceMapTools/Release/**/SourcemapTools.pdb" target="lib/" />
29+
<file src="../.build/bin/SourceMapTools/Release/**/SourcemapTools.xml" target="lib/" />
30+
<file src="../.build/bin/SourceMapTools/Release/**/SourcemapTools.dll" target="lib/" />
31+
<file src="README.md" />
3232
</files>
3333
</package>

ci/default.yml

Lines changed: 9 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,11 @@ variables:
44
- name: build_configuration
55
value: Release
66
- name: assemblyVersion
7-
value: 3.0.0
7+
value: 3.1.0
88
- name: packageVersion
9-
value: 3.0.0
9+
value: 3.1.0
1010
- name: nugetDevVersion
11-
value: 3.0.1
11+
value: 3.1.1
1212

1313
trigger:
1414
- master
@@ -33,12 +33,6 @@ stages:
3333
#########
3434
# BUILD #
3535
#########
36-
- task: UseDotNet@2
37-
displayName: 'Install .NET 8'
38-
inputs:
39-
includePreviewVersions: true
40-
version: 8.x
41-
4236
- task: PowerShell@2
4337
inputs:
4438
filePath: '$(Build.SourcesDirectory)/ci/SetVersion.ps1'
@@ -56,19 +50,7 @@ stages:
5650
########
5751
# TEST #
5852
########
59-
- task: UseDotNet@2
60-
displayName: 'Install .NET 6 SDK'
61-
inputs:
62-
packageType: sdk
63-
version: 6.x
64-
65-
- task: UseDotNet@2
66-
displayName: 'Install .NET 7 SDK'
67-
inputs:
68-
packageType: sdk
69-
version: 7.x
70-
71-
- script: dotnet test $(Build.SourcesDirectory)\$(solution) -c $(build_configuration) -l trx
53+
- script: dotnet test $(Build.SourcesDirectory)/$(solution) -c $(build_configuration) -l trx
7254
displayName: 'Run Tests'
7355
condition: succeededOrFailed()
7456

@@ -77,6 +59,7 @@ stages:
7759
testRunner: VsTest
7860
testResultsFiles: '**/*.trx'
7961
testRunTitle: 'Tests'
62+
failTaskOnMissingResultsFile: true
8063
displayName: 'Publish test results'
8164
condition: succeededOrFailed()
8265

@@ -97,22 +80,22 @@ stages:
9780

9881
- task: CmdLine@2
9982
inputs:
100-
script: nuget.exe Pack $(Build.SourcesDirectory)\ci\SourceMapTools.nuspec -OutputDirectory $(Build.SourcesDirectory)\ci
83+
script: nuget.exe Pack $(Build.SourcesDirectory)/ci/SourceMapTools.nuspec -OutputDirectory $(Build.SourcesDirectory)/.build/nuget
10184
workingDirectory: $(Build.SourcesDirectory)/ci
10285
displayName: Build nuget for Azure Artifacts
10386
condition: and(succeeded(), eq(variables['Build.SourceBranchName'], 'master'))
10487

10588
- task: CmdLine@2
10689
inputs:
107-
script: nuget.exe Pack $(Build.SourcesDirectory)\ci\SourceMapTools.nuspec -OutputDirectory $(Build.SourcesDirectory)\ci -Symbols -SymbolPackageFormat snupkg
90+
script: nuget.exe Pack $(Build.SourcesDirectory)/ci/SourceMapTools.nuspec -OutputDirectory $(Build.SourcesDirectory)/.build/nuget -Symbols -SymbolPackageFormat snupkg
10891
workingDirectory: $(Build.SourcesDirectory)/ci
10992
displayName: Build nuget for Nuget.org
11093
condition: and(succeeded(), eq(variables['Build.SourceBranchName'], 'release'))
11194

11295
- task: NuGetCommand@2
11396
inputs:
11497
command: 'push'
115-
packagesToPush: '$(Build.SourcesDirectory)/ci/SourceMapTools.*.nupkg'
98+
packagesToPush: '$(Build.SourcesDirectory)/.build/nuget/SourceMapTools.*.nupkg'
11699
nuGetFeedType: 'internal'
117100
publishVstsFeed: 'd119c8d5-d981-4087-b983-65c3339155a0/8c90a52a-2539-4e08-84e4-05beb440b781'
118101
displayName: Publish to Azure Artifacts feed
@@ -121,7 +104,7 @@ stages:
121104
- task: NuGetCommand@2
122105
inputs:
123106
command: 'push'
124-
packagesToPush: '$(Build.SourcesDirectory)/ci/SourceMapTools.*.nupkg'
107+
packagesToPush: '$(Build.SourcesDirectory)/.build/nuget/SourceMapTools.*.nupkg'
125108
nuGetFeedType: 'external'
126109
publishFeedCredentials: 'nuget.org'
127110
displayName: Publish to Nuget.org

nuget.config

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<configuration>
3+
<packageSources>
4+
<clear />
5+
<add key="nuget.org" value="https://api.nuget.org/v3/index.json" protocolVersion="3" />
6+
</packageSources>
7+
</configuration>

src/SourceMapTools/Properties/AssemblyInfo.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,9 @@
44

55
[assembly: AssemblyTitle("SourcemapTools")]
66
[assembly: AssemblyProduct("SourcemapTools")]
7-
[assembly: AssemblyCopyright("Copyright © 2021-2023")]
7+
[assembly: AssemblyCopyright("Copyright © 2021-2024")]
88
[assembly: ComVisible(false)]
9-
[assembly: AssemblyVersion("3.0.0.0")]
10-
[assembly: AssemblyFileVersion("3.0.0.0")]
9+
[assembly: AssemblyVersion("3.1.0.0")]
10+
[assembly: AssemblyFileVersion("3.1.0.0")]
1111

1212
[module: SkipLocalsInit]

0 commit comments

Comments
 (0)