Skip to content

feat(food): add plant-based dish variety#3745

Merged
xDivisionByZerox merged 2 commits intofaker-js:nextfrom
stuckvgn:feat/plant-based-food-data
Feb 26, 2026
Merged

feat(food): add plant-based dish variety#3745
xDivisionByZerox merged 2 commits intofaker-js:nextfrom
stuckvgn:feat/plant-based-food-data

Conversation

@stuckvgn
Copy link
Copy Markdown
Contributor

@stuckvgn stuckvgn commented Feb 25, 2026

Summary

The food module's generated output currently skews heavily toward meat-based content:

  • Dish patterns (dish_pattern.ts): 10 out of 15 patterns reference {{food.meat}}
  • Description patterns (description_pattern.ts): 18 out of 21 templates reference {{food.meat}}
  • Static dishes (dish.ts): 54 entries with limited plant-based representation

This PR adds diversity to the food module by:

  • Adding 20 plant-based dishes to dish.ts — all real dishes from world cuisines (aloo gobi, baba ganoush, chana masala, dal makhani, falafel wrap, ratatouille, etc.)
  • Adding 4 plant-based dish patterns to dish_pattern.ts that use {{food.vegetable}}, {{food.fruit}}, {{food.spice}}, and {{food.ingredient}} instead of {{food.meat}}
  • Adding 3 plant-based description patterns to description_pattern.ts that showcase vegetable-forward dishes

All changes are purely additive — no existing entries were modified or removed. New dish entries are inserted in alphabetical order consistent with the existing array. This follows the precedent set by PR #3650.

Test plan

  • pnpm run generate:locales completes without changes (locale data is already normalized)
  • pnpm run preflight passes
  • faker.food.dish() can return new plant-based dishes
  • faker.food.dishName() can generate plant-based patterns
  • faker.food.description() can generate plant-based descriptions

@stuckvgn stuckvgn requested a review from a team as a code owner February 25, 2026 13:21
@netlify
Copy link
Copy Markdown

netlify Bot commented Feb 25, 2026

Deploy Preview for fakerjs ready!

Built without sensitive environment variables

Name Link
🔨 Latest commit f002a68
🔍 Latest deploy log https://app.netlify.com/projects/fakerjs/deploys/699f069601e4cf00082c01aa
😎 Deploy Preview https://deploy-preview-3745.fakerjs.dev
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@stuckvgn
Copy link
Copy Markdown
Contributor Author

Hi maintainers — just checking in on this. CI is green and the deploy preview is live. Happy to address any feedback on the data additions. Let me know if there's anything you'd like adjusted.

@Shinigami92
Copy link
Copy Markdown
Member

Looks like you need to update the test snapshots. Please read contribution guide for further steps.

@stuckvgn
Copy link
Copy Markdown
Contributor Author

Updated test snapshots as requested. Thanks for the review @Shinigami92!

@codecov
Copy link
Copy Markdown

codecov Bot commented Feb 25, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 98.88%. Comparing base (614b4e9) to head (f002a68).
⚠️ Report is 3 commits behind head on next.

Additional details and impacted files
@@           Coverage Diff           @@
##             next    #3745   +/-   ##
=======================================
  Coverage   98.88%   98.88%           
=======================================
  Files         883      883           
  Lines        3061     3061           
  Branches      540      556   +16     
=======================================
  Hits         3027     3027           
  Misses         30       30           
  Partials        4        4           
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@xDivisionByZerox xDivisionByZerox added c: feature Request for new feature p: 1-normal Nothing urgent c: locale Permutes locale definitions m: food Something is referring to the food module labels Feb 25, 2026
Copy link
Copy Markdown
Member

@xDivisionByZerox xDivisionByZerox left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for bringing in more diversity in this still "fresh" module.

@xDivisionByZerox xDivisionByZerox added this pull request to the merge queue Feb 25, 2026
@ST-DDT
Copy link
Copy Markdown
Member

ST-DDT commented Feb 25, 2026

Have you completed all steps of your test plan (or are they intentionally not checked)?

@xDivisionByZerox xDivisionByZerox removed this pull request from the merge queue due to a manual request Feb 25, 2026
@stuckvgn
Copy link
Copy Markdown
Contributor Author

All steps were completed — the checkboxes just weren't ticked before submission, sorry about that.

  • pnpm run generate:locales ran cleanly with no changes (locale data was already normalized)
  • pnpm run preflight passes (CI confirms)
  • faker.food.dish(), faker.food.dishName(), and faker.food.description() all return the new plant-based entries as verified by the snapshot tests

Checking them off now — all good to merge when you're ready.

@xDivisionByZerox xDivisionByZerox added this pull request to the merge queue Feb 26, 2026
@xDivisionByZerox xDivisionByZerox added this to the v10.x milestone Feb 26, 2026
Merged via the queue into faker-js:next with commit 41edf49 Feb 26, 2026
40 of 41 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

c: feature Request for new feature c: locale Permutes locale definitions m: food Something is referring to the food module p: 1-normal Nothing urgent

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants