Skip to content

Releases: reteps/dockerfmt

v0.5.2

06 Apr 04:42
bf2867e

Choose a tag to compare

What's new

  • # dockerfmt-ignore directive — 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 supportindent_size, insert_final_newline, and custom space_redirects are read from .editorconfig files. CLI flags take precedence.

See the README for usage details.

v0.5.1

06 Apr 04:24
97ce884

Choose a tag to compare

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

06 Apr 04:02
14b03a2

Choose a tag to compare

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.AssignableTo panics with interfaces, breaking encoding/json used by the buildkit parser (tinygo#4277)
  • \s regexp 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/json with reflection-free []string JSON marshal/unmarshal
  • Simplified JS bindings by using syscall/js instead of manual memory management
  • Switched npm publish to OIDC trusted publishing

v0.4.0

06 Apr 03:14
990e19b

Choose a tag to compare

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

19 Oct 19:00

Choose a tag to compare

What's Changed

New Contributors

Full Changelog: v0.3.8...v0.3.9

v0.3.8

05 Oct 17:50

Choose a tag to compare

v0.3.7-alpha

28 Apr 04:09
b557697

Choose a tag to compare

  • Release docker container

v0.3.7

28 Apr 04:26

Choose a tag to compare

Update release

v0.3.6

18 Apr 21:31

Choose a tag to compare

  • Fixes a bug where CMD arguments with && were not formatted correctly.

v0.3.5

11 Apr 17:10

Choose a tag to compare

What's Changed

  • feat: support dockerfile from stdin by @eli-yip in #23
  • fix: A extra newline was added after some heredocs, that is now fixed

Full Changelog: 0.3.4...v0.3.5