Skip to content

🌟 [Major]: New PowerShell module v1.0.0 with complete YAML 1.2.2 command suite#47

Open
Marius Storhaug (MariusStorhaug) wants to merge 106 commits into
mainfrom
release/v1.0.0
Open

🌟 [Major]: New PowerShell module v1.0.0 with complete YAML 1.2.2 command suite#47
Marius Storhaug (MariusStorhaug) wants to merge 106 commits into
mainfrom
release/v1.0.0

Conversation

@MariusStorhaug

@MariusStorhaug Marius Storhaug (MariusStorhaug) commented Jul 25, 2026

Copy link
Copy Markdown
Member

Yaml v1.0.0 is the first public release of a new PowerShell module for the PowerShell Gallery, delivering a complete YAML 1.2.2 command suite for parsing, validating, formatting, merging, reading, writing, and targeted entry removal with no third-party runtime dependencies. This is the module go-live, so there are no breaking changes for existing consumers; the module targets PowerShell 7.6/Core.

New: Complete YAML 1.2.2 command suite

The module provides end-to-end YAML handling with ConvertFrom-Yaml, ConvertTo-Yaml, Test-Yaml, Import-Yaml, Export-Yaml, Format-Yaml, Merge-Yaml, and Remove-YamlEntry.

Command User outcome
ConvertFrom-Yaml Parse YAML text into PowerShell objects
ConvertTo-Yaml Serialize PowerShell objects into YAML text
Test-Yaml Validate YAML syntax and structure without object construction
Import-Yaml Read YAML files directly into PowerShell objects
Export-Yaml Write PowerShell objects directly to YAML files
Format-Yaml Normalize YAML text with representation-preserving, idempotent output
Merge-Yaml Deep-merge two or more YAML streams with configurable policy
Remove-YamlEntry Remove entries by RFC 6901 JSON Pointer path

New: Native YAML 1.2.2 engine with no third-party dependencies

Parsing and serialization are implemented entirely in PowerShell — no YamlDotNet or other runtime dependency. The engine enforces bounded parse, clone, merge, removal, and emit work budgets, avoids arbitrary .NET type activation, and uses iterative graph traversal to stay stable on large or adversarial inputs. Duplicate YAML mapping keys are rejected by design to prevent ambiguous data projection.

New: YAML 1.2.2 conformance across the pipeline

The scanner, parser, constructor, serializer, and emitter are validated against the YAML 1.2.2 specification, including edge cases around BOM handling, NBSP behavior, flow scalars, and tag decoding.


Technical details

Standards and framework alignment pass (Pass A)

Changed surface Standards checked Framework docs checked Result
src/functions/public/**, src/functions/private/** MSX Coding Standards: PowerShell/Functions, Naming PSModule Standards, Process-PSModule repository structure, module bootstrap Aligned
tests/** MSX Coding Standards: PowerShell/Testing PSModule Standards, Process-PSModule build-test-pack-publish Fixed in this PR
.github/workflows/**, .github/PSModule.yml, .github/linters/** MSX Coding Standards: GitHub Actions Process-PSModule repository structure and build-test-pack-publish Aligned
README.md, examples/** MSX Coding Standards: Documentation PSModule Repository-Defaults, PSModule Standards Aligned
Repository baseline files (CONTRIBUTING.md, SECURITY.md, SUPPORT.md, CODE_OF_CONDUCT.md, AGENTS.md, CLAUDE.md, .github/copilot-instructions.md, .github/pull_request_template.md) MSX Ways of Working: Repository Standard PSModule Repository-Defaults (required common files, managed distribution guidance) Fixed in this PR

Issue convergence sweep (Pass B)

  • Sweep scope: existing PR-linked candidates (#2, #4, #5, #7, #8, #20, #21, #22, #24, #25, #26, #27, #29, #43, #44) plus targeted open-issue searches by command names, YAML chapter-2/conformance terms, and representation-preserving file/merge/removal terms.
  • Dedupe note: PSModule/Yaml#1 is a pull request, not an issue leaf, and PSModule/Yaml#3 is already closed historical work.

Convergence evidence by closed issue

  • PSModule/Yaml#2 — core conversion surface delivered via ConvertFrom-Yaml and ConvertTo-Yaml, with coverage in tests/ConvertFrom-Yaml.Tests.ps1 and tests/ConvertTo-Yaml.Tests.ps1.
  • PSModule/Yaml#4Test-Yaml delivered and covered in tests/Test-Yaml.Tests.ps1.
  • PSModule/Yaml#5 — deterministic stream formatting delivered via Format-Yaml, covered in tests/Format-Yaml.Tests.ps1.
  • PSModule/Yaml#7 and PSModule/Yaml#27 — flow sequence/mapping parsing delivered and covered in parser behavior tests and tests/Specification.Tests.ps1 chapter-2 examples.
  • PSModule/Yaml#8 — multiline literal/folded scalar support delivered and covered in tests/ConvertFrom-Yaml.Tests.ps1 and chapter-2 examples.
  • PSModule/Yaml#20 — chapter-2 compliance harness delivered in tests/Specification.Tests.ps1 (examples 2.01 through 2.28).
  • PSModule/Yaml#21 — multi-document stream support delivered and validated in chapter-2 stream examples and command tests.
  • PSModule/Yaml#22 — anchors/aliases support delivered and verified in tests/ConvertFrom-Yaml.Tests.ps1 and merge/removal behavior suites.
  • PSModule/Yaml#24 — explicit tag and !! handling delivered and covered across conversion/specification tests.
  • PSModule/Yaml#25 — complex mapping key handling delivered (including hashtable-safe paths) and covered in conversion/specification tests.
  • PSModule/Yaml#26 — core-schema numeric forms and special floats delivered and covered in tests/ConvertFrom-Yaml.Tests.ps1, tests/ConvertTo-Yaml.Tests.ps1, and tests/Specification.Tests.ps1.
  • PSModule/Yaml#29 — file I/O commands delivered via Import-Yaml and Export-Yaml, covered in tests/Import-Yaml.Tests.ps1 and tests/Export-Yaml.Tests.ps1.
  • PSModule/Yaml#43 — representation-preserving merge delivered via Merge-Yaml, covered in tests/Merge-Yaml.Tests.ps1.
  • PSModule/Yaml#44 — representation-preserving entry removal delivered via Remove-YamlEntry, covered in tests/Remove-YamlEntry.Tests.ps1.
Relevant issues (or links)

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Add YAML 1.2 core-schema construction, safe tag handling, duplicate-key validation, aliases, resource limits, object projection, Test-Yaml, and pinned conformance fixtures.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Normalize supported PowerShell data, emit a YAML 1.2-compatible subset, preserve repeated acyclic references, reject cycles and normalized duplicate keys, and cover packaging metadata.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Document command contracts, safety limits, pipeline behavior, supported data types, unknown-tag handling, and non-preserved YAML presentation details with working examples.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Prefer the workflow-imported artifact so Pester coverage measures real module execution, exclude pinned YAML fixtures from repository config linting, and skip PlatyPS docs generation because it preloads a conflicting YamlDotNet assembly.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Use yamllint's native ignore rules for vendored spec and invalid parser fixtures without relying on unsupported reusable-workflow environment settings.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Match absolute fixture paths passed by Super-Linter and satisfy repository analysis for the coverage test helper.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Align workflow pin and packaging assertions to Process-PSModule v6.1.13, and disable Build-Site until this repo migrates from mkdocs to zensical.toml required by the latest release.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Replace legacy .github/mkdocs.yml with .github/zensical.toml and re-enable normal Build-Site execution under Process-PSModule v6.1.13.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Remove YamlDotNet artifacts and implement repository-owned layered YAML reader/composer/projector/emitter with iterative graph traversal, safety limits, and explicit tag handling.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Add deterministic yaml-test-suite runner surfaces for syntax, event-structure, JSON construction, out.yaml comparison, and emitter round-trip accounting; update packaging and regression tests for PowerShell 7.6 Core-only contract and zensical docs config.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Mark .zip fixtures as binary in .gitattributes so the pinned yaml-test-suite archive is not altered by line-ending normalization.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Handle explicit keys with node properties followed by indentless block sequences, and add a regression test based on yaml-test-suite 6BFJ out.yaml shape.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Add explicit-key indentless-sequence parsing for 6BFJ, and fix suite runner document-array argument passing so multi-document JSON/out.yaml comparisons evaluate all documents. Add regressions and update conformance assertions.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Preserve expanded tags in the representation graph for event comparisons and normalize yaml-test-suite event parsing/output so scalar escapes, style markers, flow markers, and anchor reuse are compared semantically instead of presentation text.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Read and write internal value boxes via raw PSObject properties so empty arrays and nested complex keys are preserved without pipeline-style flattening. Add a regression for nested empty-sequence keys and lock conformance accounting to the new zero-fail corpus counts.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Decode %xx escapes as UTF-8 during tag-handle expansion, reject malformed/invalid UTF-8 escapes, and preserve unknown expanded tags in representation comparisons. Update conformance expectations so event surface has no policy differences and keep JSON policy cases explicitly enumerated.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Make test bootstrap deterministic by sourcing repository code unless an artifact manifest override is supplied, and make packaging artifact detection resolve from env/output paths so module-local CI does not bind to ambient gallery modules.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Inline percent-escape hex parsing in the tag URI decoder to satisfy source linting and recommit the yaml-test-suite release archive as binary bytes so the pinned SHA-256 matches in CI and module-local conformance runs.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
…w harness (#48)

This change hardens workflow secret and permission handling for PR
paths, adds a repeatable Profiler-based performance harness for YAML
command regressions, and closes release-readiness QA/UX gaps identified
during PR #47 execution.

## Changed

- Replaced broad reusable-workflow secret inheritance with explicit
mapping for required secrets in
`.github/workflows/Process-PSModule.yml`.
- Split workflow execution into PR and release-capable paths so open-PR
runs use reduced permissions, while closed-PR/scheduled/manual paths
retain publish-capable permissions.
- Added `tests/tools/Invoke-YamlPerfReview.ps1` to run repeatable
baseline/regression performance scenarios for core YAML commands.
- Updated `tests/Packaging.Tests.ps1` to align with the current source
layout on the release line (removed stale assumptions about
`src/manifest.psd1` and `src/header.ps1`).
- Normalized comment-based help `.LINK` metadata across public commands
and fixed the `Merge-Yaml` link target to the correct merge section.

## Validation

- Executed full Pester suite on this branch (`Invoke-Pester -Path
.\tests -CI`): **475 passed, 0 failed, 8 skipped**.
- Executed targeted command-surface tests for touched YAML commands and
packaging updates.
- Executed help coverage audit for public commands:
synopsis/examples/related links now present for each command.
- Executed Profiler baseline/regression runs using the new harness with
the `>5%` critical-path slowdown gate.

## Why base is `release/v1.0.0`

These changes are specific to the in-flight v1.0.0 release line and
support PR #47 hardening plus release-readiness gates without mixing in
unrelated `main` branch work.

---------

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
@MariusStorhaug Marius Storhaug (MariusStorhaug) changed the title 🌟 [Major]: Native YAML 1.2.2 commands for PowerShell 7.6/Core 🌟 [Major]: Native YAML 1.2.2 command suite for PowerShell 7.6/Core Jul 26, 2026

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot wasn't able to review this pull request because it exceeds the maximum number of lines (20,000). Try reducing the number of changed lines and requesting a review from Copilot again.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
@MariusStorhaug Marius Storhaug (MariusStorhaug) changed the title 🌟 [Major]: Native YAML 1.2.2 command suite for PowerShell 7.6/Core 🌟 [Major]: New PowerShell module v1.0.0 with complete YAML 1.2.2 command suite Jul 26, 2026
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
@MariusStorhaug
Marius Storhaug (MariusStorhaug) marked this pull request as ready for review July 26, 2026 18:47
These are Distributor-managed shared files and should not be hand-authored in the module repository.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Align ignore rules to the PowerShell-module ecosystem: operating-system files, editor and developer-tooling files, and Pester test/coverage artifacts, alongside the existing framework and build outputs.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Match the canonical Template-PSModule dependabot: daily github-actions updates with a 7-day cooldown.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Major Breaking change or major new capability

Projects

None yet

2 participants