Skip to content

feat: support structured Manifest.PrivateData in generated module manifests - #265

Merged
stiwicourage merged 8 commits into
mainfrom
develop
Oct 7, 2026
Merged

stiwicourage merged 8 commits into
mainfrom
develop

Conversation

@stiwicourage

Copy link
Copy Markdown
Owner

Summary

Affected area

  • nova CLI or command routing
  • Public PowerShell cmdlet behavior
  • Scaffolding or project.json handling
  • Build, test, analyzer, coverage, or CI helper flow
  • Package, raw upload, or package metadata workflow
  • Publish, release, or GitHub Actions automation
  • Self-update or notification preference behavior
  • Contributor documentation (README.md, CONTRIBUTING.md, repository workflow docs)
  • End-user docs (docs/*.html)
  • Command help (docs/NovaModuleTools/en-US/*.md)
  • src/resources/example/
  • Dependency or manifest changes (project.json, workflow dependencies, release tooling)
  • Security-sensitive change
  • Documentation-only change
  • Agentic Copilot Workflow + scaffold mirror + scaffold-sync guardrail test.
  • Other

Review guidance

  • Start with src/private/build/BuildManifest.ps1, src/private/build/ConvertToPowerShellDataLiteral.ps1, and src/private/build/UpdateManifestPrivateData.ps1. The main change is that Nova now owns structured PrivateData serialization instead of relying on New-ModuleManifest -PrivateData for nested data.
  • Review the supporting schema/docs/tests in src/resources/Schema-Project.json, docs/schema/v3/project.json, docs/project-json-reference.html, tests/private/build/*.Tests.ps1, and tests/public/TestNovaBuild.Integration.Tests.ps1.
  • Also note the smaller fix in src/private/update/InvokeNovaModuleSelfUpdateWorkflow.ps1 plus its mirrored tests.
  • Main trade-off / known limitation: PowerShell's New-ModuleManifest -PrivateData is not safe for arbitrary nested structured values, so Nova rewrites only the top-level PrivateData block after manifest generation and preserves generated PrivateData.PSData. Build validation relies on successful Import-PowerShellDataFile; custom top-level PrivateData remains awkward with Test-ModuleManifest.

Validation

  • Invoke-NovaBuild
  • Invoke-NovaTest
  • Test-NovaBuild
  • ./scripts/build/Invoke-ScriptAnalyzerCI.ps1
  • ./scripts/build/ci/Invoke-NovaModuleToolsCI.ps1
  • Targeted Nova workflow validated (% nova build, % nova test, % nova merge, % nova deploy, % nova publish, % nova release, % nova update, % nova notification, or % nova init as relevant)
  • Docs/example only; executable validation not needed

Validation notes:

Release/package/version behavior review covered:
- tests/public/InvokeNovaRelease.Integration.Tests.ps1
- tests/public/PublishNovaModule.Integration.Tests.ps1
- tests/public/UpdateNovaModuleVersion.Integration.Tests.ps1
- tests/public/NewNovaModulePackage.Integration.Tests.ps1
- tests/private/release/GetNovaVersionUpdatePlan.Tests.ps1
- tests/private/release/InvokeNovaReleaseWorkflow.Tests.ps1
- tests/private/package/GetNovaPackageWorkflowContext.Tests.ps1

Executed validation:
- pwsh -NoLogo -NoProfile -File ./run.ps1
  Result: passed
  Details: 1249 passed, 0 failed, 4 skipped; coverage 99.79% against 99% target

No additional release-specific command rerun was needed for this comparison because:
- .github/workflows/Publish.yml is unchanged between main and develop
- the branch delta does not modify publish/package/versioning implementation files
- Publish.yml still sources the version through Get-NovaProjectInfo -Version / project.json

Documentation and release follow-up

  • README.md reviewed and updated if contributor workflow, architecture, CI, release, or automation changed
  • CONTRIBUTING.md reviewed and updated if contribution expectations or review guidance changed
  • CHANGELOG.md reviewed and updated if the change matters to users, maintainers, or contributors
  • RELEASE_NOTE.md reviewed and updated if the change affects public cmdlet usage, CLI usage, configuration semantics, or migration expectations
  • docs/NovaModuleTools/en-US/ help updated if a public command or CLI behavior changed
  • docs/*.html updated if end-user workflows or examples changed
  • src/resources/example/ reviewed and updated if the real-world project layout, package model, or upload workflow changed
  • No documentation, changelog, release-note, or example updates were needed

Maintainability, compatibility, and risk

  • Code Health / maintainability impact considered
  • No breaking change
  • Breaking change
  • Security-sensitive change
  • CI, workflow, or release-pipeline impact
  • Dependency-review impact

Risk, rollout, or rollback notes:

Recommended release classification:
- Stable target from develop -> main: 3.4.0
- Reason: Manifest.PrivateData is a new user-facing configuration capability, so patch-level release semantics would understate the scope.

Version-source assessment:
- develop currently carries project.json version 3.3.2-preview
- latest stable heading remains 3.3.1
- Publish.yml still reads the version from Get-NovaProjectInfo -Version, so the workflow is wired to the correct source of truth

Release-prep recommendation:
- If you want develop's prerelease identifier to mirror the planned stable release before merge, consider a follow-up bump to 3.4.0-preview
- I did not change versioning, publish automation, tags, or release files in this assessment-only pass

Operational note:
- No publish, tag, commit, or push occurred

Important

Do not use a public pull request to disclose a vulnerability before coordinated handling.
Use the private reporting path in SECURITY.md for new security issues.

github-actions Bot and others added 8 commits June 16, 2026 18:28
* fix(#260): enforce supported Pester version range and improve error handling
- `Invoke-NovaTest`, `Test-NovaBuild`, and `% nova test` now only use Pester versions from `5.7.1` to `5.10.0`, failing with a clear error for unsupported `Pester 6.x`.
- Updated documentation to reflect the new Pester version requirements.

* fix(#260): improve Pester version handling in Nova test workflows
- Reuse already loaded supported Pester 5.x version before switching
- Ensure early failure with clear error when unsupported Pester 6.x is present

* fix(#260): enhance Nova module validation commands and logging
- Introduced new functions for command generation and execution
- Improved error handling for validation command failures
- Updated logging to capture command execution details

* fix(#260): improve run.ps1 script content handling in tests
- resolve script path and load content once for efficiency
- update test assertions to use loaded script content

* fix(#260): improve run.ps1 script content handling in tests
- resolve script path and load content once for efficiency
- update test assertions to use loaded script content

* fix(#260): enhance output handling in integration tests
- replace output joining with Get-NovaPublicCommandIntegrationOutputText for better formatting
- normalize whitespace in output assertions for consistency

* fix(#260): add tests for Get-NovaPesterVersionText and Test-NovaPesterModuleVersionSupported
- implement default value handling in Get-NovaPesterVersionText
- validate null candidate version in Test-NovaPesterModuleVersionSupported
…duleTools into develop

* 'develop' of https://github.com/stiwicourage/NovaModuleTools:
  chore: prepare develop for next prerelease
  chore(release): 3.3.1
  Enforce Pester version range and improve error handling (#262)

# Conflicts:
#	project.json
…dling

- Update-NovaModuleTool and % nova update now split self-update failure details and recovery guidance across separate terminal lines for better readability.
- Ensure Nova test workflows only use supported Pester 5.x versions, providing clear errors for unsupported Pester 6.x installations.
* #263 feat: Enhance project.json support for Manifest.PrivateData

- Added support for `Manifest.PrivateData` in `project.json` to allow arbitrary consumer-defined metadata.
- Updated `BuildManifest` to serialize structured `PrivateData` into the generated `.psd1`, preserving nested objects and types.
- Implemented validation to reject collisions with reserved `PSData` keys in `PrivateData`.
- Created utility functions for converting data to PowerShell literals and updating manifest private data.
- Added comprehensive tests for `ConvertTo-PowerShellDataLiteral` and `Update-ManifestPrivateData` to ensure correct functionality.
- Updated documentation to reflect changes in `project.json` schema and usage of `PrivateData`.

* #263 feat: Add tests for Get-GeneratedManifestPsData and related functions

@codescene-access codescene-access Bot 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.

Gates Passed
6 Quality Gates Passed

See analysis details in CodeScene

Quality Gate Profile: Pay Down Tech Debt
Install CodeScene MCP: safeguard and uplift AI-generated code. Catch issues early with our IDE extension and CLI tool.

@codescene-access codescene-access Bot 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.

Code Coverage Gates Passed
Overall Coverage: 99.8% (required = 95%)
New & Changed Code Coverage: 100% (required = 99%)

Review details by gate
  • Overall Coverage

    • Pass/Fail Reason:
      The overall coverage gate was checked for all code and meets the goal: 99.8% covered >= threshold = 95%
    • Action:
      You have 296 files with a sum of 4299 covered and 7 uncovered lines of code.
  • New & Changed Code Coverage

    • Pass/Fail Reason:
      New or changed code meets coverage goal: 100% covered >= threshold = 99%
    • Action:
      You modified 4 files, and covered 154 added/modified lines of code.

@stiwicourage
stiwicourage merged commit d76cf7c into main Oct 7, 2026
16 checks passed

This branch was successfully deployed

1 active deployment
github-pages — f4c5bcba Deployed Oct 7, 2026 by stiwicourage via deploy #290
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant