Skip to content

Commit 4848bc2

Browse files
authored
Merge branch 'next' into infra/unicorn/import-style
2 parents 053c527 + 9daff54 commit 4848bc2

Some content is hidden

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

65 files changed

+985
-510
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:20@sha256:173debabac3a927225aac3fa451dfd1baa780d5fb8f8e513b1efc615e3221225",
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: 6 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -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',

.github/workflows/ci.yml

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -15,14 +15,14 @@ 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@44c2b7a8a4ea60a981eaca3cf939b5f4305c123b # v4.1.5
25+
uses: actions/checkout@a5ac7e51b41094c92402da3b24376905380afc29 # v4.1.6
2626
with:
2727
# Required for docs/versions tests
2828
fetch-depth: 0
@@ -70,7 +70,7 @@ jobs:
7070
run: date
7171

7272
- name: Checkout
73-
uses: actions/checkout@44c2b7a8a4ea60a981eaca3cf939b5f4305c123b # v4.1.5
73+
uses: actions/checkout@a5ac7e51b41094c92402da3b24376905380afc29 # v4.1.6
7474
with:
7575
# Required for docs/versions tests
7676
fetch-depth: 0
@@ -104,7 +104,7 @@ jobs:
104104
name: 'E2E Doc Test: node-20, ubuntu-latest'
105105
steps:
106106
- name: Checkout
107-
uses: actions/checkout@44c2b7a8a4ea60a981eaca3cf939b5f4305c123b # v4.1.5
107+
uses: actions/checkout@a5ac7e51b41094c92402da3b24376905380afc29 # v4.1.6
108108

109109
- name: Install pnpm
110110
uses: pnpm/action-setup@fe02b34f77f8bc703788d5817da081398fad5dd2 # v4.0.0
@@ -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@44c2b7a8a4ea60a981eaca3cf939b5f4305c123b # v4.1.5
128+
uses: actions/checkout@a5ac7e51b41094c92402da3b24376905380afc29 # v4.1.6
129129
with:
130130
fetch-depth: 0
131131

132132
- name: Install pnpm
133133
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@44c2b7a8a4ea60a981eaca3cf939b5f4305c123b # v4.1.5
158+
uses: actions/checkout@a5ac7e51b41094c92402da3b24376905380afc29 # v4.1.6
159159
with:
160160
fetch-depth: 0
161161

162162
- name: Install pnpm
163163
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@44c2b7a8a4ea60a981eaca3cf939b5f4305c123b # v4.1.5
188+
uses: actions/checkout@a5ac7e51b41094c92402da3b24376905380afc29 # v4.1.6
189189
with:
190190
fetch-depth: 0
191191

192192
- name: Install pnpm
193193
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: 4 additions & 4 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@44c2b7a8a4ea60a981eaca3cf939b5f4305c123b # v4.1.5
18+
uses: actions/checkout@a5ac7e51b41094c92402da3b24376905380afc29 # v4.1.6
1919
with:
2020
fetch-depth: 0
2121

2222
- name: Install pnpm
2323
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

CHANGELOG.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -968,4 +968,4 @@ All notable changes to this project will be documented in this file. See [commit
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).

CHANGELOG_old.md

Lines changed: 0 additions & 133 deletions
This file was deleted.

docs/guide/upgrading.md

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -480,6 +480,28 @@ Renamed deprecated locale aliases `cz`, `en_IND`, `ge` and removed `global`.
480480
| `import { faker } from '@faker-js/faker/locale/ge'` | `import { faker } from '@faker-js/faker/locale/ka_GE'` |
481481
| `import { faker } from '@faker-js/faker/locale/global'` | `import { faker } from '@faker-js/faker/locale/base'` |
482482

483+
### Renamed Locale Definitions
484+
485+
The following locale definitions have been renamed
486+
487+
| old | replacement |
488+
| ------------------------------------------- | -------------------------------------------- |
489+
| `faker.definitions.science.chemicalElement` | `faker.definitions.science.chemical_element` |
490+
| `faker.definitions.system.directoryPaths` | `faker.definitions.system.directory_paths` |
491+
| `faker.definitions.system.mimeTypes` | `faker.definitions.system.mime_types` |
492+
493+
With that now all our locale data use the following naming scheme:
494+
495+
```txt
496+
faker.definitions.category_name.entry_name
497+
```
498+
499+
Please keep in mind that property keys of complex objects remain in camel-case.
500+
501+
```txt
502+
faker.definitions.science.chemical_element.atomicNumber
503+
```
504+
483505
### Type Aliases
484506

485507
Removed deprecated type aliases

0 commit comments

Comments
 (0)