Skip to content

Add portable PowerShell formatter packages - #1

Merged
kjanat merged 11 commits into
mainfrom
wasm-formatter
Aug 9, 2026
Merged

Add portable PowerShell formatter packages#1
kjanat merged 11 commits into
mainfrom
wasm-formatter

Conversation

@kjanat

@kjanat kjanat commented Aug 9, 2026

Copy link
Copy Markdown
Owner

Summary

  • extract the parser-backed formatter into a portable core
  • ship a browser and Node.js WebAssembly package with typed ESM exports
  • ship a directly loadable dprint ABI WebAssembly plugin
  • add reproducible build, validation, and release workflows using separate dprint- and npm- tag namespaces

Validation

  • formatter core checks
  • browser and Node.js package validation
  • dprint ABI, schema, diagnostics, UTF-8, and idempotence checks
  • PowerShell workflow parsing, actionlint, actup check, and dprint check

kjanat added 7 commits August 8, 2026 04:03
Provide a parser-backed formatter core without runspace or session-state
requirements, plus a trimmed WebAssembly package for browsers and Node.js.
Describe the API, isolation boundary, build workflow, security model,
and current `Invoke-Formatter` parity so contributors can extend and
validate the portable formatter without reverse-engineering the code.
Compile the C# formatter into one dprint ABI module with an embedded
Mono runtime and internal WASI shims, so dprint can load it without a
process host.

Pin reproducible tools and validate the artifact, schema, diagnostics,
UTF-8 handling, and idempotence while documenting both WASM outputs.
Derive published metadata from the assembly version, embed the full
MIT license, and validate the schema identity so registry updates stay
in lockstep with the release artifact.

Document installation and immutable releases, and publish the verified
WASM, schema, and checksums only when a bare-semver tag matches the
plugin project version.
Group the formatter implementations under `Formatter`, expose the browser
WASM package through typed ESM exports, and validate it with shared
PowerShell release tooling.

Add repository-local dprint orchestration and prefixed npm release
workflow support so both WASM distributions use the pinned toolchain.
Use `dprint-<version>` tags so formatter releases cannot collide with
PSScriptAnalyzer versions or the separate npm release namespace.

Run every release step as valid PowerShell and surface native-command
failures through GitHub workflow error annotations.
@kjanat kjanat self-assigned this Aug 9, 2026
kjanat added 2 commits August 9, 2026 20:48
Provision the browser and WASI workloads before `build.ps1 -All` so the
formatter projects compile on every Pester matrix runner.
Install the repository's `wasi-sdk` tool through mise and export
`WASI_SDK_PATH` so the native dprint plugin links during `build.ps1 -All`.
@coderabbitai

This comment was marked as spam.

kjanat added 2 commits August 9, 2026 21:21
Keep portable core and browser WASM builds on every CI runner, while
restricting the native dprint link and its WASI SDK to Linux where the
pinned toolchain provides clang.
@kjanat
kjanat merged commit 5d3ffd2 into main Aug 9, 2026
8 checks passed
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