Repository navigation
Releases
0.65.0
0.64.1
What's Changed
- ci: use kjanat/setup-zig v3.1.1 by @kjanat in #101
- Fix configFile support in generated plugin schemas by @kjanat in #102
- chore(release): prepare 0.64.1 in #103
- Use the direct FreeBSD package endpoint in CI by @kjanat in #104
- Build FreeBSD CI tools without a package mirror by @kjanat in #105
Full Changelog: 0.64.0...0.64.1
0.64.0
0.63.0
What's Changed
- Fix cache safety, plugin identity, and built-in exec behavior by @kjanat in #72
- Validate local plugin cache contents by @kjanat in #74
- Bind formatting identifiers to their arena by @kjanat in #77
- Test cache path and process identity trust boundaries by @kjanat in #79
- Preserve nightly publication failures and recovery inputs by @kjanat in #80
- Publish test executables atomically with isolated staging by @kjanat in #75
- Bound npm tarball extraction and cancel abandoned workers by @kjanat in #78
- Use published tree-fucker 0.1.0 by @kjanat in #76
- Keep preview uploads under pkg.pr.new limits by @kjanat in #81
- Synchronize setup cancellation test with child startup by @kjanat in #82
- Stop publishing duplicate dprint archives by @kjanat in #83
- Default the publish-refs identity to empty by @kjanat in #84
- Classify a Wasm retry error by its own result by @kjanat in #87
- README: npm packages and kjanat plugins by @kjanat in #88
- Root a selected configFile's schemas at its directory by @kjanat in #89
- Check release checksums before publishing by @kjanat in #91
- Trust change times on local filesystems only by @kjanat in #92
- Fix publish checks, zip cleanup, and cache identity by @kjanat in #90
- Prefer kprint config file names by @kjanat in #94
- chore(release): prepare 0.63.0 in #95
Full Changelog: 0.62.0...0.63.0
0.62.0
What's Changed
- fix(npm): accept successful uploads without registry polling by @kjanat in #67
- Publish npm tarballs through Beepboop's ledger by @kjanat in #68
- Fix ETXTBSY races in script-executing tests by @kjanat in #69
- Port upstream CLI and formatter improvements by @kjanat in #70
- chore(release): prepare 0.62.0 in #71
Full Changelog: 0.61.0...0.62.0
0.61.0
What's Changed
- Bump unicode-width from 0.2.2 to 0.2.3 by @dependabot[bot] in #54
- Bump serde_json from 1.0.151 to 1.0.154 by @dependabot[bot] in #57
- Bump markdown-it-anchor from 10.0.0 to 10.1.0 in /website by @dependabot[bot] in #59
- Bump kjanat/dprint-check from 3.1.0 to 3.2.0 by @dependabot[bot] in #60
- Pass local JSON Schemas to formatter plugins by @kjanat in #61
- Bump the cargo group across 1 directory with 3 updates by @dependabot[bot] in #53
- Bump sha2 from 0.10.9 to 0.11.1 by @dependabot[bot] in #55
- Bump wasmtime from 43.0.2 to 50.0.1 by @dependabot[bot] in #56
- chore: configure release automation by @beepboop-by-kjanat[bot] in #62
- fix: isolate kprint caches by @kjanat in #63
- feat: manage npm and GitHub releases through Beepboop by @kjanat in #65
- chore(release): prepare 0.61.0 by @beepboop-by-kjanat[bot] in #66
Full Changelog: 0.60.6-kjanat...0.61.0
0.60.6-kjanat
Renamed to kprint
- The binary is now
kprint. The installers also install it asdprint, so existing scripts keep working. kprint --versionreportskprint 0.60.6.- Release archives are
kprint-<target>.zip. Thedprint-<target>.ziparchives are still attached, so older installers andupgradekeep working.
Security
- A Wasm plugin can no longer configure plugins outside the sandbox (process and exec plugins) through its overrides.
- Remote configurations can no longer reach gitignored or outside files: their negated
excludesand..associations are ignored, with a warning. - The configuration files a plugin declares for itself must be inside the configuration file's directory: no absolute paths, no
..and no symlinks out of it. - rustls-webpki 0.103.16 and webpki-roots 1.0.11.
Fixes
- A plugin's
configFileexpands${configDir}and${originConfigDir}. - Formatting a file outside the configuration's directory now finds
configFile, and the files a plugin looks for, relative to the configuration file, instead of the filesystem root. kprint <subcommand> --helpprints the help and exits successfully instead of with an error.
Distribution
- npm:
@kprint/kprint(the CLI) and@kjanat/fmt, which runskprint fmtasfmt/kfmtand uses a default remote configuration when there is none. - Docker:
ghcr.io/kjanat/kprint(distroless Debian 13, linux/amd64, linux/arm64 and linux/ppc64le). The binaries for the other platforms can be pulled from the same image with ORAS.
0.60.5-kjanat
A plugin's own configuration file
A plugin can read a configuration file of its own, so a formatter's own executable and dprint are configured in one place. dprint finds the file, parses it (TOML, JSON with comments, or YAML) and passes it to the plugin; the plugin decides what of it applies. dprint-plugin-tombi 0.1.1 uses Tombi's tombi.toml this way.
-
Without configuration, the first of the files the plugin looks for that exists next to the configuration file is passed (Tombi:
.tombi.toml,tombi.toml,pyproject.tomlwith a[tool.tombi],.config/tombi.toml). -
configFilein the plugin's table names another file, relative to the configuration file's directory, optionally with the part to pass after#, orfalsefor none:[toml] configFile = "pyproject.toml#tool.tombi"
-
A missing or unparsable file is an error that names it.
-
Remote configuration can't choose a file (only
false), as it can't setincludes. -
The language server picks up a change to the file, or a file it looked for being made, without a restart.
-
A change to the file invalidates the incremental cache like a change to the configuration.
A plugin declares the files it looks for in its plugin info, or, built for dprint's plugin crates, with a get_config_files export returning a JSON array. A plugin that declares none gets configFile as one of its own properties, as before.
Fewer needless compiles on a busy machine
A run that interprets a Wasm plugin compiles it once interpreting took about as long as compiling would. That was how long interpreting took, including the time the thread waited for a CPU, so on a busy machine a run formatting a few bytes could compile a plugin for nothing, and print that it did. It's now the CPU time interpreting takes, on Unix and Windows, which also leaves out the time a plugin waits for the plugins it asks to format.
Full Changelog: 0.60.4-kjanat...0.60.5-kjanat
0.60.4-kjanat
dprint add in a TOML configuration
In a TOML configuration whose plugins array had no comma after its last plugin, dprint add put the comma on its own line, after that plugin's newline:
"https://plugins.dprint.dev/kjanat/svg-v0.4.1.wasm"
,
"https://plugins.dprint.dev/kjanat/tombi-0.1.0.wasm",
]Now the comma follows the plugin, and a comment after it stays after it:
"https://plugins.dprint.dev/kjanat/svg-v0.4.1.wasm",
"https://plugins.dprint.dev/kjanat/tombi-0.1.0.wasm",
]Full Changelog: 0.60.3-kjanat...0.60.4-kjanat
0.60.3-kjanat
A plugin compiled in the background is kept for the next run
A run that interprets a Wasm plugin long enough compiles it to native code in the background. When the run finished formatting before that compile did, the compile was dropped, and the next run compiled the plugin again before formatting anything (dprint-plugin-tombi: 4.3s for the second run).
Now a run waits for a compile it started in the background before it exits, so the native code is in the cache: the next run formats natively right away (0.62s). The run that starts the compile takes up to the compile's time longer, once per plugin release. It only starts after about a second in the interpreter, about what compiling takes.
Full Changelog: 0.60.2-kjanat...0.60.3-kjanat