Skip to content

v0.117.0-preview0003

Pre-release
Pre-release
Compare
Choose a tag to compare
@gaelcolas gaelcolas released this 24 Sep 20:30

[v0.117.0-preview0003]

Added

  • Integration tests to build and import a module created using the Plaster
    template SimpleModule.
  • Support ModuleFast when
    restoring dependencies by adding the parameter UseModuleFast to the
    build.ps1, e.g. ./build.ps1 -Tasks noop -ResolveDependency -UseModuleFast
    or by enabling it in the configuration file Resolve-Dependency.psd1.
    Using ModuleFast will resolve dependencies much faster, but requires
    PowerShell 7.2.
  • Support for PSResourceGet (beta release).
    If the modules PSResourceGet can be bootstrapped they will be used. If
    PSResourceGet cannot be bootstrapped then it will revert to using
    PowerShellGet v2.2.5. If the user requests or configures to use ModuleFast
    then that will override both PSResourceGet and PowerShellGet. The method
    PSResourceGet can be enabled in the configuration file Resolve-Dependency.psd1.
    It is also possible to use PSResourceGet by adding the parameter UsePSResourceGet
    to the build.ps1, e.g. ./build.ps1 -Tasks noop -ResolveDependency -UsePSResourceGet.
  • When using PSResourceGet to resolve dependencies it also possible to
    use PowerShellGet v2.9.0 (previous CompatPowerShellGet). To use the
    compatibility module it can be enabled in the configuration file Resolve-Dependency.psd1.
    It is also possible to use it by adding the parameter UsePowerShellGetCompatibilityModule
    to the build.ps1, e.g. ./build.ps1 -Tasks noop -ResolveDependency -UsePSResourceGet -UsePowerShellGetCompatibilityModule.
    The 2.9.0-preview has since then been unlisted, the compatibility
    module will now be released as PowerShellGet v3.0.0.

Changed

  • Task publish_nupkg_to_gallery
    • Add support for publishing a NuGet package to a gallery using the .NET SDK in addition to using nuget.exe. Fixes #433
  • Split up unit tests and integration tests in separate pipeline jobs since
    integration tests could change state on a developers machine, and in the
    current PowerShell session. Integration tests no longer run when running
    ./build.ps1 -Tasks test. To run integration tests pass the parameter
    PesterPath, e.g. ./build.ps1 -Tasks test -PesterPath 'tests/Integration'.
  • Added sample private function and public function samples to Plaster template
    SimpleModule so that it is possible to run task test without it failing.
  • Sample Private function tests updated to Pester 5.
  • Sample Public function tests updated to Pester 5.
  • Sampler's build.ps1 and the template build.ps1 was aligned.
  • PowerShell Team will release the PSResourceGet compatibility module
    (previously known as CompatPowerShellGet) as PowerShellGet v2.9.0 (or
    higher). The resolve dependency script, when PowerShellGet is used, will
    use MaximumVersion set to 2.8.999 to make sure the expected
    PowerShellGet version is installed, today that it is v2.2.5.
    The 2.9.0-preview has since then been unlisted, the compatibility
    module will now be released as PowerShellGet v3.0.0.

Fixed

  • Fix unit tests that was wrongly written and failed on Pester 5.5.
  • There was different behavior on PowerShell and Windows PowerShell when
    creating the module manifest. So when the modify section that was meant
    to reuse the already present but commented Prerelease key it also ran
    the modify statement that adds a Prerelease key that is needed for
    a module manifest that is created under Windows PowerShell. This resulted
    in two Prerelease keys when creating a module under PowerShell 7.x.
    Now it will add a commented Perelease key and then next modify statement
    will remove the comment, making it work on all version of PowerShell.
    Fixes #436.
  • The QA test template was updated so that it is possible to run the tests
    without the need to add a git remote (remote origin).