Datafaker 1.1.0 Released

While a 1.1.0 release vs a 1.0.0 release might seem like a small feature update, for us, it was a huge milestone. For those unfamiliar with Datafaker, Datafaker is a JVM library to generate fake data for Java, Scala and Kotlin applications. Datafaker started as a fork of Javafaker, but over time has fewer bugs, more faker providers, and fewer dependencies. As such, the 1.1.0 release is a great reflection of that, since it touches on all of these topics.

However, the biggest change is the addition of several external contributors, and we’d like to do a special shout out to Elton AndrĂ©, Sergey Nuyanzin and Amit Solankurkar for their contributions to this release!

Datafaker 1.1.0 Improvements

One of the biggest improvements in Datafaker 1.1.0 is that the external dependencies have been completely revamped. The SnakeYML version is now a shaded jar, as well as being the latest version of SnakeYML (to make sure there are no CVE’s), as well as a removal off all external libraries, with the exception of generex, which is a library to generate data based on regular expressions.

In the area of new faker providers, the following have been added:

  • Mountains
  • CNPJ (Legal Entity Identifier)
  • CPF (Brazilian Taxpayer Identifier)

Another big improvement, inspired by a bug report for the US phone numbers, was to improve the phone number generation. Originally, phone numbers were created without taking into regard most of the Locale information, and would just consist of a random string of numbers. Now, for the US, Swedish, Norwegian, Czech, UK and Dutch phone numbers, the validity of those numbers are taken into account, and almost all generated numbers (at least more than 75%), are now valid.

A small but handy feature we added to the Faker class is the examplify method. While the purpose might not be directly obvious, it’s purpose is the generate a value which looks like the input. For example, given the input string ABC, and output string of 3 random letters will be generated.

Bugfixes

A few small bugs were fixed in this release. Some typos and translations were fixed in the resource files, and as stated before, the US phone numbers are now generated with more validity.

Have a look at the full Datafaker 1.1.0 release notes for more detail, and we hope you enjoy this release!

Older Post

Leave a Reply

Your email address will not be published. Required fields are marked *