From f760cc706465d368a00d24f9f71565575630a744 Mon Sep 17 00:00:00 2001 From: Andrew Kriger Date: Wed, 8 Jan 2025 16:22:04 -0500 Subject: [PATCH] Fix CsvWriter initialization --- CHANGELOG.md | 3 +++ src/Geta.Optimizely.ProductFeed.Csv/CsvFeedExporter.cs | 4 +--- .../Geta.Optimizely.ProductFeed.Csv.csproj | 4 ++-- .../Geta.Optimizely.ProductFeed.Google.csproj | 4 ++-- .../Geta.Optimizely.ProductFeed.csproj | 4 ++-- 5 files changed, 10 insertions(+), 9 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 28b679e..f40e9f4 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,9 @@ All notable changes to this project will be documented in this file. +## [4.0.1] +* Fixed issue with CsvWriter initialization + ## [4.0.0] * Target .NET8 diff --git a/src/Geta.Optimizely.ProductFeed.Csv/CsvFeedExporter.cs b/src/Geta.Optimizely.ProductFeed.Csv/CsvFeedExporter.cs index 2475755..4df0a6c 100644 --- a/src/Geta.Optimizely.ProductFeed.Csv/CsvFeedExporter.cs +++ b/src/Geta.Optimizely.ProductFeed.Csv/CsvFeedExporter.cs @@ -1,13 +1,11 @@ // Copyright (c) Geta Digital. All rights reserved. // Licensed under Apache-2.0. See the LICENSE file in the project root for more information -using System; using System.Collections.Generic; using System.Globalization; using System.IO; using System.Threading; using CsvHelper; -using CsvHelper.Configuration; using EPiServer.Web; using Geta.Optimizely.ProductFeed.Models; @@ -20,7 +18,7 @@ public class CsvFeedExporter(CsvFeedDescriptor descriptor) : A public override void BeginExport(HostDefinition host, CancellationToken cancellationToken) { base.BeginExport(host, cancellationToken); - _writer = new CsvWriter(new StreamWriter(_buffer), new CsvConfiguration(CultureInfo.InvariantCulture)); + _writer = new CsvWriter(new StreamWriter(_buffer), CultureInfo.InvariantCulture); _writer.WriteHeader(descriptor.CsvEntityType); _writer.NextRecord(); } diff --git a/src/Geta.Optimizely.ProductFeed.Csv/Geta.Optimizely.ProductFeed.Csv.csproj b/src/Geta.Optimizely.ProductFeed.Csv/Geta.Optimizely.ProductFeed.Csv.csproj index fdf3c6d..9a307cc 100644 --- a/src/Geta.Optimizely.ProductFeed.Csv/Geta.Optimizely.ProductFeed.Csv.csproj +++ b/src/Geta.Optimizely.ProductFeed.Csv/Geta.Optimizely.ProductFeed.Csv.csproj @@ -2,8 +2,8 @@ net8.0 - 4.0.0 - 4.0.0 + 4.0.1 + 4.0.1 Geta.Optimizely.ProductFeed.Csv Geta Optimizely Csv Product Feed ProductFeed true diff --git a/src/Geta.Optimizely.ProductFeed.Google/Geta.Optimizely.ProductFeed.Google.csproj b/src/Geta.Optimizely.ProductFeed.Google/Geta.Optimizely.ProductFeed.Google.csproj index 11edefa..5baf466 100644 --- a/src/Geta.Optimizely.ProductFeed.Google/Geta.Optimizely.ProductFeed.Google.csproj +++ b/src/Geta.Optimizely.ProductFeed.Google/Geta.Optimizely.ProductFeed.Google.csproj @@ -2,8 +2,8 @@ net8.0 - 4.0.0 - 4.0.0 + 4.0.1 + 4.0.1 Geta.Optimizely.ProductFeed.Google Geta Optimizely Google Product Feed ProductFeed true diff --git a/src/Geta.Optimizely.ProductFeed/Geta.Optimizely.ProductFeed.csproj b/src/Geta.Optimizely.ProductFeed/Geta.Optimizely.ProductFeed.csproj index bdfb716..489b118 100644 --- a/src/Geta.Optimizely.ProductFeed/Geta.Optimizely.ProductFeed.csproj +++ b/src/Geta.Optimizely.ProductFeed/Geta.Optimizely.ProductFeed.csproj @@ -2,8 +2,8 @@ net8.0 - 4.0.0 - 4.0.0 + 4.0.1 + 4.0.1 Geta.Optimizely.ProductFeed Geta Optimizely Product Feed ProductFeed true