-
Notifications
You must be signed in to change notification settings - Fork 222
Bump @faker-js/faker from 9.0.3 to 10.2.0 and fix CI failures #4295
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
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
There was a problem hiding this 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/fakerfrom^9.0.3to^10.2.0. - Add
@faker-jsto the Jest node_modules transform allowlist so faker v10’s ESM output is transformed. - Update
package-lock.jsonto 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", |
Copilot
AI
Feb 6, 2026
There was a problem hiding this comment.
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).
| "@faker-js/faker": "^10.2.0", | |
| "@faker-js/faker": "^9.0.0", |
| "node": "^20.19.0 || ^22.13.0 || ^23.5.0 || >=24.0.0", | ||
| "npm": ">=10" |
Copilot
AI
Feb 6, 2026
There was a problem hiding this comment.
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.
| "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" |
Closes #4293
Commits