Skip to content

Releases

v0.2.1

Choose a tag to compare

@pankgeorg pankgeorg released this 16 Nov 19:34
cf21c48

First release on npm: npm install --save-dev prettier prettier-plugin-julia (https://www.npmjs.com/package/prettier-plugin-julia). No changes to formatting since v0.2.0. The attached tarball is the one published to npm.

v0.2.0

Choose a tag to compare

@pankgeorg pankgeorg released this 10 Nov 20:11
965078d

Install (Node ^22.23.3 or ^24.22.1, Prettier 3):

npm install --save-dev prettier https://github.com/pankgeorg/prettier-plugin-julia/releases/download/v0.2.0/prettier-plugin-julia-0.2.0.tgz

then .prettierrc: { "plugins": ["prettier-plugin-julia"] } and npx prettier --write "**/*.jl". CLI, GitHub Actions, pre-commit and editor setup: docs/usage.md.

Changed

  • wasm/parser.wasm rebuilt on WasmCodegen.jl
    main 98cad1f (v0.1.0: 316bbaf), with WasmBuilder.jl 0.1.1 and wasm-opt -O3
    (Binaryen 130). JuliaSyntax is unchanged: the one shipped in Julia 1.13.2 (also the one in
    1.13.3). The parser output is identical to v0.1.0's on 25,174 real-world Julia files, and
    parsing speed is the same within noise (0.156 → 0.159 s/MB). The module is 739,251 bytes
    (was 735,576). wasm/manifest.json also records the WasmBuilder and Binaryen versions.
    It is the same file as in eslint-plugin-julia v0.2.0. The build was first checked on
    WasmCodegen main in #2; this release ships it.

Fixed

  • The source links in wasm/manifest.json point at topiary-julia's jlparse branch, where
    the parser sources are (the links to main were broken).

Parser: WasmCodegen.jl main 98cad1f (was 316bbaf), JuliaSyntax of Julia 1.13.2, wasm-opt -O3. Parse speed 0.156 → 0.159 s/MB (parse_src, 25,174 files / 229 MB, Node 24, median of 3 interleaved rounds: the same within noise), output identical to v0.1.0 on all of them; module 735,576 → 739,251 bytes.

Corpus check with this parser (the same 25,174 files): 25,163 formatted and verified, 11 rejected by JuliaSyntax (as in v0.1.0), 0 regions kept as written, 0 crashes, formatting idempotent.

Full changelog: v0.1.0...v0.2.0

v0.1.0

Choose a tag to compare

@pankgeorg pankgeorg released this 08 Nov 20:17
15b0d96

Install (Node ^22.23.3 or ^24.22.1, Prettier 3):

npm install --save-dev prettier https://github.com/pankgeorg/prettier-plugin-julia/releases/download/v0.1.0/prettier-plugin-julia-0.1.0.tgz

then .prettierrc: { "plugins": ["prettier-plugin-julia"] } and npx prettier --write "**/*.jl". CLI, GitHub Actions, pre-commit and editor setup: docs/usage.md.

First release, distributed as a GitHub release tarball (not on npm yet).

Added

  • Prettier 3 plugin for Julia (.jl): language registration, the julia parser, and a
    printer built on JuliaSyntax (from Julia 1.13.2) compiled to WebAssembly. No Julia
    installation needed.
  • Style close to Runic and JuliaFormatter: 4-space indent, 92 columns, spaces around binary
    operators except : and ^, f(x; k=1) keyword arguments, one element per line with a
    trailing comma when a list doesn't fit, unindented module bodies, for i in.
  • Safety check: every output is parsed again and compared with the input in a strict
    normal form; code whose meaning would change is kept as written and reported. Options
    juliaVerify and juliaReport.
  • # prettier-ignore and #! format: off / #! format: on.
  • ```julia / ```jl blocks in Markdown, formatted with 4-space indent
    and 92 columns.
  • Usage guide for the CLI, GitHub Actions, lint-staged, pre-commit and VS Code
    (docs/usage.md).

Tested on 25,174 real-world Julia files: all valid files formatted and verified, no region
kept as written, formatting is idempotent.