New & Noteworthy
We are happy to announce that we are moving into the beta phase of v8. The v8 version is the last to support NodeJS v14 which reaches EOF tomorrow (2023-04-30) as well as TS 4.x. Future major versions (>= v9) won't support NodeJS v14 anymore and also official support for TS 4.x will be discontinued.
From now on, only small changes will be made; all the big things we wanted in v8 have already been implemented. This means we are now actively asking for your feedback, especially for the migration guide https://next.fakerjs.dev/guide/upgrading.html.
Biggest changes between v7 to v8:
- We removed support for locale switching at runtime. However, it is now possible to craft custom Faker instances with imported locales and chain them as fallbacks.
- You can not import all pre-build Faker instances from
@faker-js/faker
, but there is a known bug #1791 so it is currently still recommended to import them from@faker-js/faker/locale/<locale>
. - Behind the scenes, we are now throwing errors for non existing locale data. If you need to access the raw data for any reasons, you can still access them via
faker.rawDefinitions
, but this is not officially supported and can be changed at anytime.
Please explore https://next.fakerjs.dev for more information.
What's Changed
- chore(deps): update vitest to ~0.29.7 by @renovate in #1981
- chore(deps): update devdependencies by @renovate in #1979
- chore(deps): update pnpm to v7.30.3 by @renovate in #1980
- chore(deps): update doc-dependencies by @renovate in #1982
- feat(locale): add hyphenated names to English locales by @matthewmayer in #1872
- docs: extend Faker class jsdocs by @ST-DDT in #1960
- docs: mark method references in @Deprecation messages by @ST-DDT in #1963
- docs(color): improve rgb examples by @matthewmayer in #1970
- feat(helpers): add fromRegExp method by @wooneusean in #1569
- docs: unwrap nested named union and literal types by @ST-DDT in #1965
- chore(deps): update dependency prettier to v2.8.7 by @renovate in #1954
- feat: add base locale by @Shinigami92 in #1748
- chore(locale): change uk_country to state by @matthewmayer in #1989
- docs(location): improve documentation for state and county by @matthewmayer in #1987
- feat(locale): add fi states by @matthewmayer in #1986
- docs: add overview guides to specific modules by @matthewmayer in #1929
- test: separate jsdoc tag tests by @Shinigami92 in #1969
- fix(image): use seeded picsum by @Shinigami92 in #1968
- feat(locale): add af_ZA and zu_ZA states by @matthewmayer in #1983
- feat(locale): add hu states by @matthewmayer in #1990
- refactor(finance): simplify routingNumber implementation by @ST-DDT in #1993
- test: replace deprecated method call by @ST-DDT in #1999
- test(finance): remove debug code from test by @ST-DDT in #1998
- refactor(helpers): deprecate unique method by @Shinigami92 in #1790
- refactor(locale)!: move title to metadata by @ST-DDT in #1978
- docs: mark deprecated modules by @ST-DDT in #2000
- feat(locale): extend Hebrew locale data by @shai-shimon in #1721
- refactor: restore en_IND by @Shinigami92 in #1873
- chore(deps): update devdependencies by @renovate in #2006
- feat(locale): add locale TH by @munkeawtoast in #1922
- docs(person): fix formatting issues by @ST-DDT in #2005
- fix: typo in Faker jsdocs by @ST-DDT in #2008
- infra: extend preflight by @ST-DDT in #2003
- feat(locale): add en_US location.county data by @matthewmayer in #1996
- docs: Faker and utility pages by @ST-DDT in #1940
- refactor(finance)!: simplify account implementation by @ST-DDT in #1992
- docs: normalize blocks by @Shinigami92 in #2002
- fix(locale): fix broken street address reference in fr_CH by @ST-DDT in #2007
- refactor(locale): rename ge to ka_GE by @matthewmayer in #2010
- chore(deps): update vitest to ~0.29.8 by @renovate in #2015
- chore(deps): update pnpm to v7.30.5 by @renovate in #2017
- chore(deps): update doc-dependencies by @renovate in #2018
- chore(deps): update typescript-eslint to ~5.57.1 by @renovate in #2016
- chore: activate eslint no-else-return by @Shinigami92 in #2009
- docs(helpers): document unique deprecation by @Shinigami92 in #2001
- refactor(locale): rename cz to cs_CZ by @matthewmayer in #2013
- infra: add labels to feature issue template by @xDivisionByZerox in #2028
- refactor(location)!: zip code state by @Shinigami92 in #1874
- refactor(company): remove English locale definitions from company in non-English locales by @matthewmayer in #2027
- docs: document format of locale codes, allFakers and allLocales by @matthewmayer in #2030
- chore(deps): update vitest to ~0.30.1 by @renovate in #2034
- chore(deps): update all non-major dependencies by @renovate in #2035
- chore(deps): update typescript-eslint to ~5.58.0 by @renovate in #2038
- chore(deps): update devdependencies by @renovate in #2036
- chore(business): remove old business data by @matthewmayer in #2033
- chore(deps): update pnpm to v8 by @renovate in #2039
- fix(locales): remove wrong phone number in Portugal by @MarioRodrigues10 in #2029
- chore(deps): update doc-dependencies by @renovate in #2037
- docs: fix docs:dev api search completion navigation by @ST-DDT in #2043
- infra: remove typedoc-plugin-missing-exports dependency by @ST-DDT in #2042
- chore: reword to elements by @Shinigami92 in #2049
- test: rename type to singular by @Shinigami92 in #2052
- docs: document @throws parameter in API docs by @matthewmayer in #2050
- chore: unify todos by @Shinigami92 in #2063
- chore: consistent jsdocs tag formatting by @ST-DDT in #2056
- chore(location): standardize abbreviated parameter by @Shinigami92 in #2061
- docs(image): explain deprecation of category methods by @matthewmayer in #2040
- refactor: rename patterns to pattern by @Shinigami92 in #2059
- chore(deps): update devdependencies (major) by @renovate in #2066
- refactor(location): merge state and stateAbbr by @xDivisionByZerox in #2060
- chore(deps): update devdependencies by @renovate in #2064
- chore(deps): update doc-dependencies by @renovate in #2065
- refactor(date): rename abbr to abbreviated by @Shinigami92 in #2068
- refactor(finance): rename account to accountNumber by @Shinigami92 in #2054
- refactor(finance): rename mask to maskedNumber by @Shinigami92 in #2055
- docs: check api references by @ST-DDT in #2024
- docs: strikethrough deprecated methods on api index by @matthewmayer in #2067
- refactor(location): deprecate streetName by @Shinigami92 in #2071
- refactor(location): deprecate cityName by @xDivisionByZerox in #2070
- refactor(helpers)!: remove default value from arrayElement by @xDivisionByZerox in #2045
- infra: add funding and bugs link by @Shinigami92 in #2076
- refactor(location)!: rename definition street to street_pattern by @Shinigami92 in #2051
- fix: export AircraftType correctly as type by @Shinigami92 in #2077
- feat(locale): add city names for th by @matthewmayer in #2075
- feat(locale): add additional metadata properties by @matthewmayer in #2025
- refactor(datatype): deprecate datetime by @Shinigami92 in #2053
- infra: auto comment on feature requests by @xDivisionByZerox in #2041
- refactor(locale): use null as not applicable by @ST-DDT in #2078
- feat(locale): de color human by @xDivisionByZerox in #1997
- feat: introduce locale proxy by @ST-DDT in #2004
- fix: script error by @ST-DDT in #2085
- chore(deps): update devdependencies by @renovate in #2089
- chore(deps): update all non-major dependencies by @renovate in #2086
- chore(deps): update dependency prettier to v2.8.8 by @renovate in #2087
- chore(deps): update doc-dependencies by @renovate in #2088
- chore(deps): update typescript-eslint to ~5.59.0 by @renovate in #2090
- chore(deps): update dependency eslint-plugin-jsdoc to v43 by @renovate in #2091
- feat(locale): add en_HK locale by @matthewmayer in #2083
- fix: add support for equals on locale proxies by @ST-DDT in #2092
- feat(date): introduce anytime by @ST-DDT in #2096
- chore: eslint report-unused-disable-directives by @Shinigami92 in #2097
- docs: add npm script descriptions to CONTRIBUTING by @xDivisionByZerox in #2095
- refactor(location)!: rename definition city to city_pattern by @xDivisionByZerox in #2094
- chore(helpers): move unique store into faker instance by @Shinigami92 in #2072
- fix(types): locale proxy by @ST-DDT in #2099
- docs: fix full url to absolute conversion by @ST-DDT in #2101
- fix(locale): es cities should be in city_name not city_prefix, remove extraneous city_suffix by @matthewmayer in #2109
- fix(locale): fix en_HK city_pattern by @matthewmayer in #2105
- chore(release): 8.0.0-beta.0 by @Shinigami92 in #2110
New Contributors
- @wooneusean made their first contribution in #1569
- @shai-shimon made their first contribution in #1721
- @munkeawtoast made their first contribution in #1922
- @MarioRodrigues10 made their first contribution in #2029
Full Changelog: v8.0.0-alpha.2...v8.0.0-beta.0