Skip to content

Datafaker 3.0.0

Latest

Choose a tag to compare

@bodiam bodiam released this 28 Nov 07:42
d335661

Datafaker 3.0.0 requires Java 17 or later. The upgrade guide has replacements for removed APIs and examples for the new providers.

Highlights

  • Add the Adjective, Database, and Selection providers. Selection is the replacement for the deprecated Options provider in Java and Kotlin.
  • Support percentage-weighted choices in custom YAML. A weighted branch can contain a string template or a list of templates. #1962
  • Scope temporary locale and seed settings to the calling thread with doWith. Nested calls restore the enclosing settings. #2000
  • Reduce overhead in default random generation, locale fallback, and bulk Java, JSON, and CSV generation. #2001 · Benchmark results
  • Package generated GraalVM Native Image metadata for built-in providers and locale resources. Native Image guide
  • Add a lowercase requirement to passwords and generated text, improve bulk Java record transformations, and escape raw SQL identifiers according to the selected dialect.

Upgrading from 2.x

  • Replace date() with timeAndDate(), which returns Java Time types. Use ChronoUnit for relative timestamps.
  • Move username and password calls to credentials(), and currency calls to money().
  • Pass raw schema, table, and field names to the SQL transformer. Datafaker applies the dialect's identifier quoting.
  • Check exact-value fixtures after upgrading. Provider data and ordering changed, including Vietnamese full names and the NYSE ticker list.

What's Changed

  • Released Datafaker 2.7.0 by @github-actions[bot] in #1856
  • Migrate Country.flag() from deprecated flags.fmcdn.net to flagcdn.com; add overload by @spannm in #1857
  • Tweak release processing by @kingthorin in #1858
  • Add more test for custom fakers by @snuyanzin in #1859
  • feat(stock): add ISIN generation and consolidate Luhn logic by @spannm in #1861
  • fix(ci): skip publish job in forks by @spannm in #1862
  • fix: formatting and update examples in README by @ferclager in #1817
  • Update all non-major dependencies to v6.1.1 by @renovate[bot] in #1864
  • feat(build): Maven POM cosmetics by @spannm in #1865
  • build(deps-dev): bump com.diffplug.spotless:spotless-maven-plugin from 3.7.0 to 3.8.0 by @dependabot[bot] in #1866
  • Further Java Modernization by @kingthorin in #1863
  • build(deps): bump com.googlecode.libphonenumber:libphonenumber from 9.0.33 to 9.0.34 by @dependabot[bot] in #1870
  • docs: upgrade MkDocs Material to 9.7.6 by @kingthorin in #1868
  • Update Javadoc link to latest version by @kingthorin in #1872
  • build: fix maven-enforcer config and enforce plugin versions by @spannm in #1867
  • Replace iban-commons with jbanking by @bodiam in #1873
  • fix(build): use releaseJavaVersion for kotlin-maven-plugin jvmTarget by @asolntsev in #1874
  • mark all APIs nullable/non-nullable by @asolntsev in #1764
  • Typos and tweaks by @asolntsev in #1876
  • Enable spotless index by @snuyanzin in #1860
  • Update all non-major dependencies by @renovate[bot] in #1877
  • build(deps-dev): bump kotlin.version from 2.4.0 to 2.4.10 by @dependabot[bot] in #1878
  • Prepare for upcoming 3.0.0 release by @kingthorin in #1875
  • Add a Collection option by @deluxe in #1880
  • Tweak Formatting in Options by @kingthorin in #1881
  • build(deps): bump com.googlecode.libphonenumber:libphonenumber from 9.0.34 to 9.0.35 by @dependabot[bot] in #1882
  • Refactor Options as Selection by @deluxe in #1885
  • build(deps): bump actions/setup-python from 6 to 7 by @dependabot[bot] in #1886
  • Clean and automate native-image metadata by @bodiam in #1887
  • fix flaky test TimeAndDateTest.testFutureDateWithBounds by @asolntsev in #1890
  • build(deps-dev): bump org.apache.maven.plugins:maven-jar-plugin from 3.5.0 to 3.5.1 by @dependabot[bot] in #1888
  • Add Tokyo Stock Exchange (TSE) stock symbols by @yuokada in #1889
  • Update dependency mkdocs-material to v9.7.7 by @renovate[bot] in #1891
  • build(deps-dev): bump com.diffplug.spotless:spotless-maven-plugin from 3.8.0 to 3.9.0 by @dependabot[bot] in #1892
  • build(deps-dev): bump commons-validator:commons-validator from 1.10.1 to 1.11.0 by @dependabot[bot] in #1895
  • build(deps): bump actions/setup-java from 5 to 5.6.0 by @dependabot[bot] in #1896
  • Update all non-major dependencies by @renovate[bot] in #1897
  • Update all non-major dependencies to v6.1.3 by @renovate[bot] in #1898
  • docs: add related projects page by @kingthorin in #1899
  • Update dependency com.googlecode.libphonenumber:libphonenumber to v9.0.37 by @renovate[bot] in #1900
  • Fix domain/hostname generation to comply with RFC 1123 by @kingthorin in #1901
  • build(deps-dev): bump com.diffplug.spotless:spotless-maven-plugin from 3.9.0 to 3.10.0 by @dependabot[bot] in #1902
  • build(deps): bump actions/setup-java from 5.7.0 to 6.0.0 by @dependabot[bot] in #1903
  • Update all non-major dependencies by @renovate[bot] in #1904
  • build(deps): bump org.apache.maven.plugins:maven-compiler-plugin from 3.15.0 to 3.16.0 by @dependabot[bot] in #1905
  • build(deps-dev): bump org.apache.maven.plugins:maven-surefire-plugin from 3.5.6 to 3.6.0 by @dependabot[bot] in #1908
  • build(deps-dev): bump org.apache.maven.plugins:maven-failsafe-plugin from 3.5.6 to 3.6.0 by @dependabot[bot] in #1907
  • chore(deps): update all non-major dependencies by @renovate[bot] in #1909
  • build(deps-dev): bump kotlin.version from 2.4.10 to 2.4.20 by @dependabot[bot] in #1910
  • Add TemporalUnit overloads to timeAndDate(), deprecate TimeUnit variants by @LouisDeconinck in #1912
  • fix(deps): update all non-major dependencies by @renovate[bot] in #1914
  • build(deps): bump codecov/codecov-action from 7.0.0 to 7.1.0 by @dependabot[bot] in #1915
  • Keep float and byte values numeric in JSON by @jakezwang in #1916
  • feat: add Spanish DNI/NIF generator to ID generator by @SetyVII in #1906
  • #1916 support infinite Doubles in JSON by @asolntsev in #1917
  • build(deps): bump codecov/codecov-action from 7.1.0 to 7.1.1 by @dependabot[bot] in #1918
  • Add Database provider for database and JDBC test data by @ChiragMangukia in #1919
  • build(deps-dev): bump slf4j.version from 2.0.19 to 2.0.20 by @dependabot[bot] in #1920
  • fix(deps): update all non-major dependencies by @renovate[bot] in #1921
  • add new Canadian phone area code 273 by @asolntsev in #1923
  • build(deps-dev): bump org.apache.commons:commons-lang3 from 3.20.0 to 3.21.0 by @dependabot[bot] in #1924
  • chore(deps): update dependency maven to v3.10.0 by @renovate[bot] in #1926
  • Remove deprecated apis by @asolntsev in #1929
  • Update all non-major dependencies by @renovate[bot] in #1930
  • Add Java 27 to CI by @bodiam in #1933
  • build(deps-dev): bump org.sonatype.central:central-publishing-maven-plugin from 0.11.0 to 0.11.1 by @dependabot[bot] in #1935
  • Escape quotes in SQL string values per dialect by @ItsDeadlyProgrammer in #1936
  • Update all non-major dependencies by @renovate[bot] in #1937
  • Honor inclusive upper bounds in RandomService.nextInt by @PHJ2000 in #1942
  • #1941 add some tests for "nextInt" and "nextLong" by @asolntsev in #1943
  • Escape backslashes in SQL string values for MySQL-like dialects by @ItsDeadlyProgrammer in #1939
  • clean up nyse symbols in stock.yml (#1928) by @baaska23 in #1932
  • Follow-up to #1932: restore NYSE class shares, drop ETFs, check whole stock lists by @asolntsev in #1944
  • Update all non-major dependencies by @renovate[bot] in #1945
  • build(deps-dev): bump org.apache.maven.plugins:maven-failsafe-plugin from 3.6.0 to 3.6.1 by @dependabot[bot] in #1946
  • build(deps-dev): bump org.apache.maven.plugins:maven-surefire-plugin from 3.6.0 to 3.6.1 by @dependabot[bot] in #1947
  • build(deps-dev): bump org.jacoco:jacoco-maven-plugin from 0.8.15 to 0.8.16 by @dependabot[bot] in #1950
  • build(deps-dev): bump org.apache.maven.plugins:maven-enforcer-plugin from 3.6.3 to 3.7.0 by @dependabot[bot] in #1951
  • Fix TOML string escaping for control characters by @jump-oss in #1949
  • Remove stray space from Alabama postcode 36877 by @ChandraChaan in #1957
  • Remove trailing spaces from kpop group names by @ChandraChaan in #1958
  • build(deps): bump com.google.errorprone:error_prone_annotations from 2.51.0 to 2.52.0 by @dependabot[bot] in #1960
  • build(deps-dev): bump com.diffplug.spotless:spotless-maven-plugin from 3.10.4 to 3.11.0 by @dependabot[bot] in #1961
  • Fix TOML key and table header escaping by @jump-oss in #1956
  • Update all non-major dependencies by @renovate[bot] in #1963
  • build(deps-dev): bump org.apache.commons:commons-lang3 from 3.21.0 to 3.22.0 by @dependabot[bot] in #1966
  • build(deps-dev): bump org.codehaus.mojo:versions-maven-plugin from 2.24.0 to 2.25.1 by @dependabot[bot] in #1967
  • Update all non-major dependencies by @renovate[bot] in #1970
  • Use Vietnam phone numbers for the vi locale by @tiennm99 in #1979
  • Keep Đ/đ as d in generated email addresses by @tiennm99 in #1980
  • Remove outer whitespace from YAML values and test for it in every file by @kingthorin in #1959
  • Fix typo in Korean city name: 영원 -> 영월 by @estherkim0109 in #1986
  • Transliterate letters that NFD does not decompose in email addresses by @asolntsev in #1987
  • Use Vietnamese 5-digit postal codes for the vi locale by @tiennm99 in #1982
  • Fix Vietnamese address data for the vi locale by @tiennm99 in #1983
  • Update all non-major dependencies by @renovate[bot] in #1988
  • Add Vietnamese data for more providers in the vi locale by @tiennm99 in #1985
  • Use real administrative suffixes for Korean city names by @asolntsev in #1989
  • Fix lookalike letters from another alphabet in be, by, ru and aviation data by @bardrop in #1978
  • Fix TOML null handling and nested value serialization by @jump-oss in #1965
  • build(deps-dev): bump org.tomlj:tomlj from 1.1.1 to 2.2.0 by @dependabot[bot] in #1993
  • Add Chinese color names for zh-CN and zh-TW by @asolntsev in #1991
  • Add Simplified Chinese job data by @wozhenbang2004 in #1992
  • Fix publicIpV4Address returning private and loopback addresses by @Yashpatel2311 in #1994
  • Exclude remaining special-purpose ranges from publicIpV4Address; limit privateIpV4Address to RFC 1918 by @asolntsev in #1996
  • Use current Korean provinces and assigned postcode prefixes by @wonjangcloud9 in #1995
  • Use the requested age and gender in Hungarian and Ukrainian id numbers by @bardrop in #1999
  • Fix batch transformation of Java records by @jindawn in #1953
  • Put the family name first in Vietnamese names by @tiennm99 in #1984
  • fix(#1968): added includeLowercase parameter to text and password by @LKodex in #1969
  • Escape the closing quote in SQL identifiers, table and schema names by @ItsDeadlyProgrammer in #1940
  • Register FakeValuesService expression resolution types in native-image metadata (#1737) by @LouisDeconinck in #1913
  • Restore id-only credential matching so snapshot publishing works on Maven 3.10 by @tomersein in #1998
  • Adjective faker based on existing YML file. Generated by Grok Fast 1. by @bodiam in #1730
  • Speed up Faker generation and fix concurrent cache updates by @bodiam in #2000
  • Speed up default RNG, locale fallback, and bulk generation by @bodiam in #2001
  • Update user guides for Datafaker 3.0 by @bodiam in #2003
  • Add current JVM faker performance comparison by @bodiam in #2004
  • Support percentage-weighted choices in custom YAML providers by @Sinkleberg in #1962
  • Redesign the documentation site for 3.0 and check its code samples by @bodiam in #2005

New Contributors

Full Changelog: 2.7.0...3.0.0