v0.13.0

Automattic/harperv0.13.0Dec 30, 2024by elijah-potter

AI Summary

A major milestone release featuring Automattic's acquisition of Harper, the release of the `harper.js` library, and significant performance improvements via FST spellchecking.

Key Highlights

  • Automattic acquires Harper and the author joins full-time.
  • Harper gets faster with FST-based spellchecking.
  • Released `harper.js` npm package for web and Node.js.
  • Added new lint rules for 'that that' and repetition.

New Features

  • Released harper.js npm package
  • FST-based Curated Dictionary Spellchecking
  • Created lint for 'that that' -> 'that which'
  • Added Haskell Support
  • Span visualization command

Full Release Notes

# What's Changed

It has been more than two months since the last update to Harper. A lot has changed, and we're excited to see how it helps you write better-documented code, faster.

## Automattic Acquires Harper

Until now, Harper has been a side project. I would work on it in my spare time or during lecture if I was feeling particularly bored. As of last week, that has changed.

As [reported by TechCrunch](https://techcrunch.com/2024/11/21/wordpress-com-owner-automattic-snaps-up-grammar-checker-harper/) and [announced on their blog](https://automattic.com/2024/11/21/automattic-welcomes-harper-and-elijah-potter/), moving forward I will be working for Automattic full-time to make Harper the most useful and portable grammar checker out there. I will continue to support `harper-ls` and continue to accept pull requests for the various other [Harper integrations](https://writewithharper.com/docs/about#How-Can-I-Start-Using-Harper-), but much of my effort will be focused on initiatives to bring Harper to Automattic's products.

## Harper Gets Faster

With the latest release, Harper is getting even faster, particularly on initial and uncached document load. Until now, Harper has been using a [homegrown spell-checking algorithm](https://elijahpotter.dev/articles/stupid_simple_spell_check) that, while naive, has been quite effective at delivering quality corrections. Over the last several months, [Grant Lemons](https://grantlemons.com/) has been working on a significant improvement to this algorithm, leveraging [finite-state-transducers](https://en.wikipedia.org/wiki/Finite-state_transducer) to more quickly search for valid words of minimum edit distance to your misspelled ones.  You can read more about that work [on Grant's site](https://grantlemons.com/fst-writeup.html).

This also comes to the benefit of our more high-level analysis and pattern-matching engines, which are the main reasons we couldn't use an off-the-shelf spellchecking library.

## `harper.js`

With Harper `0.13.0`, we're releasing a new JavaScript library for using Harper anywhere on the web or on Node.js. We're calling it `harper.js`, and you can find it on [NPM](https://www.npmjs.com/package/harper.js). Documentation is more than a little sparse at the moment. We'll be adding to the [public documentation](https://writewithharper.com/docs/about) in the coming days, so keep an eye on it.

## Feedback

As per usual, don't be afraid to file an issue if you have any feedback, feature requests or problems. A lot has changed, so we'd be worried if there weren't a couple issues.

* build(deps): bump wasm-bindgen from 0.2.92 to 0.2.95 by @dependabot in https://github.com/Automattic/harper/pull/220
* build(deps): bump once_cell from 1.19.0 to 1.20.2 by @dependabot in https://github.com/Automattic/harper/pull/219
* Minor updates by @mcecode in https://github.com/Automattic/harper/pull/224
* build(deps): bump pulldown-cmark from 0.11.0 to 0.12.2 by @dependabot in https://github.com/Automattic/harper/pull/237
* build(deps): bump ordered-float from 4.2.2 to 4.4.0 by @dependabot in https://github.com/Automattic/harper/pull/236
* build(deps): bump anyhow from 1.0.83 to 1.0.90 by @dependabot in https://github.com/Automattic/harper/pull/235
* Use standard "python" language id, add support for missing `.py` extension by @jfly in https://github.com/Automattic/harper/pull/241
* Add support for nix by @jfly in https://github.com/Automattic/harper/pull/244
* build(deps): bump clap from 4.5.18 to 4.5.20 by @dependabot in https://github.com/Automattic/harper/pull/246
* build(deps): bump thiserror from 1.0.60 to 1.0.65 by @dependabot in https://github.com/Automattic/harper/pull/247
* build(deps): bump serde_json from 1.0.128 to 1.0.132 by @dependabot in https://github.com/Automattic/harper/pull/245
* build(deps): bump tokio from 1.40.0 to 1.41.0 by @dependabot in https://github.com/Automattic/harper/pull/249
* build(deps): bump anyhow from 1.0.90 to 1.0.91 by @dependabot in https://github.com/Automattic/harper/pull/248
* build(deps): bump thiserror from 1.0.65 to 1.0.67 by @dependabot in https://github.com/Automattic/harper/pull/264
* build(deps): bump anyhow from 1.0.91 to 1.0.92 by @dependabot in https://github.com/Automattic/harper/pull/261
* build(deps): bump ordered-float from 4.4.0 to 4.5.0 by @dependabot in https://github.com/Automattic/harper/pull/260
* build(deps): bump serde from 1.0.209 to 1.0.214 by @dependabot in https://github.com/Automattic/harper/pull/263
* Language ID Fixes by @mcecode in https://github.com/Automattic/harper/pull/266
* build(deps): bump anyhow from 1.0.92 to 1.0.93 by @dependabot in https://github.com/Automattic/harper/pull/272
* build(deps): bump thiserror from 1.0.67 to 2.0.3 by @dependabot in https://github.com/Automattic/harper/pull/273
* build(deps): bump hashbrown from 0.15.0 to 0.15.1 by @dependabot in https://github.com/Automattic/harper/pull/274
* build(deps): bump cross-spawn from 7.0.3 to 7.0.5 in /packages by @dependabot in https://github.com/Automattic/harper/pull/279
* build(deps): bump tokio from 1.41.0 to 1.41.1 by @dependabot in https://github.com/Automattic/harper/pull/275
* feat: Create lint for 'that that' -> 'that which' by @grantlemons in https://github.com/Automattic/harper/pull/278
* build(deps): bump clap from 4.5.20 to 4.5.21 by @dependabot in https://github.com/Automattic/harper/pull/283
* build(deps): bump serde_json from 1.0.132 to 1.0.133 by @dependabot in https://github.com/Automattic/harper/pull/281
* feat: FST-based Curated Dictionary Spellchecking by @grantlemons in https://github.com/Automattic/harper/pull/258
* feat(#253): remove requirement that word be in list for repetition by @grantlemons in https://github.com/Automattic/harper/pull/277
* build(deps): bump hashbrown from 0.15.1 to 0.15.2 by @dependabot in https://github.com/Automattic/harper/pull/285
* Improve config change handling by @mcecode in https://github.com/Automattic/harper/pull/292
* fix: correct readme workflows by @grantlemons in https://github.com/Automattic/harper/pull/295
* ci: disable packaging and building workflows on draft PRs by @grantlemons in https://github.com/Automattic/harper/pull/294
* fix(#287): add minimum as a correction from min by @grantlemons in https://github.com/Automattic/harper/pull/291
* build(deps): bump tokio from 1.41.1 to 1.42.0 by @dependabot in https://github.com/Automattic/harper/pull/301
* build(deps): bump thiserror from 2.0.3 to 2.0.4 by @dependabot in https://github.com/Automattic/harper/pull/300
* build(deps): bump wasm-bindgen from 0.2.95 to 0.2.97 by @dependabot in https://github.com/Automattic/harper/pull/297
* build(deps): bump tracing from 0.1.40 to 0.1.41 by @dependabot in https://github.com/Automattic/harper/pull/299
* build(deps): bump tracing-subscriber from 0.3.18 to 0.3.19 by @dependabot in https://github.com/Automattic/harper/pull/298
* docs: update a link to point to github.com/Automattic/harper by @macbre in https://github.com/Automattic/harper/pull/311
* fix(core): updates to SpelledNumbers by @grantlemons in https://github.com/Automattic/harper/pull/325
* feat: Span visualization command by @grantlemons in https://github.com/Automattic/harper/pull/303
* build(deps): bump thiserror from 2.0.4 to 2.0.9 by @dependabot in https://github.com/Automattic/harper/pull/328
* build(deps): bump anyhow from 1.0.93 to 1.0.95 by @dependabot in https://github.com/Automattic/harper/pull/327
* build(deps): bump nanoid from 3.3.7 to 3.3.8 in /packages by @dependabot in https://github.com/Automattic/harper/pull/316
* build(deps): bump ordered-float from 4.5.0 to 4.6.0 by @dependabot in https://github.com/Automattic/harper/pull/326
* build(deps): bump clap from 4.5.21 to 4.5.23 by @dependabot in https://github.com/Automattic/harper/pull/309
* Support using a different `harper-ls` executable than the one bundled in the VSCode extension by @mcecode in https://github.com/Automattic/harper/pull/330
* feat(vscode-plugin): Add Haskell Support by @mcecode in https://github.com/Automattic/harper/pull/336
* feat(#331): Haskell Comment Support by @grantlemons in https://github.com/Automattic/harper/pull/332

## New Contributors
* @jfly made their first contribution in https://github.com/Automattic/harper/pull/241
* @macbre made their first contribution in https://github.com/Automattic/harper/pull/311

**Full Changelog**: https://github.com/Automattic/harper/compare/v0.12.0...v0.13.0