Skip to content

Bump @faker-js/faker from 9.0.3 to 10.2.0 and fix CI failures#4295

Open
d10c wants to merge 2 commits intogithub:mainfrom
d10c:fix-pr-4293
Open

Bump @faker-js/faker from 9.0.3 to 10.2.0 and fix CI failures#4295
d10c wants to merge 2 commits intogithub:mainfrom
d10c:fix-pr-4293

Conversation

@d10c
Copy link
Contributor

@d10c d10c commented Feb 6, 2026

Closes #4293

Commits

  1. Bump @faker-js/faker from 9.0.3 to 10.2.0 in /extensions/ql-vscode
  2. Add @faker-js to Jest transform patterns for v10 ESM support
    • Adds @faker-js/faker to Jest's ES module transformation list
    • Required because faker v10+ is now an ES module

dependabot bot and others added 2 commits February 6, 2026 11:36
Bumps [@faker-js/faker](https://github.com/faker-js/faker) from 9.0.3 to 10.2.0.
- [Release notes](https://github.com/faker-js/faker/releases)
- [Changelog](https://github.com/faker-js/faker/blob/next/CHANGELOG.md)
- [Commits](faker-js/faker@v9.0.3...v10.2.0)

---
updated-dependencies:
- dependency-name: "@faker-js/faker"
  dependency-version: 10.2.0
  dependency-type: direct:development
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
This commit adds @faker-js/faker to the list of packages that need to
be transformed by Jest during test execution.

Problem:
@faker-js/faker v10.0.0+ changed from CommonJS to ES modules (ESM) by
setting \"type\": \"module\" in its package.json. Jest, by default, does
not transform node_modules packages and expects them to be in CommonJS
format. When Jest tries to load the ESM version of faker, it fails
because the test environment isn't configured to handle ES modules from
node_modules.

While this doesn't directly cause test failures in this particular
upgrade (the tests fail for a different React 19 reason), it's a
necessary prerequisite to ensure faker can be properly loaded in the
Jest test environment.

Solution:
Added '@faker-js' to the transformScopes array in test/jest-config.ts.
This tells Jest to transform any packages under the @faker-js scope,
converting them from ES modules to CommonJS so they can be used in the
Jest test environment.

The transformScopes array is used to generate transformIgnorePatterns,
which determines which packages in node_modules should NOT be ignored
by Jest's transformation pipeline.

File modified:
- extensions/ql-vscode/test/jest-config.ts
@d10c d10c requested a review from nickrolfe February 6, 2026 12:25
@d10c d10c marked this pull request as ready for review February 6, 2026 12:25
@d10c d10c requested a review from a team as a code owner February 6, 2026 12:25
Copilot AI review requested due to automatic review settings February 6, 2026 12:25
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR updates the extensions/ql-vscode dev dependency on @faker-js/faker to v10.x and adjusts the Jest configuration to correctly transform the now-ESM faker package during tests, resolving the CI failures seen in the original Dependabot bump.

Changes:

  • Bump @faker-js/faker from ^9.0.3 to ^10.2.0.
  • Add @faker-js to the Jest node_modules transform allowlist so faker v10’s ESM output is transformed.
  • Update package-lock.json to reflect the new faker version and its engine requirements.

Reviewed changes

Copilot reviewed 2 out of 3 changed files in this pull request and generated 2 comments.

File Description
extensions/ql-vscode/test/jest-config.ts Adds @faker-js to the transform allowlist so Jest will transform faker’s ESM code.
extensions/ql-vscode/package.json Bumps @faker-js/faker devDependency to ^10.2.0.
extensions/ql-vscode/package-lock.json Updates lockfile entries for faker v10.2.0 (including updated engines metadata).
Files not reviewed (1)
  • extensions/ql-vscode/package-lock.json: Language not supported

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

"@babel/preset-typescript": "^7.28.5",
"@eslint/js": "^9.39.2",
"@faker-js/faker": "^9.0.3",
"@faker-js/faker": "^10.2.0",
Copy link

Copilot AI Feb 6, 2026

Choose a reason for hiding this comment

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

@faker-js/faker v10 declares engines.npm >=10. This repo’s package.json currently advertises engines.npm >=7.20.6, which is now lower than what this devDependency supports and can lead to installs/tests failing for contributors using npm 7–9. Consider bumping engines.npm to >=10 (or aligning it with whatever npm version is shipped with the pinned Node in .nvmrc).

Suggested change
"@faker-js/faker": "^10.2.0",
"@faker-js/faker": "^9.0.0",

Copilot uses AI. Check for mistakes.
Comment on lines +3387 to +3388
"node": "^20.19.0 || ^22.13.0 || ^23.5.0 || >=24.0.0",
"npm": ">=10"
Copy link

Copilot AI Feb 6, 2026

Choose a reason for hiding this comment

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

The lockfile now records @faker-js/faker@10.2.0 with engines.npm >=10. To avoid confusion and potential install failures on older npm versions, align extensions/ql-vscode/package.json’s engines.npm with this requirement.

Suggested change
"node": "^20.19.0 || ^22.13.0 || ^23.5.0 || >=24.0.0",
"npm": ">=10"
"node": "^20.19.0 || ^22.13.0 || ^23.5.0 || >=24.0.0"

Copilot uses AI. Check for mistakes.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant