Skip to content

Commit

Permalink
docs: clarify the CHANGELOG a bit
Browse files Browse the repository at this point in the history
  • Loading branch information
barona-mika-vilpas committed Jan 16, 2024
1 parent 184d291 commit f093267
Showing 1 changed file with 8 additions and 5 deletions.
13 changes: 8 additions & 5 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,17 +6,20 @@ This project follows semantic versioning.

### Breaking changes

- the `maybe` combinator's return type changed from returning `T` to `T | undefined`
- (internal) remove internal namespaces with flat types. `ResultKind.Fail` is now called `ResultKindFail` and so on.
- added additional type safety (some details available in a1e925bd782a714c28e1fa49ec2cb2792a80ab88)
- fix: the `maybe` combinator's return type changed from returning `T` to `T | undefined`. This type is more correct because `maybe` can be called without an argument.
- refactor: (internal) remove internal namespaces with flat types. `ResultKind.Fail` is now called `ResultKindFail` and so on.
- refactor: added additional type safety (some details available in [a1e925bd782a714c28e1fa49ec2cb2792a80ab88](https://github.com/GregRos/parjs/commit/a1e925bd782a714c28e1fa49ec2cb2792a80ab88))

### New features

- add `isParjsSuccess`, `isParjsFailure`, `isParjsResult`. They can be used when testing your parsers.
- add example parser for `.ini` files (see the [README](./README.md))
- add example parser for mathe expressions (see the [README](./README.md))
- the `or()` combinator shows a clearer error message when it fails
- add example parser for math expressions (see the [README](./README.md))
- add the `.many1()` combinator, which is like `.many()` but requires at least one match
- add `.debug()` method for any parser. It will log the parser's name, the input, the result, and the remaining input. This is useful for debugging. See the [README](./README.md) for more details.
- add constant type inference for many parsers and combinators. For example, `const p: Parjser<"a"> = string("a")` is now the default inferred type when using `string()`. Previously, the type would be inferred as `Parjser<string>`. See the [README](./README.md) for more details.

### Miscellaneous changes

- failure stack traces are printed on multiple lines
- the `or()` combinator shows a clearer error message when it fails

0 comments on commit f093267

Please sign in to comment.