Releases: typelevel/cats-parse
cats-parse 0.3.1
Released for Scala 3.0.0-RC1.
What's changed
- Scala 3.0.0-RC1 (#172) @larsrh
- Update sbt-mdoc to 2.2.18 (#171) @scala-steward
- Update sbt-spiewak-sonatype to 0.20.3 (#170) @scala-steward
- Update sbt-scalajs, scalajs-compiler, ... to 1.5.0 (#169) @scala-steward
- Update cats-core to 2.4.1 (#168) @scala-steward
- Update cats-core to 2.4.0 (#167) @scala-steward
- Update sbt-mdoc to 2.2.17 (#166) @scala-steward
- Update atto-core to 0.9.1 (#164) @scala-steward
- Update sbt to 1.4.7 (#163) @scala-steward
- Update fastparse to 2.3.1 (#161) @scala-steward
- Update munit, munit-scalacheck to 0.7.21 (#160) @scala-steward
- Update sbt-mdoc to 2.2.16 (#159) @scala-steward
- Update scala 2.12.x to 2.12.13 (#151) @regadas
Contributors to this release
Parser1 is dead, long live Parser0
What's changed
There are three main changes:
- Parser1 becomes Parser, and Parser becomes Parser0. #116 by @martijnhoekstra
- We have methods to repeat up to a maximum number of times. #132 by @martijnhoekstra
- A trie-based parser for matching the longest string (Parser.stringIn): #110 by @satabin
This release is a significant change. In prior versions, Parser was a parser that could consume 0 or more characters and Parser1 consumed at least one. In practice we have found that almost always you want to work with a parser that does consume, so in this release we have switched: Parser consumes at least 1 character, and Parser0 consumes 0 or more. There are scala fix rules: https://github.com/martijnhoekstra/catsparsescalafix/ which @scala-steward knows about. They should get you almost all the way, if not 100% correct.
We wanted to make this change before the library was too widely adopted but we intend to put a significant premium going forward on source and binary compatibility. Please accept our apologies if this creates extra work for you.
In addition to the Parser0 change, we also allow repeating a parser a maximum number of times when doing a repetition. This is not commonly used, so most users won't need it. In addition, all the repetition methods are accessible as methods on Parser. Previously, some variants only existed on the companion. They all start with rep
which should allow users of IDEs to find them more easily.
Lastly, there is a new parser: stringIn
which matches the longest string from a collection of strings. This uses a trie internally, so it can be much faster when you have many strings you could when compared to using string
with oneOf
.
Huge thanks to @martijnhoekstra, @regadas, @satabin and @johnynek for contributions to this release.
new features and code improvements
- Add a recursive method (#149) @johnynek
- Add repeat Parser until end Parser (#146) @regadas
- Remove ParserMethods which is unneeded (#148) @johnynek
- Add missing overrides (#147) @regadas
- Fix a few more tests not running (#143) @regadas
- fix tests: use whole prefix length in case of repeating strings (#144) @martijnhoekstra
- remove nonNegativeDigit in SemVer (#145) @martijnhoekstra
- More repSep related clean ups (#142) @johnynek
- RepSep overload with no
min
parameter (#141) @martijnhoekstra - Some more pre-0.3.0 changes (#139) @johnynek
- scaladoc 2.12 requires api mapping (#138) @regadas
- Fix scaladoc (#136) @regadas
- Cleanup accumulated errors (#133) @regadas
- allow for max in rep (#132) @martijnhoekstra
- Remove
as
Parser type param (#134) @regadas - Fix minor scala 3 compiler warns (#135) @regadas
- Add | operator (#130) @johnynek
- Merge adjacent StringIn nodes in oneOf (#125) @johnynek
- Some minor nits post Parser0 change (#123) @johnynek
- Add
stringIn1
parser (#110) @satabin - Add either Parser (#115) @regadas
- Make 1 the default: rename Foo1 things to Foo, and the associated Foo to Foo0 (#116) @martijnhoekstra
- Fix string unmap with Parser1 (#122) @regadas
- Fix
<*
scaladoc (#112) @regadas
dependency updates
- Update sbt-scalajs, scalajs-compiler, ... to 1.4.0 (#150) @scala-steward
- Update atto-core to 0.9.0 (#140) @scala-steward
- Update sbt to 1.4.6 (#126) @scala-steward
- Update to scala 3.0.0-M3, cats, and munit (#124) @regadas
- Update jawn-ast to 1.0.3 (#120) @scala-steward
- Update sbt-spiewak-sonatype to 0.19.3 (#119) @scala-steward
- Update sbt-mdoc to 2.2.14 (#118) @scala-steward
- Update sbt-paradox to 0.9.1 (#117) @scala-steward
- Update sbt to 1.4.5 (#114) @scala-steward
Contributors to this release
@johnynek, @martijnhoekstra, @regadas, @satabin and @scala-steward
Selective Functor Edition
What's changed
This release adds a number of new parsers, including semver #78 and rfc5234 #66. There is a new class to compute line and column numbers and select specific lines from an input in order to show users where a parser went wrong #103. And a few new APIs including select, filter, between, and surroundedBy (see #101 #108 #79)
New features
- Implement FunctorFilter and add some more laws (#108) @johnynek
- Add a simple law for select (#107) @johnynek
- Override productEval methods in FlatMap (#106) @johnynek
- filter, based on selective (#101) @rossabaker
- Add LocationMap to help users show error locations (#103) @johnynek
- Add material theme to paradox (#98) @regadas
- Right associate products in unmap (#82) @johnynek
- Add
between
andsurroundedBy
combinators (#79) @regadas - Add SemVer Parser (#78) @oguzhanunlu
- Avoid oneOf reverse on List (#76) @regadas
- mergeCharIn tailrec (#68) @regadas
- Optimize string, void and char cases a bit (#67) @johnynek
- RFC5234 common rules (#66) @rossabaker
- Small optimization around makeError (#62) @regadas
- a few optimizations more (#60) @johnynek
Fixes
- Fix return type on repAs1 (#99) @johnynek
- Simplify bench project Scala version exclusions (#96) @mpilquist
- Ignore bench from codecov (#94) @regadas
- Increase test coverage a bit (#86) @johnynek
- Aggregate bench project (#83) @regadas
- Fix issue 72 (#74) @johnynek
Version bumps
- Update sbt-spiewak-sonatype to 0.19.2 (#104) @scala-steward
- Upgrade to latest sbt-spiewak-sonatype (#102) @mpilquist
- Update sbt-paradox to 0.9.0 (#100) @scala-steward
- Update jawn-ast to 1.0.2 (#95) @scala-steward
- Add Scala 3.0.0-M2 support and cleanup build (#93) @mpilquist
- Cleanup deps (#92) @regadas
- Update cats-core to 2.3.0 (#91) @scala-steward
- Update sbt-spiewak-sonatype to 0.18.3 (#90) @scala-steward
- Update sbt-spiewak-sonatype to 0.18.2 (#88) @scala-steward
- Update sbt-mdoc to 2.2.13 (#87) @scala-steward
- Update munit, munit-scalacheck to 0.7.19 (#85) @scala-steward
- Update sbt-spiewak-sonatype to 0.18.1 (#84) @scala-steward
- Update sbt-spiewak-sonatype to 0.18.0 (#80) @scala-steward
- Update sbt to 1.4.4 (#81) @scala-steward
- bump github actions, regenerate ci.yml (#75) @johnynek
- Update munit, munit-scalacheck to 0.7.18 (#73) @scala-steward
- Update sbt to 1.4.3 (#70) @scala-steward
- Update sbt-scalajs, scalajs-compiler, ... to 1.3.1 (#69) @scala-steward
- Upgrade to Scala 3.0.0-M1 (#63) @mpilquist
Contributors to this release
@johnynek, @mpilquist, @oguzhanunlu, @regadas, @rossabaker and @scala-steward
Now with ignoreCase Parsers!
This is the second release of cats-parse. There were no bug fixes (nor any known bugs), but there are two new features and a number of new tests and laws added. The test coverage is now about 96%
New features:
- ignoreCase parsers: These are useful for parsing strings or characters while ignoring the case. For instance, parsing SQL can make use of these. See #50, #47, #46. Thanks for this work by @stephenjudkins !
- custom failure messages: In addition to
Parser.fail
there is nowParser.failWith(str: String)
which allows you to set an error message which can be helpful for reporting clearer errors and debugging parsers. See #47, work by @johnynek
What's changed
- Add a few new laws and optimizations (#58) @johnynek
- Improve performance around ignoreCase (#57) @johnynek
- Setup codecov (#56) @regadas
- Add githubWorkflowCheck to prePR (#55) @regadas
- Add common Functor#as directly (#52) @regadas
- Update sbt-mdoc to 2.2.12 (#54) @scala-steward
- Update munit, munit-scalacheck to 0.7.17 (#53) @scala-steward
- Thank you for contributing to
cats-parse
! (#51) @regadas - Add some ignoreCase methods, rename stringCI to ignoreCase (#50) @johnynek
- minor refactor in
stringCI1
(#47) @stephenjudkins - Fix unclear SBT example in documentation (#44) @stephenjudkins
- Case-insensitive string parsers (#46) @stephenjudkins
- Add ability to repeat into different structures (#45) @johnynek
- Add failWith for user defined error messages (#42) @johnynek
- Update sbt-mdoc to 2.2.11 (#41) @scala-steward
- Add initial mdoc support (#30) @regadas
- Add a law relating backtrack and orElse (#40) @johnynek
- First pass at improving the Scaladoc comments. (#37) @non
- Test some distributivity laws (#38) @johnynek
- Update munit, munit-scalacheck to 0.7.16 (#36) @scala-steward
- remove unused sbt plugins (#35) @johnynek
- Update sbt-spiewak-sonatype to 0.17.0 (#31) @scala-steward
- Update sbt to 1.4.2 (#33) @scala-steward
- Update munit, munit-scalacheck to 0.7.15 (#34) @scala-steward
- Update scala 2.12.11 -> 2.12.12 (#28) @regadas
- Upgrading sbt-github-actions to 0.9.4 to remove deprecations (#27) @zmccoy
- Update scalafmt tasks (#26) @regadas
- Expand the readme (#23) @johnynek
Contributors to this release
@johnynek, @non, @regadas, @scala-steward, @stephenjudkins and @zmccoy
Initial Release
What's changed
- Add docs, make APIs more consistent (#22) @johnynek
- Optimize repetition and json strings (#21) @johnynek
- Adding the Release markdown first draft (#20) @zmccoy
- Add Numbers parsers (#13) @johnynek
- Optimize string parsing in our benchmark. (#17) @non
- JSON benchmarks (#12) @rossabaker
- Add CI badge to readme (#14) @Slakah
- Enable scalafmt, fixes #6 (#11) @mpilquist
- Enable sbt-spiewak and sbt-github-actions, cross-build for dotty and 2.13 (#10) @mpilquist
🏗️ Build Improvements
Contributors to this release
@Slakah, @johnynek, @mpilquist, @non, @rossabaker and @zmccoy