Skip to content

Releases: vexx32/PSKoans

PSKoans v0.65.1 - Bugfixes

29 Oct 02:46
Compare
Choose a tag to compare

Notable Changes

  • Fixed some outstanding issues with Reset-PSKoan; you should now be able to use it to reset koans on an individual basis without any issues. To do so, specify the -Topic and then the -Context name or -Name of the It block to reset one or more koans to the default.
  • Fixed an issue where calling Reset-PSKoan to reset the koan library would error out on missing files in the user folder. Now it will simply call Update-PSKoan automatically on any missing topics in order to copy them from the module library.
  • Fixed an issue in AboutNumbers where a function was being called incorrectly. If you're experiencing weird errors from that topic, you can use Reset-PSKoan -Topic AboutNumbers -Name 'has to be a whole number' to pull the new version of the affected koan after updating.
  • Fixed some issues with module import and KoanLocation paths that have spaces.

Full Changelog

Hash Name Subject
38f8c5e @indented-automation 🐛 Reset-PSKoan: Fixes bug with start position offset (#310)
ac1a361 @jpsider 🐛 #303 - Updated Koan Parameter. (#304)
57824bd @vexx32 📝 🚀 Update Changelog generation script a bit (#313)
de4dc93 @vexx32 ✨ Reset-PSKoan: Improve handling for missing topics (#312)
d1f5273 @vexx32 📝 Publish Commit Log as Markdown Table (#309)
75c26ef @vexx32 🐛 Fix Show-Karma -Meditate for KoanLocation with spaces (#308)
8f0d7b3 @vexx32 🐛 Fix issue where importing the module a second time fails (#307)
4c77261 @vexx32 🎨 tweak space around progress bars (#305)

PSKoans v0.65.0 - New Katas, and MORE Koans!

26 Oct 15:24
Compare
Choose a tag to compare

Notable Changes

  • Literally hundreds of new koans, both in old and new topics. We're well over 600 individual koans at present, and we'll still be adding more!
  • New Commands:
    • Show-Karma: A pretty koan completion status display command, taking the place of Measure-Karma.
    • Get-Karma: Outputs a summary object of your PSKoans progress, including current topic progress information. Store your data as you progress to keep a log, or design your own pretty views using the same information used in Show-Karma!
    • Get-PSKoanSetting / Set-PSKoanSetting: Directly get and set persistent settings for your PSKoans module!
      • Currently available settings:
        • KoanLocation: Change the folder location that PSKoans reads from and stores your koan library in!
        • Editor: Change the default editor that PSKoans opens your library in when you call Show-Karma -Meditate! Full paths or executables available from $env:PATH locations are both supported!
      • Settings are stored in ~/.config/PSKoans/config.json
    • Utility commands, with many thanks to @indented-automation for his black-magic wizardry for these gems:
      • Get-PSKoan: Lists the koan topics available!
      • Update-PSKoan: Updates all your koan files, adding any missing koans in your topic files, and copies new topic files over! You can also target specific topics to update with -Topic
      • Reset-PSKoan: Reset individual koan topics, context blocks, or individual koan It blocks by name! Call without parameters to do a full reset of your koan topics. You will be prompted for confirmation before any changes are made to each topic.
  • Updated Commands:
  • Retired Commands:
    • Measure-Karma: Retained as an alias to the new Show-Karma

Full Changelog

Community Contributions

A huge thank-you to all the folks from the community who helped make this update a hundred times better than it would otherwise be!

Special thanks go to @thomasrayner, @indented-automation, and @sudoblark for their hard work and immense contributions to the PSKoans topic library. (And especially for being willing to put up with me through some very thorough code reviews!)

Commit Name Subject
493be4a @A298B112 Fix Select-Object -Unique koan (#221)
c8c4893 @BrandonLundt Typos identified in Issue #190 (#201)
3320e2c @BrandonLundt Changed out-file parameter and updated Out-String koan (#198)
8db3533 @BrandonLundt Removed -Recurse, updated Regex Pattern, added help (#200)
8a4e35a @BrandonLundt 🎨 ♻️ Fixed typos, split ErrorRecord describe into two Contexts (#199)
1edc1b9 @BrandonLundt 🔧 Clarify AboutPSProviders->FileSystemProvider Koan. (#189)
f1bad6f @cyberd3mon ➕ A couple of qoutes of wisdom added. (#300)
09f013c @EVWorth Fixes auto-succeeding pester tests in AboutComparison and AboutStrings (#214)
7eaca0a @gep13 📝 Remove double space (#269)
4c5e590 @IISResetMe Fix #177 (unpredictable test expectations in AboutWhereObject) (#219)
508fada @indented-automation ✨ Updates AboutStrings with new examples (#299)
594d53a @indented-automation ✨ Adds Koans: AboutClasses (#296)
09e37fb @indented-automation ✨ Adds about enumerations koans (#263)
0628f3c @indented-automation 🐛 Fixes Detailed parameter (#268)
db83193 @indented-automation ✨ Adds examples to AboutArrays (#257)
302263e @indented-automation ✨ Adds module topic support & refactor init (#251)
1bb9e9d @indented-automation Updates AboutSelectObject (#247)
89632fb @indented-automation ✨ Adds bitwise operator and binary koans (#245)
9c2c5f7 @indented-automation ✅ Adds new koan validation tests (#246)
1a4c496 @indented-automation ✨ Adds Koan Update and Reset commands (#223)
21f8e42 @indented-automation ✨ Adds OFS to AboutStrings (#204)
3933d71 @johnheusinger ✨ Add a few bits of wisdom (#293)
d0726f5 @manoj2994 ✅ Write Tests for *-Advice Cmdlets #278 (#283)
54beee2 @robdy ✨ Add specific error for Show-Advice (#287)
31f0494 @robdy 🐛 Fix bug with VSCode opening empty file (#289)
785883c @robdy 🐛 Fix fun advices filenames (#285)
b1fbf7e @sudoblark ✨ Port of PowerShell Intro Training into PSKoans (#241)
defad7f @thomasrayner ✨ New topic: Regular Expressions (#281)
ce875f3 @tomlarse 🔧 Fix divide by zero on some systems (#192)
f67a246 @tomlarse Moved $Aliases to the correct scope (#173)
3fb8b44 @usrme 🐛 Check for PSKoan directory before opening (#274)
b9a2415 @usrme 🐛 Fix Show-Advice requiring full basename for snippet (#276)
5cd6b86 @vercellone 🔧 Fixes #191 AboutPSObjects (#228)
2b01ba4 @vercellone 📦 Enforce a single LF at EOF (#232)

All Other Changes

Commit Subject
4a66dfa 🚀 Fix nupkg generation for PRs
b03bc1a 🚀 Allow tests to publish on failed tests
e2ca569 📝 Use relative path for workspace folder
4f378d2 🐛 Properly Rethrow Get-Karma errors in Show-Karma (#302)
29fd4d1 🐛 Update-PSKoan - Fix Yes to All for ShouldProcess Prompts (#292)
f6ad6b8 🎨 ♻️ Style Pass (#295)
be71464 ✨ 🎨 Add meditation prompts (#294)
c7c536d ✨ Add -PipelineVariable koan & update AboutLoopsAndPipelines (#291)
9bc1a72 ✨ Persist koan settings (#248)
41ea730 🚧 🎨 Rework Koan Order (#277)
4f2e142 📝 Update Contributing.md (#271)
dd8b268 🐛 🎨 Update AboutDiscovery (#270)
d8fa6ca 🚀 Refactor job / task layout (#266)
9d046f5 🚀 Dry-Run Module Publishing in CI (#265)
11d0143 🚀 Add Code Coverage Reports (#259)
da66f06 🐛 Show-Karma - Properly handle completion of topics (#250)
47e75aa ✨ add CSV koans (#240)
edb870b 📝 Update readme and meditation prompt (#243)
9690b0a 🎨 Use longer-form blank for dummy type name (#244)
8300057 🔧 Update all references to $env:PATH (#239)
0cf03c8 ✨ Add Get-Karma function, rename Measure-Karma to Show-Karma (#238)
5e5c174 ✨ Implement first Katas (#237)
dff3296 🔧 🎨 Fix #179 AboutPSProviders (#235)
39aefd4 🚀 Add multi-platform building and testing (#236)
adbd525 🔧 🎨 Fix Outstanding koan issues (#233)...
Read more

v0.50.1 - Bugfixes & A New Logo!

28 Apr 15:21
Compare
Choose a tag to compare

New Logo!

Many thanks to @Adilio for the fantastic design and tolerance of me fiddling with it constantly. 😄

Logo

Fixes & Changes

  • Uses a more console-font-compatible character for the progress bar. The parallelogram looks lovely in a lot of fonts in VS Code, but in a majority of cases it's not supported by many standard console fonts.
  • Fixes the initial introductory koan thinking it was complete from the start.
  • Added some overloads for Equals() to [Blank] which allows us to do silly things like this and still fail a Pester test:
$Value = __
$Value | Should -Be $Value

v0.50.0 Error Handling Koans!

21 Apr 05:10
Compare
Choose a tag to compare

New Koans

  • ✨ PSObject Koans (#120)
  • ✨ Redirections (#148) (Thanks @corbob!)
  • ✨ Error handling koans (#153)

New Features

  • ✨ Allow measure-karma -Contemplate to use code-insiders (#104) (Thanks @thomasrayner!)
  • ✨ Permit Specifying and Listing Topics for Measure-Karma (#101)
  • ✨ Display additional progress bar for farthest topic reached (#118)
    • You will now see two progress bars; one for overall progress, and one for progress on the current topic you're up to.
  • ✨ Add -Reset -Topic to Measure-Karma (#144)

New Commands

Get-/Set-PSKoanLocation

  • Allows easy get/set for your working folder.
  • Add Set-PSKoanLocation to your PowerShell profile to have it always use the requested location.
  • Enables easy switching between set locations!
  • Location defaults to $HOME\PSKoans

Module Fixes / Improvements

  • ✨ Update build / test process to be more flexible and smooth for local builds as well as CI/CD.
  • ✨ Added [OutputType()] attributes to module commands.
  • ✨ Improvements to module feature tests.
  • ♻️ Get-Advice renamed to Show-Advice. Old name retained as an alias.
  • ♻️ Advice data moved to json file for easier management and updating.
  • [Koan()] attribute gets a .Module property to distinguish koans being built for distinct modules!
  • ♻️ Remove unneeded wait periods (#114)
  • ♻️ Reformat tests (#115)
  • ♻️ Refactor Invoke-Koan (#121)
  • 🔧 Load Dummy types (incl. [__]) globally (#122)
  • ♻️ Adjust type detector switch for clarity (#123)
  • 💄 Refactor Data Strings & Show-MeditationPrompt (#126)
  • 📝 Update total Koans from 238 to 246 (#130)
  • 🔧 Update Measure-Karma to correctly open paths with spaces (#132) (Thanks @puthuppu!)
  • 🔧 Adding Blank Class to fix #131 (#135) (Thanks @tysonjhayes!)
  • 🔧 Make Clear-Host optional for Measure-Karma (#142)
  • ✅ Update CI test display (#146)
  • 📝 Add external help files and MD docs files (#155)

Koan Fixes / Improvements

  • ♻️ Grammar Updates in AboutArrays (#133)
  • 🔧 Change addition array example - fixes #111 (#112) (Thanks @thomasrayner!)
  • ♻️ Provider Clearer Context around Write-Output vs Return (#136) (Thanks @tysonjhayes!)
  • 🔧 Fix Koan Issues & Fix Readme (#143)
  • 🚧 Merge Constructs and Patterns (#149)
  • 📝 Add ASCII/Char explanation (#152)

0.42.2 - Bulletproofing

11 Dec 04:54
Compare
Choose a tag to compare
Pre-release

New Stuff

  • Changed Invoke-Koan to simply use a separate runspace instead of toying with SessionState in barely-supported ways.
  • Trimmed some of the koan finding/filtering code.
  • Applied a slightly more robust koans searching method in Measure-Karma
  • Applies using module PSKoans before executing koans files
    • Use of using module PSKoans in koans file headers is now technically optional.

Fixes

  • Fixed issue where KoanAttribute was not being registered or discovered, preventing koan files from being assessed.
  • Fixed issue where the user's Koans folder was not being searched properly, resulting in confusing prompts and division by zero errors.
  • Fixed issues where the meditation prompt output far too many errors
  • Fixed issues where older koans files couldn't be read correctly. Using new version(s) with older koan files should work more or less as expected now.
  • Fixed issues in some cases where Pester would complain that the Should -Fail assertion operator was already registered.

v0.42.1: Oops

10 Dec 18:23
Compare
Choose a tag to compare
v0.42.1: Oops Pre-release
Pre-release

I guess I didn't test thoroughly enough! Apologies for the busted release; a fix is being published to the gallery shortly!

Here are the fixed files, and they'll be up on the gallery in a few minutes. 😄

For those of you wanting to continue your koans run uninterrupted and without resetting, please run the following command to replace your file headers for compatibility:

Get-ChildItem -Path $env:PSKoans_Folder -Recurse -File | ForEach-Object {
    ( Get-Content -Path $_.FullName ) -replace '^#Requires.*PSKoans','using module PSKoans' |
        Set-Content $_.FullName
}

0.42 - Stability, Sensibility, and Framework!

09 Dec 14:58
Compare
Choose a tag to compare

This is pretty much a big overhaul, refactor, and cleanup release. Not a ton of new koans available at the moment, though several have been altered to make more sense and be more beginner-friendly! However, this release has had the files re-encoded to Windows PowerShell standards to ensure that all of you who are still using Windows PowerShell can use the module with far less issues. 😄

Changelog

  • Tons of community contributions!
  • Uses using module instead of #Requires -Modules so that types are exported in a more sensible fashion and do not remain in the session when you Remove-Module. This change may break compatibility with koan files from older versions.
  • Registers a Should -Fail operator to handle code paths that should not be reached or catch cases where tests might pass just because all code paths that have an assertion are skipped in some way.
  • Added restricted support for properly counting koans that need to use -TestCases for the It blocks.
    • Only hashtable literals that can be assessed with SafeGetValue() will be able to be counted. We ain't got time to trace back variable references to god knows where!
  • Add some checks to ensure that we handle missing koan files better.
  • Removed the rake alias completely. This was mainly a nod to the F# koans which used rake as a build / test runner tool. However, some people actually want to use the rake tool itself from PowerShell at times, and this got in the way of that.
  • Refactor AboutConditionals, AboutVariables, AboutFunctionsAndScriptBlocks, and AboutArrays to make more sense and have more consistent writing style with the rest of the koans.
  • Move CI/CD to Azure Pipelines.

Community Contributions

  • Add initial frameworks for advice prompts (Thanks @FriedrichWeinmann! #54)
    • This is very early for this stuff, but you can see the basic functionality with Invoke-Advice.
  • Add Clear-Path as an alias to Measure-Karma (Thanks @steviecoaster! #56)
  • Updates to readme and Getting Started sections (Thanks @nohwnd! #58)
  • Fixes and tweaks to AboutStringOperators so they work as intended and make more sense. (Thanks @ChrisLGardner! #60, #62)
  • Updates and edits to AboutLoopsAndPipelines, AboutHashtables, AboutStrings, AboutTypeOperators, AboutAssignmentAndArithmetic, and AboutArrays. (Thanks @indented-automation! #63 #64 #65 #67 #69 #70)
  • Updates to AboutConditionals so the switch -Wildcard koan makes more sense. (Thanks @BrandonLundt! #73)
  • Updates to AboutHashtables. (Thanks @gpduck! #93)

v0.41.0 - AboutStringBuilder

26 Aug 13:22
50a0c15
Compare
Choose a tag to compare
Pre-release

Additions:

  • AboutStringBuilder koans! For all your advanced, overcomplicated, and way over-the-top string constructions!

Changes:

  • Mostly cosmetic changes to the initial series of Koans to make them more readable, and consistent with the style of the later koans.

v0.40 AboutModules

12 Aug 02:27
7741ba9
Compare
Choose a tag to compare
v0.40 AboutModules Pre-release
Pre-release

v0.40 - AboutModules

Changes

  • Changed Get-Enlightenment to Measure-Karma. The old command name(s) persist as aliases, as well as existing aliases.
    • Changed Measure-Karma's -Meditate switch to -Contemplate ; old switch name will be aliased to the new one for the time being.
  • Added AboutModules!
  • Added verbose output to exported and internal functions!
  • Two new short koans for the random meditation prompt!
  • Moved koan counting to internal module function rather than doing it directly in Measure-Karma
  • Added Comment-Based Help to functions that were missing it, and tidied up existing help blocks

Fixes

  • Fix build process to operate based on version tags rather than just branches.
  • Fix PSGallery releases not automatically showing links to github and license, etc.
    • I forgot to put stuff in PrivateData in the .psd1, oops!
  • Moved data file import to module import rather than function execution so that imported data stays in session memory instead of accessing disk on every function call.
  • Finally got around to updating some stuff in the readm!. Fixes #47
  • Updated tests to reflect new command behaviour, and added tests for Measure-Koan.

v0.39.5: Optimisations

07 Aug 12:14
466ef5c
Compare
Choose a tag to compare
Pre-release

Found a way to count the total koans without invoking Pester via the AST; avoids double counting everything, and it's significantly faster.