From ee35ad87ae685553ddf46dc7ff0e37051ece32b2 Mon Sep 17 00:00:00 2001 From: James Brundage <+@noreply.github.com> Date: Tue, 5 Aug 2025 17:57:01 -0700 Subject: [PATCH 1/6] feat: `Get-Turtle` inline set fix ( Fixes #108, Fixes #107 ) --- Commands/Get-Turtle.ps1 | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/Commands/Get-Turtle.ps1 b/Commands/Get-Turtle.ps1 index 0818714..7fc7f74 100644 --- a/Commands/Get-Turtle.ps1 +++ b/Commands/Get-Turtle.ps1 @@ -165,19 +165,19 @@ function Get-Turtle { } # If the output is not a turtle object, we can output it. - # NOTE: This will lead to multiple types of output in the pipeline. + # NOTE: This may lead to multiple types of output in the pipeline. # Luckily, this should be one of the few cases where this does not annoy too much. - # Properties being returned will largely be strings or numbers. - if (-not ($stepOutput.pstypenames -eq 'Turtle')) { + # Properties being returned will largely be strings or numbers, and these will always output directly. + if ($null -ne $stepOutput -and -not ($stepOutput.pstypenames -eq 'Turtle')) { # Output the step $stepOutput # and set the output turtle to false. $outputTurtle = $false - } else { + } elseif ($null -ne $stepOutput) { # Set the current turtle to the step output. $currentTurtle = $stepOutput # and output it later (presumably). - $outputTurtle = $true + $outputTurtle = $true } } From 69118a5ba839997ea653aee2c69f7446c89d0547 Mon Sep 17 00:00:00 2001 From: James Brundage <+@noreply.github.com> Date: Tue, 5 Aug 2025 18:04:57 -0700 Subject: [PATCH 2/6] fix: `Turtle.get_PNG/JPEG/WEBP` requirement clarification ( Fixes #110 ) --- Types/Turtle/get_JPEG.ps1 | 2 +- Types/Turtle/get_PNG.ps1 | 2 +- Types/Turtle/get_WEBP.ps1 | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Types/Turtle/get_JPEG.ps1 b/Types/Turtle/get_JPEG.ps1 index d3214f7..fac18a1 100644 --- a/Types/Turtle/get_JPEG.ps1 +++ b/Types/Turtle/get_JPEG.ps1 @@ -1,4 +1,4 @@ -$chromiumNames = 'chromium','chrome','msedge' +$chromiumNames = 'chromium','chrome' foreach ($browserName in $chromiumNames) { $chromiumCommand = $ExecutionContext.SessionState.InvokeCommand.GetCommand($browserName,'Application') diff --git a/Types/Turtle/get_PNG.ps1 b/Types/Turtle/get_PNG.ps1 index 01159be..b47915b 100644 --- a/Types/Turtle/get_PNG.ps1 +++ b/Types/Turtle/get_PNG.ps1 @@ -1,4 +1,4 @@ -$chromiumNames = 'chromium','chrome','msedge' +$chromiumNames = 'chromium','chrome' foreach ($browserName in $chromiumNames) { $chromiumCommand = $ExecutionContext.SessionState.InvokeCommand.GetCommand($browserName,'Application') diff --git a/Types/Turtle/get_WEBP.ps1 b/Types/Turtle/get_WEBP.ps1 index 915fdf5..73c10ca 100644 --- a/Types/Turtle/get_WEBP.ps1 +++ b/Types/Turtle/get_WEBP.ps1 @@ -1,4 +1,4 @@ -$chromiumNames = 'chromium','chrome','msedge' +$chromiumNames = 'chromium','chrome' foreach ($browserName in $chromiumNames) { $chromiumCommand = $ExecutionContext.SessionState.InvokeCommand.GetCommand($browserName,'Application') From d0fe873f8b5e8dea703c2e9834d2a2a3c0442f7e Mon Sep 17 00:00:00 2001 From: StartAutomating Date: Wed, 6 Aug 2025 01:05:17 +0000 Subject: [PATCH 3/6] fix: `Turtle.get_PNG/JPEG/WEBP` requirement clarification ( Fixes #110 ) --- Turtle.types.ps1xml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Turtle.types.ps1xml b/Turtle.types.ps1xml index 1bf3372..7d7b415 100644 --- a/Turtle.types.ps1xml +++ b/Turtle.types.ps1xml @@ -1570,7 +1570,7 @@ if ($VerbosePreference -ne 'SilentlyContinue') { JPEG - $chromiumNames = 'chromium','chrome','msedge' + $chromiumNames = 'chromium','chrome' foreach ($browserName in $chromiumNames) { $chromiumCommand = $ExecutionContext.SessionState.InvokeCommand.GetCommand($browserName,'Application') @@ -1881,7 +1881,7 @@ $this | Add-Member -MemberType NoteProperty -Force -Name '.PatternTransform' -Va PNG - $chromiumNames = 'chromium','chrome','msedge' + $chromiumNames = 'chromium','chrome' foreach ($browserName in $chromiumNames) { $chromiumCommand = $ExecutionContext.SessionState.InvokeCommand.GetCommand($browserName,'Application') @@ -2136,7 +2136,7 @@ $this | Add-Member -MemberType NoteProperty -Force -Name '.ViewBox' -Value $view WEBP - $chromiumNames = 'chromium','chrome','msedge' + $chromiumNames = 'chromium','chrome' foreach ($browserName in $chromiumNames) { $chromiumCommand = $ExecutionContext.SessionState.InvokeCommand.GetCommand($browserName,'Application') From 94cf154ffa0094689d3d04d422d553a62bbaebd5 Mon Sep 17 00:00:00 2001 From: James Brundage <+@noreply.github.com> Date: Tue, 5 Aug 2025 18:09:29 -0700 Subject: [PATCH 4/6] feat: `Turtle.get/set_FillRule` ( Fixes #109 ) --- Types/Turtle/get_FillRule.ps1 | 8 ++++++++ Types/Turtle/set_FillRule.ps1 | 6 ++++++ 2 files changed, 14 insertions(+) create mode 100644 Types/Turtle/get_FillRule.ps1 create mode 100644 Types/Turtle/set_FillRule.ps1 diff --git a/Types/Turtle/get_FillRule.ps1 b/Types/Turtle/get_FillRule.ps1 new file mode 100644 index 0000000..9d588f1 --- /dev/null +++ b/Types/Turtle/get_FillRule.ps1 @@ -0,0 +1,8 @@ +if (-not $this.'.PathAttribute') { + $this | Add-Member -MemberType NoteProperty -Name '.PathAttribute' -Value ([Ordered]@{}) -Force +} +if ($this.'.PathAttribute'.'fill-rule') { + return $this.'.PathAttribute'.'fill-rule' +} else { + 'nonzero' +} \ No newline at end of file diff --git a/Types/Turtle/set_FillRule.ps1 b/Types/Turtle/set_FillRule.ps1 new file mode 100644 index 0000000..1e3763b --- /dev/null +++ b/Types/Turtle/set_FillRule.ps1 @@ -0,0 +1,6 @@ +param( +[ValidateSet('nonzero', 'evenodd')] +[string] +$fillRule = 'nonzero' +) +$this.PathAttribute = [Ordered]@{'fill-rule' = $fillRule.ToLower()} From 554d0e4ad1753718b6a33e48e409782846d364f6 Mon Sep 17 00:00:00 2001 From: StartAutomating Date: Wed, 6 Aug 2025 01:09:46 +0000 Subject: [PATCH 5/6] feat: `Turtle.get/set_FillRule` ( Fixes #109 ) --- Turtle.types.ps1xml | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/Turtle.types.ps1xml b/Turtle.types.ps1xml index 7d7b415..90d669a 100644 --- a/Turtle.types.ps1xml +++ b/Turtle.types.ps1xml @@ -1488,6 +1488,28 @@ if (-not $this.'.Fill') { } + + FillRule + + if (-not $this.'.PathAttribute') { + $this | Add-Member -MemberType NoteProperty -Name '.PathAttribute' -Value ([Ordered]@{}) -Force +} +if ($this.'.PathAttribute'.'fill-rule') { + return $this.'.PathAttribute'.'fill-rule' +} else { + 'nonzero' +} + + + param( +[ValidateSet('nonzero', 'evenodd')] +[string] +$fillRule = 'nonzero' +) +$this.PathAttribute = [Ordered]@{'fill-rule' = $fillRule.ToLower()} + + + Heading From 3138e495629e1ba9661b5844160a5932c339fed4 Mon Sep 17 00:00:00 2001 From: James Brundage <+@noreply.github.com> Date: Wed, 6 Aug 2025 15:39:37 -0700 Subject: [PATCH 6/6] release: Turtle 0.1.3 Updating Manifest and CHANGELOG --- CHANGELOG.md | 16 +++++++++++++--- Turtle.psd1 | 18 ++++++++++++++---- 2 files changed, 27 insertions(+), 7 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 2bc3ef3..38164b1 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,4 +1,12 @@ -## Turtle 0.1.2: +## Turtle 0.1.3 + +* Fixing `Get-Turtle` inline sets (#108, #107) +* Fixing `.PNG/JPEG/WEBP` to no longer try to use msedge (#110) +* Adding `Turtle.get/set_FillRule` to get or set the fill rule for the turtle. (#109) + +--- + +## Turtle 0.1.2 * `Get-Turtle/Turtle` can now get or set properties or methods * New Methods: @@ -9,7 +17,9 @@ * `Turtle.Save()` calls Save-Turtle * Explicitly exporting commands from module -## Turtle 0.1.1: +--- + +## Turtle 0.1.1 * Updates: * `Turtle.get/set_ID` allows for turtle identifiers @@ -28,7 +38,7 @@ --- -## Turtle 0.1: +## Turtle 0.1 * Initial Release * Builds a Turtle Graphics engine in PowerShell diff --git a/Turtle.psd1 b/Turtle.psd1 index aef92da..1d9bd46 100644 --- a/Turtle.psd1 +++ b/Turtle.psd1 @@ -1,6 +1,6 @@ @{ # Version number of this module. - ModuleVersion = '0.1.2' + ModuleVersion = '0.1.3' # Description of the module Description = "Turtles in a PowerShell" # Script module or binary module file associated with this manifest. @@ -37,7 +37,15 @@ # A URL to the license for this module. LicenseURI = 'https://github.com/PowerShellWeb/Turtle/blob/main/LICENSE' ReleaseNotes = @' -## Turtle 0.1.2: +## Turtle 0.1.3 + +* Fixing `Get-Turtle` inline sets (#108, #107) +* Fixing `.PNG/JPEG/WEBP` to no longer try to use msedge (#110) +* Adding `Turtle.get/set_FillRule` to get or set the fill rule for the turtle. (#109) + +--- + +## Turtle 0.1.2 * `Get-Turtle/Turtle` can now get or set properties or methods * New Methods: @@ -48,7 +56,9 @@ * `Turtle.Save()` calls Save-Turtle * Explicitly exporting commands from module -## Turtle 0.1.1: +--- + +## Turtle 0.1.1 * Updates: * `Turtle.get/set_ID` allows for turtle identifiers @@ -67,7 +77,7 @@ --- -## Turtle 0.1: +## Turtle 0.1 * Initial Release * Builds a Turtle Graphics engine in PowerShell