npm / @faker-js/faker
@faker-js/faker
What changed in @faker-js/faker 7 to 10, from its official release notes, upgrade guides and advisories. Sources checked 2026-11-30.
66 breaking1 security10 deprecations100 new APIs and options31 behavior and defaults36 fixes and other
See which of these apply to your code, ranked, in your agent:
npx @unstale/cli init@faker-js/faker 10109 changes
Breaking changes 15
Stops scaling the HSLA alpha into a percentage.
Rejects refDates that a ULID timestamp cannot encode.
Invalid credit card issuer patterns are removed.
Faker v10 is an ESM-only package; CommonJS projects can still use it through Node.js's ESM Modules require feature in sufficiently recent Node versions.
Deprecated address methods have been removed; use the corresponding faker.location methods instead.
This method has been removed; the notes point to issue #3201 for details.
This method has been removed; use faker.image.avatar instead.
This method has been removed; use faker.image.dataUri instead.
This method has been removed; use faker.color.rgb instead.
This method has been removed; use faker.internet.username instead.
Deprecated name methods have been removed; use the corresponding faker.person methods instead.
Word methods now default to the fail resolution strategy and throw when no words match the input criteria; use any-length to restore the previous fallback behavior.
Node.js v18 is no longer supported; Faker v10 requires Node.js v20.19.0, v22.13.0, or v24.0.0.
For CommonJS codebases, supported module resolution values are now Bundler, Node20, and NodeNext; Node20 requires TypeScript 5.9.0 or newer.
The v9 deprecations are removed.
Security 1
Faker: helpers.fake exploitable into arbritary code execution
New APIs and options 43
Adds vehicle data for the de locale.
Adds 060 Japanese mobile phone number formats.
Adds Norwegian animal data for the nb_NO locale.
Adds Norwegian food data for the nb_NO locale.
Changes ne to Devangari and adds en_NP.
Introduces the NumberRange type.
Adds Welsh locale data for sex, direction, animals, vehicle fuel, book format, counties, postal addresses and postcodes, internet domain suffixes, phone numbers, continents, city names, street names, states, and building numbers.
Adds color data for the cy locale.
Can now accept a year range when generating a future date.
Can now accept a year range when generating a past date.
Can now accept a date range when generating a recent date.
Can now accept a date range when generating a soon date.
Adds postal_address data and improves secondary_address data.
Adds Farsi airline locale data.
Exposes core.locale as a LocaleProxy.
Introduces FakerCore as a core Faker API.
Adds the sl_SI locale with location module data.
Adds the mn_MN_cyrl Mongolian locale.
Adds postal address generation.
Adds distributor functions to the number module.
Adds a mobile style for generated phone numbers.
Adds the first standalone module functions.
Adds a Norwegian country definition for the nb_NO locale.
UUID v7 is now supported.
Japanese color definitions are added.
A Japanese dog definition is added.
A Japanese food module is added.
Japanese internet definitions are added.
Japanese job definitions are added for the person module.
Japanese suffix definitions are added for the person module.
Norwegian continent definitions are added.
A Norwegian direction definition is added.
Norwegian sex definitions are added.
A Norwegian vehicle definition is added.
Norwegian zodiac sign definitions are added.
Adds a location module for the bn_BD locale.
Adds states (regions) to the Danish locale.
Adds Hungarian city names, full street addresses, continents, countries, and directions.
Adds Indonesian translations for animal, color, commerce, and word data, and adds country data to location.
Adds person module data to the ku_ckb locale.
Adds the ku_kmr_latin locale.
Adds the sl_SI locale and its person module data.
Adds support for UPC.
Behavior and default changes 20
Organizes first names by gender in the en locale.
Improves middle names organized by gender for the en locale.
Adds mobile phone number styles for more locales.
Adds more realistic Greek address data.
Improves en_GB postcode data.
Improves en_IE postal address data.
Expands plant-based dish and pattern variety.
Extends Turkish person last names.
Adds Japanese cat breed definitions.
Adds Japanese horse breed definitions.
Adds plant-based dish variety.
sexType can now return 'generic'.
Allows product name patterns to vary by locale.
Uses accents in English country names.
Adds support for Iranian IBANs.
Removes some negative words from the Hungarian locale.
Removes offensive and inappropriate words from the Japanese locale.
Adds counties and states to nb_NO location data.
Moves raspberry from the vegetable category to the fruit category.
The list of colors in Polish is extended.
Fixes and other changes 30
Gives the LCH hue its full 360 degree range.
Fixes handling of prototype property keys.
Validates CIDR prefix length and octet range in ipv4().
Generates long passwords without causing a stack overflow.
Excludes reserved port 0 from generated internet ports.
Excludes forbidden letter combinations from Dutch postcodes.
Generates only valid French postal codes.
Uses only valid letters in en_CA postcodes.
Calculates the VIN check digit.
The closest strategy now picks the nearest word length.
Updates the nl_BE phone number patterns.
Fixes an incorrect date boundary in past and future.
Fixes a typo in de_CH last names.
Corrects fruit and vegetable locale data.
Fixes phone numbers for en_AU.
Corrects Farsi phone locales.
Fixes lazy results in fake.
Validates unsupported fileExt mime types.
routingNumber now uses a real FederalReserveRoutingSymbol from a lookup table.
Ignores wrapper characters in fromRegExp and handles single-character patterns.
Removes citation brackets from snake names.
Adds Japanese bear definitions.
Adds Japanese bird definitions.
Adds Japanese cattle breed definitions.
Adds Japanese fish definitions.
Corrects typos and capitalization in Mexican Spanish street names.
Adds phone numbers for the fi locale.
Empty strings are removed from Hebrew lorem words.
The state name is corrected to Trøndelag for the nb_NO locale.
Corrects the locale endonym to use Latin script.
@faker-js/faker 932 changes
Breaking changes 16
The package is converted to ESM, affecting how developers load it in their projects.
Prices can now be returned as fractional values.
Date methods fail on invalid dates, between has stricter error handling, and birthdate behavior is improved.
The timeZone method is separated.
The discontinued Maestro credit card issuer is removed from locale data.
Type checking is stricter for the function signature passed to multiple.
Deprecated locale aliases and the unused global locale faker instance are removed.
The default_country definitions are removed.
The v8-deprecated number parameter is removed.
Job definitions are flattened.
Word definitions are reduced to 1,000 in all locales.
Image defaults are randomized.
Locale data uses snake case and singular locale definition keys; location data no longer uses index-value binding.
Support for Node.js versions earlier than 18 is dropped.
Support for TypeScript versions earlier than 5 is dropped.
Deprecated APIs from v8 are removed, including deprecated providers and methods across multiple modules.
Deprecations 1
Invocations on non-functions are deprecated.
New APIs and options 10
The en_CA locale now provides postcodes by state.
Multiple bitcoin address types and testnet support are added.
Japanese street and street address support is added.
Additional music genres and album and artist methods are added.
The multipleOf option is added to faker.number.int.
A new style parameter is added to phone methods.
A new food module is available.
The pt_PT locale now includes company information.
The sk locale now includes state information, expanding localized state data.
A Uzbek locale is added and extended with date, color, commerce, location, and lorem data.
Behavior and default changes 4
More simple animals are available in the generated animal types.
Company locale data is extended for Hebrew.
Const generics are used where possible, affecting inferred types.
The pt_PT locale now provides more color data.
Fixes and other changes 1
Hebrew username character mapping is added.
@faker-js/faker 884 changes
Breaking changes 30
The finance account API is renamed accountNumber.
arrayElement no longer has a default value.
The company locale definition key bs is renamed to buzz.
The location locale definition city is renamed city_pattern.
Country codes now use ISO-3166-1.
The locale identifier cz is renamed cs_CZ.
Support for dynamically switching locales is removed.
The en_IND locale identifier changes to en_IN.
Pre-built Faker instances can be imported from the package, though the notes recommend locale-specific imports because of a known bug.
The price method now uses an options object.
The image module is rewritten and lorempixel is removed.
The method now returns a number.
The method now returns a number tuple.
Number-generation methods move to a new module.
The float method defaults to high precision, and its default parameters change.
The hex method's default changes.
The int method's default parameters change.
The name module is renamed to person.
Prefixes are split into gendered versions.
Errors are now thrown when locale data does not exist.
String methods move to a new module.
allowLeadingZeros now defaults to true.
The string method is named symbol after the special method was renamed.
The locale identifier ge is renamed ka_GE.
Support for switching locales at runtime was removed; custom Faker instances can instead use imported locales chained as fallbacks.
The finance mask API is renamed maskedNumber.
Version 8 is the last version that supports Node.js v14; later major versions will not support it.
Locale definitions use null to represent not applicable values.
The location locale definition street is renamed street_pattern.
Locale title moves to metadata.
Deprecations 7
location.cityName is deprecated.
datatype.datetime is deprecated.
Company suffix methods are deprecated.
Raw locale data remains accessible through faker.rawDefinitions, but it is unsupported and may change at any time.
Image providers are deprecated; use the image module directly.
The random module is deprecated.
location.streetName is deprecated.
New APIs and options 41
The af_ZA locale is added.
date adds anytime.
A base locale is added.
Locale city patterns add city_name.
Thai locale data adds city names.
The de locale adds color human data.
Finance adds a currency object.
Custom Faker instances can be crafted with imported locales and chained as fallbacks.
The en_HK locale is added.
Helpers adds enumValue.
An airline module is added.
The boolean method gains a probability option to control the likelihood of a true result.
A defaultRefDate value and setDefaultRefDate method are introduced for setting the default reference date.
The fake method now supports multiple parameters.
commitEntry gains an options.refDate value.
Selection now uses a uniform distribution, and the method supports a length range.
A multiple helper is introduced.
A rangeToNumber helper is added, along with range parameters.
A weightedArrayElement helper is added.
The url method now accepts options.
Binary random number generation is added.
Octal random number generation is added.
A short bio feature is added to the person module.
A zodiacSign method is added to the person module.
Binary random string generation is added.
A method to generate strings from characters is added.
A nanoid method is added to the string module.
Octal random string generation is added.
The word module gains a sample method.
Helpers adds fromRegExp.
A locale proxy is introduced.
The en_US locale adds location.county data.
A mergeLocales utility is added and exported.
Helpers adds objectEntry.
A Serbian (Latin) language locale is added.
The cz locale adds state and state_abbr definitions.
The fi locale adds state data.
The hu locale adds state data.
date adds anytime.
The TH locale is added.
The zu_ZA locale is added.
Behavior and default changes 3
The helper can now generate from an array and allows an empty string.
The method now returns IPv4 and IPv6 addresses.
English locales add hyphenated names.
Fixes and other changes 3
The en_IND locale is restored.
Person locale definitions add last_name_patterns to avoid repeating last names.
Picsum images now use the Faker seed.
@faker-js/faker 719 changes
Breaking changes 5
Deprecated APIs were removed, which may require updating code that still uses them.
The package now targets ES2020, which may affect the JavaScript environments able to run it.
The TypeScript export assignment form was removed, affecting how consumers import the package.
The default export was removed; developers must use the supported named exports instead.
Node.js 12 is no longer supported.
Deprecations 2
The phone formats API was deprecated.
The phone number format API was deprecated.
New APIs and options 6
Definition types can now be extended.
A color module was added.
A birthdate generator was added.
Locale definitions can now be supplied directly through faker.fake.
A casing option was added.
A generator for random HTTP status codes was added.
Behavior and default changes 4
The banned value can now be provided as a string.
City generation now uses a localized fake pattern.
Street generation now uses a localized fake pattern.
The bigInt generator was reimplemented.
Fixes and other changes 2
Fixed behavior when an empty array is passed to the helper.
Support for Node.js 18 was added.