What's Changed
Breaking Changes
- Convert to TypeScript by @azu in #7
- Add
SourceRange
,SourcePosition
,SourceLocation
as types - Remove
SourceLocation
andSourcePosition
class. It becomes just a plain object - Make
source.indice
private
- Add
- 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.
- Example: refactor: update to structured-source@4 by azu · Pull Request #984 · textlint/textlint
- fix(core): update structured-source@4 by azu · Pull Request #544 · secretlint/secretlint
Refactoring
Other Changes
New Contributors
Full Changelog: v3.0.2...v4.0.0