github reteps/dockerfmt v0.5.0

latest releases: v0.5.2, v0.5.1
11 hours ago

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

Don't miss a new dockerfmt release

NewReleases is sending notifications on new releases.