Releases: faker-js/faker
v8.3.0
Known Issue
⚠ WARNING: This version has compiler issues due to missing internal types.
What's Changed
- chore(deps): update typescript-eslint to ~6.7.5 by @renovate in #2481
- chore(deps): update devdependencies by @renovate in #2480
- chore(deps): update dependency @actions/github to v6 by @renovate in #2482
- infra(unicorn): prefer-spread by @Shinigami92 in #2421
- infra(typescript-eslint): prefer-regexp-exec by @ST-DDT in #2466
- infra(unicorn): no-instanceof-array by @ST-DDT in #2459
- infra(unicorn): escape-case by @ST-DDT in #2469
- infra: implement inactive locales content generation enhancement by @xDivisionByZerox in #2265
- docs: fix deprecated text for internet.password by @rcbyr in #2486
- infra(unicorn): prefer-number-properties by @ST-DDT in #2452
- infra(unicorn): no-zero-fractions by @ST-DDT in #2453
- infra(unicorn): prefer-optional-catch-binding by @ST-DDT in #2491
- chore(deps): update typescript-eslint to ~6.8.0 by @renovate in #2500
- chore: substrings of length one by @ST-DDT in #2496
- refactor(finance): simplify litecoin address implementation by @ST-DDT in #2495
- chore(deps): update devdependencies by @renovate in #2499
- infra(unicorn): prefer-native-coercion-functions by @ST-DDT in #2445
- chore(deps): update actions/checkout digest to 1e31de5 by @renovate in #2498
- docs: fix typo in usage.md by @lacymorrow in #2502
- infra(unicorn): no-for-loop by @ST-DDT in #2490
- infra(eslint): config cleanup by @ST-DDT in #2468
- infra(unicorn): prefer-array-some by @ST-DDT in #2451
- infra(unicorn): prefer-ternary by @ST-DDT in #2464
- infra(unicorn): filename-case by @ST-DDT in #2492
- refactor(finance): simplify maskedNumber implementation by @ST-DDT in #2493
- infra(unicorn): prefer-top-level-await by @ST-DDT in #2511
- chore(deps): update actions/setup-node action to v4 by @renovate in #2515
- chore(deps): update typescript-eslint to ~6.9.0 by @renovate in #2514
- chore(deps): update dependency eslint-plugin-unicorn to v49 by @renovate in #2516
- docs(phone): improve deprecation and see message by @ST-DDT in #2517
- docs: how to use with Playwright by @jfgreffier in #2489
- refactor(person): remove duplicate title definitions by @matthewmayer in #2523
- infra(typescript-eslint): strict-type-checked by @ST-DDT in #2467
- refactor: simplify module creation by @ST-DDT in #2485
- infra(unicorn): prefer-negative-index by @ST-DDT in #2512
- chore(deps): update devdependencies by @renovate in #2501
- chore(deps): update typescript-eslint to ~6.9.1 by @renovate in #2529
- refactor(locale): remove fr_CH data which is identical to fr by @matthewmayer in #2526
- infra(unicorn): no-negated-condition by @ST-DDT in #2507
- infra(unicorn): no-array-reduce by @ST-DDT in #2479
- fix(finance): maskedNumber has incorrect defaults by @ST-DDT in #2494
- fix(locale): improve Swedish phone numbers format by @Gyran in #2520
- feat(person): use fake patterns for jobTitle by @matthewmayer in #2528
- feat(locale): add Senegal locale by @makhtar-sarr in #2525
- refactor(string): remove arbitrary limit from sample by @ST-DDT in #2497
- infra(typescript-eslint): switch-exhaustiveness-check by @ST-DDT in #2519
- feat(locale): and location to fr_SN by @makhtar-sarr in #2533
- docs: restructure apidocs page tree by @LARVAIDE in #2530
- feat(locale): add person to fr_SN by @makhtar-sarr in #2537
- fix(date): ensures correct range for birthdate by @mumumilk in #2535
- test(docs): ensure defaults are consistent by @ST-DDT in #2177
- chore(deps): update devdependencies by @renovate in #2538
- chore(deps): update typescript-eslint to ~6.10.0 by @renovate in #2539
- chore(deps): update dependency prettier to v3.1.0 by @renovate in #2541
- feat(locale): Add Street to location fr_SN by @makhtar-sarr in #2536
- infra: enable strictNullChecks in tsconfig by @ST-DDT in #2435
- infra(unicorn): prefer-module by @ST-DDT in #2510
New Contributors
- @rcbyr made their first contribution in #2486
- @lacymorrow made their first contribution in #2502
- @jfgreffier made their first contribution in #2489
- @Gyran made their first contribution in #2520
- @makhtar-sarr made their first contribution in #2525
- @LARVAIDE made their first contribution in #2530
- @mumumilk made their first contribution in #2535
Full Changelog: v8.2.0...v8.3.0
v8.2.0
What's Changed
- ci: check mergable by label by @Shinigami92 in #2405
- fix(locale): Dutch phone number by @RobinvanderVliet in #2400
- test: add more module jsdoc tests by @ST-DDT in #2412
- infra: replace deprecated eslint config import by @ST-DDT in #2411
- feat(locale): add unionpay module for zh_CN by @CoolPlayLin in #2338
- infra: lint all existing jsdocs by @ST-DDT in #2408
- chore(deps): update typescript-eslint to ~6.7.2 by @renovate in #2423
- chore(deps): update vitest to ~0.34.5 by @renovate in #2424
- chore(deps): update devdependencies by @renovate in #2422
- fix(docs): revert filter code that breaks search in docs by @matthewmayer in #2425
- chore(finance): update mastercard patterns and test by @matthewmayer in #2396
- feat(locale): add airline database science commerce and vehicle for zh_CN by @CoolPlayLin in #2395
- chore(deps): update devdependencies by @renovate in #2430
- chore(deps): update typescript-eslint to ~6.7.3 by @renovate in #2428
- chore(deps): update vitest by @renovate in #2429
- feat: support custom randomizer by @ST-DDT in #2284
- feat(locale): add street_name to
en_US
,en_GB
anden
by @xDivisionByZerox in #2371 - chore: randomizer cleanup by @ST-DDT in #2431
- infra(deps): add eslint unicorn by @Shinigami92 in #2418
- chore(deps-dev): bump postcss from 8.4.30 to 8.4.31 by @dependabot in #2437
- infra(unicorn): prefer-node-protocol by @Shinigami92 in #2420
- infra(unicorn): prefer-date-now by @Shinigami92 in #2419
- docs: fix outdated comment regarding multiple faker locales by @ST-DDT in #2433
- infra: enable no-useless-escape eslint rule by @ST-DDT in #2434
- chore: fix iban test typos by @ST-DDT in #2438
- infra(unicorn): no-console-spaces by @ST-DDT in #2447
- infra(unicorn): prefer-array-flat-map by @ST-DDT in #2446
- infra(unicorn): prefer-object-from-entries by @ST-DDT in #2443
- infra(unicorn): prefer-string-starts-ends-with by @ST-DDT in #2442
- infra(unicorn): no-new-array by @ST-DDT in #2441
- docs: improve wording regarding locale selection by @ST-DDT in #2436
- chore(deps): update typescript-eslint to ~6.7.4 by @renovate in #2450
- chore(deps): update devdependencies by @renovate in #2449
- infra(unicorn): no-hex-escape by @ST-DDT in #2440
- infra(unicorn): use hashbang for scripts by @ST-DDT in #2448
- infra(unicorn): no-array-push-push by @ST-DDT in #2454
- infra(unicorn): explicit-length-check by @ST-DDT in #2455
- infra(unicorn): no-array-for-each by @ST-DDT in #2461
- infra(unicorn): prefer-includes by @ST-DDT in #2463
- infra(unicorn): consistent-destructuring by @ST-DDT in #2462
- infra(unicorn): text-encoding-identifier-case by @ST-DDT in #2465
- docs: fix bad Promise usage by @ST-DDT in #2475
- infra(unicorn): catch-error-name by @ST-DDT in #2471
- docs(number): improve documentation regarding number bounds by @ST-DDT in #2474
- chore(release): 8.2.0 by @xDivisionByZerox in #2478
New Contributors
- @dependabot made their first contribution in #2437
Full Changelog: v8.1.0...v8.2.0
v8.1.0
What's Changed
- chore(deps): update dependency c8 to ~7.14.0 by @renovate in #2183
- chore(deps): update dependency eslint-plugin-jsdoc to v45 by @renovate in #2185
- chore: fix jsdoc lint error by @ST-DDT in #2182
- fix(locale): remove continent from ja countries by @KeisukeYamashita in #2194
- fix(locale): remove duplicated countries in
ja
locale by @KeisukeYamashita in #2189 - fix(locale): limited ja first names without passing sex by @KeisukeYamashita in #2190
- chore(deps): update dependency eslint to ~8.42.0 by @renovate in #2201
- chore(deps): update typescript-eslint to ~5.59.8 by @renovate in #2199
- chore(deps): update dependency @types/prettier to ~2.7.3 by @renovate in #2197
- chore(deps): update vitest to ~0.31.4 by @renovate in #2200
- chore(deps): update dependency eslint-plugin-jsdoc to v46 by @renovate in #2202
- chore(deps): update doc-dependencies by @renovate in #2198
- docs: replace deprecated datatype.uuid() with string.uuid() by @saranatour1 in #2214
- feat(locale): added word and music to Farsi by @atenadadkhah in #2210
- feat(locale): add company name to zh_CN by @ZACHSTRIVES in #2203
- feat(location): add ne postcodes by @matthewmayer in #2148
- feat(locale): add direction to ja by @KeisukeYamashita in #2191
- feat(color): migrate hu human colors by @matthewmayer in #2157
- feat(metadata): add method to access metadata by @matthewmayer in #2143
- feat(location): fi addresses by @matthewmayer in #2146
- chore(deps): update typescript-eslint to ~5.59.11 by @renovate in #2217
- chore(deps): update devdependencies (major) by @renovate in #2220
- chore(deps): update devdependencies by @renovate in #2218
- chore(deps): update vitest to ~0.32.2 by @renovate in #2219
- refactor(locale): cs_CZ state_abbr not applicable by @xDivisionByZerox in #2140
- feat(location): add en_IE postcodes by @matthewmayer in #2149
- feat(location): es province should be county as its a 2nd level administrative area by @matthewmayer in #2156
- feat(locale): support color and date for zh_CN by @Flower-F in #2223
- chore(deps): update devdependencies by @renovate in #2224
- chore(deps): update typescript-eslint to ~5.60.0 by @renovate in #2225
- feat(locale): add database for German (de) by @inkedtree in #2226
- chore(deps): update doc-dependencies by @renovate in #2216
- chore(deps): update typescript-eslint to ~5.60.1 by @renovate in #2236
- chore(deps): update devdependencies by @renovate in #2235
- refactor(phone): deprecate
format
argument forphone.number
by @xDivisionByZerox in #2229 - docs: fix typo by @shairez in #2241
- docs: fix jsdocs typos by @RobinvanderVliet in #2244
- feat(locale): add Dutch province abbreviations by @RobinvanderVliet in #2232
- feat(locale): add GB subdivision codes by @RobinvanderVliet in #2233
- chore(deps): update typescript-eslint to ~5.61.0 by @renovate in #2247
- chore(deps): update vitest to ~0.33.0 by @renovate in #2248
- chore(deps): update devdependencies by @renovate in #2246
- chore(deps): update dependency vitepress to v1.0.0-beta.5 by @renovate in #2245
- chore: pin workflows dependencies by @step-security-bot in #2208
- feat(locale): update Dutch locale (nl) by @RobinvanderVliet in #2237
- feat(locale): add states for Turkey (tr) by @import-brain in #2231
- refactor(git): don't use Intl by @matthewmayer in #2222
- infra: reduce tsconfig complexity by @Shinigami92 in #2102
- infra: ignore .pnpm-store by @Shinigami92 in #2253
- chore(deps): update dependency @types/react to ~18.2.15 by @renovate in #2255
- chore(deps): update typescript-eslint to ~5.62.0 - autoclosed by @renovate in #2257
- refactor(lorem): merge supplemental into words by @matthewmayer in #2242
- chore: enable strictBindCallApply by @Shinigami92 in #2254
- chore: remove legacy locale folder by @Shinigami92 in #2263
- docs: fix typo in CONTRIBUTING.md by @inkedtree in #2264
- chore: ignore lint warning by @ST-DDT in #2266
- fix(location): avoid hyphenated surnames in city patterns by @matthewmayer in #2119
- fix(location): Czech postcode format by @ihmpavel in #2268
- chore(deps): update typescript-eslint to v6 (major) by @renovate in #2259
- feat(locale): add states to vi locale and fix city name by @asharnadeem in #2128
- chore(deps): update doc-dependencies by @renovate in #2274
- fix(helpers): prevent uniqueArray from hanging by @matthewmayer in #2239
- feat(location): add states for mk by @matthewmayer in #2271
- feat(location): add states for pt_PT by @matthewmayer in #2269
- fix(test): fix imports for jsdocs example verification by @ST-DDT in #2281
- chore(deps): update typescript-eslint to ~6.2.0 by @renovate in #2283
- chore(deps): update doc-dependencies by @renovate in #2282
- test: move files to modules by @Shinigami92 in #2279
- fix(test): typedoc signature test issues by @ST-DDT in #2280
- feat(lorem): seed AR lorem by @ahmedrowaihi in #2147
- feat(location): add states for sr_RS_latin by @matthewmayer in #2270
- docs: edit import-brain's team page listing by @import-brain in #2291
- docs: update role for xDivisionByZerox by @xDivisionByZerox in #2292
- chore(deps): update dependency prettier to v3 by @Shinigami92 in #2260
- chore(deps): update devdependencies by @renovate in #2256
- chore(deps): update dependency eslint-config-prettier to v9 by @renovate in #2258
- chore(deps): update vitest to ~0.34.1 by @renovate in #2294
- chore(deps): update typescript-eslint to ~6.2.1 by @renovate in #2297
- chore(deps): update dependency prettier to v3.0.1 by @renovate in #2296
- chore(deps): update dependency @types/react to ~18.2.18 by @renovate in #2295
- fix(locale): invalid date definitions by @xDivisionByZerox in #2293
- chore: remove unused dependencies by @ST-DDT in #2298
- docs(number): remove wrong default value for float precision by @mshima in #2299
- fix(location): Pad en_US ZIP codes left to 5 characters if needed by @matthewmayer in #2278
- chore(deps): update typescript-eslint to ~6.4.0 by @renovate in #2312
- chore(deps): update dependency @types/markdown-it to v13 by @renovate in #2313
- chore(deps): update devdependencies by @renovate in #2311
- test(image): add seeded tests for dataUri by @ST-DDT in #2317
- fix: remove unrelated entries from de_CH country codes by @import-brain in #2304
- feat(locale): add minimal da locale, start with location by @stonor in #2324
- feat(locale): Fully Improve zh_TW by @CoolPlayLin in #2320
- chore(deps): update vitest to ~0.34.2 by @renovate in https:...
v8.0.2
What's Changed
- test: vitest prefer-each by @Shinigami92 in #2144
- chore(deps): update vitest to ~0.31.1 by @renovate in #2169
- chore(deps): update codecov/codecov-action action to v3.1.4 by @renovate in #2166
- fix(locale): en_HK last_name_patterns should be last_name_pattern by @matthewmayer in #2154
- chore(deps): update typescript-eslint to ~5.59.7 by @renovate in #2168
- chore(deps): update devdependencies by @renovate in #2170
- docs(number): update default max value by @dephiros in #2176
- chore(deps): update doc-dependencies by @renovate in #2167
- fix(locale): ro_MD city should be city_pattern by @matthewmayer in #2155
- docs(image): add content warnings to image function jsdocs by @import-brain in #2159
- fix(git): limit need for Intl to specific method by @matthewmayer in #2172
- chore(release): 8.0.2 by @Shinigami92 in #2180
New Contributors
Full Changelog: v8.0.1...v8.0.2
v8.0.1
This release only offers a cleanup of the docs and the README.md for npm
- JSDoc in VSCode now points to https://fakerjs.dev/
- Version table in README.md was updated
What's Changed
- docs: Document what should appear in migration guide by @matthewmayer in #2138
- docs: switch doc links to stable by @Shinigami92 in #2152
- chore(deps): update pnpm to v8.5.1 by @renovate in #2160
- chore(deps): update devdependencies by @renovate in #2161
- chore(deps): update dependency glob to v10 by @renovate in #2162
- chore(deps): update devdependencies by @renovate in #2163
- chore(release): 8.0.1 by @Shinigami92 in #2164
Full Changelog: v8.0.0...v8.0.1
v8.0.0
New & Noteworthy
We are happy to announce that the stable release of v8. The v8 version will be the last version that supports NodeJS v14 which reached EOL on (2023-04-30).
Future we won't also support TS 4.x in further major versions anymore (>= v9).
For a complete migration guide from v7 to v8 please checkout fakerjs.dev/guide/upgrading.
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. - Image providers are deprecated, please use the image module directly.
https://fakerjs.dev is now also fully updated. Please feel free to explore it.
What's Changed
- infra: relink main to next by @Shinigami92 in #1435
- chore(deps): update pnpm/action-setup action to v2.2.3 by @renovate in #1433
- refactor!: cleanup deprecations by @Shinigami92 in #1440
- feat(internet)!: ip now returns ipv4 and ipv6 by @xDivisionByZerox in #1059
- feat(location)!:
nearbyGPSCoordinate
returns number tuple by @xDivisionByZerox in #1061 - docs: fix CONTRIBUTING.md JSDoc do/dont by @domingo2000 in #1450
- refactor(company)!: remove hardcoded name fallback pattern by @Minozzzi in #1451
- refactor(locale)!: change en_IND to en_IN by @wael-fadlallah in #1448
- refactor!: make mersenne internal by @Shinigami92 in #1444
- docs: remove obsolete check by @ST-DDT in #1452
- test: fix fake test expectation by @ST-DDT in #1458
- refactor(person)!: rename name module by @Shinigami92 in #1445
- feat(location)!:
latitude
/longitude
returns number by @xDivisionByZerox in #1064 - chore(deps): update action-semantic-pull-request action to v5 by @renovate in #1434
- chore(deps): update dependency vitepress to v1.0.0-alpha.21 by @renovate in #1461
- chore(deps): update devdependencies by @renovate in #1462
- chore(deps): update vitest to ~0.24.3 by @renovate in #1463
- chore(deps): update all non-major dependencies by @renovate in #1460
- feat(string): move methods to new module by @xDivisionByZerox in #1155
- docs(string): update function jsdocs by @import-brain in #1473
- refactor(location)!: rename address module by @Shinigami92 in #1469
- docs: link to next docs and vice versa by @ST-DDT in #1438
- docs: fix version test by @ST-DDT in #1478
- feat: fake with multiple parameters by @ST-DDT in #1459
- chore(deps): update pnpm to v7.14.0 by @renovate in #1484
- chore(deps): update typescript-eslint to ~5.40.1 by @renovate in #1483
- chore(deps): update devdependencies by @renovate in #1481
- chore(deps): update doc-dependencies by @renovate in #1482
- docs: fix typo in usage section by @tlouth19 in #1485
- feat(internet): add options to url() by @import-brain in #1480
- docs: add version banner by @brc-dd in #1487
- chore(deps): update devdependencies by @renovate in #1495
- chore(deps): update doc-dependencies by @renovate in #1493
- feat(locale): update Korean color, date, location, word, company by @thilllon in #1492
- docs: fix snippets of codes in usage guide by @tarikjabiri in #1496
- refactor(mersenne): rewrite internal mersenne by @Shinigami92 in #1447
- refactor!: upgrade node minimum target by @Shinigami92 in #1494
- chore(deps): update devdependencies by @renovate in #1501
- chore(deps): update pnpm to v7.14.1 by @renovate in #1502
- chore(deps): update typescript-eslint to ~5.41.0 by @renovate in #1503
- docs: fix findname in usage docs by @matthewmayer in #1504
- feat(datatype): introduce probability option to boolean by @ST-DDT in #1476
- infra: use pnpm native in netlify configuration by @brc-dd in #1509
- docs: remove duplicate description tags by @brc-dd in #1510
- feat(locale): add dv locale by @subbe in #1506
- docs: update since tags for person and location by @matthewmayer in #1516
- feat(git): add options.refDate to commitEntry by @KevinMind in #1512
- chore(deps): update pnpm to v7.14.2 by @renovate in #1529
- chore(deps): update vitest to ~0.24.5 by @renovate in #1530
- chore(deps): update typescript-eslint to ~5.42.0 by @renovate in #1531
- chore(deps): update doc-dependencies by @renovate in #1528
- chore(deps): update devdependencies by @renovate in #1527
- feat(person): add
zodiacSign()
by @luciferreeves in #182 - refactor(helpers)!: rewrite shuffle by @Shinigami92 in #1521
- chore(deps): update vitest to ~0.25.1 by @renovate in #1544
- fix(git): adjust commitEntry to match
git log
output by @ST-DDT in #1539 - chore: use boolean probability instead of magic numbers by @ST-DDT in #1540
- chore: remove broken source urls found in some locales by @subbe in #1511
- fix(date): don't allow parameters <= 0 by @Shinigami92 in #1536
- test: use test snapshots for scripts/apidoc/signature.spec.ts by @ST-DDT in #1488
- feat(word): add sample method by @pkuczynski in #714
- docs(helpers): extend module jsdocs by @ST-DDT in #1515
- infra: update website redirects (next) by @ST-DDT in #1523
- chore(deps): update doc-dependencies by @renovate in #1558
- chore(deps): update dependency cypress to v11 by @renovate in #1562
- chore(deps): update typescript-eslint to ~5.42.1 by @renovate in #1559
- chore(deps): update pnpm to v7.15.0 by @renovate in #1561
- chore(deps): update devdependencies by @renovate in #1560
- refactor(string): rename params by @import-brain in #1551
- fix(locale): mk (Macedonian) names should use cyrillic а by @matthewmayer in #1557
- fix: correct the logic of first_name in en_GH locale by @wael-fadlallah in #1566
- test: use runner on different timezone by @Shinigami92 in #1537
- feat(locale): add free email domains for zh_CN by @matthewmayer in #1555
- chore(deps): update dependency typescript to ~4.9.3 by @renovate in #1581
- chore(deps): update pnpm to v7.17.0 by @renovate in #1583
- chore(deps): update vitest to ~0.25.2 by @renovate in #1580
- chore(deps): update dependency vitepress to v1.0.0-alpha.29 by @renovate in #1579
- chore(deps): update devdependencies by @renovate in #1582
- chore(deps): update typescript-eslint to ~5.43.0 by @renovate in #1584
- docs: add upgrading guide for v8 by @matthewmayer in #1517
- feat(helpers): add rangeToNumber method and add range parameters by @ST-DDT in #1486
- chore: fix company definition jsdocs by @ST-DDT in https://github.com/fa...
v8.0.0-beta.1
What's Changed
- refactor(locale): add city_name to city_patterns by @xDivisionByZerox in #2104
- refactor(types): rename locale definition types to singular by @ST-DDT in #2058
- chore(deps): update devdependencies by @renovate in #2113
- chore(deps): update doc-dependencies by @renovate in #2115
- chore(deps): update typescript-eslint to ~5.59.1 by @renovate in #2114
- fix(location): no leading zero on building number or secondary address by @matthewmayer in #2032
- chore: improve regex usage by @Shinigami92 in #2108
- fix(locale): rename city_prefix to city_name for en_NG, en_ZA, en_AU_ocker by @matthewmayer in #2111
- feat(locale): add ro_MD locale by @matthewmayer in #2084
- fix(test): fix failing latitude test by @matthewmayer in #2116
- fix(locale): remove incorrect and unused city_prefix/suffix for sk by @matthewmayer in #2117
- fix(locale): el county should be city_name by @matthewmayer in #2106
- test: prepare test sources for strict mode by @Shinigami92 in #2107
- feat(helpers): new method
objectEntry
by @suyashgulati in #2123 - fix(locale): remove unrealistic fictional city patterns in ne, ro, tr by @matthewmayer in #2120
- infra: use managed pnpm by @Shinigami92 in #2124
- chore: rename generics by @Shinigami92 in #2046
- docs(location): mention real cities by @xDivisionByZerox in #2118
- chore(release): 8.0.0-beta.1 by @Shinigami92 in #2129
New Contributors
- @suyashgulati made their first contribution in #2123
Full Changelog: v8.0.0-beta.0...v8.0.0-beta.1
v8.0.0-beta.0
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 str...
v8.0.0-alpha.2
What's Changed
- chore(deps): update typescript-eslint to ~5.56.0 by @renovate in #1952
- docs: keyboard only search navigation by @ST-DDT in #1932
- test(helpers): mustache special cases by @Shinigami92 in #1875
- feat(locale): add Serbian (Latin) language by @bdimitrovski in #1801
- fix(locale): split zh_TW first_names by gender by @matthewmayer in #1941
- chore(random): deprecate random module by @ST-DDT in #1939
- docs: fix function reference typo in readme by @okcoker in #1956
- test(number): replace RegExp with validation functions by @xDivisionByZerox in #1857
- docs(color): fix color rgb docs by @Shinigami92 in #1958
- docs(internet): password doesn't create crypto-secure PWs by @deltamualpha in #1961
- fix: revert types field by @Shinigami92 in #1966
- docs: mark deprecated parameter options by @ST-DDT in #1962
- chore(release): 8.0.0-alpha.2 by @Shinigami92 in #1971
New Contributors
- @bdimitrovski made their first contribution in #1801
- @okcoker made their first contribution in #1956
- @deltamualpha made their first contribution in #1961
Full Changelog: v8.0.0-alpha.1...v8.0.0-alpha.2
v8.0.0-alpha.1
What's Changed
- feat(helpers): allow empty string in fake by @ST-DDT in #1679
- infra: remove git commit hooks by @Shinigami92 in #1684
- test(helpers): fake should not trim whitespace by @ST-DDT in #1680
- chore(deps): update vitest to ~0.26.2 by @renovate in #1688
- chore(deps): update devdependencies by @renovate in #1689
- chore(deps): update pnpm to v7.20.0 by @renovate in #1690
- chore(deps): update dependency @types/prettier to ~2.7.2 by @renovate in #1687
- docs(datatype): allow markdown in @see links by @matthewmayer in #1667
- docs: update gitignore by @ST-DDT in #1697
- docs: fix param check by @ST-DDT in #1694
- chore: turn on padding-line-between-statements by @Shinigami92 in #1691
- chore(locale): split de_CH first names into male and female by @matthewmayer in #1692
- feat(person): add short bio by @matthewmayer in #1696
- chore: update license years to 2023 by @Shinigami92 in #1706
- feat(helpers): add new faker.helpers.weightedArrayElement by @matthewmayer in #1654
- refactor(location): nearbyGPSCoordinate options by @Shinigami92 in #1682
- feat(locale): extend english company by @Busyvar in #1701
- chore(locale): split es_MX names into female/male by @matthewmayer in #1704
- chore(locale): split ne first_names to female and male by @matthewmayer in #1705
- feat(number): add binary and octal random number generation by @pladreyt in #1708
- feat(string): add binary and octal random string generation by @pladreyt in #1710
- docs: show hint regarding displayed readme version by @ST-DDT in #1698
- chore(test): skip console messages containing 'deprecated' by @matthewmayer in #1709
- feat(locale): add Luxembourg (French) locale by @DavidMoraisFerreira in #1693
- docs: fix simple typo by @lpmi-13 in #1712
- infra: set lint warnings to error by @ST-DDT in #1714
- feat(person): split prefix into gendered versions by @matthewmayer in #1665
- feat(string): nanoid by @xDivisionByZerox in #1716
- refactor(company): deprecate suffix methods by @ST-DDT in #1719
- test: repair all functional test by @ST-DDT in #1718
- chore(deps): update vitest to ~0.27.0 by @renovate in #1722
- chore(deps): update pnpm to v7.24.2 by @renovate in #1723
- chore(deps): update devdependencies by @renovate in #1725
- chore: remove debug code by @ST-DDT in #1724
- chore(deps): update typescript-eslint to ~5.48.1 by @renovate in #1727
- chore(deps): update doc-dependencies by @renovate in #1728
- docs: use native mastodon icon by @Shinigami92 in #1729
- feat(string): generate string from characters by @ST-DDT in #1717
- feat(locales): add mergeLocales utility by @ST-DDT in #1707
- chore(deps): update pnpm to v7.25.0 by @renovate in #1743
- chore(deps): update vitest to ~0.27.1 by @renovate in #1741
- chore(deps): update dependency vitepress to v1.0.0-alpha.36 by @renovate in #1740
- chore(deps): update dependency prettier to v2.8.3 by @renovate in #1726
- chore(deps): update dependency rimraf to v4 by @renovate in #1744
- chore(deps): update devdependencies by @renovate in #1742
- infra: setup dev-container by @ST-DDT in #1652
- build: escape locale import names if they match the module name by @matthewpetro in #1737
- docs: jsdoc for options by @Shinigami92 in #1644
- fix(locale): filter inappropriate words in the en locale by @matthewmayer in #1745
- fix(internet): fix invalid emails in some locales by @matthewmayer in #1746
- feat(company): add realistic Hungarian company names by @BenceSzalai in #1758
- infra: apply shorter CI timeouts and retry e2e once by @ST-DDT in #1756
- infra: changelog generation by @xDivisionByZerox in #1304
- docs: unwrap complex array params by @ST-DDT in #1753
- chore: export mergeLocales utility by @ST-DDT in #1751
- chore(deps): update vitest to ~0.27.3 by @renovate in #1762
- refactor(git): commitDate explicitly set default for refDate by @xDivisionByZerox in #1750
- test: use basic reporter by @Shinigami92 in #1763
- chore(deps): update pnpm to v7.25.1 by @renovate in #1768
- chore(deps): update typescript-eslint to ~5.48.2 by @renovate in #1769
- chore(deps): update doc-dependencies by @renovate in #1767
- refactor: reorganize apidoc scripts and reuse them for tests by @ST-DDT in #1759
- chore(deps): update devdependencies by @renovate in #1766
- docs(internet): document emoji type values by @matthewmayer in #1732
- feat(date): introduce faker.defaultRefDate and setDefaultRefDate by @ST-DDT in #1757
- fix(helpers): uniform distribution in helpers.arrayElements by @ST-DDT in #1770
- chore: remove disturbing image from README by @ST-DDT in #1782
- feat(helpers): add length range support in
arrayElements
by @import-brain in #1772 - docs: fix unwrap literal union by @ST-DDT in #1752
- chore: fix missing defaultRefDate calls by @ST-DDT in #1781
- docs: big api button by @ST-DDT in #1773
- test(helpers): widen arrayElements distribution by @Shinigami92 in #1786
- refactor(locale)!: remove unused separator entry by @ST-DDT in #1731
- refactor(docs): split generate:api-docs execution from import by @ST-DDT in #1779
- refactor(internet): remove weigths in userAgent by @xDivisionByZerox in #1761
- refactor(string): rename
special
tosymbol
by @xDivisionByZerox in #1789 - test(system): add valid 0 for cron by @Shinigami92 in #1787
- refactor(system): replace mime db with common dataset by @xDivisionByZerox in #1788
- chore(deps): update pnpm to v7.26.2 by @renovate in #1797
- chore(deps): update typescript-eslint to ~5.49.0 by @renovate in #1798
- feat(number)!: default to high precision float by @matthewmayer in #1675
- test: use cypress container by @Shinigami92 in #1792
- docs: fix see also for non faker.x references by @ST-DDT in #1794
- feat(airline): add airline module by @matthewpetro in #1699
- chore(deps): update vitest to ~0.28.3 by @renovate in #1799
- chore(deps): update devdependencies by @renovate in #1796
- chore(deps): update dependency vitepress to v1.0.0-alpha.43 by @renovate in #1795
- infra: configure lint rule array-type by @Shinigami92 in #1793
- test: run tests shuffled by @Shinigami92 in #1645
- infra(docs): add docs diff script by @ST-DDT in #1755
- fix(person): change fullName to use name patterns by @matthewmayer in #1637
- test: configure chai truncated threshold by @Shinigami92 in #1807
- docs: show source link by @ST-DDT in #1780
- fix(locale): replace Ð with Đ in hr and vi by @matthewmayer in https://git...