Skip to content

v2.0.0

Choose a tag to compare

@MrRefactoring MrRefactoring released this 10 May 16:32
· 10 commits to master since this release

Added

  • 16 new languages compiled from Snowball 3.0.1 sources:
    Armenian, Basque, Catalan, Czech, Esperanto, Estonian, Hindi, Indonesian, Irish, Lithuanian, Nepali, Norwegian, Persian, Polish, Serbian, Yiddish
  • Finnish added to supported languages in README (was already implemented)
  • Functional API — three levels of usage:
    • Named language functions: russian('бегущий') → 'бег'
    • Factory: createStemmer('ru') returns a reusable (word: string) => string
    • Raw: stem('ru', 'бегущий')
  • ISO 639-1 code support — pass 'ru', 'en', etc. alongside Languages enum values
  • Browser support — conditional exports (node / browser / default); single --target web WASM build shared by both environments; WASM initializes automatically on import, no init() call needed
  • Interactive demo at demo/index.html — word-by-word stemming diff with 33 language samples
  • GitHub Actions workflow deploying the demo to GitHub Pages

Changed

  • Minimum Node.js version is now 22
  • Package is now pure ESM ("type": "module") — use import instead of require
  • Entire codebase migrated from JavaScript to TypeScript 6 (module: NodeNext)
  • SOLID architecture: single-responsibility modules, dependency injection via iso-map.ts
  • wasm-bindgen updated from 0.2.45 to 0.2.121
  • Rust codebase migrated to edition 2024 — removed extern crate, updated module paths to crate:: prefix
  • Snowball runtime (SnowballEnv, Among) replaced with official Snowball 3.0 version: i32 positions, new go_in_grouping / go_out_grouping methods, all algorithms recompiled from source
  • opt-level = "s" added to release profile (optimize for size)
  • Test suite migrated to Vitest, one test per language (43 tests total)
  • packageManager field set to pnpm@11

Removed

  • Class-based new Stemmer(Languages.X) API (replaced by functional API above)
  • CommonJS support — package is ESM-only
  • serde / serde_derive dependencies