Skip to content

Releases: PSModule/Jwt

v1.9.5

12 May 18:57
fdca4e5

Choose a tag to compare

🩹 [Patch]: Linting passes on all platforms (#25)

The Lint-SourceCode and Lint-Module CI jobs now pass on Linux, macOS, and Windows. All PSAvoidLongLines violations that blocked the pipeline after PR #18 was merged have been resolved by extracting long error message strings into local variables and splitting long inline conditionals across multiple lines.

Fixed: Linting no longer fails on any platform

PSScriptAnalyzer reported a PSAvoidLongLines violation (line length > 120 characters) in three source files, causing every platform leg of both Lint-SourceCode and Lint-Module to exit with code 1 and preventing Get-TestResults from completing successfully.

The affected lines were all throw statements with long interpolated error messages and one long inline if/else expression used to set an HMAC key. Each has been reformatted — long messages extracted into a $message variable, and the inline conditional split across multiple lines. No error types, parameter names, function signatures, or observable behaviors changed.

All 31 Pester tests pass locally after the reformatting.

Technical Details

  • New-Jwt.ps1 — 7 violations fixed: throw messages on lines 80, 90, 101, 106, 128, 144 extracted to $message variables; $hmacsha256.Key = if (...) {...} else {...} on line 132 split across multiple lines.
  • Test-Jwt.ps1 — 6 violations fixed: same patterns as New-Jwt.ps1 (lines 78, 88, 103, 121, 125, 154).
  • ConvertTo-Base64UrlString.ps1 — 2 violations fixed: .NOTES comment wrapped at a word boundary (line 24); throw message extracted via an intermediate $type variable to stay within 120 chars (line 51).
  • Implementation plan progress: All tasks completed — source fixes in all three files applied, Invoke-ScriptAnalyzer returns no PSAvoidLongLines results, and all 31 Pester tests pass.