Skip to content
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

update dependency jest to v29.7.0 and ts-jest v29.2.5 #24

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

odanado
Copy link
Member

@odanado odanado commented Jan 24, 2025

Part of #23

After upgrading the version of TypeScript, an error occurred when running npm install due to a conflict with the TypeScript version inside ts-jest.

npm error code ERESOLVE
npm error ERESOLVE could not resolve
npm error
npm error While resolving: [email protected]
npm error Found: typescript@[5](https://github.com/line/liff-inspector/actions/runs/12947569932/job/36114422141#step:4:6).7.3
npm error node_modules/typescript
npm error   dev typescript@"5.[7](https://github.com/line/liff-inspector/actions/runs/12947569932/job/36114422141#step:4:8).3" from the root project
npm error   peer typescript@"*" from [email protected]
npm error   node_modules/ts-loader
npm error     dev ts-loader@"9.5.1" from @line/[email protected]
npm error     packages/headless-inspector
npm error       @line/[email protected]
npm error       node_modules/@line/headless-inspector
npm error         workspace packages/headless-inspector from the root project
npm error         1 more (@line/liff-inspector)
npm error     ts-loader@"9.5.1" from @line/[email protected]
npm error     packages/liff-inspector
npm error       @line/[email protected]
npm error       node_modules/@line/liff-inspector
npm error         workspace packages/liff-inspector from the root project
npm error   1 more (tsutils)
npm error
npm error Could not resolve dependency:
npm error peer typescript@">=3.[8](https://github.com/line/liff-inspector/actions/runs/12947569932/job/36114422141#step:4:9) <5.0" from [email protected]
npm error node_modules/ts-jest
npm error   dev ts-jest@"27.1.4" from the root project
npm error
npm error Conflicting peer dependency: typescript@4.[9](https://github.com/line/liff-inspector/actions/runs/12947569932/job/36114422141#step:4:10).5
npm error node_modules/typescript
npm error   peer typescript@">=3.8 <5.0" from [email protected]
npm error   node_modules/ts-jest
npm error     dev ts-jest@"27.1.4" from the root project
npm error
npm error Fix the upstream dependency conflict, or retry
npm error this command with --force or --legacy-peer-deps
npm error to accept an incorrect (and potentially broken) dependency resolution.

I will update the versions of jest and ts-jest to resolve this issue.

@odanado odanado requested a review from a team as a code owner January 24, 2025 10:27
@odanado odanado added the dependencies Pull requests that update a dependency file label Jan 24, 2025
@@ -26,9 +26,10 @@
"@typescript-eslint/parser": "5.19.0",
"eslint": "8.13.0",
"eslint-config-prettier": "8.5.0",
"jest": "27.5.1",
"jest": "29.7.0",
"jest-environment-jsdom": "29.7.0",
Copy link
Member Author

@odanado odanado Jan 24, 2025

Choose a reason for hiding this comment

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

After jest v28, jest-environment-jsdom is no longer installed by default.
Therefore, we need to install it separately.

@@ -35,6 +35,7 @@
"devDependencies": {
"@types/express": "4.17.13",
"@types/ws": "8.5.3",
"@types/yargs": "16.0.8",
Copy link
Member Author

@odanado odanado Jan 24, 2025

Choose a reason for hiding this comment

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

This project depended on @types/yargs, but it was not explicitly installed in package.json.
As a result, when jest-environment-jsdom is installed, the version of @types/yargs changes.

To solve this, I modified it so that @types/yargs is explicitly installed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
dependencies Pull requests that update a dependency file
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant