Skip to content

Commit 54d42af

Browse files
authored
Merge branch 'next' into fix/locale/fr_CH/location/street_address
2 parents 3d0e89b + fc2f171 commit 54d42af

23 files changed

Lines changed: 264 additions & 216 deletions

File tree

cypress/e2e/api.cy.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ describe('API Test', () => {
4343

4444
cy.request({
4545
method: 'HEAD',
46-
url: `/api/${link}`,
46+
url: link,
4747
failOnStatusCode: false,
4848
})
4949
.should(({ status }) => {

docs/.vitepress/api-pages.ts

Lines changed: 2 additions & 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: 'Faker', link: '/api/faker.html' },
56
{ text: 'Airline', link: '/api/airline.html' },
67
{ text: 'Animal', link: '/api/animal.html' },
78
{ text: 'Color', link: '/api/color.html' },
@@ -28,4 +29,5 @@ export const apiPages = [
2829
{ text: 'System', link: '/api/system.html' },
2930
{ text: 'Vehicle', link: '/api/vehicle.html' },
3031
{ text: 'Word', link: '/api/word.html' },
32+
{ text: 'Utilities', link: '/api/utils.html' },
3133
];

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

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
export interface Method {
22
readonly name: string;
3-
readonly title: string;
43
readonly description: string; // HTML
54
readonly parameters: MethodParameter[];
65
readonly returns: string;

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

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,9 @@ const props = defineProps<{ method: Method }>();
88
99
function seeAlsoToUrl(see: string): string {
1010
const [, module, method] = see.replace(/\(.*/, '').split('\.');
11+
if (!method) {
12+
return 'faker.html#' + slugify(module);
13+
}
1114
return module + '.html#' + slugify(method);
1215
}
1316
</script>

docs/about/announcements/2022-01-14.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,7 @@ We were closing issues every other hour. Discussing the `FUNDING.yml` was inevit
107107

108108
When we became aware that this project was the most stable fork of Faker with the most community support, we realized that we needed to deal with the `FUNDING.yml` file and take a stance.
109109

110-
:::tip Short version, please
110+
::: tip Short version, please
111111
Jess posted a [concise and thorough writeup](https://github.com/faker-js/faker/discussions/56#discussioncomment-1958057) of the logic behind our actions and decisions.
112112

113113
This was backed by the support of all of the co-maintainers. It's a much less narrative version of this section, so if you want the TLDR and some photos of the transactions, give it a read.
@@ -123,7 +123,7 @@ Ben said that simply, "The funding is attached to the project, not the current m
123123

124124
Unanimously, we agreed that we **wanted absolutely no ability to touch the existing funding** and created a cut-over plan with the support of Open Collective.
125125

126-
:::tip Legacy collective
126+
::: tip Legacy collective
127127
There is now a [fakerjs-legacy](https://opencollective.com/fakerjs-legacy) collective. Open Collective transferred all funds into the legacy account and invited Marak and the other maintainer, Brian, into the _legacy_ collective so that they could do whatever they wanted with the funds.
128128
:::
129129

docs/api/ApiIndex.vue

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -97,13 +97,11 @@ onUnmounted(() => window.removeEventListener('keydown', apiSearchFocusHandler));
9797
<div class="api-groups">
9898
<div v-for="item of section.items" :key="item.text" class="api-group">
9999
<h3>
100-
<a :href="item.link + '.html'">{{ item.text }}</a>
100+
<a :href="item.link">{{ item.text }}</a>
101101
</h3>
102102
<ul>
103103
<li v-for="h of item.headers" :key="h.anchor">
104-
<a :href="item.link + '.html#' + slugify(h.anchor)">{{
105-
h.text
106-
}}</a>
104+
<a :href="item.link + '#' + slugify(h.anchor)">{{ h.text }}</a>
107105
</li>
108106
</ul>
109107
</div>

docs/guide/localization.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ However, we also provide pre-built instances for more than 50 other locales.
1010

1111
See below for a list of available locales.
1212

13-
:::tip Note
13+
::: tip Note
1414
You can also build your own Faker instances, with custom locales/overwrites.
1515
:::
1616

@@ -33,7 +33,7 @@ The English locales are around 600 KB in size.
3333
All locales together are around 5 MB in size.
3434
:::
3535

36-
:::tip Note
36+
::: tip Note
3737
Some locales have limited coverage and rely more heavily on the English locale as the source for features they currently do not have.
3838
However, in most cases, using a specific locale will be beneficial in the long term as specifying a locale reduces the time necessary for startup, which has a compounding effect on testing frameworks that reload the imports every execution.
3939
:::

docs/guide/upgrading.md

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,7 @@ This is the migration guide for upgrading from v7 to v8.
44

55
Since v8 has not yet been released, this is a work in progress list of any major and breaking changes in v8.
66

7-
::: info
8-
Not the version you are looking for?
7+
::: info Not the version you are looking for?
98

109
- [Upgrading to v7](https://v7.fakerjs.dev/guide/upgrading.html)
1110
- [Upgrading to v6](https://v6.fakerjs.dev/migration-guide-v5/)
@@ -16,7 +15,7 @@ Not the version you are looking for?
1615

1716
### Removed ability to change the locale on existing `Faker` instances
1817

19-
:::tip NOTE
18+
::: tip Note
2019
If you are using only the default (`en`) locale, then you don't have to change anything.
2120
:::
2221

docs/guide/usage.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ For more information about changing and customizing the locales, please refer to
3737
</script>
3838
```
3939

40-
::: info NOTE
40+
::: info Note
4141
Using the browser is great for experimenting 👍. However, due to all of the strings Faker uses to generate fake data, **Faker is a large package**. It's `> 5 MiB` minified. **Please avoid deploying the full Faker in your web app.**
4242
:::
4343

@@ -50,7 +50,7 @@ const randomName = faker.person.fullName(); // Willie Bahringer
5050
const randomEmail = faker.internet.email(); // Tomasa_Ferry14@hotmail.com
5151
```
5252

53-
::: info NOTE
53+
::: info Note
5454
It is highly recommended to use version tags when importing libraries in Deno, e.g: `import { faker } from "https://cdn.skypack.dev/@faker-js/faker@v7.4.0"`. Add `?dts` to import with type definitions: `import { faker } from "https://cdn.skypack.dev/@faker-js/faker@v7.4.0?dts"`.
5555
:::
5656

@@ -104,7 +104,7 @@ const secondRandom = faker.number.int();
104104
console.log(firstRandom === secondRandom);
105105
```
106106

107-
::: info NOTE
107+
::: info Note
108108
When upgrading to a new version of Faker, you may get different values for the same seed, as the underlying data (lists of names, words etc) may have changed.
109109
:::
110110

scripts/apidoc.ts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,8 @@
1-
import { faker } from '../src';
21
import { generate } from './apidoc/generate';
32
import { initMarkdownRenderer } from './apidoc/signature';
43

54
async function build(): Promise<void> {
65
await initMarkdownRenderer();
7-
faker.setDefaultRefDate(Date.UTC(2023, 0, 1));
86
await generate();
97
}
108

0 commit comments

Comments
 (0)