Skip to content

Commit 3b8fa6d

Browse files
authored
Merge branch 'next' into switch-to-tsup
2 parents 8770f4c + 50897d9 commit 3b8fa6d

26 files changed

+1371
-12
lines changed

.gitattributes

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,2 @@
1-
* -crlf
1+
* text eol=lf
2+
*.png binary

README.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -24,11 +24,11 @@ Please proceed to the [Getting Started Guide](https://fakerjs.dev/guide/) for th
2424

2525
For detailed API documentation, please select the version of the documentation you are looking for.
2626

27-
| Version | Website |
28-
| :----------: | :------------------------ |
29-
| v8.\* (next) | https://next.fakerjs.dev/ |
30-
| v8 (stable) | https://fakerjs.dev/ |
31-
| v7 (old) | https://v7.fakerjs.dev/ |
27+
| Version | Website |
28+
| :---------: | :------------------------ |
29+
| v9 (next) | https://next.fakerjs.dev/ |
30+
| v8 (stable) | https://fakerjs.dev/ |
31+
| v7 (old) | https://v7.fakerjs.dev/ |
3232

3333
---
3434

docs/.vitepress/api-pages.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ export const apiPages = [
1818
{ text: 'Datatype', link: '/api/datatype.html' },
1919
{ text: 'Date', link: '/api/date.html' },
2020
{ text: 'Finance', link: '/api/finance.html' },
21+
{ text: 'Food', link: '/api/food.html' },
2122
{ text: 'Git', link: '/api/git.html' },
2223
{ text: 'Hacker', link: '/api/hacker.html' },
2324
{ text: 'Helpers', link: '/api/helpers.html' },

scripts/generate-locales.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,7 @@ const definitionsTypes: DefinitionType = {
6363
database: 'DatabaseDefinition',
6464
date: 'DateDefinition',
6565
finance: 'FinanceDefinition',
66+
food: 'FoodDefinition',
6667
hacker: 'HackerDefinition',
6768
internet: 'InternetDefinition',
6869
location: 'LocationDefinition',

src/definitions/definitions.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ import type { CompanyDefinition } from './company';
66
import type { DatabaseDefinition } from './database';
77
import type { DateDefinition } from './date';
88
import type { FinanceDefinition } from './finance';
9+
import type { FoodDefinition } from './food';
910
import type { HackerDefinition } from './hacker';
1011
import type { InternetDefinition } from './internet';
1112
import type { LocationDefinition } from './location';
@@ -39,6 +40,7 @@ export type LocaleDefinition = {
3940
database?: DatabaseDefinition;
4041
date?: DateDefinition;
4142
finance?: FinanceDefinition;
43+
food?: FoodDefinition;
4244
hacker?: HackerDefinition;
4345
internet?: InternetDefinition;
4446
location?: LocationDefinition;

src/definitions/food.ts

Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
import type { LocaleEntry } from './definitions';
2+
3+
export type FoodDefinition = LocaleEntry<{
4+
/**
5+
* Common food adjectives.
6+
*/
7+
adjective: string[];
8+
9+
/**
10+
* List of description patterns.
11+
*/
12+
description_pattern: string[];
13+
14+
/**
15+
* Common dish names.
16+
*/
17+
dish: string[];
18+
19+
/**
20+
* List of dish patterns.
21+
*/
22+
dish_pattern: string[];
23+
24+
/**
25+
* A list of cooking styles that are commonly associated with a particular food item or recipe.
26+
*/
27+
ethnic_category: string[];
28+
29+
/**
30+
* A list of common fruit names.
31+
*/
32+
fruit: string[];
33+
34+
/**
35+
* Common ingredient names.
36+
*/
37+
ingredient: string[];
38+
39+
/**
40+
* Common meat names.
41+
*/
42+
meat: string[];
43+
44+
/**
45+
* A list of common spice names.
46+
*/
47+
spice: string[];
48+
49+
/**
50+
* A list of common vegetable names.
51+
*/
52+
vegetable: string[];
53+
}>;

src/definitions/index.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ export type { DatabaseDefinition } from './database';
1010
export type { DateDefinition, DateEntryDefinition } from './date';
1111
export type { LocaleDefinition, LocaleEntry } from './definitions';
1212
export type { FinanceDefinition } from './finance';
13+
export type { FoodDefinition } from './food';
1314
export type { HackerDefinition } from './hacker';
1415
export type { InternetDefinition } from './internet';
1516
export type { LocationDefinition } from './location';

src/faker.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ import { CompanyModule } from './modules/company';
1111
import { DatabaseModule } from './modules/database';
1212
import { DateModule } from './modules/date';
1313
import { FinanceModule } from './modules/finance';
14+
import { FoodModule } from './modules/food';
1415
import { GitModule } from './modules/git';
1516
import { HackerModule } from './modules/hacker';
1617
import { HelpersModule } from './modules/helpers';
@@ -75,6 +76,7 @@ export class Faker extends SimpleFaker {
7576
readonly database: DatabaseModule = new DatabaseModule(this);
7677
readonly date: DateModule = new DateModule(this);
7778
readonly finance = new FinanceModule(this);
79+
readonly food = new FoodModule(this);
7880
readonly git: GitModule = new GitModule(this);
7981
readonly hacker: HackerModule = new HackerModule(this);
8082
readonly helpers: HelpersModule = new HelpersModule(this);

src/index.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@ export type {
3030
FinanceDefinition,
3131
/** @deprecated Use FinanceDefinition instead */
3232
FinanceDefinition as FinanceDefinitions,
33+
FoodDefinition,
3334
HackerDefinition,
3435
/** @deprecated Use HackerDefinition instead */
3536
HackerDefinition as HackerDefinitions,
@@ -101,6 +102,7 @@ export type { DatabaseModule } from './modules/database';
101102
export type { DatatypeModule } from './modules/datatype';
102103
export type { DateModule, SimpleDateModule } from './modules/date';
103104
export type { Currency, FinanceModule } from './modules/finance';
105+
export type { FoodModule } from './modules/food';
104106
export type { GitModule } from './modules/git';
105107
export type { HackerModule } from './modules/hacker';
106108
export type { HelpersModule, SimpleHelpersModule } from './modules/helpers';

src/locales/en/food/adjective.ts

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
export default [
2+
'bitter',
3+
'creamy',
4+
'crispy',
5+
'crunchy',
6+
'delicious',
7+
'fluffy',
8+
'fresh',
9+
'golden',
10+
'juicy',
11+
'moist',
12+
'rich',
13+
'salty',
14+
'savory',
15+
'smoky',
16+
'sour',
17+
'spicy',
18+
'sweet',
19+
'tangy',
20+
'tender',
21+
'zesty',
22+
];
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
export default [
2+
'A classic pie filled with delicious {{food.meat}} and {{food.adjective}} {{food.ingredient}}, baked in a {{food.adjective}} pastry crust and topped with a golden-brown lattice.',
3+
'A delightful tart combining {{food.adjective}} {{food.vegetable}} and sweet {{food.fruit}}, set in a buttery pastry shell and finished with a hint of {{food.spice}}.',
4+
'A heartwarming {{food.ethnic_category}} soup, featuring fresh {{food.ingredient}} and an aromatic blend of traditional spices.',
5+
'A robust {{food.adjective}} stew featuring {{food.ethnic_category}} flavors, loaded with {{food.adjective}} meat, {{food.adjective}} vegetables, and a {{food.adjective}}, {{food.adjective}} broth.',
6+
'A simple {{food.fruit}} pie. No fancy stuff. Just pie.',
7+
'A slow-roasted {{animal.bird}} with a {{food.adjective}}, {{food.adjective}} exterior. Stuffed with {{food.fruit}} and covered in {{food.fruit}} sauce. Sides with {{food.vegetable}} puree and wild {{food.vegetable}}.',
8+
'A special {{color.human}} {{food.ingredient}} from {{location.country}}. To support the strong flavor it is sided with a tablespoon of {{food.spice}}.',
9+
'A succulent {{food.meat}} steak, encased in a {{food.adjective}} {{food.spice}} crust, served with a side of {{food.spice}} mashed {{food.vegetable}}.',
10+
'An exquisite {{food.meat}} roast, infused with the essence of {{food.fruit}}, slow-roasted to bring out its natural flavors and served with a side of creamy {{food.vegetable}}',
11+
'Baked {{food.ingredient}}-stuffed {{food.meat}}, seasoned with {{food.spice}} and {{food.adjective}} herbs, accompanied by roasted {{food.vegetable}} medley.',
12+
'Crispy fried {{food.meat}} bites, seasoned with {{food.spice}} and served with a tangy {{food.fruit}} dipping sauce.',
13+
'Fresh mixed greens tossed with {{food.spice}}-rubbed {{food.meat}}, {{food.vegetable}}, and a light dressing.',
14+
'Fresh {{food.ingredient}} with a pinch of {{food.spice}}, topped by a caramelized {{food.fruit}} with whipped cream',
15+
'Grilled {{food.meat}} kebabs, marinated in {{food.ethnic_category}} spices and served with a fresh {{food.vegetable}} and {{food.fruit}} salad.',
16+
'Hearty {{food.ingredient}} and {{food.meat}} stew, slow-cooked with {{food.spice}} and {{food.vegetable}} for a comforting, flavorful meal.',
17+
'Juicy {{food.meat}}, grilled to your liking and drizzled with a bold {{food.spice}} sauce, served alongside roasted {{food.vegetable}}.',
18+
'Our {{food.adjective}} {{food.meat}}, slow-cooked to perfection, accompanied by steamed {{food.vegetable}} and a rich, savory gravy.',
19+
'Tender {{food.meat}} skewers, glazed with a sweet and tangy {{food.fruit}} sauce, served over a bed of fragrant jasmine rice.',
20+
'Tenderly braised {{food.meat}} in a rich {{food.spice}} and {{food.vegetable}} sauce, served with a side of creamy {{food.vegetable}}.',
21+
'Three {{food.ingredient}} with {{food.vegetable}}, {{food.vegetable}}, {{food.vegetable}}, {{food.vegetable}} and {{food.ingredient}}. With a side of baked {{food.fruit}}, and your choice of {{food.ingredient}} or {{food.ingredient}}.',
22+
'{{number.int({"min":1, "max":99})}}-day aged {{food.meat}} steak, with choice of {{number.int({"min":2, "max":4})}} sides.',
23+
];

src/locales/en/food/dish.ts

Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
export default [
2+
'California maki',
3+
'Peking duck',
4+
'Philadelphia maki',
5+
'arepas',
6+
'barbecue ribs',
7+
'bruschette with tomato',
8+
'bunny chow',
9+
'caesar salad',
10+
'caprese salad',
11+
'cauliflower penne',
12+
'cheeseburger',
13+
'chicken fajitas',
14+
'chicken milanese',
15+
'chicken parm',
16+
'chicken wings',
17+
'chilli con carne',
18+
'ebiten maki',
19+
'fettuccine alfredo',
20+
'fish and chips',
21+
'french fries with sausages',
22+
'french toast',
23+
'hummus',
24+
'katsu curry',
25+
'kebab',
26+
'lasagne',
27+
'linguine with clams',
28+
'massaman curry',
29+
'meatballs with sauce',
30+
'mushroom risotto',
31+
'pappardelle alla bolognese',
32+
'pasta and beans',
33+
'pasta carbonara',
34+
'pasta with tomato and basil',
35+
'pho',
36+
'pierogi',
37+
'pizza',
38+
'poke',
39+
'pork belly buns',
40+
'pork sausage roll',
41+
'poutine',
42+
'ricotta stuffed ravioli',
43+
'risotto with seafood',
44+
'salmon nigiri',
45+
'scotch eggs',
46+
'seafood paella',
47+
'som tam',
48+
'souvlaki',
49+
'stinky tofu',
50+
'sushi',
51+
'tacos',
52+
'teriyaki chicken donburi',
53+
'tiramisù',
54+
'tuna sashimi',
55+
'vegetable soup',
56+
];

src/locales/en/food/dish_pattern.ts

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
export default [
2+
'{{food.adjective}} {{food.ethnic_category}} stew',
3+
'{{food.adjective}} {{food.meat}} with {{food.vegetable}}',
4+
'{{food.ethnic_category}} {{food.ingredient}} soup',
5+
'{{food.fruit}} and {{food.fruit}} tart',
6+
'{{food.fruit}} pie',
7+
'{{food.fruit}}-glazed {{food.meat}} skewers',
8+
'{{food.fruit}}-infused {{food.meat}} roast',
9+
'{{food.ingredient}} and {{food.meat}} pie',
10+
'{{food.ingredient}}-infused {{food.meat}}',
11+
'{{food.meat}} steak',
12+
'{{food.meat}} with {{food.fruit}} sauce',
13+
'{{food.spice}}-crusted {{food.meat}}',
14+
'{{food.spice}}-rubbed {{food.meat}} salad',
15+
'{{food.vegetable}} salad',
16+
"{{person.first_name}}'s special {{food.ingredient}}",
17+
];
Lines changed: 120 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,120 @@
1+
export default [
2+
'Ainu',
3+
'Albanian',
4+
'American',
5+
'Andhra',
6+
'Anglo-Indian',
7+
'Arab',
8+
'Argentine',
9+
'Armenian',
10+
'Assyrian',
11+
'Awadhi',
12+
'Azerbaijani',
13+
'Balochi',
14+
'Bangladeshi',
15+
'Bashkir',
16+
'Belarusian',
17+
'Bengali',
18+
'Berber',
19+
'Brazilian',
20+
'British',
21+
'Buddhist',
22+
'Bulgarian',
23+
'Cajun',
24+
'Cantonese',
25+
'Caribbean',
26+
'Chechen',
27+
'Chinese',
28+
'Chinese Islamic',
29+
'Circassian',
30+
'Crimean Tatar',
31+
'Cypriot',
32+
'Czech',
33+
'Danish',
34+
'Egyptian',
35+
'English',
36+
'Eritrean',
37+
'Estonian',
38+
'Ethiopian',
39+
'Filipino',
40+
'French',
41+
'Georgian',
42+
'German',
43+
'Goan',
44+
'Goan Catholic',
45+
'Greek',
46+
'Gujarati',
47+
'Hyderabad',
48+
'Indian',
49+
'Indian Chinese',
50+
'Indian Singaporean',
51+
'Indonesian',
52+
'Inuit',
53+
'Irish',
54+
'Italian',
55+
'Italian-American',
56+
'Jamaican',
57+
'Japanese',
58+
'Jewish - Israeli',
59+
'Karnataka',
60+
'Kazakh',
61+
'Keralite',
62+
'Korean',
63+
'Kurdish',
64+
'Laotian',
65+
'Latvian',
66+
'Lebanese',
67+
'Lithuanian',
68+
'Louisiana Creole',
69+
'Maharashtrian',
70+
'Malay',
71+
'Malaysian Chinese',
72+
'Malaysian Indian',
73+
'Mangalorean',
74+
'Mediterranean',
75+
'Mennonite',
76+
'Mexican',
77+
'Mordovian',
78+
'Mughal',
79+
'Native American',
80+
'Nepalese',
81+
'New Mexican',
82+
'Odia',
83+
'Pakistani',
84+
'Parsi',
85+
'Pashtun',
86+
'Pennsylvania Dutch',
87+
'Peranakan',
88+
'Persian',
89+
'Peruvian',
90+
'Polish',
91+
'Portuguese',
92+
'Punjabi',
93+
'Québécois',
94+
'Rajasthani',
95+
'Romani',
96+
'Romanian',
97+
'Russian',
98+
'Sami',
99+
'Serbian',
100+
'Sindhi',
101+
'Slovak',
102+
'Slovenian',
103+
'Somali',
104+
'South Indian',
105+
'Soviet',
106+
'Spanish',
107+
'Sri Lankan',
108+
'Taiwanese',
109+
'Tamil',
110+
'Tatar',
111+
'Texan',
112+
'Thai',
113+
'Turkish',
114+
'Udupi',
115+
'Ukrainian',
116+
'Vietnamese',
117+
'Yamal',
118+
'Zambian',
119+
'Zanzibari',
120+
];

0 commit comments

Comments
 (0)