Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Conversation

pkuczynski
Copy link
Member

No description provided.

@pkuczynski pkuczynski requested a review from a team as a code owner September 25, 2025 10:27
@pkuczynski pkuczynski self-assigned this Sep 25, 2025
Copy link

netlify bot commented Sep 25, 2025

Deploy Preview for fakerjs ready!

Name Link
🔨 Latest commit ec43327
🔍 Latest deploy log https://app.netlify.com/projects/fakerjs/deploys/68d5191ed5f8ec0008286e96
😎 Deploy Preview https://deploy-preview-3616.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.

Copy link

codecov bot commented Sep 25, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 99.97%. Comparing base (b547045) to head (ec43327).

Additional details and impacted files
@@           Coverage Diff           @@
##             next    #3616   +/-   ##
=======================================
  Coverage   99.97%   99.97%           
=======================================
  Files        2894     2894           
  Lines      222390   222390           
  Branches      932      929    -3     
=======================================
  Hits       222337   222337           
  Misses         53       53           
🚀 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 the c: docs Improvements or additions to documentation label Sep 25, 2025
Comment on lines +60 to +80
```ts
// Transform both `ts` and `js` files. Defining only `ts` would not be enough, as we also need to transform @faker-js
transform: {
'^.+\\.(t|j)s$': 'ts-jest',

// or when you pass more settings:
'^.+\\.(t|j)s$': [
'ts-jest',
// ... other setttings
]
}

// Exclude from transformation all files in `node_modules`, except `@faker-js`
transformIgnorePatterns: [
// npm
'node_modules/(?!@faker-js).+',

// pnpm
'node_modules/.pnpm/.+/node_modules/(?!@faker-js).+'
],
```
Copy link
Member

Choose a reason for hiding this comment

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

The change itself looks fine. I was thinking about representing the code block for the config as a Code Group to better differentiate between npm and pnpm packages.
BUT, this documentation only represents a migration option for ts-jest. By default Jest uses babel-jest. Also, the transformer configuration itself is not that important - only that you have one defined for *.js files. That's why I would probably replace the "transform" section in a more generic way, like this:

// Transform both `ts` and `js` files. Defining only `ts` would not be enough, as we also need to transform @faker-js
transform: {
  '^.+\\.(t|j)s$': 'ts-jest', // use the transformer and configuration of your choice
}

// Exclude from transformation all files in `node_modules`, except `@faker-js`
transformIgnorePatterns: [
  // npm
  'node_modules/(?!@faker-js).+',

  // pnpm
  'node_modules/.pnpm/.+/node_modules/(?!@faker-js).+'
],

@xDivisionByZerox xDivisionByZerox added the p: 1-normal Nothing urgent label Sep 25, 2025
@xDivisionByZerox xDivisionByZerox added this to the v10.x milestone Sep 25, 2025
@matthewmayer
Copy link
Contributor

Maybe we should try to keep this short and put a longer description and workarounds on https://fakerjs.dev/guide/frameworks.html

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

c: docs Improvements or additions to documentation p: 1-normal Nothing urgent

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants

Morty Proxy This is a proxified and sanitized view of the page, visit original site.