|
| 1 | +# Changelog |
| 2 | + |
| 3 | +All notable changes to this project are documented here. This project follows |
| 4 | +[Semantic Versioning](https://semver.org/spec/v2.0.0.html). |
| 5 | + |
| 6 | +## [0.1.0] — 2026-07-13 |
| 7 | + |
| 8 | +First tagged release. Up to now the plugin has only been installable from |
| 9 | +`main`; from here on you can pin a version. |
| 10 | + |
| 11 | +If you are pinning for the first time, note the one breaking change below. |
| 12 | + |
| 13 | +### Breaking |
| 14 | + |
| 15 | +- **`sources` now merges with the defaults instead of replacing them.** The |
| 16 | + option was always *documented* as defaulting to |
| 17 | + `{ typescript = true, ts = true, vtsls = true }` and merged with your table, |
| 18 | + but the default was actually `nil`, so your table silently replaced the whole |
| 19 | + set. `setup({ sources = { deno = true } })` therefore stopped formatting |
| 20 | + TypeScript diagnostics altogether. |
| 21 | + |
| 22 | + It now behaves as documented, and `{ deno = true }` *adds* Deno. If you were |
| 23 | + relying on the old behavior to **restrict** which sources get formatted, turn |
| 24 | + the others off explicitly: |
| 25 | + |
| 26 | + ```lua |
| 27 | + -- before (accidentally worked as "only vtsls") |
| 28 | + require("effect-error-pretty").setup({ sources = { vtsls = true } }) |
| 29 | + |
| 30 | + -- now |
| 31 | + require("effect-error-pretty").setup({ |
| 32 | + sources = { vtsls = true, typescript = false, ts = false }, |
| 33 | + }) |
| 34 | + ``` |
| 35 | + |
| 36 | +### Fixed — parser |
| 37 | + |
| 38 | +- **Effects with a function type in the `A` channel parsed into the wrong |
| 39 | + channels.** The `>` in an arrow type (`(id: string) => Effect<...>`) was |
| 40 | + counted as a closing bracket, driving the nesting depth negative so every |
| 41 | + top-level comma after it was missed. `E` and `R` were swallowed into `A`, and |
| 42 | + the headline "Missing Services" box never fired — on a service interface with |
| 43 | + methods, which is the common case. |
| 44 | +- A top-level union of Effects (`Effect<A> | Effect<B>`, e.g. from |
| 45 | + `cond ? effectA : effectB`) matched the greedy `Effect<...>` pattern and was |
| 46 | + shredded into a fabricated service name. It now falls back to a plain type |
| 47 | + mismatch. |
| 48 | +- `YieldWrap<...>` was unwrapped *before* `import("…").` prefixes were stripped, |
| 49 | + so the fully-qualified form TypeScript actually emits never unwrapped. |
| 50 | +- **`Not callable` (TS2349) and nullish (TS18048) never fired at all.** The |
| 51 | + clause they match lives on a continuation line that the parser stripped before |
| 52 | + matching. Both are now read before the strip — while making sure a TS2769 |
| 53 | + *overload* error is not misreported as "not callable", since it nests the same |
| 54 | + text. |
| 55 | +- `Object is possibly 'null' or 'undefined'` (TS2533) reported only the `null` |
| 56 | + half, and the same bug applied to the named form (TS18049). |
| 57 | +- Argument-count errors only matched a plain count; the `at least N` (TS2555) |
| 58 | + and `N-M` overload forms matched nothing and rendered no box. |
| 59 | +- `extra_patterns` given as a bare function now works instead of erroring on |
| 60 | + every TypeScript diagnostic. |
| 61 | + |
| 62 | +### Fixed — rendering |
| 63 | + |
| 64 | +- A service whose name merely *starts with* `Scope` (e.g. `ScopeManager`) was |
| 65 | + titled "Scope Required" over a contradicting `Effect.provide` hint. When |
| 66 | + `Scope` genuinely rides along with other services, both hints are now shown. |
| 67 | +- When both sides normalized to the same signature — two copies of a package in |
| 68 | + `node_modules` — the plugin rendered a "Mismatch" box whose Got and Expected |
| 69 | + were character-for-character identical. That case is now named, with the |
| 70 | + differing import paths kept visible. |
| 71 | +- **Inline text hid diverging channels.** For a multi-channel error the float |
| 72 | + showed both the missing services and the unhandled errors, but the inline |
| 73 | + virtual text showed only the services — so following it left the error |
| 74 | + unresolved with no clue why. Every diverging channel is now reported. |
| 75 | +- Truncation was byte-wise and could cut a multi-byte character in half; the |
| 76 | + ellipsis was decided from the pre-strip length, so short types got a `…` they |
| 77 | + had not earned. |
| 78 | +- Wrapped types did not line up under their labels (the continuation indents |
| 79 | + were hardcoded and measured against the wrong prefixes), so the output did not |
| 80 | + match the screenshots in the README. |
| 81 | +- Five diagnostic kinds rendered a float box but returned nothing inline. |
| 82 | + |
| 83 | +### Fixed — API and setup |
| 84 | + |
| 85 | +- **A formatter error no longer takes down the whole diagnostic float.** There |
| 86 | + was no `pcall` in the format path, so one throwing `extra_pattern` blanked the |
| 87 | + entire float — including diagnostics from unrelated sources on the same line — |
| 88 | + and threw on every `CursorHold`. |
| 89 | +- **`float = true` no longer gets silently wiped.** `vim.diagnostic.config()` |
| 90 | + shallow-assigns top-level keys, so any later `config({ float = ... })` |
| 91 | + replaced the whole table and dropped the formatter. LazyVim's `nvim-lspconfig` |
| 92 | + spec does exactly this, on the same event the README's own install snippet |
| 93 | + uses. The formatter now reinstalls itself on `VimEnter` / `LspAttach`. |
| 94 | +- A function-form `float` config (a documented Neovim shape) was discarded |
| 95 | + wholesale, taking the user's border and their own `format` with it. |
| 96 | +- `inline_format` kept only the first line of `format-ts-errors`' deliberately |
| 97 | + multi-line output, rendering the literal word `Type` as the virtual text. |
| 98 | + |
| 99 | +### Fixed — docs and tests |
| 100 | + |
| 101 | +- The documented test command loaded your personal Neovim config instead of |
| 102 | + `tests/minimal_init.lua`: `PlenaryBustedDirectory` spawns a child process per |
| 103 | + spec file, and those children ignore the parent's `-u`. |
| 104 | +- `format_ts_errors_fallback` linked to an npm package; the code requires the |
| 105 | + Lua plugin |
| 106 | + [`format-ts-errors.nvim`](https://github.com/davidosomething/format-ts-errors.nvim). |
| 107 | +- `tests/minimal_init.lua` hardcoded the XDG default path for plenary, so it |
| 108 | + silently no-opped under `NVIM_APPNAME` or a custom `XDG_DATA_HOME`. |
| 109 | +- Test coverage went from 32 to 76 cases. `render.lua` and `init.lua` previously |
| 110 | + had none at all, which is why most of the above shipped. |
| 111 | + |
| 112 | +[0.1.0]: https://github.com/rashedInt32/effect-error-pretty.nvim/releases/tag/v0.1.0 |
0 commit comments