Skip to content

Commit 5b8408a

Browse files
committed
chore: merge next
2 parents 444b9f0 + be77179 commit 5b8408a

File tree

32 files changed

+1537
-374
lines changed

32 files changed

+1537
-374
lines changed

.github/workflows/ci.yml

Lines changed: 2 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,8 @@ jobs:
110110

111111
e2e-test:
112112
runs-on: ubuntu-latest
113-
timeout-minutes: 15
113+
container: cypress/browsers:node18.12.0-chrome107
114+
timeout-minutes: 10
114115
name: 'E2E Doc Test: node-18, ubuntu-latest'
115116
steps:
116117
- name: Checkout
@@ -121,11 +122,6 @@ jobs:
121122
with:
122123
version: 7
123124

124-
- name: Set node version to 18
125-
uses: actions/setup-node@v3
126-
with:
127-
node-version: 18
128-
129125
- name: Install deps
130126
run: pnpm install
131127

@@ -134,11 +130,6 @@ jobs:
134130

135131
- id: e2e
136132
name: Run e2e
137-
run: timeout 5m pnpm run docs:test:e2e:run
138-
continue-on-error: true
139-
140-
- name: Run e2e (2nd attempt)
141-
if: ${{ steps.e2e.outcome != 'success' }}
142133
run: pnpm run docs:test:e2e:run
143134

144135
lint:

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -92,6 +92,7 @@ The API covers the following modules:
9292

9393
| Module | Example | Output |
9494
| -------- | --------------------------------------------- | -------------------------------------------------------------------------------------------------- |
95+
| Airline | `faker.airline.airport()` | `{ name: 'Dallas Fort Worth International Airport', iataCode: 'DFW' }` |
9596
| Animal | `faker.animal.cat()` | Norwegian Forest Cat |
9697
| Color | `faker.color.rgb()` | #cdfcdc |
9798
| Commerce | `faker.commerce.product()` | Polo t-shirt |

