Skip to content

Commit

Permalink
Merge branch 'next' into phone-number-fr_SN
Browse files Browse the repository at this point in the history
  • Loading branch information
ST-DDT authored Apr 25, 2024
2 parents 8aaba5e + 16ba43a commit 5cc6308
Show file tree
Hide file tree
Showing 743 changed files with 22,206 additions and 55,427 deletions.
17 changes: 13 additions & 4 deletions .eslintrc.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -33,11 +33,13 @@ module.exports = defineConfig({
},
rules: {
eqeqeq: ['error', 'always', { null: 'ignore' }],
'logical-assignment-operators': 'error',
'no-else-return': 'error',
'no-restricted-globals': ['error', 'Intl'],
'prefer-exponentiation-operator': 'error',
'prefer-template': 'error',

'unicorn/no-array-callback-reference': 'off', // reduces readability
'unicorn/no-nested-ternary': 'off', // incompatible with prettier
'unicorn/no-null': 'off', // incompatible with TypeScript
'unicorn/no-zero-fractions': 'off', // deactivated to raise awareness of floating operations
Expand All @@ -49,20 +51,17 @@ module.exports = defineConfig({
'unicorn/better-regex': 'off',
'unicorn/consistent-function-scoping': 'off',
'unicorn/import-style': 'off',
'unicorn/no-array-callback-reference': 'off',
'unicorn/no-await-expression-member': 'off',
'unicorn/no-object-as-default-parameter': 'off',
'unicorn/numeric-separators-style': 'off',
'unicorn/prefer-export-from': 'off',
'unicorn/prefer-string-slice': 'off',
'unicorn/prevent-abbreviations': 'off',
'unicorn/require-array-join-separator': 'off',
'unicorn/switch-case-braces': 'off',

'@typescript-eslint/array-type': [
'error',
{ default: 'array-simple', readonly: 'generic' },
],
'@typescript-eslint/consistent-type-exports': 'error',
'@typescript-eslint/consistent-type-imports': 'error',
'@typescript-eslint/explicit-module-boundary-types': 'error',
'@typescript-eslint/naming-convention': [
Expand Down Expand Up @@ -94,6 +93,16 @@ module.exports = defineConfig({
{ blankLine: 'always', prev: 'block-like', next: '*' },
],
'@typescript-eslint/prefer-regexp-exec': 'error',
'@typescript-eslint/restrict-plus-operands': [
'error',
{
allowAny: false,
allowBoolean: false,
allowNullish: false,
allowNumberAndString: true,
allowRegExp: false,
},
],
'@typescript-eslint/restrict-template-expressions': [
'error',
{ allowNumber: true, allowBoolean: true },
Expand Down
32 changes: 15 additions & 17 deletions .github/renovate.json5
Original file line number Diff line number Diff line change
@@ -1,23 +1,22 @@
{
"$schema": "https://docs.renovatebot.com/renovate-schema.json",
"extends": [
"config:base",
"config:best-practices",
"schedule:earlyMondays",
"group:allNonMajor",
":prHourlyLimitNone",
"helpers:pinGitHubActionDigests"
":prHourlyLimitNone"
],
"labels": ["c: dependencies"],
"labels": ["c: dependencies", "p: 1-normal"],
"lockFileMaintenance": {
"enabled": true
},
"milestone": 15,
"reviewersFromCodeOwners": true,
"rangeStrategy": "bump",
"rangeStrategy": "pin",
"packageRules": [
{
"groupName": "devDependencies",
"matchDepTypes": ["devDependencies"],
"rangeStrategy": "bump"
"matchDepTypes": ["devDependencies"]
},
{
"groupName": "dependencies",
Expand All @@ -35,12 +34,16 @@
"rangeStrategy": "replace"
},
{
"groupName": "typescript-eslint",
"matchPackagePrefixes": ["@typescript-eslint/"]
"groupName": "eslint",
"matchPackagePrefixes": [
"@typescript-eslint/",
"@eslint-types/",
"eslint"
]
},
{
"groupName": "vitest",
"matchPackageNames": ["@vitest/coverage-v8", "@vitest/ui", "vitest"]
"matchPackagePrefixes": ["@vitest/", "vitest"]
},
{
"groupName": "prettier",
Expand All @@ -52,16 +55,11 @@
},
{
"groupName": "doc-dependencies",
"matchPackageNames": [
"@algolia/client-search",
"typedoc",
"typedoc-plugin-missing-exports",
"vitepress"
]
"matchPackageNames": ["@algolia/client-search", "ts-morph", "vitepress"]
}
],
"vulnerabilityAlerts": {
"labels": ["c: security"],
"labels": ["c: security", "p: 2-high"],
"assignees": ["team:maintainers"]
}
}
16 changes: 8 additions & 8 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ jobs:
name: 'Build & Unit Test: node-${{ matrix.node_version }}, ${{ matrix.os }}'
steps:
- name: Checkout
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
uses: actions/checkout@1d96c772d19495a3b5c517cd2bc0cb401ea0529f # v4.1.3
with:
# Required for docs/versions tests
fetch-depth: 0
Expand Down Expand Up @@ -70,7 +70,7 @@ jobs:
run: date

- name: Checkout
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
uses: actions/checkout@1d96c772d19495a3b5c517cd2bc0cb401ea0529f # v4.1.3
with:
# Required for docs/versions tests
fetch-depth: 0
Expand Down Expand Up @@ -98,13 +98,13 @@ jobs:
e2e-test:
runs-on: ubuntu-latest
container:
image: cypress/browsers:node-20.6.1-chrome-116.0.5845.187-1-ff-117.0-edge-116.0.1938.76-1
image: cypress/browsers:node-20.6.1-chrome-116.0.5845.187-1-ff-117.0-edge-116.0.1938.76-1@sha256:cd909915e1a0aa24dbd3eaf95feb2a7be6cf9961fa425ffa06cd5a44d211451c
options: --user 1001
timeout-minutes: 10
name: 'E2E Doc Test: node-20, ubuntu-latest'
steps:
- name: Checkout
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
uses: actions/checkout@1d96c772d19495a3b5c517cd2bc0cb401ea0529f # v4.1.3

- name: Install pnpm
uses: pnpm/action-setup@a3252b78c470c02df07e9d59298aecedc3ccdd6d # v3.0.0
Expand All @@ -125,7 +125,7 @@ jobs:
name: 'Lint: node-20, ubuntu-latest'
steps:
- name: Checkout
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
uses: actions/checkout@1d96c772d19495a3b5c517cd2bc0cb401ea0529f # v4.1.3
with:
fetch-depth: 0

Expand Down Expand Up @@ -155,7 +155,7 @@ jobs:
name: 'TS-Check: node-20, ubuntu-latest'
steps:
- name: Checkout
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
uses: actions/checkout@1d96c772d19495a3b5c517cd2bc0cb401ea0529f # v4.1.3
with:
fetch-depth: 0

Expand Down Expand Up @@ -185,7 +185,7 @@ jobs:
name: 'Codecov: node-20, ubuntu-latest'
steps:
- name: Checkout
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
uses: actions/checkout@1d96c772d19495a3b5c517cd2bc0cb401ea0529f # v4.1.3
with:
fetch-depth: 0

Expand All @@ -210,7 +210,7 @@ jobs:
run: pnpm vitest run --coverage

- name: Upload coverage to Codecov
uses: codecov/codecov-action@0cfda1dd0a4ad9efc75517f399d859cd1ea4ced1 # v4.0.2
uses: codecov/codecov-action@84508663e988701840491b86de86b666e8a86bed # v4.3.0
with:
token: ${{ secrets.CODECOV_TOKEN }}
fail_ci_if_error: true
2 changes: 1 addition & 1 deletion .github/workflows/pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ jobs:
pull-requests: write
steps:
- name: Checkout
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
uses: actions/checkout@1d96c772d19495a3b5c517cd2bc0cb401ea0529f # v4.1.3
with:
fetch-depth: 0

Expand Down
1 change: 1 addition & 0 deletions .npmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
package-manager-strict=false
2 changes: 1 addition & 1 deletion .nvmrc
Original file line number Diff line number Diff line change
@@ -1 +1 @@
lts/gallium
lts/iron
2 changes: 1 addition & 1 deletion .prettierignore
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
.pnpm-store/
coverage/
dist/
test/scripts/apidoc/temp/
test/scripts/apidocs/temp/
CHANGELOG.md
CHANGELOG_old.md
pnpm-lock.yaml
107 changes: 107 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,113 @@

All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.

## [9.0.0-alpha.0](https://github.com/faker-js/faker/compare/v8.4.1...v9.0.0-alpha.0) (2024-04-12)


### ⚠ BREAKING CHANGES

* **locale:** remove unused global locale faker instance (#2789)
* **locale:** remove deprecated locale aliases (#2787)
* **date:** birthdate improvements (#2756)
* **date:** stricter error handling of between (#2719)
* **date:** fail on invalid dates (#2757)
* **location:** remove v8 deprecated location methods (#2753)
* remove v8 deprecated type aliases (#2754)
* **commerce:** remove v8 deprecated commerce method (#2752)
* **location:** remove default_country definitions (#2740)
* **helpers:** remove v8 deprecated helpers methods (#2729)
* **number:** remove v8 deprecated number parameter (#2738)
* **company:** remove v8 deprecated company methods (#2726)
* **phone:** add new style parameter (#2578)
* **finance:** remove v8 deprecated finance methods (#2727)
* **git:** remove v8 deprecated git method (#2716)
* **phone:** remove v8 deprecated phone format (#2712)
* **date:** remove v8 deprecated date methods (#2704)
* **helpers:** stricter checking for function signature passed to `multiple` (#2563)
* **internet:** remove v8 deprecated internet methods (#2699)
* **random:** remove v8 deprecated image methods (#2697)
* high precision random number generator (#2357)
* **person:** flatten jobs definitions (#2505)
* **datatype:** remove v8 deprecated datatype methods (#2694)
* **helpers:** use const generics where possible (#2685)
* **random:** remove deprecated random module (#2678)
* remove v8 deprecated faker class parts (#2682)
* **helpers:** remove v8 deprecated unique (#2661)
* switch to tsup (#2391)
* **image:** remove v8 deprecated providers (#2634)
* **image:** randomize defaults (#2472)
* **deps:** update dependency typescript to v5 (#1953)
* drop NodeJS v14 and v16 support (#2121)

### Features

* **animal:** add more simple animals to animal.type() ([#2786](https://github.com/faker-js/faker/issues/2786)) ([f47dfe5](https://github.com/faker-js/faker/commit/f47dfe5c58371b468c704cab7a7cd29f9a3e3379))
* **food:** new module ([#2484](https://github.com/faker-js/faker/issues/2484)) ([9aab7c2](https://github.com/faker-js/faker/commit/9aab7c2429b50c0f6e8bd1908344f9ff92912f5d))
* **helpers:** stricter checking for function signature passed to `multiple` ([#2563](https://github.com/faker-js/faker/issues/2563)) ([2b15f2e](https://github.com/faker-js/faker/commit/2b15f2ee7eeba7147c75a24d71042ee996966c92))
* **helpers:** use const generics where possible ([#2685](https://github.com/faker-js/faker/issues/2685)) ([c45537f](https://github.com/faker-js/faker/commit/c45537f6d4f3a28d8be1ebbe03567004c04af145))
* high precision random number generator ([#2357](https://github.com/faker-js/faker/issues/2357)) ([4ab0731](https://github.com/faker-js/faker/commit/4ab073164beab2bf690d7fffc7773e7b76d8e07e))
* **music:** add additional genres ([#2621](https://github.com/faker-js/faker/issues/2621)) ([7dae52b](https://github.com/faker-js/faker/commit/7dae52bfcd93c41ec9d2c4dd4d96a07f31c3dfc1))
* **number:** add multipleOf to faker.number.int ([#2586](https://github.com/faker-js/faker/issues/2586)) ([5ef8ef1](https://github.com/faker-js/faker/commit/5ef8ef1da13e83efc61702e64d8f75b611afb4e5))
* **phone:** add new style parameter ([#2578](https://github.com/faker-js/faker/issues/2578)) ([e130549](https://github.com/faker-js/faker/commit/e130549e82a3d59af46f2d595ed47fa9a39724a3))


### Bug Fixes

* **commerce:** return fractional prices ([#2458](https://github.com/faker-js/faker/issues/2458)) ([9348138](https://github.com/faker-js/faker/commit/9348138893bb95faa5037c653443fbd525ce2939))
* **internet:** add Hebrew username charMapping ([#2781](https://github.com/faker-js/faker/issues/2781)) ([5860783](https://github.com/faker-js/faker/commit/5860783e81d392bc235408b697668ab8ecdd2d7c))
* **person:** add dedicated first names in ko locale ([#2773](https://github.com/faker-js/faker/issues/2773)) ([47f008a](https://github.com/faker-js/faker/commit/47f008aff5aee08057ad5445d5b3dfbd1b196934))
* **person:** delete set of invalid names in en_NG ([#2764](https://github.com/faker-js/faker/issues/2764)) ([2884552](https://github.com/faker-js/faker/commit/2884552c0506f6244eeda56ee6a76067424959ca))
* restore support for moduleResolution Node* ([#2749](https://github.com/faker-js/faker/issues/2749)) ([2f07483](https://github.com/faker-js/faker/commit/2f074835e60240d8ac53e2d42fc7b5dac85d05b8))
* tree-shaking ([#2790](https://github.com/faker-js/faker/issues/2790)) ([fb65976](https://github.com/faker-js/faker/commit/fb65976acb1003f441a35afafbd87204eca0e2d7))


### infra

* drop NodeJS v14 and v16 support ([#2121](https://github.com/faker-js/faker/issues/2121)) ([1e0df8b](https://github.com/faker-js/faker/commit/1e0df8b81445d89b4a65bcab3a156b51ee1d1a38))


* **commerce:** remove v8 deprecated commerce method ([#2752](https://github.com/faker-js/faker/issues/2752)) ([8c80877](https://github.com/faker-js/faker/commit/8c80877f1691886e32c2b1eb799586c0c1b02b8b))
* **company:** remove v8 deprecated company methods ([#2726](https://github.com/faker-js/faker/issues/2726)) ([19bcf88](https://github.com/faker-js/faker/commit/19bcf886e41b13a6b77b92bac4775b18e8aa9418))
* **datatype:** remove v8 deprecated datatype methods ([#2694](https://github.com/faker-js/faker/issues/2694)) ([682a427](https://github.com/faker-js/faker/commit/682a4276f13d7b8f48e1bd8aafcf011c7bd10390))
* **date:** birthdate improvements ([#2756](https://github.com/faker-js/faker/issues/2756)) ([b498d1f](https://github.com/faker-js/faker/commit/b498d1f794e6d682e9d9fedebff194664c2a3f1d))
* **date:** fail on invalid dates ([#2757](https://github.com/faker-js/faker/issues/2757)) ([3485e7e](https://github.com/faker-js/faker/commit/3485e7eece540b63059e97bd8166d1ffd88334de))
* **date:** remove v8 deprecated date methods ([#2704](https://github.com/faker-js/faker/issues/2704)) ([e868060](https://github.com/faker-js/faker/commit/e868060c87cbca3c1bf90465d61fc39a4eea1f9c))
* **date:** stricter error handling of between ([#2719](https://github.com/faker-js/faker/issues/2719)) ([da35c51](https://github.com/faker-js/faker/commit/da35c51d16eccd99a7001a5b055a24806168435d))
* **deps:** update dependency typescript to v5 ([#1953](https://github.com/faker-js/faker/issues/1953)) ([bc3ebb7](https://github.com/faker-js/faker/commit/bc3ebb793666c0d7e58cf428ba12465a7b290cbe))
* **finance:** remove v8 deprecated finance methods ([#2727](https://github.com/faker-js/faker/issues/2727)) ([a536a9d](https://github.com/faker-js/faker/commit/a536a9d79f410986e6bd6dc1bc4a72252a0cc8d9))
* **git:** remove v8 deprecated git method ([#2716](https://github.com/faker-js/faker/issues/2716)) ([b3afc8f](https://github.com/faker-js/faker/commit/b3afc8f351003cf9df9984fb5be6cd46e18f71d8))
* **helpers:** remove v8 deprecated helpers methods ([#2729](https://github.com/faker-js/faker/issues/2729)) ([1169a05](https://github.com/faker-js/faker/commit/1169a0576ba1469d7c05be0b8fd844bde8a1af13))
* **helpers:** remove v8 deprecated unique ([#2661](https://github.com/faker-js/faker/issues/2661)) ([4382fd9](https://github.com/faker-js/faker/commit/4382fd9313821bf542829859e97d4422acc9e284))
* **image:** randomize defaults ([#2472](https://github.com/faker-js/faker/issues/2472)) ([92207b7](https://github.com/faker-js/faker/commit/92207b7df15732a61e613a4376a9ce88bd4f7b0f))
* **image:** remove v8 deprecated providers ([#2634](https://github.com/faker-js/faker/issues/2634)) ([44d698e](https://github.com/faker-js/faker/commit/44d698e14f48a32259fd52a39d1e3028f84f3c06))
* **internet:** remove v8 deprecated internet methods ([#2699](https://github.com/faker-js/faker/issues/2699)) ([3024d9e](https://github.com/faker-js/faker/commit/3024d9e7adeadb1c317aee308c594d3e18090b1a))
* **location:** remove default_country definitions ([#2740](https://github.com/faker-js/faker/issues/2740)) ([a409b46](https://github.com/faker-js/faker/commit/a409b468f942d964ce22ff42b52f8a756e0ca815))
* **location:** remove v8 deprecated location methods ([#2753](https://github.com/faker-js/faker/issues/2753)) ([6dee178](https://github.com/faker-js/faker/commit/6dee178558b87b73bba1395c11d2ffe3d156dad1))
* **number:** remove v8 deprecated number parameter ([#2738](https://github.com/faker-js/faker/issues/2738)) ([a672d27](https://github.com/faker-js/faker/commit/a672d277b883a445a852f9b6db18818104e8de7e))
* **person:** flatten jobs definitions ([#2505](https://github.com/faker-js/faker/issues/2505)) ([0d4cba6](https://github.com/faker-js/faker/commit/0d4cba637cdd38e7757ecca1b7eae75d7a737fa8))
* **phone:** remove v8 deprecated phone format ([#2712](https://github.com/faker-js/faker/issues/2712)) ([660da4c](https://github.com/faker-js/faker/commit/660da4c401b36ebfe0c0f7975c265146d9224921))
* **random:** remove deprecated random module ([#2678](https://github.com/faker-js/faker/issues/2678)) ([64ff107](https://github.com/faker-js/faker/commit/64ff107b8a9cd0965a67f00fd30cded144c02fd6))
* **random:** remove v8 deprecated image methods ([#2697](https://github.com/faker-js/faker/issues/2697)) ([e99fba9](https://github.com/faker-js/faker/commit/e99fba9729729e8a3107a659f5e00b9f18047298))
* remove v8 deprecated faker class parts ([#2682](https://github.com/faker-js/faker/issues/2682)) ([a9dc701](https://github.com/faker-js/faker/commit/a9dc7017b4a2b2bf79c42fe947de6029fae5e937))
* remove v8 deprecated type aliases ([#2754](https://github.com/faker-js/faker/issues/2754)) ([2ec602b](https://github.com/faker-js/faker/commit/2ec602ba1be4e04f261a96717a3d3c90a15a4c01))
* switch to tsup ([#2391](https://github.com/faker-js/faker/issues/2391)) ([db88a15](https://github.com/faker-js/faker/commit/db88a1518e8d0ccfe191bd48a1ae8641a9a25303))


### New Locales

* **locale:** add location for uz_UZ_latin ([#2775](https://github.com/faker-js/faker/issues/2775)) ([80730e9](https://github.com/faker-js/faker/commit/80730e92abe87545e685674cafdcb1bc90f15fb1))
* **locale:** add uzbek locale (uz_UZ_latin) ([#2686](https://github.com/faker-js/faker/issues/2686)) ([f7471a2](https://github.com/faker-js/faker/commit/f7471a225f388c6bc0ec47ebad759ee1051e1106))
* **locale:** extend Uzbek locale for commerce ([#2750](https://github.com/faker-js/faker/issues/2750)) ([b6b18d7](https://github.com/faker-js/faker/commit/b6b18d7f97e232bd133f117172e02df35fa16fec))
* **locale:** extend Uzbek locale for date and color ([#2724](https://github.com/faker-js/faker/issues/2724)) ([776a625](https://github.com/faker-js/faker/commit/776a6258de07108548fb5918bdb8b572a278075a))
* **locale:** support street and street address for ja ([#2193](https://github.com/faker-js/faker/issues/2193)) ([501f4b3](https://github.com/faker-js/faker/commit/501f4b3d3a8056b8b7877f1d78575ade26b361ce))


### Changed Locales

* **locale:** normalize animal data ([#2791](https://github.com/faker-js/faker/issues/2791)) ([03b965a](https://github.com/faker-js/faker/commit/03b965abfde57be617a1ae7ba715604e149a803d))
* **locale:** remove deprecated locale aliases ([#2787](https://github.com/faker-js/faker/issues/2787)) ([03ac471](https://github.com/faker-js/faker/commit/03ac47198313126c3cc8cb3fb9ef184360bb79eb))
* **locale:** remove unused global locale faker instance ([#2789](https://github.com/faker-js/faker/issues/2789)) ([b505a70](https://github.com/faker-js/faker/commit/b505a70c8e52a3f64c6b7cb4e2888cf5d48aeefe))

### [8.4.1](https://github.com/faker-js/faker/compare/v8.4.0...v8.4.1) (2024-02-06)

* JSDocs improvements
Expand Down
Loading

0 comments on commit 5cc6308

Please sign in to comment.