Skip to content

Commit

Permalink
Merge branch 'next' into next
Browse files Browse the repository at this point in the history
  • Loading branch information
ST-DDT authored Mar 11, 2024
2 parents f7d31db + 98e3cec commit b62c4b8
Show file tree
Hide file tree
Showing 36 changed files with 620 additions and 2,225 deletions.
4 changes: 2 additions & 2 deletions .eslintrc.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ module.exports = defineConfig({
'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 +50,19 @@ 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
2 changes: 1 addition & 1 deletion docs/guide/upgrading_v9/2357.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Use High Precision RNG by default
### Use High Precision RNG by default

TLDR: Many Faker methods will return a different result in v9 compared to v8 for the same seed.

Expand Down
2 changes: 1 addition & 1 deletion docs/guide/upgrading_v9/2508.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Some methods now return undefined in Javascript when unknown enumeration values are passed
### Some methods now return undefined in Javascript when unknown enumeration values are passed

Some methods would previously fallback to a default value for an option when an unknown value was passed for a enum parameter.
Now, these methods will return undefined instead.
Expand Down
14 changes: 14 additions & 0 deletions docs/guide/upgrading_v9/2704.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
### Remove deprecated date methods

Removed deprecated date methods

| old | replacement |
| -------------------------------------- | ------------------------------------------ |
| `faker.date.past(years, refDate)` | `faker.date.past({ years, refDate })` |
| `faker.date.future(years, refDate)` | `faker.date.future({ years, refDate })` |
| `faker.date.between(from, to)` | `faker.date.between({ from, to })` |
| `faker.date.betweens(from, to, count)` | `faker.date.betweens({ from, to, count })` |
| `faker.date.recent(days, refDate)` | `faker.date.recent({ days, refDate })` |
| `faker.date.soon(days, refDate)` | `faker.date.soon({ days, refDate })` |
| `faker.date.month({ abbr })` | `faker.date.month({ abbreviated })` |
| `faker.date.weekday({ abbr })` | `faker.date.weekday({ abbreviated })` |
7 changes: 7 additions & 0 deletions docs/guide/upgrading_v9/2712.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
### Remove deprecated phone methods

Removed deprecated phone methods

| old | replacement |
| ---------------------------- | -------------------------------------------------------------------------------- |
| `faker.phone.number(format)` | `faker.phone.number()`, `faker.string.numeric()` or `faker.helpers.fromRegExp()` |
7 changes: 7 additions & 0 deletions docs/guide/upgrading_v9/2716.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
### Remove deprecated git method

Removed deprecated git method

| old | replacement |
| ---------------------- | ------------------------------------ |
| `faker.git.shortSha()` | `faker.git.commitSha({ length: 7 })` |
10 changes: 10 additions & 0 deletions docs/guide/upgrading_v9/2727.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
### Remove deprecated finance methods

Removed deprecated finance methods

| old | replacement |
| --------------------------------------------------------- | ------------------------------------------------------------- |
| `faker.finance.account` | `faker.finance.accountNumber` |
| `faker.finance.mask` | `faker.finance.maskedNumber` |
| `faker.finance.amount(min, max, dec, symbol, autoFormat)` | `faker.finance.amount({ min, max, dec, symbol, autoFormat })` |
| `faker.finance.iban(formatted, countryCode)` | `faker.finance.iban({ formatted, countryCode })` |
18 changes: 9 additions & 9 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -91,12 +91,12 @@
"@eslint-types/typescript-eslint": "~7.0.2",
"@eslint-types/unicorn": "~51.0.1",
"@types/markdown-it": "~13.0.7",
"@types/node": "~20.11.24",
"@types/node": "~20.11.25",
"@types/sanitize-html": "~2.11.0",
"@types/semver": "~7.5.8",
"@types/validator": "~13.11.9",
"@typescript-eslint/eslint-plugin": "~7.1.0",
"@typescript-eslint/parser": "~7.1.0",
"@typescript-eslint/eslint-plugin": "~7.1.1",
"@typescript-eslint/parser": "~7.1.1",
"@vitest/coverage-v8": "~1.3.1",
"@vitest/ui": "~1.3.1",
"@vueuse/core": "~10.9.0",
Expand All @@ -107,10 +107,10 @@
"eslint-define-config": "~2.1.0",
"eslint-gitignore": "~0.1.0",
"eslint-plugin-deprecation": "~2.0.0",
"eslint-plugin-jsdoc": "~48.2.0",
"eslint-plugin-jsdoc": "~48.2.1",
"eslint-plugin-prettier": "~5.1.3",
"eslint-plugin-unicorn": "~51.0.1",
"eslint-plugin-vitest": "~0.3.22",
"eslint-plugin-vitest": "~0.3.25",
"glob": "~10.3.10",
"npm-run-all2": "~6.1.2",
"prettier": "3.2.5",
Expand All @@ -121,11 +121,11 @@
"standard-version": "~9.5.0",
"tsup": "~8.0.2",
"tsx": "~4.7.1",
"typedoc": "~0.25.10",
"typescript": "~5.3.3",
"typedoc": "~0.25.12",
"typescript": "~5.4.2",
"validator": "~13.11.0",
"vite": "~5.1.4",
"vitepress": "1.0.0-rc.44",
"vite": "~5.1.5",
"vitepress": "1.0.0-rc.45",
"vitest": "~1.3.1",
"vue": "~3.4.21"
},
Expand Down
Loading

0 comments on commit b62c4b8

Please sign in to comment.