Releases: PSModule/Jwt
v1.9.5
🩹 [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.
- Fixes #24
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:throwmessages on lines 80, 90, 101, 106, 128, 144 extracted to$messagevariables;$hmacsha256.Key = if (...) {...} else {...}on line 132 split across multiple lines.Test-Jwt.ps1— 6 violations fixed: same patterns asNew-Jwt.ps1(lines 78, 88, 103, 121, 125, 154).ConvertTo-Base64UrlString.ps1— 2 violations fixed:.NOTEScomment wrapped at a word boundary (line 24);throwmessage extracted via an intermediate$typevariable to stay within 120 chars (line 51).- Implementation plan progress: All tasks completed — source fixes in all three files applied,
Invoke-ScriptAnalyzerreturns noPSAvoidLongLinesresults, and all 31 Pester tests pass.