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

Allow Jest v28 #135

Merged
merged 1 commit into from
May 3, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
7 changes: 5 additions & 2 deletions .github/workflows/nodejs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,16 +20,19 @@ jobs:
matrix:
node-version: [10.x, 12.x, 14.x, 16.x]
eslint-version: [6, 7, 8]
jest-version: [25, 26, 27]
jest-version: [25, 26, 27, 28]
include:
# eslint@7 and jest@26 doesn't support node@8
# eslint@7 and jest@26 don't support node@8
- node-version: 8.x
eslint-version: 6
jest-version: 25
exclude:
# eslint@8 doesn't support node@10
- node-version: 10.x
eslint-version: 8
# jest@28 doesn't support node@10
- node-version: 10.x
jest-version: 28
runs-on: ubuntu-latest

steps:
Expand Down
6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -42,16 +42,16 @@
"eslint-plugin-jest": "^23.17.1",
"eslint-plugin-prettier": "^3.1.4",
"execa": "^3.4.0",
"jest": "^25.1 || ^26 || ^27",
"jest": "^25.1 || ^26 || ^27 || ^28",
"jest-watch-select-projects": "^2.0.0",
"jest-watch-typeahead": "^0.6.4",
"jest-watch-typeahead": "^1.1.0",
Copy link
Member

Choose a reason for hiding this comment

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

this only works in jest 27 and newer (as v1 is native ESM), but I guess watch mode isn't the most important thing

Copy link
Collaborator

Choose a reason for hiding this comment

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

Does v0.x support jest 28? If so, we should probably downgrade it.

Copy link
Member

@SimenB SimenB May 3, 2022

Choose a reason for hiding this comment

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

yes, the interface of watch plugins is unchanged

(there will be peer dep warnings, tho)

Copy link
Collaborator

Choose a reason for hiding this comment

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

ah, then it’s still invalid - no chance of a v0.x bump with updated peer deps?

Copy link
Member

Choose a reason for hiding this comment

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

we could upgrade to yarn v2 and use packageExtension. Either way, it's just a warning locally, it won't be visible to consumers

Copy link
Contributor Author

Choose a reason for hiding this comment

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

What do you think about changing the semver here to be ^0.6.4 || ^1.1.0?

Copy link
Member

Choose a reason for hiding this comment

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

that works 🙂

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Copy link
Collaborator

Choose a reason for hiding this comment

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

@SimenB yarn-specific features aren’t useful. #136 works tho

Copy link
Member

Choose a reason for hiding this comment

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

Since it only applies to this specific repo and no consumers, and we use yarn, I think it would work fine. but changing the range works as well

"prettier": "1.19.1",
"rimraf": "^3.0.2",
"semver": "^6.3.0"
},
"peerDependencies": {
"eslint": "^6 || ^7 || ^8",
"jest": "^25.1 || ^26 || ^27"
"jest": "^25.1 || ^26 || ^27 || ^28"
},
"prettier": {
"proseWrap": "never",
Expand Down