Tags: PSModule/TimeSpan
Tags
🪲 [Fix]: Fix linter settings and docs (#15) This pull request makes configuration updates to the project's linting and formatting setup. The key changes include disabling several linter validations in the GitHub Actions workflow and adjusting markdown linting rules to allow for more flexibility. **Linter configuration updates:** * Disabled multiple linter validations (such as Biome format/lint, GitHub Actions Zizmor, JSCPD, JSON/Markdown/YAML Prettier) in the `Linter` section of `.github/PSModule.yml`. **Markdown linting rule adjustments:** * Disabled the `MD024` rule (no duplicate headings) and corrected the punctuation list formatting for `MD026` in `.github/linters/.markdown-lint.yml`.
🩹 [Patch]: Bump Process-PSModule to v5 (#14) ## Description This pull request updates the repository's GitHub workflow and configuration files to streamline CI processes and remove unused or redundant configurations. The most significant changes include consolidating scheduled and pull request triggers into a single workflow, updating workflow dependencies, and cleaning up linter and configuration files. **Workflow and CI configuration improvements:** * Combined the nightly scheduled run and pull request triggers into the `.github/workflows/Process-PSModule.yml` workflow, replacing the separate `Nightly-Run.yml` and simplifying scheduling and dispatch logic. [[1]](diffhunk://#diff-b4dbaea65a86cef96799e9783b18b31e96a456d476805312f52919d45a060603L3-R6) [[2]](diffhunk://#diff-ae7e03d0a8740974e1848d0dc7322a8b3f3f4898b37bfd5b226dff69096bb8dfL1-L16) * Updated the referenced version of the `Process-PSModule` reusable workflow from `v4` to `v5` to ensure the latest improvements and fixes are used. * Added a new `.github/PSModule.yml` configuration file to set up code coverage targets and provide a template for further test and build configuration. **Linter and dependency management cleanup:** * Removed the `.github/workflows/Linter.yml` workflow and the `.github/linters/.jscpd.json` configuration file, indicating a move away from the previous linter setup or its consolidation elsewhere. [[1]](diffhunk://#diff-482e65806ed9e4a7320f14964764086b91fed4a28d12e4efde1776472e147e79L1-L32) [[2]](diffhunk://#diff-557094e283c00b23265c1c75872f41c6b1a524a00f0d99dd68ebd22cb63bfdd6L1-L10) * Updated `.github/dependabot.yml` to automatically label GitHub Actions updates with `dependencies` and `github-actions`, improving dependency management and visibility.
Bump actions/checkout from 4 to 5 (#13) Bumps [actions/checkout](https://github.com/actions/checkout) from 4 to 5. <details> <summary>Release notes</summary> <p><em>Sourced from <a href="https://github.com/actions/checkout/releases">actions/checkout's releases</a>.</em></p> <blockquote> <h2>v5.0.0</h2> <h2>What's Changed</h2> <ul> <li>Update actions checkout to use node 24 by <a href="https://github.com/salmanmkc"><code>@salmanmkc</code></a> in <a href="https://redirect.github.com/actions/checkout/pull/2226">actions/checkout#2226</a></li> <li>Prepare v5.0.0 release by <a href="https://github.com/salmanmkc"><code>@salmanmkc</code></a> in <a href="https://redirect.github.com/actions/checkout/pull/2238">actions/checkout#2238</a></li> </ul> <h2>⚠️ Minimum Compatible Runner Version</h2> <p><strong>v2.327.1</strong><br /> <a href="https://github.com/actions/runner/releases/tag/v2.327.1">Release Notes</a></p> <p>Make sure your runner is updated to this version or newer to use this release.</p> <p><strong>Full Changelog</strong>: <a href="https://github.com/actions/checkout/compare/v4...v5.0.0">https://github.com/actions/checkout/compare/v4...v5.0.0</a></p> <h2>v4.3.0</h2> <h2>What's Changed</h2> <ul> <li>docs: update README.md by <a href="https://github.com/motss"><code>@motss</code></a> in <a href="https://redirect.github.com/actions/checkout/pull/1971">actions/checkout#1971</a></li> <li>Add internal repos for checking out multiple repositories by <a href="https://github.com/mouismail"><code>@mouismail</code></a> in <a href="https://redirect.github.com/actions/checkout/pull/1977">actions/checkout#1977</a></li> <li>Documentation update - add recommended permissions to Readme by <a href="https://github.com/benwells"><code>@benwells</code></a> in <a href="https://redirect.github.com/actions/checkout/pull/2043">actions/checkout#2043</a></li> <li>Adjust positioning of user email note and permissions heading by <a href="https://github.com/joshmgross"><code>@joshmgross</code></a> in <a href="https://redirect.github.com/actions/checkout/pull/2044">actions/checkout#2044</a></li> <li>Update README.md by <a href="https://github.com/nebuk89"><code>@nebuk89</code></a> in <a href="https://redirect.github.com/actions/checkout/pull/2194">actions/checkout#2194</a></li> <li>Update CODEOWNERS for actions by <a href="https://github.com/TingluoHuang"><code>@TingluoHuang</code></a> in <a href="https://redirect.github.com/actions/checkout/pull/2224">actions/checkout#2224</a></li> <li>Update package dependencies by <a href="https://github.com/salmanmkc"><code>@salmanmkc</code></a> in <a href="https://redirect.github.com/actions/checkout/pull/2236">actions/checkout#2236</a></li> <li>Prepare release v4.3.0 by <a href="https://github.com/salmanmkc"><code>@salmanmkc</code></a> in <a href="https://redirect.github.com/actions/checkout/pull/2237">actions/checkout#2237</a></li> </ul> <h2>New Contributors</h2> <ul> <li><a href="https://github.com/motss"><code>@motss</code></a> made their first contribution in <a href="https://redirect.github.com/actions/checkout/pull/1971">actions/checkout#1971</a></li> <li><a href="https://github.com/mouismail"><code>@mouismail</code></a> made their first contribution in <a href="https://redirect.github.com/actions/checkout/pull/1977">actions/checkout#1977</a></li> <li><a href="https://github.com/benwells"><code>@benwells</code></a> made their first contribution in <a href="https://redirect.github.com/actions/checkout/pull/2043">actions/checkout#2043</a></li> <li><a href="https://github.com/nebuk89"><code>@nebuk89</code></a> made their first contribution in <a href="https://redirect.github.com/actions/checkout/pull/2194">actions/checkout#2194</a></li> <li><a href="https://github.com/salmanmkc"><code>@salmanmkc</code></a> made their first contribution in <a href="https://redirect.github.com/actions/checkout/pull/2236">actions/checkout#2236</a></li> </ul> <p><strong>Full Changelog</strong>: <a href="https://github.com/actions/checkout/compare/v4...v4.3.0">https://github.com/actions/checkout/compare/v4...v4.3.0</a></p> <h2>v4.2.2</h2> <h2>What's Changed</h2> <ul> <li><code>url-helper.ts</code> now leverages well-known environment variables by <a href="https://github.com/jww3"><code>@jww3</code></a> in <a href="https://redirect.github.com/actions/checkout/pull/1941">actions/checkout#1941</a></li> <li>Expand unit test coverage for <code>isGhes</code> by <a href="https://github.com/jww3"><code>@jww3</code></a> in <a href="https://redirect.github.com/actions/checkout/pull/1946">actions/checkout#1946</a></li> </ul> <p><strong>Full Changelog</strong>: <a href="https://github.com/actions/checkout/compare/v4.2.1...v4.2.2">https://github.com/actions/checkout/compare/v4.2.1...v4.2.2</a></p> <h2>v4.2.1</h2> <h2>What's Changed</h2> <ul> <li>Check out other refs/* by commit if provided, fall back to ref by <a href="https://github.com/orhantoy"><code>@orhantoy</code></a> in <a href="https://redirect.github.com/actions/checkout/pull/1924">actions/checkout#1924</a></li> </ul> <h2>New Contributors</h2> <ul> <li><a href="https://github.com/Jcambass"><code>@Jcambass</code></a> made their first contribution in <a href="https://redirect.github.com/actions/checkout/pull/1919">actions/checkout#1919</a></li> </ul> <p><strong>Full Changelog</strong>: <a href="https://github.com/actions/checkout/compare/v4.2.0...v4.2.1">https://github.com/actions/checkout/compare/v4.2.0...v4.2.1</a></p> <!-- raw HTML omitted --> </blockquote> <p>... (truncated)</p> </details> <details> <summary>Changelog</summary> <p><em>Sourced from <a href="https://github.com/actions/checkout/blob/main/CHANGELOG.md">actions/checkout's changelog</a>.</em></p> <blockquote> <h1>Changelog</h1> <h2>V5.0.0</h2> <ul> <li>Update actions checkout to use node 24 by <a href="https://github.com/salmanmkc"><code>@salmanmkc</code></a> in <a href="https://redirect.github.com/actions/checkout/pull/2226">actions/checkout#2226</a></li> </ul> <h2>V4.3.0</h2> <ul> <li>docs: update README.md by <a href="https://github.com/motss"><code>@motss</code></a> in <a href="https://redirect.github.com/actions/checkout/pull/1971">actions/checkout#1971</a></li> <li>Add internal repos for checking out multiple repositories by <a href="https://github.com/mouismail"><code>@mouismail</code></a> in <a href="https://redirect.github.com/actions/checkout/pull/1977">actions/checkout#1977</a></li> <li>Documentation update - add recommended permissions to Readme by <a href="https://github.com/benwells"><code>@benwells</code></a> in <a href="https://redirect.github.com/actions/checkout/pull/2043">actions/checkout#2043</a></li> <li>Adjust positioning of user email note and permissions heading by <a href="https://github.com/joshmgross"><code>@joshmgross</code></a> in <a href="https://redirect.github.com/actions/checkout/pull/2044">actions/checkout#2044</a></li> <li>Update README.md by <a href="https://github.com/nebuk89"><code>@nebuk89</code></a> in <a href="https://redirect.github.com/actions/checkout/pull/2194">actions/checkout#2194</a></li> <li>Update CODEOWNERS for actions by <a href="https://github.com/TingluoHuang"><code>@TingluoHuang</code></a> in <a href="https://redirect.github.com/actions/checkout/pull/2224">actions/checkout#2224</a></li> <li>Update package dependencies by <a href="https://github.com/salmanmkc"><code>@salmanmkc</code></a> in <a href="https://redirect.github.com/actions/checkout/pull/2236">actions/checkout#2236</a></li> </ul> <h2>v4.2.2</h2> <ul> <li><code>url-helper.ts</code> now leverages well-known environment variables by <a href="https://github.com/jww3"><code>@jww3</code></a> in <a href="https://redirect.github.com/actions/checkout/pull/1941">actions/checkout#1941</a></li> <li>Expand unit test coverage for <code>isGhes</code> by <a href="https://github.com/jww3"><code>@jww3</code></a> in <a href="https://redirect.github.com/actions/checkout/pull/1946">actions/checkout#1946</a></li> </ul> <h2>v4.2.1</h2> <ul> <li>Check out other refs/* by commit if provided, fall back to ref by <a href="https://github.com/orhantoy"><code>@orhantoy</code></a> in <a href="https://redirect.github.com/actions/checkout/pull/1924">actions/checkout#1924</a></li> </ul> <h2>v4.2.0</h2> <ul> <li>Add Ref and Commit outputs by <a href="https://github.com/lucacome"><code>@lucacome</code></a> in <a href="https://redirect.github.com/actions/checkout/pull/1180">actions/checkout#1180</a></li> <li>Dependency updates by <a href="https://github.com/dependabot"><code>@dependabot</code></a>- <a href="https://redirect.github.com/actions/checkout/pull/1777">actions/checkout#1777</a>, <a href="https://redirect.github.com/actions/checkout/pull/1872">actions/checkout#1872</a></li> </ul> <h2>v4.1.7</h2> <ul> <li>Bump the minor-npm-dependencies group across 1 directory with 4 updates by <a href="https://github.com/dependabot"><code>@dependabot</code></a> in <a href="https://redirect.github.com/actions/checkout/pull/1739">actions/checkout#1739</a></li> <li>Bump actions/checkout from 3 to 4 by <a href="https://github.com/dependabot"><code>@dependabot</code></a> in <a href="https://redirect.github.com/actions/checkout/pull/1697">actions/checkout#1697</a></li> <li>Check out other refs/* by commit by <a href="https://github.com/orhantoy"><code>@orhantoy</code></a> in <a href="https://redirect.github.com/actions/checkout/pull/1774">actions/checkout#1774</a></li> <li>Pin actions/checkout's own workflows to a known, good, stable version. by <a href="https://github.com/jww3"><code>@jww3</code></a> in <a href="https://redirect.github.com/actions/checkout/pull/1776">actions/checkout#1776</a></li> </ul> <h2>v4.1.6</h2> <ul> <li>Check platform to set archive extension appropriately by <a href="https://github.com/cory-miller"><code>@cory-miller</code></a> in <a href="https://redirect.github.com/actions/checkout/pull/1732">actions/checkout#1732</a></li> </ul> <h2>v4.1.5</h2> <ul> <li>Update NPM dependencies by <a href="https://github.com/cory-miller"><code>@cory-miller</code></a> in <a href="https://redirect.github.com/actions/checkout/pull/1703">actions/checkout#1703</a></li> <li>Bump github/codeql-action from 2 to 3 by <a href="https://github.com/dependabot"><code>@dependabot</code></a> in <a href="https://redirect.github.com/actions/checkout/pull/1694">actions/checkout#1694</a></li> <li>Bump actions/setup-node from 1 to 4 by <a href="https://github.com/dependabot"><code>@dependabot</code></a> in <a href="https://redirect.github.com/actions/checkout/pull/1696">actions/checkout#1696</a></li> <li>Bump actions/upload-artifact from 2 to 4 by <a href="https://github.com/dependabot"><code>@dependabot</code></a> in <a href="https://redirect.github.com/actions/checkout/pull/1695">actions/checkout#1695</a></li> <li>README: Suggest <code>user.email</code> to be <code>41898282+github-actions[bot]@users.noreply.github.com</code> by <a href="https://github.com/cory-miller"><code>@cory-miller</code></a> in <a href="https://redirect.github.com/actions/checkout/pull/1707">actions/checkout#1707</a></li> </ul> <h2>v4.1.4</h2> <ul> <li>Disable <code>extensions.worktreeConfig</code> when disabling <code>sparse-checkout</code> by <a href="https://github.com/jww3"><code>@jww3</code></a> in <a href="https://redirect.github.com/actions/checkout/pull/1692">actions/checkout#1692</a></li> <li>Add dependabot config by <a href="https://github.com/cory-miller"><code>@cory-miller</code></a> in <a href="https://redirect.github.com/actions/checkout/pull/1688">actions/checkout#1688</a></li> <li>Bump the minor-actions-dependencies group with 2 updates by <a href="https://github.com/dependabot"><code>@dependabot</code></a> in <a href="https://redirect.github.com/actions/checkout/pull/1693">actions/checkout#1693</a></li> <li>Bump word-wrap from 1.2.3 to 1.2.5 by <a href="https://github.com/dependabot"><code>@dependabot</code></a> in <a href="https://redirect.github.com/actions/checkout/pull/1643">actions/checkout#1643</a></li> </ul> <h2>v4.1.3</h2> <!-- raw HTML omitted --> </blockquote> <p>... (truncated)</p> </details> <details> <summary>Commits</summary> <ul> <li><a href="https://github.com/actions/checkout/commit/08c6903cd8c0fde910a37f88322edcfb5dd907a8"><code>08c6903</code></a> Prepare v5.0.0 release (<a href="https://redirect.github.com/actions/checkout/issues/2238">#2238</a>)</li> <li><a href="https://github.com/actions/checkout/commit/9f265659d3bb64ab1440b03b12f4d47a24320917"><code>9f26565</code></a> Update actions checkout to use node 24 (<a href="https://redirect.github.com/actions/checkout/issues/2226">#2226</a>)</li> <li>See full diff in <a href="https://github.com/actions/checkout/compare/v4...v5">compare view</a></li> </ul> </details> <br /> [](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores) Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `@dependabot rebase`. [//]: # (dependabot-automerge-start) [//]: # (dependabot-automerge-end) --- <details> <summary>Dependabot commands and options</summary> <br /> You can trigger Dependabot actions by commenting on this PR: - `@dependabot rebase` will rebase this PR - `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it - `@dependabot merge` will merge this PR after your CI passes on it - `@dependabot squash and merge` will squash and merge this PR after your CI passes on it - `@dependabot cancel merge` will cancel a previously requested merge and block automerging - `@dependabot reopen` will reopen this PR if it is closed - `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually - `@dependabot show <dependency name> ignore conditions` will show all of the ignore conditions of the specified dependency - `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself) </details> Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
🪲[Fix]: Format-TimeSpan handling of zero values in the middle of time… … spans (#12) The `Format-TimeSpan` function was incorrectly truncating output when zero values appeared between non-zero time units. Consider: ```powershell # This should show "2h 10s" but only showed "2h" New-TimeSpan -Hours 2 -Minutes 0 -Seconds 10 | Format-TimeSpan # Other examples that were broken: New-TimeSpan -Hours 1 -Milliseconds 500 | Format-TimeSpan # Should show "1h 500ms" New-TimeSpan -Days 2 -Minutes 30 | Format-TimeSpan # Should show "2d 30m" ``` ## Root Cause The issue was in the auto-precision calculation logic. When precision wasn't explicitly specified, the function would: 1. Count the number of non-zero units (correctly identifying 2 units: hours and seconds) 2. Process only a fixed range based on that count (`startingIndex + precision - 1`) 3. Skip zero values during processing, but the limited range prevented reaching subsequent non-zero units ## Solution Modified the auto-precision logic to process all time units when precision is not explicitly specified, allowing the existing filtering logic to correctly include only non-zero values regardless of gaps. ## Key Changes - Updated auto-precision calculation in `Format-TimeSpan.ps1` to use maximum range when `IncludeZeroValues` is false - Added comprehensive test cases covering various zero-gap scenarios - Preserved all existing functionality including explicit precision behavior ## Testing - ✅ Fixed original issue: `New-TimeSpan -Hours 2 -Minutes 0 -Seconds 10 | Format-TimeSpan` → "2h 10s" - ✅ All existing regression tests pass (8/8) - ✅ Added 3 new test cases for zero-gap scenarios - ✅ Verified explicit precision, different formats, and negative values still work correctly Fixes #11. <!-- START COPILOT CODING AGENT TIPS --> --- 💬 Share your feedback on Copilot coding agent for the chance to win a $200 gift card! Click [here](https://survey.alchemer.com/s3/8343779/Copilot-Coding-agent) to start the survey. --------- Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: MariusStorhaug <17722253+MariusStorhaug@users.noreply.github.com>
🌟 [Major]: Change default format precision to be all units that have … …values (#10) This pull request introduces significant updates to the `TimeSpan` PowerShell module, focusing on improving functionality, usability, and documentation. Key changes include enhancements to the `Format-TimeSpan` function, updates to the README for better clarity, and expanded test coverage to ensure backward compatibility and validate new features. - Fixes #9 ### Enhancements to `Format-TimeSpan` functionality * 🌟 Default behavior now shows all non-zero time units unless explicitly overridden by the `Precision` parameter. Added a new `IncludeZeroValues` parameter to include zero-value units in the output. * 🌟 Precision handling updated to dynamically calculate based on non-zero units when not explicitly specified, ensuring intuitive defaults. * Added examples showing multiple formatting styles (`Symbol`, `Abbreviation`, `FullName`) and clarified their behavior. ### Documentation improvements * Updated `README.md` to reflect the new default behavior, provide detailed usage examples, and explain supported parameters and time units. * Enhanced inline comments in `Format-TimeSpan.ps1` to clarify parameter behavior and default settings. ### Expanded test coverage: * Added tests for new functionality, including `IncludeZeroValues` and backward compatibility for explicit precision settings. * Updated existing tests to align with the new default behavior of `Format-TimeSpan`. --------- Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: MariusStorhaug <17722253+MariusStorhaug@users.noreply.github.com> Co-authored-by: Marius Storhaug <marstor@hotmail.com>
🌟[Major]: Replace `FullNames` with a dynamic `Format` parameter with … …3 alternatives (#8) This pull request introduces enhancements to the formatting functionality for units and time spans in the PowerShell module. Key changes include adding a new `Format` parameter to specify unit display styles (Symbol, Abbreviation, or FullName), updating the `UnitMap` to include symbols, and refactoring associated tests to reflect these changes. - Fixes #7 ### Enhancements to TimeSpan Formatting: * 🌟 **`Format-TimeSpan`:** Replaced the `FullNames` switch with the `Format` parameter, allowing users to specify the desired unit display style. Updated logic to use the `Format-UnitValue` function with the new `Format` parameter. ### Enhancements to Unit Formatting: * **`Format-UnitValue`:** Added a `Format` parameter with options for Symbol, Abbreviation, and FullName, replacing the previous `FullNames` switch. Refactored logic to handle unit formatting based on the selected format. * **`src/variables/private/UnitMap.ps1`:** Updated the `UnitMap` to include a new `Symbol` field for each unit, alongside existing Singular, Plural, and Abbreviation fields. ### Test Updates: * **`tests/PSModuleTest.Tests.ps1`:** Refactored tests to validate the new `Format` parameter functionality, including scenarios for symbols, abbreviations, and full names. Added new test cases for various formats and edge cases like negative values and smallest units. --------- Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: MariusStorhaug <17722253+MariusStorhaug@users.noreply.github.com> Co-authored-by: Marius Storhaug <marstor@hotmail.com>
Bump PSModule/Process-PSModule from 3 to 4 (#4) - Moved `mkdocs.yml` file to `.github`. - Bumps [PSModule/Process-PSModule](https://github.com/psmodule/process-psmodule) from 3 to 4. <details> <summary>Release notes</summary> <p><em>Sourced from <a href="https://github.com/psmodule/process-psmodule/releases">PSModule/Process-PSModule's releases</a>.</em></p> <blockquote> <h2>v3.2.17</h2> <!-- raw HTML omitted --> <h2>What's Changed</h2> <h3>Other Changes</h3> <ul> <li>🪲 [Fix]: Fix placement of docs after copy by <a href="https://github.com/MariusStorhaug"><code>@MariusStorhaug</code></a> in <a href="https://redirect.github.com/PSModule/Process-PSModule/pull/138">PSModule/Process-PSModule#138</a></li> </ul> <p><strong>Full Changelog</strong>: <a href="https://github.com/PSModule/Process-PSModule/compare/v3...v3.2.17">https://github.com/PSModule/Process-PSModule/compare/v3...v3.2.17</a></p> <h2>v3.2.16</h2> <!-- raw HTML omitted --> <h2>What's Changed</h2> <h3>Other Changes</h3> <ul> <li>🪲 [Fix]: Fix an issue that break the workflow when there is nothing to commit in <code>BuildDocs</code> by <a href="https://github.com/MariusStorhaug"><code>@MariusStorhaug</code></a> in <a href="https://redirect.github.com/PSModule/Process-PSModule/pull/137">PSModule/Process-PSModule#137</a></li> </ul> <p><strong>Full Changelog</strong>: <a href="https://github.com/PSModule/Process-PSModule/compare/v3...v3.2.16">https://github.com/PSModule/Process-PSModule/compare/v3...v3.2.16</a></p> <h2>v3.2.15</h2> <!-- raw HTML omitted --> <h2>What's Changed</h2> <h3>Other Changes</h3> <ul> <li>🩹 [Patch]: Merge <code>Docs</code> jobs into one by <a href="https://github.com/MariusStorhaug"><code>@MariusStorhaug</code></a> in <a href="https://redirect.github.com/PSModule/Process-PSModule/pull/136">PSModule/Process-PSModule#136</a></li> </ul> <p><strong>Full Changelog</strong>: <a href="https://github.com/PSModule/Process-PSModule/compare/v3...v3.2.15">https://github.com/PSModule/Process-PSModule/compare/v3...v3.2.15</a></p> <h2>v3.2.14</h2> <!-- raw HTML omitted --> <h2>What's Changed</h2> <h3>Other Changes</h3> <ul> <li>🩹 [Patch]: Separate Docs from Build by <a href="https://github.com/MariusStorhaug"><code>@MariusStorhaug</code></a> in <a href="https://redirect.github.com/PSModule/Process-PSModule/pull/135">PSModule/Process-PSModule#135</a></li> </ul> <p><strong>Full Changelog</strong>: <a href="https://github.com/PSModule/Process-PSModule/compare/v3...v3.2.14">https://github.com/PSModule/Process-PSModule/compare/v3...v3.2.14</a></p> <h2>v3.2.13</h2> <!-- raw HTML omitted --> <h2>What's Changed</h2> <h3>Other Changes</h3> <ul> <li>🩹 [Patch]: Reverting Co-location by <a href="https://github.com/MariusStorhaug"><code>@MariusStorhaug</code></a> in <a href="https://redirect.github.com/PSModule/Process-PSModule/pull/134">PSModule/Process-PSModule#134</a></li> </ul> <p><strong>Full Changelog</strong>: <a href="https://github.com/PSModule/Process-PSModule/compare/v3...v3.2.13">https://github.com/PSModule/Process-PSModule/compare/v3...v3.2.13</a></p> <!-- raw HTML omitted --> </blockquote> <p>... (truncated)</p> </details> <details> <summary>Commits</summary> <ul> <li><a href="https://github.com/PSModule/Process-PSModule/commit/78a1ce8511fa85425fb029398e9a7acc51232df7"><code>78a1ce8</code></a> 🩹 [Refactor]: Enhance XML report output formatting in workflow script for imp...</li> <li><a href="https://github.com/PSModule/Process-PSModule/commit/d276cf4bb89b09bb2b4e4ee04cb43ee07ed9ff59"><code>d276cf4</code></a> 🩹 [Refactor]: Output merged report as string in workflow script for improved ...</li> <li><a href="https://github.com/PSModule/Process-PSModule/commit/d197e574720ada9fedf16d6b38c22e94dcae8059"><code>d197e57</code></a> 🩹 [Refactor]: Implement XML report merging in workflow script to consolidate ...</li> <li><a href="https://github.com/PSModule/Process-PSModule/commit/40d1337b85bffbece64f53a3c56784841ae58908"><code>40d1337</code></a> 🩹 [Refactor]: Replace Show-FileContent with Get-Content for improved file con...</li> <li><a href="https://github.com/PSModule/Process-PSModule/commit/cba299082a18e431b11fee82329cd595b25fc3eb"><code>cba2990</code></a> 🩹 [Refactor]: Improve file listing and logging in workflow script for better ...</li> <li><a href="https://github.com/PSModule/Process-PSModule/commit/2508f849b0351842b1278926adf95dd05bca28de"><code>2508f84</code></a> 🩹 [Refactor]: Update workflow script to set output rendering and retrieve rep...</li> <li><a href="https://github.com/PSModule/Process-PSModule/commit/963de209b488f8b55741acd8aba54d11d86466f7"><code>963de20</code></a> 🩹 [Refactor]: Simplify artifact download command in workflow script to direct...</li> <li><a href="https://github.com/PSModule/Process-PSModule/commit/c93d57a373be121cee01c406706f6ff62ebd4a92"><code>c93d57a</code></a> 🩹 [Refactor]: Enhance artifact download command in workflow script to use pat...</li> <li><a href="https://github.com/PSModule/Process-PSModule/commit/670b57c03364a7175246878896f86a871eae5980"><code>670b57c</code></a> 🩹 [Refactor]: Update artifact retrieval in workflow script to use repository ...</li> <li><a href="https://github.com/PSModule/Process-PSModule/commit/3cc46e1dc263dbb2090e76872d10d4a1e5ab775c"><code>3cc46e1</code></a> 🩹 [Refactor]: Update artifact filtering in workflow script to improve code co...</li> <li>Additional commits viewable in <a href="https://github.com/psmodule/process-psmodule/compare/v3...v4">compare view</a></li> </ul> </details> <br /> [](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores) Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `@dependabot rebase`. [//]: # (dependabot-automerge-start) [//]: # (dependabot-automerge-end) --- <details> <summary>Dependabot commands and options</summary> <br /> You can trigger Dependabot actions by commenting on this PR: - `@dependabot rebase` will rebase this PR - `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it - `@dependabot merge` will merge this PR after your CI passes on it - `@dependabot squash and merge` will squash and merge this PR after your CI passes on it - `@dependabot cancel merge` will cancel a previously requested merge and block automerging - `@dependabot reopen` will reopen this PR if it is closed - `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually - `@dependabot show <dependency name> ignore conditions` will show all of the ignore conditions of the specified dependency - `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself) </details> --------- Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Marius Storhaug <marstor@hotmail.com>
🌟 [Major]: Introducing the `TimeSpan` module (#3) ## Description This pull request introduces the `TimeSpan` PowerShell module, focusing on formatting numerical values and time spans. - Fixes #2 New function: * [`src/functions/private/Format-UnitValue.ps1`](diffhunk://#diff-b5be05918c9bdd69f29b7ccf5dd1d94ed3f4c262039a61a0cdaf4efa26f2165bR1-R70): Added a new function `Format-UnitValue` to format numerical values with their corresponding units, supporting both abbreviations and full names. * [`src/functions/public/Format-TimeSpan.ps1`](diffhunk://#diff-c083b791c0fc9d31b5a09f3192324400a88968ce49165b92316b2204fabdc880R1-R132): Added a new function `Format-TimeSpan` to format `TimeSpan` objects into human-readable strings, supporting precision levels and full unit names. Enhancements to unit handling: * [`src/variables/private/UnitMap.ps1`](diffhunk://#diff-2a1908f14064df8453dc87e1f041a5e287ad5d93d18622f8dfdb0c3bc2b93455R1-R79): Introduced a unit map (`$script:UnitMap`) to provide consistent handling of various time units, including their singular, plural forms, abbreviations, and tick values. Testing improvements: * [`tests/PSModuleTest.Tests.ps1`](diffhunk://#diff-854f5db3c1afae9419d6a22487e65e9e83942e00d1f21a85d4c23424dd2f47cdL1-R46): Added new tests for the `Format-TimeSpan` function to cover various scenarios, including basic usage, precision handling, smallest unit handling, negative time spans, and base unit formatting. ## Type of change <!-- Use the check-boxes [x] on the options that are relevant. --> - [ ] 📖 [Docs] - [ ] 🪲 [Fix] - [ ] 🩹 [Patch] - [ ]⚠️ [Security fix] - [ ] 🚀 [Feature] - [x] 🌟 [Breaking change] ## Checklist <!-- Use the check-boxes [x] on the options that are relevant. --> - [x] I have performed a self-review of my own code - [x] I have commented my code, particularly in hard-to-understand areas
Init (#1) ## Description Init ## Type of change <!-- Use the check-boxes [x] on the options that are relevant. --> - [ ] 📖 [Docs] - [ ] 🪲 [Fix] - [ ] 🩹 [Patch] - [ ]⚠️ [Security fix] - [ ] 🚀 [Feature] - [ ] 🌟 [Breaking change] ## Checklist <!-- Use the check-boxes [x] on the options that are relevant. --> - [ ] I have performed a self-review of my own code - [ ] I have commented my code, particularly in hard-to-understand areas