From 2e39e4143c700b4f78d2550d463f314d7675fe48 Mon Sep 17 00:00:00 2001 From: Simon Lydell Date: Mon, 6 Jul 2026 17:48:35 +0200 Subject: [PATCH] elm-test 0.19.2-0 --- CHANGELOG.md | 33 ++++++++++++++++++++++++++++++++- README.md | 14 ++++++++++++-- lib/Generate.js | 2 +- package-lock.json | 4 ++-- package.json | 2 +- 5 files changed, 48 insertions(+), 7 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index f59b91f4..e2c17dab 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,7 +2,38 @@ Notable changes to this project will be documented in this file. -The format is based on [Keep a Changelog](http://keepachangelog.com/). This project mirrors the Elm version. So version 0.19.2-revisionX of this project will be compatible with Elm 0.19.2. +The format is based on [Keep a Changelog](http://keepachangelog.com/). This project mirrors the Elm version. So version 0.19.2-X of this project will be compatible with Elm 0.19.2. See [Versions](./README.md#versions) for details. + +## 0.19.2-0 - 2026-07-06 + +### Breaking + +elm-test now requires [Elm 0.19.2](https://github.com/elm/compiler/releases/tag/0.19.2)! + +Note that if you install Elm 0.19.2, but forget to update elm-test, you’ll get an error like this: + +``` +-- ELM VERSION MISMATCH ----------------------------------------------- elm.json + +Your elm.json says this application needs a different version of Elm. + +It requires 0.19.1, but you are using 0.19.2 right now. + + +`elm make` failed with exit code 1. +``` + +That error message is slightly confusing because it’s talking about a generated `elm.json` file deep in the `elm-stuff/` directory, not your own elm.json! But either way, the solution is to use the same version of `elm` and `elm-test`. See [Versions](./README.md#versions) for details. + +Thanks to [Harm](https://github.com/hahschaa) for helping with this! + +## Performance + +- elm-test no longer depends on the `chalk` package. [Jeroen Engels](https://github.com/jfmengels) noticed that all we used that package for was to color text blue and red, and made a PR simplifying that to just two functions (and a helper), instead of a whole package – with sub-dependencies. This removed 6 npm packages in total, and about 0.2 MB, from an elm-test install! + +- elm-test now starts up to ~40 ms faster in some cases, due to lazy loading of two npm packages. When not using the watch mode, or when not using the junit report, we now avoid loading a bunch of file watching and XML generating code. Thanks to [Jeroen Engels](https://github.com/jfmengels) for doing deep analysis on this! + +- When `Expect.equal` fails on two large, dissimilar strings, the reporter's character-level diff takes several seconds – just to realize that a diff cannot be displayed. [Matthieu Pizenberg](https://github.com/mpizenberg/) fixed this in [elm-test-rs](https://github.com/mpizenberg/elm-test-rs), which originally copied the code in question from this repo. The fix has now been copied back, so diffs stay sub-second, even for really large cases! ## 0.19.1-revision17 - 2025-11-18 diff --git a/README.md b/README.md index 80d7fa50..3c50c2bd 100644 --- a/README.md +++ b/README.md @@ -11,18 +11,28 @@ When people say “elm-test” they usually refer to either: ## Versions -Not all versions of [elm-explorations/test] and this CLI tool work together! +You need to keep the versions of these three things in sync: + +- This CLI tool. +- The Elm compiler. +- The [elm-explorations/test] package. + +When it comes to the first two it’s easy: Use the same version for both. If you use Elm 0.19.2, use version 0.19.2 of this CLI tool as well. Note that the npm packages for both `elm` and `elm-test` might have suffixes such as `-0` and `-1` etc. It’s totally OK to use `elm@0.19.2-0` with `elm-test@0.19.2-1`! The suffixes don’t need to match. The suffixes are all about bug fixes or features in the respective npm packages, while the base version says which compiler version we’re working with. + +When it comes to [elm-explorations/test]: Use at least version 2.0.0 with elm-test 0.19.2. If you’re on 0.19.1, see the following table: | elm-explorations/test | elm-test CLI | | --------------------- | -------------------- | | >= 2.0.0 | >= 0.19.1-revision10 | | <= 1.2.2 | <= 0.19.1-revision9 | +(For 0.19.1, the suffix used was for example `-revision9` instead of just `-9`. This was changed in 0.19.2 to match the `elm` npm package.) + > **Unfortunate behavior of 0.19.1-revision9 and older** > > - `elm-test init` always installs the latest [elm-explorations/test]. This means that if you run `elm-test init` on version 0.19.1-revision9 or older, you will get elm-explorations/test 2.0.0 or later, which don’t work 100 % together (see the next point). > - elm-test 0.19.1-revision9 or older do _not_ validate that [elm-explorations/test] in your elm.json has a compatible version. If you upgrade to elm-explorations/test 2.0.0 or later but forget to upgrade the elm-test CLI, most things will still work, but test distribution diagrams (new in elm-explorations/test 2.0.0) won’t show up. So if you use `Test.fuzzWith` and wonder why distribution diagrams never show up – check your elm-test CLI version! -> - There exists an elm-test CLI version called just "0.19.1". It should have been called "0.19.1-revision1", but unfortunately isn’t. Don’t make the mistake thinking it’s the latest version! You always want "0.19.1-revisionX". +> - There exists an elm-test CLI version called just "0.19.1". It should have been called "0.19.1-revision1", but unfortunately isn’t. Don’t make the mistake thinking it’s the latest version! You always want "0.19.1-revisionX". (This is also why there is a version called "0.19.2-0" but no "0.19.2".) ## Installation diff --git a/lib/Generate.js b/lib/Generate.js index 97f0894a..5874f079 100644 --- a/lib/Generate.js +++ b/lib/Generate.js @@ -148,7 +148,7 @@ function getMainModule(generatedCodeDir /*: string */) /*: { path: // We'll be putting the generated Main in something like this: // - // my-project-name/elm-stuff/generated-code/elm-community/elm-test/0.19.2-revisionX/src/Test/Generated/Main.elm + // my-project-name/elm-stuff/generated-code/elm-community/elm-test/0.19.2-X/src/Test/Generated/Main.elm path.join(getGeneratedSrcDir(generatedCodeDir), ...moduleName) + '.elm', }; } diff --git a/package-lock.json b/package-lock.json index f16bf3b4..5ddb33e8 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "elm-test", - "version": "0.19.1-revision17", + "version": "0.19.2-0", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "elm-test", - "version": "0.19.1-revision17", + "version": "0.19.2-0", "license": "BSD-3-Clause", "dependencies": { "chokidar": "^3.5.3", diff --git a/package.json b/package.json index a8726e8b..23c7ae09 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "elm-test", - "version": "0.19.1-revision17", + "version": "0.19.2-0", "description": "Run elm-test suites.", "main": "elm-test.js", "engines": {