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

feat: OpenXml 3.1.0 and dependencies update #79

Merged
merged 5 commits into from
Sep 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
10 changes: 9 additions & 1 deletion .config/dotnet-tools.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,15 @@
"version": "8.0.3",
"commands": [
"paket"
]
],
"rollForward": false
},
"csharpier": {
"version": "0.29.1",
"commands": [
"dotnet-csharpier"
],
"rollForward": false
}
}
}
80 changes: 40 additions & 40 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,60 +3,60 @@ name: Build and Test
on:
push:
branches:
- master
- master
pull_request:
branches:
- master
- master

jobs:
build:

strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, windows-latest, macOS-latest]
runs-on: ${{ matrix.os }}

steps:
- name: Checkout
uses: actions/checkout@v2
- name: Setup .NET 8.0 SDK
uses: actions/setup-dotnet@v4
with:
dotnet-version: '8.0.x'
- name: Build and Test
run: dotnet fsi build.fsx -- -p build
- name: Upload Artifacts
uses: actions/upload-artifact@v2
with:
name: bin
path: bin/*.nupkg
- name: Checkout
uses: actions/checkout@v2
- name: Setup .NET 8.0 SDK
uses: actions/setup-dotnet@v4
with:
dotnet-version: "8.0.x"
- name: Build and Test
run: dotnet fsi build.fsx -- -p build
- name: Upload Artifacts
uses: actions/upload-artifact@v4
with:
name: bin-${{matrix.os}}
path: bin/*.nupkg

generate-docs:
runs-on: windows-latest
needs: build

steps:
- name: Checkout
uses: actions/checkout@v2
- name: Setup .NET 8.0 SDK
uses: actions/setup-dotnet@v4
with:
dotnet-version: '8.0.x'
- name: Build and Test
run: dotnet fsi build.fsx -- -p build
- name: Setup DocFX
uses: crazy-max/ghaction-chocolatey@v1
with:
args: install docfx
- name: DocFX Build
working-directory: docs
run: docfx docfx.json
continue-on-error: false
- name: Publish
if: github.event_name == 'push'
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: docs/_site
force_orphan: true
- name: Checkout
uses: actions/checkout@v2
- name: Setup .NET 8.0 SDK
uses: actions/setup-dotnet@v4
with:
dotnet-version: "8.0.x"
- name: Build and Test
run: dotnet fsi build.fsx -- -p build
- name: Setup DocFX
uses: crazy-max/ghaction-chocolatey@v1
with:
args: install docfx
- name: DocFX Build
working-directory: docs
run: docfx docfx.json
continue-on-error: false
- name: Publish
if: github.event_name == 'push'
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: docs/_site
force_orphan: true

9 changes: 8 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,12 @@
# Changelog

## 2.2.0 - September 8, 2024

- DocumentFormat.OpenXml 3.0.2 -> 3.1.0
- DocumentFormat.OpenXml.Framework 3.0.2 -> 3.1.0
- SixLabors.ImageSharp 3.1.4 -> 3.1.5
- SixLabors.ImageSharp.Drawing 2.1.3 -> 2.1.4

## [2.1.1] - April 18, 2024

- fix: regression cased by migration to struct inside OpenXML v3 #75
Expand Down Expand Up @@ -76,7 +83,7 @@

## [1.10.0] - Feb 19, 2022

- Added support of ExtendedChartPart (http://schemas.microsoft.com/office/drawing/2014/chartex) in PresentationBuilder and DocumentBuilder.
- Added support of ExtendedChartPart (<http://schemas.microsoft.com/office/drawing/2014/chartex>) in PresentationBuilder and DocumentBuilder.

## [1.9.2] - Feb 17, 2022

Expand Down
8 changes: 2 additions & 6 deletions Clippit.Tests/Word/PowerToolsBlockExtensionsTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,8 @@

namespace Clippit.Tests.Word
{
public class PowerToolsBlockExtensionsTests : TestsBase
public class PowerToolsBlockExtensionsTests(ITestOutputHelper log) : TestsBase(log)
{
public PowerToolsBlockExtensionsTests(ITestOutputHelper log) : base(log)
{
}

[Fact]
public void MustBeginPowerToolsBlockToUsePowerTools()
{
Expand Down Expand Up @@ -81,7 +77,7 @@ public void MustBeginPowerToolsBlockToUsePowerTools()
Assert.Equal("Second", paragraphElements[1].Value);
}

[Fact]
[Fact(Skip = "Since v3.1 OpenXML SDK unload part root element on content stream Dispose.")]
public void MustEndPowerToolsBlockToUseStronglyTypedClasses()
{
using var stream = new MemoryStream();
Expand Down
6 changes: 3 additions & 3 deletions Clippit/Core/PowerToolsBlockExtensions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ public static class PowerToolsBlockExtensions
/// </param>
public static void BeginPowerToolsBlock(this OpenXmlPackage package)
{
if (package is null) throw new ArgumentNullException(nameof(package));
ArgumentNullException.ThrowIfNull(package);

package.RemovePowerToolsAnnotations();
package.Save();
Expand All @@ -44,7 +44,7 @@ public static void BeginPowerToolsBlock(this OpenXmlPackage package)
/// </param>
public static void EndPowerToolsBlock(this OpenXmlPackage package)
{
if (package is null) throw new ArgumentNullException(nameof(package));
ArgumentNullException.ThrowIfNull(package);

foreach (var part in package.GetAllParts())
{
Expand All @@ -55,7 +55,7 @@ public static void EndPowerToolsBlock(this OpenXmlPackage package)

private static void RemovePowerToolsAnnotations(this OpenXmlPackage package)
{
if (package is null) throw new ArgumentNullException(nameof(package));
ArgumentNullException.ThrowIfNull(package);

foreach (var part in package.GetAllParts())
{
Expand Down
2 changes: 1 addition & 1 deletion Clippit/PtOpenXmlUtil.cs
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ public static XDocument GetXDocument(this OpenXmlPart part, out XmlNamespaceMana

public static void PutXDocument(this OpenXmlPart part)
{
if (part is null) throw new ArgumentNullException(nameof(part));
ArgumentNullException.ThrowIfNull(part);

var partXDocument = part.GetXDocument();
if (partXDocument != null)
Expand Down
3 changes: 1 addition & 2 deletions global.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
{
"sdk": {
"version": "8.0.302",
"version": "8.0.401",
"rollForward": "latestFeature"
}
}

56 changes: 28 additions & 28 deletions paket.lock
Original file line number Diff line number Diff line change
Expand Up @@ -2,45 +2,45 @@ STORAGE: NONE
RESTRICTION: == net8.0
NUGET
remote: https://api.nuget.org/v3/index.json
DocumentFormat.OpenXml (3.0.2)
DocumentFormat.OpenXml.Framework (>= 3.0.2)
DocumentFormat.OpenXml.Framework (3.0.2)
DocumentFormat.OpenXml (3.1)
DocumentFormat.OpenXml.Framework (>= 3.1)
DocumentFormat.OpenXml.Framework (3.1)
System.IO.Packaging (>= 8.0)
IDisposableAnalyzers (4.0.8)
Microsoft.CodeCoverage (17.10)
Microsoft.NET.Test.Sdk (17.10)
Microsoft.CodeCoverage (>= 17.10)
Microsoft.TestPlatform.TestHost (>= 17.10)
Microsoft.CodeCoverage (17.11.1)
Microsoft.NET.Test.Sdk (17.11.1)
Microsoft.CodeCoverage (>= 17.11.1)
Microsoft.TestPlatform.TestHost (>= 17.11.1)
Microsoft.NETCore.Platforms (7.0.4)
Microsoft.TestPlatform.ObjectModel (17.10)
Microsoft.TestPlatform.ObjectModel (17.11.1)
System.Reflection.Metadata (>= 1.6)
Microsoft.TestPlatform.TestHost (17.10)
Microsoft.TestPlatform.ObjectModel (>= 17.10)
Microsoft.TestPlatform.TestHost (17.11.1)
Microsoft.TestPlatform.ObjectModel (>= 17.11.1)
Newtonsoft.Json (>= 13.0.1)
Newtonsoft.Json (13.0.3)
SixLabors.Fonts (2.0.4)
SixLabors.ImageSharp (3.1.4)
SixLabors.ImageSharp.Drawing (2.1.3)
SixLabors.Fonts (>= 2.0.3)
SixLabors.ImageSharp (>= 3.1.4)
SixLabors.ImageSharp (3.1.5)
SixLabors.ImageSharp.Drawing (2.1.4)
SixLabors.Fonts (>= 2.0.4)
SixLabors.ImageSharp (>= 3.1.5)
System.Collections.Immutable (8.0)
System.IO.Packaging (8.0)
System.Reflection.Metadata (8.0)
System.Collections.Immutable (>= 8.0)
System.Text.Encoding.CodePages (8.0)
xunit (2.8.1)
xunit.analyzers (>= 1.14)
xunit.assert (>= 2.8.1)
xunit.core (2.8.1)
xunit (2.9)
xunit.analyzers (>= 1.15)
xunit.assert (>= 2.9)
xunit.core (2.9)
xunit.abstractions (2.0.3)
xunit.analyzers (1.14)
xunit.assert (2.8.1)
xunit.core (2.8.1)
xunit.extensibility.core (2.8.1)
xunit.extensibility.execution (2.8.1)
xunit.extensibility.core (2.8.1)
xunit.analyzers (1.16)
xunit.assert (2.9)
xunit.core (2.9)
xunit.extensibility.core (2.9)
xunit.extensibility.execution (2.9)
xunit.extensibility.core (2.9)
xunit.abstractions (>= 2.0.3)
xunit.extensibility.execution (2.8.1)
xunit.extensibility.core (2.8.1)
xunit.runner.console (2.8.1)
xunit.runner.visualstudio (2.8.1)
xunit.extensibility.execution (2.9)
xunit.extensibility.core (2.9)
xunit.runner.console (2.9)
xunit.runner.visualstudio (2.8.2)
Loading