From a1ef9376196c7104f9ba4e4f7b3f51a3593e9cd1 Mon Sep 17 00:00:00 2001 From: dfinke Date: Thu, 5 Dec 2019 18:03:02 -0500 Subject: [PATCH 1/8] bump version --- ImportExcel.psd1 | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/ImportExcel.psd1 b/ImportExcel.psd1 index c553e85..d7c52a1 100644 --- a/ImportExcel.psd1 +++ b/ImportExcel.psd1 @@ -3,25 +3,25 @@ RequiredAssemblies = @('.\EPPlus.dll') # Script module or binary module file associated with this manifest. - RootModule = 'ImportExcel.psm1' + RootModule = 'ImportExcel.psm1' # Version number of this module. - ModuleVersion = '6.5.3' + ModuleVersion = '7.0.0' # ID used to uniquely identify this module - GUID = '60dd4136-feff-401a-ba27-a84458c57ede' + GUID = '60dd4136-feff-401a-ba27-a84458c57ede' # Author of this module - Author = 'Douglas Finke' + Author = 'Douglas Finke' # Company or vendor of this module - CompanyName = 'Doug Finke' + CompanyName = 'Doug Finke' # Copyright statement for this module - Copyright = 'c 2019 All rights reserved.' + Copyright = 'c 2019 All rights reserved.' # Description of the functionality provided by this module - Description = @' + Description = @' PowerShell module to import/export Excel spreadsheets, without Excel. Check out the How To Videos https://www.youtube.com/watch?v=U3Ne_yX4tYo&list=PL5uoqS92stXioZw-u-ze_NtvSo0k0K0kq '@ @@ -60,7 +60,7 @@ Check out the How To Videos https://www.youtube.com/watch?v=U3Ne_yX4tYo&list=PL5 # NestedModules = @() # Functions to export from this module - FunctionsToExport = @( + FunctionsToExport = @( 'Add-ConditionalFormatting', 'Add-ExcelChart', 'Add-ExcelDataValidationRule', @@ -132,7 +132,7 @@ Check out the How To Videos https://www.youtube.com/watch?v=U3Ne_yX4tYo&list=PL5 #VariablesToExport = '*' # Aliases to export from this module - AliasesToExport = @( + AliasesToExport = @( 'Convert-XlRangeToImage' 'New-ExcelChart', 'Set-Column', @@ -145,7 +145,7 @@ Check out the How To Videos https://www.youtube.com/watch?v=U3Ne_yX4tYo&list=PL5 # ModuleList = @() # List of all files packaged with this module - FileList = @( + FileList = @( '.\EPPlus.dll', '.\Export-charts.ps1', '.\GetExcelTable.ps1', @@ -159,12 +159,12 @@ Check out the How To Videos https://www.youtube.com/watch?v=U3Ne_yX4tYo&list=PL5 '.\InferData\InferData.ps1', '.\Pivot\Pivot.ps1', '.\spikes\ConvertFrom-ExcelColumnName.ps1', - '.\Examples', '.\images', '.\Testimonials' ,'.\Public' , ".\Private" + '.\Examples', '.\images', '.\Testimonials' , '.\Public' , ".\Private" ) # Private data to pass to the module specified in RootModule/ModuleToProcess - PrivateData = @{ + PrivateData = @{ # PSData is module packaging and gallery metadata embedded in PrivateData # It's for rebuilding PowerShellGet (and PoshCode) NuGet-style packages # We had to do this because it's the only place we're allowed to extend the manifest From 270a5d921c597562d3710fd13c037dcf165166c1 Mon Sep 17 00:00:00 2001 From: dfinke Date: Thu, 5 Dec 2019 18:03:13 -0500 Subject: [PATCH 2/8] Start on readme --- README.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/README.md b/README.md index dba7450..a34117b 100644 --- a/README.md +++ b/README.md @@ -60,6 +60,9 @@ Plus, wiring the [PowerShell ScriptAnalyzer Excel report](https://github.com/dfi ![](./images/ScriptAnalyzerReport.png) +# What's new 7.0.0 +## Refactor + # What's new 6.5.3 Thanks again to the community for making this module even better. From 1baed182c3f88d002a6c6f3307ec5e9f025da5ba Mon Sep 17 00:00:00 2001 From: dfinke Date: Thu, 5 Dec 2019 18:19:32 -0500 Subject: [PATCH 3/8] Updated --- README.md | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/README.md b/README.md index a34117b..7638b64 100644 --- a/README.md +++ b/README.md @@ -63,6 +63,13 @@ Plus, wiring the [PowerShell ScriptAnalyzer Excel report](https://github.com/dfi # What's new 7.0.0 ## Refactor +- Remove all functions from the `psm1` +- Move functions into public subdirectory +- Align TDD and continuous integration workflow +- Move help from functions to mdHelp and use PlatyPS to generate external help file + +Thanks to [James O'Neill](https://twitter.com/jamesoneill) for the refactor and [Illy](https://twitter.com/ili_z) on the continuous integration. + # What's new 6.5.3 Thanks again to the community for making this module even better. From c0b3297bd70a9d8c89f9102654834d373b608ad5 Mon Sep 17 00:00:00 2001 From: dfinke Date: Thu, 5 Dec 2019 18:20:21 -0500 Subject: [PATCH 4/8] add link --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 7638b64..0ca404e 100644 --- a/README.md +++ b/README.md @@ -66,7 +66,7 @@ Plus, wiring the [PowerShell ScriptAnalyzer Excel report](https://github.com/dfi - Remove all functions from the `psm1` - Move functions into public subdirectory - Align TDD and continuous integration workflow -- Move help from functions to mdHelp and use PlatyPS to generate external help file +- Move help from functions to mdHelp and use [PlatyPS](https://www.powershellgallery.com/packages/platyPS) to generate external help file Thanks to [James O'Neill](https://twitter.com/jamesoneill) for the refactor and [Illy](https://twitter.com/ili_z) on the continuous integration. From 4608c0bd0443559bda8bf0c11cb5ac61b23c5c2a Mon Sep 17 00:00:00 2001 From: dfinke Date: Thu, 5 Dec 2019 18:20:43 -0500 Subject: [PATCH 5/8] updated --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 0ca404e..95e4fc6 100644 --- a/README.md +++ b/README.md @@ -65,7 +65,7 @@ Plus, wiring the [PowerShell ScriptAnalyzer Excel report](https://github.com/dfi - Remove all functions from the `psm1` - Move functions into public subdirectory -- Align TDD and continuous integration workflow +- Align TDD and continuous integration workflow for this refactor - Move help from functions to mdHelp and use [PlatyPS](https://www.powershellgallery.com/packages/platyPS) to generate external help file Thanks to [James O'Neill](https://twitter.com/jamesoneill) for the refactor and [Illy](https://twitter.com/ili_z) on the continuous integration. From 8b5fa9e7986153fa00c2d1cca7828af1f1dadb3c Mon Sep 17 00:00:00 2001 From: dfinke Date: Sat, 7 Dec 2019 10:59:34 -0500 Subject: [PATCH 6/8] Updated msg for Autosize on Linux --- ImportExcel.psm1 | 31 ++++++++++++++++++------------- 1 file changed, 18 insertions(+), 13 deletions(-) diff --git a/ImportExcel.psm1 b/ImportExcel.psm1 index b070877..a414233 100644 --- a/ImportExcel.psm1 +++ b/ImportExcel.psm1 @@ -1,14 +1,14 @@ #region import everything we need -$culture= $host.CurrentCulture.Name -replace '-\w*$','' +$culture = $host.CurrentCulture.Name -replace '-\w*$', '' Import-LocalizedData -UICulture $culture -BindingVariable Strings -FileName Strings -ErrorAction Ignore if (-not $Strings) { Import-LocalizedData -UICulture "en" -BindingVariable Strings -FileName Strings -ErrorAction Ignore } -try {[void] [System.Reflection.Assembly]::LoadWithPartialName("System.Drawing")} -catch {Write-Warning -Message $Strings.SystemDrawingAvaialable} +try { [void] [System.Reflection.Assembly]::LoadWithPartialName("System.Drawing") } +catch { Write-Warning -Message $Strings.SystemDrawingAvaialable } -foreach ($directory in @('Public','Charting','InferData','Pivot')) { - Get-ChildItem -Path "$PSScriptRoot\$directory\*.ps1" | ForEach-Object {. $_.FullName} +foreach ($directory in @('Public', 'Charting', 'InferData', 'Pivot')) { + Get-ChildItem -Path "$PSScriptRoot\$directory\*.ps1" | ForEach-Object { . $_.FullName } } . $PSScriptRoot\ArgumentCompletion.ps1 @@ -42,15 +42,20 @@ if (($IsLinux -or $IsMacOS) -or $env:NoAutoSize) { catch { $env:NoAutoSize = $true if ($IsLinux) { - Write-Warning -Message ('ImportExcel Module Cannot Autosize. Please run the following command to install dependencies:' + [environment]::newline + - '"sudo apt-get install -y --no-install-recommends libgdiplus libc6-dev"') + $msg = @" +ImportExcel Module Cannot Autosize. Please run the following command to install dependencies: +apt-get -y update && apt-get install -y --no-install-recommends libgdiplus libc6-dev +"@ + Write-Warning -Message $msg } if ($IsMacOS) { - Write-Warning -Message ('ImportExcel Module Cannot Autosize. Please run the following command to install dependencies:' + [environment]::newline + - '"brew install mono-libgdiplus"') + $msg = @" +ImportExcel Module Cannot Autosize. Please run the following command to install dependencies: +brew install mono-libgdiplus +"@ + Write-Warning -Message $msg + } + finally { + $ExcelPackage | Close-ExcelPackage -NoSave } } - finally { - $ExcelPackage | Close-ExcelPackage -NoSave - } -} From 4fee745a7f06fab99c64d3c880d38a415ef392e7 Mon Sep 17 00:00:00 2001 From: dfinke Date: Sat, 7 Dec 2019 11:05:42 -0500 Subject: [PATCH 7/8] Fix brace --- ImportExcel.psm1 | 1 + 1 file changed, 1 insertion(+) diff --git a/ImportExcel.psm1 b/ImportExcel.psm1 index a414233..4ef285d 100644 --- a/ImportExcel.psm1 +++ b/ImportExcel.psm1 @@ -59,3 +59,4 @@ brew install mono-libgdiplus $ExcelPackage | Close-ExcelPackage -NoSave } } +} \ No newline at end of file From 9b385e72c62f35c26c4ec454f8b26753edef7332 Mon Sep 17 00:00:00 2001 From: dfinke Date: Sat, 7 Dec 2019 11:15:35 -0500 Subject: [PATCH 8/8] Fix - The specified FileList entry '.\Private' in the module manifest 'ImportExcel.psd1' is invalid. --- ImportExcel.psd1 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ImportExcel.psd1 b/ImportExcel.psd1 index d7c52a1..675aea9 100644 --- a/ImportExcel.psd1 +++ b/ImportExcel.psd1 @@ -159,7 +159,7 @@ Check out the How To Videos https://www.youtube.com/watch?v=U3Ne_yX4tYo&list=PL5 '.\InferData\InferData.ps1', '.\Pivot\Pivot.ps1', '.\spikes\ConvertFrom-ExcelColumnName.ps1', - '.\Examples', '.\images', '.\Testimonials' , '.\Public' , ".\Private" + '.\Examples', '.\images', '.\Testimonials' , '.\Public' )