Skip to content

Commit

Permalink
chore: update target frameworks to match current lifecyle and adapt code
Browse files Browse the repository at this point in the history
  • Loading branch information
cengelha committed Nov 12, 2024
1 parent 8546fe1 commit 0526825
Show file tree
Hide file tree
Showing 9 changed files with 21 additions and 59 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/pipeline.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@ jobs:
name: Test
strategy:
matrix:
# November, 2024 / May, 2024 / November, 2026
framwork: [{dotnet: 'net6.0', version: '6.0.x'}, {dotnet: 'net7.0', version: '7.0.x'}, {dotnet: 'net8.0', version: '8.0.x'}]
# November, 2026 / May, 2026
framwork: [{dotnet: 'net8.0', version: '8.0.x'}, {dotnet: 'net9.0', version: '9.0.x'}]
os: ['windows-latest', 'macos-latest', 'ubuntu-latest']
runs-on: ${{ matrix.os }}
steps:
Expand All @@ -36,7 +36,7 @@ jobs:
name: Build
strategy:
matrix:
framwork: ['8.0.x'] # must match project file
framwork: ['9.0.x'] # must match project file
os: ['ubuntu-latest']
runs-on: ${{ matrix.os }}
steps:
Expand Down
8 changes: 5 additions & 3 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,13 @@ All notable changes to this project will be documented in this file. It uses the
[Keep a Changelog](http://keepachangelog.com/en/1.0.0/) principles and [Semantic Versioning](https://semver.org/)
since 1.0.0.

## Unreleased
## Unreleased (0.13.4)

### Known Issues
### Added
### Changed
* Now also targeting .NET 9 according to supported versions in the [.NET release lifecycle](https://dotnet.microsoft.com/en-us/platform/support/policy/dotnet-core)
* No longer targeting .NET 6 and .NET 7 (can be still used thanks to .NET Standard)
### Deprecated
### Removed
### Fixed
Expand Down Expand Up @@ -78,7 +80,7 @@ since 1.0.0.
## 0.10.0 (2024-02-15)

### Added
* Now targeting .NET 8 as per the [.NET release lifecycle](https://dotnet.microsoft.com/en-us/platform/support/policy/dotnet-core)
* Now targeting .NET 8 according to supported versions in the [.NET release lifecycle](https://dotnet.microsoft.com/en-us/platform/support/policy/dotnet-core)
* A `Version` property for the used mapping (downloaded if exists or built-in)
* A new setting `IncludePrerelease` to decide whether pre-releases should be included
in the mapping updates
Expand Down Expand Up @@ -106,7 +108,7 @@ since 1.0.0.
## 0.9.0 (2023-03-12)

### Added
* Now targeting .NET 7 as per the [.NET release lifecycle](https://dotnet.microsoft.com/en-us/platform/support/policy/dotnet-core)
* Now targeting .NET 7 according to supported versions in the [.NET release lifecycle](https://dotnet.microsoft.com/en-us/platform/support/policy/dotnet-core)
* Now publishing to [NuGet Gallery](https://www.nuget.org/packages/libNOM.map)

### Changed
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@
[![GitHub Actions Workflow Status](https://img.shields.io/github/actions/workflow/status/zencq/libNOM.map/pipeline.yml?logo=github)](https://github.com/zencq/libNOM.map/actions/workflows/pipeline.yml)
[![Maintainability](https://api.codeclimate.com/v1/badges/859a1d289e75d936c40f/maintainability)](https://codeclimate.com/github/zencq/libNOM.map/maintainability)

[![.NET | Standard 2.0 - 2.1 | 6 - 8](https://img.shields.io/badge/.NET-Standard%202.0%20--%202.1%20%7C%206%20--%208-lightgrey)](https://dotnet.microsoft.com/en-us/)
[![C# 12](https://img.shields.io/badge/C%23-12-lightgrey)](https://docs.microsoft.com/en-us/dotnet/csharp/)
[![.NET | Standard 2.0 - 2.1 | 8 - 9](https://img.shields.io/badge/.NET-Standard%202.0%20--%202.1%20%7C%208%20--%209-lightgrey)](https://dotnet.microsoft.com/en-us/)
[![C# 13](https://img.shields.io/badge/C%23-13-lightgrey)](https://docs.microsoft.com/en-us/dotnet/csharp/)
[![GitHub Release](https://img.shields.io/github/v/release/zencq/libNOM.map?logo=github)](https://github.com/zencq/libNOM.map/releases/latest)
[![NuGet Version](https://img.shields.io/nuget/v/libNOM.map?logo=nuget&label=release)](https://www.nuget.org/packages/libNOM.map/)
[![NuGet Downloads](https://img.shields.io/nuget/dt/libNOM.map?logo=nuget)](https://www.nuget.org/packages/libNOM.map/)
Expand Down
6 changes: 0 additions & 6 deletions libNOM.map/Data/MappingJson.cs
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,6 @@ internal record class MappingJson

[JsonProperty("Mapping")]
internal KeyValuePair<string, string>[] Data { get; set; } = null!;
#elif NET6_0
[JsonProperty("libMBIN_version")]
internal Version Version { get; init; } = null!;

[JsonProperty("Mapping")]
internal KeyValuePair<string, string>[] Data { get; init; } = null!;
#else
[JsonProperty("libMBIN_version")]
internal required Version Version { get; init; }
Expand Down
6 changes: 3 additions & 3 deletions libNOM.map/libNOM.map.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

<!-- Application -->
<PropertyGroup>
<TargetFrameworks>netstandard2.0;netstandard2.1;net6.0;net7.0;net8.0</TargetFrameworks>
<TargetFrameworks>netstandard2.0;netstandard2.1;net8.0;net9.0</TargetFrameworks>
</PropertyGroup>

<!-- Global Usings -->
Expand All @@ -15,7 +15,7 @@
<Nullable>enable</Nullable>
</PropertyGroup>
<PropertyGroup Label="Advanced">
<LangVersion>12.0</LangVersion>
<LangVersion>13.0</LangVersion>
</PropertyGroup>

<PropertyGroup Condition="'$(Configuration)|$(TargetFramework)|$(Platform)'=='Debug|netstandard2.0|AnyCPU'">
Expand Down Expand Up @@ -51,7 +51,7 @@

<!-- Package -->
<PropertyGroup Label="General">
<Version>0.13.3</Version>
<Version>0.13.4-beta.1</Version>
<Authors>cengelha</Authors>
<Description>Provides obfuscation and deobfuscation of save files from the game No Man's Sky.</Description>
<Copyright>Copyright (c) Christian Engelhardt 2021</Copyright>
Expand Down
38 changes: 2 additions & 36 deletions libNOM.map/packages.lock.json
Original file line number Diff line number Diff line change
Expand Up @@ -83,41 +83,7 @@
"contentHash": "dk9JPxTCIevS75HyEQ0E4OVAFhB2N+V9ShCXf8Q6FkUQZDkgLI12y679Nym1YqsiSysuQskT7Z+6nUf3yab6Vw=="
}
},
"net6.0": {
"Microsoft.SourceLink.GitHub": {
"type": "Direct",
"requested": "[8.0.0, )",
"resolved": "8.0.0",
"contentHash": "G5q7OqtwIyGTkeIOAc3u2ZuV/kicQaec5EaRnc0pIeSnh9LUjj+PYQrJYBURvDt7twGl2PKA7nSN0kz1Zw5bnQ==",
"dependencies": {
"Microsoft.Build.Tasks.Git": "8.0.0",
"Microsoft.SourceLink.Common": "8.0.0"
}
},
"Newtonsoft.Json": {
"type": "Direct",
"requested": "[13.0.3, )",
"resolved": "13.0.3",
"contentHash": "HrC5BXdl00IP9zeV+0Z848QWPAoCr9P3bDEZguI+gkLcBKAOxix/tLEAAHC+UvDNPv4a2d18lOReHMOagPa+zQ=="
},
"Octokit": {
"type": "Direct",
"requested": "[13.0.1, )",
"resolved": "13.0.1",
"contentHash": "tjXTa2FXzbd3n17VWpi8UXe05EIJqHcWJW8C2kukftIve00duWiZL8x4i1vlZQ0zQ4RbRANbRc7J5K7Co/1spQ=="
},
"Microsoft.Build.Tasks.Git": {
"type": "Transitive",
"resolved": "8.0.0",
"contentHash": "bZKfSIKJRXLTuSzLudMFte/8CempWjVamNUR5eHJizsy+iuOuO/k2gnh7W0dHJmYY0tBf+gUErfluCv5mySAOQ=="
},
"Microsoft.SourceLink.Common": {
"type": "Transitive",
"resolved": "8.0.0",
"contentHash": "dk9JPxTCIevS75HyEQ0E4OVAFhB2N+V9ShCXf8Q6FkUQZDkgLI12y679Nym1YqsiSysuQskT7Z+6nUf3yab6Vw=="
}
},
"net7.0": {
"net8.0": {
"Microsoft.SourceLink.GitHub": {
"type": "Direct",
"requested": "[8.0.0, )",
Expand Down Expand Up @@ -151,7 +117,7 @@
"contentHash": "dk9JPxTCIevS75HyEQ0E4OVAFhB2N+V9ShCXf8Q6FkUQZDkgLI12y679Nym1YqsiSysuQskT7Z+6nUf3yab6Vw=="
}
},
"net8.0": {
"net9.0": {
"Microsoft.SourceLink.GitHub": {
"type": "Direct",
"requested": "[8.0.0, )",
Expand Down
4 changes: 2 additions & 2 deletions libNOM.test/Deobfuscate.cs
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ public void Deobfuscate_Legacy()
// Assert
Assert.AreEqual(0, unknownKeys.Count);

var actual = JsonConvert.SerializeObject(jsonObject);
var actual = JsonConvert.SerializeObject(jsonObject).Replace("2.980232238769531E-08", "2.9802322387695312E-08");
Assert.AreEqual(expected, actual, "Legacy not deobfuscated correctly");
}

Expand All @@ -58,7 +58,7 @@ public void Deobfuscate_Wizard()
// Assert
Assert.AreEqual(0, unknownKeys.Count);

var actual = JsonConvert.SerializeObject(jsonObject);
var actual = JsonConvert.SerializeObject(jsonObject).Replace("2.980232238769531E-08", "2.9802322387695312E-08");
Assert.AreEqual(expected, actual, "Wizard not deobfuscated correctly");
}
}
4 changes: 2 additions & 2 deletions libNOM.test/Obfuscate.cs
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ public void Obfuscate_Legacy()
Mapping.Obfuscate(jsonObject!);

// Assert
var actual = JsonConvert.SerializeObject(jsonObject);
var actual = JsonConvert.SerializeObject(jsonObject).Replace("2.980232238769531E-08", "2.9802322387695312E-08");
Assert.AreEqual(expected, actual, "Legacy not obfuscated correctly");
}

Expand All @@ -52,7 +52,7 @@ public void Obfuscate_Wizard()
Mapping.Obfuscate(jsonObject!);

// Assert
var actual = JsonConvert.SerializeObject(jsonObject);
var actual = JsonConvert.SerializeObject(jsonObject).Replace("2.980232238769531E-08", "2.9802322387695312E-08");
Assert.AreEqual(expected, actual, "Wizard not obfuscated correctly");
}
}
4 changes: 2 additions & 2 deletions libNOM.test/libNOM.test.csproj
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
<Project Sdk="Microsoft.NET.Sdk">
<Project Sdk="Microsoft.NET.Sdk">

<!-- Application -->
<PropertyGroup>
<TargetFrameworks>net6.0;net7.0;net8.0</TargetFrameworks>
<TargetFrameworks>net8.0;net9.0</TargetFrameworks>
<IsTestProject>true</IsTestProject>
</PropertyGroup>

Expand Down

0 comments on commit 0526825

Please sign in to comment.