Skip to content

Commit 79e8529

Browse files
authored
Merge branch 'next' into docs/define-allowed-lorem-words
2 parents b26bdff + a082ed2 commit 79e8529

File tree

271 files changed

+3662
-2896
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

271 files changed

+3662
-2896
lines changed

.devcontainer/devcontainer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
// README at: https://github.com/devcontainers/templates/tree/main/src/typescript-node
33
{
44
"name": "FakerJs",
5-
"image": "mcr.microsoft.com/devcontainers/typescript-node:0-18",
5+
"image": "mcr.microsoft.com/devcontainers/typescript-node:22@sha256:52f2401bd5937985be000f34bb33bb3a3a47bd20249d91bc787d8f00eba220e9",
66

77
// Features to add to the dev container. More info: https://containers.dev/features.
88
// "features": {},

.eslintrc.cjs

Lines changed: 9 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,7 @@ module.exports = defineConfig({
3939
'prefer-exponentiation-operator': 'error',
4040
'prefer-template': 'error',
4141

42+
'unicorn/import-style': 'off', // subjective & doesn't do anything for us
4243
'unicorn/no-array-callback-reference': 'off', // reduces readability
4344
'unicorn/no-nested-ternary': 'off', // incompatible with prettier
4445
'unicorn/no-null': 'off', // incompatible with TypeScript
@@ -50,7 +51,6 @@ module.exports = defineConfig({
5051
// Each rule should be checked whether it should be enabled/configured and the problems fixed, or stay disabled permanently.
5152
'unicorn/better-regex': 'off',
5253
'unicorn/consistent-function-scoping': 'off',
53-
'unicorn/import-style': 'off',
5454
'unicorn/no-object-as-default-parameter': 'off',
5555
'unicorn/numeric-separators-style': 'off',
5656
'unicorn/prefer-export-from': 'off',
@@ -80,6 +80,12 @@ module.exports = defineConfig({
8080
trailingUnderscore: 'forbid',
8181
},
8282
],
83+
'@typescript-eslint/no-confusing-void-expression': [
84+
'error',
85+
{
86+
ignoreArrowShorthand: true,
87+
},
88+
],
8389
'@typescript-eslint/no-inferrable-types': [
8490
'error',
8591
{ ignoreParameters: true },
@@ -114,10 +120,6 @@ module.exports = defineConfig({
114120
'@typescript-eslint/unbound-method': 'off',
115121
'@typescript-eslint/unified-signatures': 'off', // incompatible with our api docs generation
116122

117-
// TODO @ST-DDT 2023-10-10: The following rules currently conflict with our code.
118-
// Each rule should be checked whether it should be enabled/configured and the problems fixed, or stay disabled permanently.
119-
'@typescript-eslint/no-confusing-void-expression': 'off',
120-
121123
'jsdoc/require-jsdoc': 'off', // Enabled only for src/**/*.ts
122124
'jsdoc/require-returns': 'off',
123125
'jsdoc/sort-tags': [
@@ -164,12 +166,6 @@ module.exports = defineConfig({
164166
'error',
165167
{
166168
case: 'snakeCase',
167-
// TODO @ST-DDT 2023-10-21: rename the definitions in v9
168-
ignore: [
169-
/chemicalElement\.ts$/,
170-
/directoryPaths\.ts$/,
171-
/mimeTypes\.ts$/,
172-
],
173169
},
174170
],
175171
'unicorn/text-encoding-identifier-case': 'off',
@@ -191,7 +187,9 @@ module.exports = defineConfig({
191187
],
192188

193189
'vitest/expect-expect': 'off',
190+
'vitest/no-alias-methods': 'error',
194191
'vitest/prefer-each': 'error',
192+
'vitest/prefer-to-have-length': 'error',
195193
'vitest/valid-expect': ['error', { maxArgs: 2 }],
196194
},
197195
},

.github/workflows/ci.yml

Lines changed: 23 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -15,20 +15,20 @@ jobs:
1515
strategy:
1616
matrix:
1717
os: [ubuntu-latest, macos-latest, windows-latest]
18-
node_version: [18, 20]
18+
node_version: [18, 20, 22]
1919
fail-fast: false
2020
timeout-minutes: 10
2121

2222
name: 'Build & Unit Test: node-${{ matrix.node_version }}, ${{ matrix.os }}'
2323
steps:
2424
- name: Checkout
25-
uses: actions/checkout@0ad4b8fadaa221de15dcec353f45205ec38ea70b # v4.1.4
25+
uses: actions/checkout@a5ac7e51b41094c92402da3b24376905380afc29 # v4.1.6
2626
with:
2727
# Required for docs/versions tests
2828
fetch-depth: 0
2929

3030
- name: Install pnpm
31-
uses: pnpm/action-setup@a3252b78c470c02df07e9d59298aecedc3ccdd6d # v3.0.0
31+
uses: pnpm/action-setup@fe02b34f77f8bc703788d5817da081398fad5dd2 # v4.0.0
3232

3333
- name: Set node version to ${{ matrix.node_version }}
3434
uses: actions/setup-node@60edb5dd545a775178f52524783378180af0d1f8 # v4.0.2
@@ -70,13 +70,13 @@ jobs:
7070
run: date
7171

7272
- name: Checkout
73-
uses: actions/checkout@0ad4b8fadaa221de15dcec353f45205ec38ea70b # v4.1.4
73+
uses: actions/checkout@a5ac7e51b41094c92402da3b24376905380afc29 # v4.1.6
7474
with:
7575
# Required for docs/versions tests
7676
fetch-depth: 0
7777

7878
- name: Install pnpm
79-
uses: pnpm/action-setup@a3252b78c470c02df07e9d59298aecedc3ccdd6d # v3.0.0
79+
uses: pnpm/action-setup@fe02b34f77f8bc703788d5817da081398fad5dd2 # v4.0.0
8080

8181
- name: Set node version to ${{ matrix.node_version }}
8282
uses: actions/setup-node@60edb5dd545a775178f52524783378180af0d1f8 # v4.0.2
@@ -104,10 +104,10 @@ jobs:
104104
name: 'E2E Doc Test: node-20, ubuntu-latest'
105105
steps:
106106
- name: Checkout
107-
uses: actions/checkout@0ad4b8fadaa221de15dcec353f45205ec38ea70b # v4.1.4
107+
uses: actions/checkout@a5ac7e51b41094c92402da3b24376905380afc29 # v4.1.6
108108

109109
- name: Install pnpm
110-
uses: pnpm/action-setup@a3252b78c470c02df07e9d59298aecedc3ccdd6d # v3.0.0
110+
uses: pnpm/action-setup@fe02b34f77f8bc703788d5817da081398fad5dd2 # v4.0.0
111111

112112
- name: Install deps
113113
run: pnpm install
@@ -122,20 +122,20 @@ jobs:
122122
lint:
123123
runs-on: ubuntu-latest
124124
timeout-minutes: 10
125-
name: 'Lint: node-20, ubuntu-latest'
125+
name: 'Lint: node-22, ubuntu-latest'
126126
steps:
127127
- name: Checkout
128-
uses: actions/checkout@0ad4b8fadaa221de15dcec353f45205ec38ea70b # v4.1.4
128+
uses: actions/checkout@a5ac7e51b41094c92402da3b24376905380afc29 # v4.1.6
129129
with:
130130
fetch-depth: 0
131131

132132
- name: Install pnpm
133-
uses: pnpm/action-setup@a3252b78c470c02df07e9d59298aecedc3ccdd6d # v3.0.0
133+
uses: pnpm/action-setup@fe02b34f77f8bc703788d5817da081398fad5dd2 # v4.0.0
134134

135-
- name: Set node version to 20
135+
- name: Set node version to 22
136136
uses: actions/setup-node@60edb5dd545a775178f52524783378180af0d1f8 # v4.0.2
137137
with:
138-
node-version: 20
138+
node-version: 22
139139
cache: 'pnpm'
140140

141141
- name: Install deps
@@ -152,20 +152,20 @@ jobs:
152152
ts-check:
153153
runs-on: ubuntu-latest
154154
timeout-minutes: 10
155-
name: 'TS-Check: node-20, ubuntu-latest'
155+
name: 'TS-Check: node-22, ubuntu-latest'
156156
steps:
157157
- name: Checkout
158-
uses: actions/checkout@0ad4b8fadaa221de15dcec353f45205ec38ea70b # v4.1.4
158+
uses: actions/checkout@a5ac7e51b41094c92402da3b24376905380afc29 # v4.1.6
159159
with:
160160
fetch-depth: 0
161161

162162
- name: Install pnpm
163-
uses: pnpm/action-setup@a3252b78c470c02df07e9d59298aecedc3ccdd6d # v3.0.0
163+
uses: pnpm/action-setup@fe02b34f77f8bc703788d5817da081398fad5dd2 # v4.0.0
164164

165-
- name: Set node version to 20
165+
- name: Set node version to 22
166166
uses: actions/setup-node@60edb5dd545a775178f52524783378180af0d1f8 # v4.0.2
167167
with:
168-
node-version: 20
168+
node-version: 22
169169
cache: 'pnpm'
170170

171171
- name: Install deps
@@ -182,20 +182,20 @@ jobs:
182182
codecov:
183183
runs-on: ubuntu-latest
184184
timeout-minutes: 10
185-
name: 'Codecov: node-20, ubuntu-latest'
185+
name: 'Codecov: node-22, ubuntu-latest'
186186
steps:
187187
- name: Checkout
188-
uses: actions/checkout@0ad4b8fadaa221de15dcec353f45205ec38ea70b # v4.1.4
188+
uses: actions/checkout@a5ac7e51b41094c92402da3b24376905380afc29 # v4.1.6
189189
with:
190190
fetch-depth: 0
191191

192192
- name: Install pnpm
193-
uses: pnpm/action-setup@a3252b78c470c02df07e9d59298aecedc3ccdd6d # v3.0.0
193+
uses: pnpm/action-setup@fe02b34f77f8bc703788d5817da081398fad5dd2 # v4.0.0
194194

195-
- name: Set node version to 20
195+
- name: Set node version to 22
196196
uses: actions/setup-node@60edb5dd545a775178f52524783378180af0d1f8 # v4.0.2
197197
with:
198-
node-version: 20
198+
node-version: 22
199199
cache: 'pnpm'
200200

201201
- name: Install deps
@@ -210,7 +210,7 @@ jobs:
210210
run: pnpm vitest run --coverage
211211

212212
- name: Upload coverage to Codecov
213-
uses: codecov/codecov-action@5ecb98a3c6b747ed38dc09f787459979aebb39be # v4.3.1
213+
uses: codecov/codecov-action@125fc84a9a348dbcf27191600683ec096ec9021c # v4.4.1
214214
with:
215215
token: ${{ secrets.CODECOV_TOKEN }}
216216
fail_ci_if_error: true

.github/workflows/pr.yml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -10,22 +10,22 @@ jobs:
1010
check-code-generation:
1111
runs-on: ubuntu-latest
1212
timeout-minutes: 10
13-
name: 'Check Code Generation: node-20, ubuntu-latest'
13+
name: 'Check Code Generation: node-22, ubuntu-latest'
1414
permissions:
1515
pull-requests: write
1616
steps:
1717
- name: Checkout
18-
uses: actions/checkout@0ad4b8fadaa221de15dcec353f45205ec38ea70b # v4.1.4
18+
uses: actions/checkout@a5ac7e51b41094c92402da3b24376905380afc29 # v4.1.6
1919
with:
2020
fetch-depth: 0
2121

2222
- name: Install pnpm
23-
uses: pnpm/action-setup@a3252b78c470c02df07e9d59298aecedc3ccdd6d # v3.0.0
23+
uses: pnpm/action-setup@fe02b34f77f8bc703788d5817da081398fad5dd2 # v4.0.0
2424

25-
- name: Set node version to 20
25+
- name: Set node version to 22
2626
uses: actions/setup-node@60edb5dd545a775178f52524783378180af0d1f8 # v4.0.2
2727
with:
28-
node-version: 20
28+
node-version: 22
2929
cache: 'pnpm'
3030

3131
- name: Install deps

.prettierignore

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,5 +3,4 @@ coverage/
33
dist/
44
test/scripts/apidocs/temp/
55
CHANGELOG.md
6-
CHANGELOG_old.md
76
pnpm-lock.yaml

.versionrc.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,7 @@
11
{
2+
"skip": {
3+
"tag": true
4+
},
25
"types": [
36
{ "type": "feat", "scope": "locale", "section": "New Locales" },
47
{ "type": "feat", "section": "Features" },

CHANGELOG.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Changelog
22

3-
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.
3+
All notable changes to this project will be documented in this file. See [commit-and-tag-version](https://github.com/absolute-version/commit-and-tag-version) for commit guidelines.
44

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

@@ -968,4 +968,4 @@ All notable changes to this project will be documented in this file. See [standa
968968

969969
## 6.0.0-alpha.0 (2022-01-07)
970970

971-
For changes prior to version v6.0.0-alpha.1, see [the old changelog](./CHANGELOG_old.md).
971+
For changes prior to version `v6`, see [the old changelog](https://github.com/faker-js/faker/blob/v6/CHANGELOG_old.md).

0 commit comments

Comments
 (0)