You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
echarts: Public/Private files and a shorter New-UDEChart #169
PowerShellUniversal.Component.ECharts.psm1 is still one file: 329 code lines, 7 functions. New-UDEChart has 193 code lines. Both are offenders in build/growth-baseline.json (limits: file 300, function 100).
AGENTS.md, "How we build", asks for one function per file in Public/ and Private/, with the .psm1 only loading them.
Break New-UDEChart into helpers with one job each. Pass inputs as parameters.
Keep commands, parameters, help and output identical. Compare Get-Command -Module with parameter sets and Get-Help -Full before and after, and the output of docs/site/Build-Site.ps1.
Lower the baseline with npm run growth -- --update.
Not affected: behaviour. It was left out of the Pivot pull request to keep one change per pull request and one module per CHANGELOG.
The ECharts module is split into Public/ and Private/, one function per file. The .psm1 only loads them, the same way as Pivot.
New-UDEChart now runs its steps through four helpers. It went from 193 to 121 code lines, 108 of them the param() block. The growth baseline is lowered.
These are identical before and after: Get-Command with parameter sets, Get-Help -Full and the exports (source and built module), the output of New-UDEChart for calls that use every parameter, and docs/site/generated.
New tests: every parameter arrives under its prop name, and the file tests (ModuleFiles.Tests.ps1) and the build test run for both split modules.
Not tested on PSU: the ECharts split itself (asset registration in a real app, PSU's real Endpoint.Register, import time with 14 files). The Pivot split from #171 ran clean on a PSU test instance.
New-UDEChart stays over the 100-line limit because of its 103 parameters. Getting under it would mean changing the command.
Activity
refactor(echarts): one function per file, and New-UDEChart in steps (#…
eizedev commentedon Nov 23, 2026
Done in #173 (merged as a26cc9f).
Public/andPrivate/, one function per file. The.psm1only loads them, the same way as Pivot.New-UDEChartnow runs its steps through four helpers. It went from 193 to 121 code lines, 108 of them theparam()block. The growth baseline is lowered.Get-Commandwith parameter sets,Get-Help -Fulland the exports (source and built module), the output ofNew-UDEChartfor calls that use every parameter, anddocs/site/generated.ModuleFiles.Tests.ps1) and the build test run for both split modules.Not tested on PSU: the ECharts split itself (asset registration in a real app, PSU's real
Endpoint.Register, import time with 14 files). The Pivot split from #171 ran clean on a PSU test instance.New-UDEChartstays over the 100-line limit because of its 103 parameters. Getting under it would mean changing the command.