docs/.vitepress/api-pages.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
// Run 'pnpm run generate:api-docs' to update
33
export const apiPages = [
44
{ text: 'Overview', link: '/api/' },
5+
{ text: 'Airline', link: '/api/airline.html' },
56
{ text: 'Animal', link: '/api/animal.html' },
67
{ text: 'Color', link: '/api/color.html' },
78
{ text: 'Commerce', link: '/api/commerce.html' },

docs/.vitepress/components/api-docs/method.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ function seeAlsoToUrl(see: string): string {
4444
:href="seeAlsoToUrl(seeAlso)"
4545
v-html="seeAlso"
4646
/>
47-
<template v-else v-html="seeAlso" />
47+
<div v-else v-html="seeAlso" />
4848
</li>
4949
</ul>
5050
</div>

docs/.vitepress/config.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,14 +3,14 @@ import { DefaultTheme } from 'vitepress/theme';
33
import { apiPages } from './api-pages';
44
import { currentVersion, oldVersions, versionBannerInfix } from './versions';
55

6-
type SidebarGroup = DefaultTheme.SidebarGroup;
6+
type SidebarItem = DefaultTheme.SidebarItem;
77

88
const description =
99
'Generate massive amounts of fake (but reasonable) data for testing and development.';
1010
const image = 'https://fakerjs.dev/social-image.png';
1111

12-
function extendSideNav(current: SidebarGroup): SidebarGroup[] {
13-
const links: SidebarGroup[] = [
12+
function extendSideNav(current: SidebarItem): SidebarItem[] {
13+
const links: SidebarItem[] = [
1414
{
1515
text: 'Guide',
1616
items: [

docs/guide/upgrading.md

Lines changed: 14 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -103,11 +103,20 @@ The `faker.address.*` methods will continue to work as an alias in v8 and v9, bu
103103
The number-related methods previously found in `faker.datatype` have been moved to a new `faker.number` module.
104104
For the old `faker.datatype.number` method you should replace with `faker.number.int` or `faker.number.float` depending on the precision required.
105105

106-
faker.datatype.number() //35
107-
faker.datatype.int() //35
108-
109-
faker.datatype.number({precision:0.01}) //35.21
110-
faker.datatype.float({precision:0.01}) //35.21
106+
By default, `faker.number.float` no longer defaults to a precision of 0.01
107+
108+
```js
109+
// OLD
110+
faker.datatype.number({ max: 100 }); // 35
111+
faker.datatype.number({ max: 100, precision: 0.01 }); // 35.21
112+
faker.datatype.float({ max: 100 }); // 35.21
113+
faker.datatype.float({ max: 100, precision: 0.001 }); // 35.211
114+
115+
// NEW
116+
faker.number.int({ max: 100 }); // 35
117+
faker.number.float({ max: 100 }); // 35.21092065742612
118+
faker.number.float({ max: 100, precision: 0.01 }); // 35.21
119+
```
111120

112121
| Old method | New method |
113122
| ----------------------- | ------------------------------------------ |

package.json

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -89,21 +89,21 @@
8989
"@types/react": "~18.0.27",
9090
"@types/sanitize-html": "~2.8.0",
9191
"@types/semver": "~7.3.13",
92-
"@types/validator": "~13.7.10",
93-
"@typescript-eslint/eslint-plugin": "~5.48.2",
94-
"@typescript-eslint/parser": "~5.48.2",
95-
"@vitest/coverage-c8": "~0.27.3",
96-
"@vitest/ui": "~0.27.3",
97-
"@vueuse/core": "~9.11.1",
92+
"@types/validator": "~13.7.11",
93+
"@typescript-eslint/eslint-plugin": "~5.49.0",
94+
"@typescript-eslint/parser": "~5.49.0",
95+
"@vitest/coverage-c8": "~0.28.3",
96+
"@vitest/ui": "~0.28.3",
97+
"@vueuse/core": "~9.12.0",
9898
"c8": "~7.12.0",
9999
"conventional-changelog-cli": "~2.2.2",
100-
"cypress": "~12.3.0",
101-
"esbuild": "~0.17.4",
102-
"eslint": "~8.32.0",
100+
"cypress": "~12.4.1",
101+
"esbuild": "~0.17.5",
102+
"eslint": "~8.33.0",
103103
"eslint-config-prettier": "~8.6.0",
104104
"eslint-define-config": "~1.14.0",
105105
"eslint-gitignore": "~0.1.0",
106-
"eslint-plugin-jsdoc": "~39.6.7",
106+
"eslint-plugin-jsdoc": "~39.7.4",
107107
"eslint-plugin-prettier": "~4.2.1",
108108
"glob": "~8.1.0",
109109
"npm-run-all": "~4.1.5",
@@ -112,7 +112,7 @@
112112
"prettier-plugin-organize-imports": "~3.2.2",
113113
"react": "~18.2.0",
114114
"react-dom": "~18.2.0",
115-
"rimraf": "~4.1.1",
115+
"rimraf": "~4.1.2",
116116
"sanitize-html": "~2.8.1",
117117
"semver": "~7.3.8",
118118
"standard-version": "~9.5.0",
@@ -122,11 +122,11 @@
122122
"typescript": "~4.9.4",
123123
"validator": "~13.7.0",
124124
"vite": "~4.0.4",
125-
"vitepress": "1.0.0-alpha.40",
126-
"vitest": "~0.27.3",
125+
"vitepress": "1.0.0-alpha.43",
126+
"vitest": "~0.28.3",
127127
"vue": "~3.2.45"
128128
},
129-
"packageManager": "pnpm@7.25.1",
129+
"packageManager": "pnpm@7.26.2",
130130
"engines": {
131131
"node": "^14.17.0 || ^16.13.0 || >=18.0.0",
132132
"npm": ">=6.14.13"

0 commit comments

Comments
 (0)