Releases: reteps/dockerfmt
v0.5.2
What's new
# dockerfmt-ignoredirective — place this comment before any directive to skip formatting for it. Useful as an escape hatch for command grouping, unescaped semicolons, or intentional formatting.- EditorConfig support —
indent_size,insert_final_newline, and customspace_redirectsare read from.editorconfigfiles. CLI flags take precedence.
See the README for usage details.
v0.5.1
Fix: Go WASM global constructor conflict
Problem: Importing @reteps/dockerfmt overwrote globalThis.Go, breaking other Go WASM packages (e.g. sh-syntax) that rely on their own wasm_exec.js with different capabilities like WASI support.
Fix: The Go class is now scoped under globalThis.__dockerfmt_Go instead of clobbering globalThis.Go. Any previously set Go constructor is preserved.
v0.5.0
What's Changed
Fix JS/WASM bindings (#25)
The JS bindings (@reteps/dockerfmt) have been broken since the initial release due to TinyGo bugs:
reflect.AssignableTopanics with interfaces, breakingencoding/jsonused by the buildkit parser (tinygo#4277)\sregexp failures in newer TinyGo versions, also breaking the buildkit parser
This release switches from TinyGo to standard Go (GOOS=js GOARCH=wasm), which has full reflect and regexp support. The WASM binary is larger (2 MB → 6.9 MB) but the bindings now work correctly for all Dockerfile forms — both shell-form (CMD echo hello) and JSON-form (CMD ["echo", "hello"]).
Other changes
- Added CI workflow (Go tests + JS build/test) on PRs and main pushes
- Added JS integration tests
- Replaced
encoding/jsonwith reflection-free[]stringJSON marshal/unmarshal - Simplified JS bindings by using
syscall/jsinstead of manual memory management - Switched npm publish to OIDC trusted publishing
v0.4.0
What's Changed
- Refactored formatting engine — Cleaned up core formatting with better structure and comprehensive unit tests
- Fixed multiline flag duplication — RUN instruction flags (e.g.
--mount) are no longer duplicated when formatting line breaks (#42) - Version tagging — Docker images and Go binaries are now tagged with the release version (#47)
- Version set via ldflags — Version is now set at build time instead of being hardcoded
- Improved CLI help — Documents stdin input processing in the command help message (#43)
v0.3.9
What's Changed
- fix: bump version to 0.3.8 by @chenrui333 in #39
- Add support for OCI file name 'Containerfile' by @codingjoe in #40
- Make
--writeonly write on change by @dani0854 in #41
New Contributors
- @chenrui333 made their first contribution in #39
- @codingjoe made their first contribution in #40
- @dani0854 made their first contribution in #41
Full Changelog: v0.3.8...v0.3.9
v0.3.8
v0.3.7-alpha
- Release docker container