Skip to content

Releases: textlint/structured-source

v4.0.0

08 Jan 10:32
@azu azu
3d106b8
Compare
Choose a tag to compare

What's Changed

Breaking Changes

  • Convert to TypeScript by @azu in #7
    • Add SourceRange, SourcePosition, SourceLocation as types
    • Remove SourceLocation and SourcePosition class. It becomes just a plain object
    • Make source.indice private
  • Require ES2018+
    • It means that require Node.js 14+
  • Change default export to named export

Migration Works

You should use named import to use structured-source.

- import StructuredSource from "structured-source";
+ import { StructuredSource } from "structured-source";

Also, You no more need @types/structured-source because v4 includes types as built-in.

npm install structured-source@4
npm rm @types/structured-source

An example of Migration to v4 from v3.

Refactoring

  • use GitHub Actions, Remove gulp, Use TypeScript by @azu in #6

Other Changes

New Contributors

Full Changelog: v3.0.2...v4.0.0