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

Upgrade to create-jest-runner 0.8.0 #121

Closed
wants to merge 1 commit into from

Conversation

ZauberNerd
Copy link

@ZauberNerd ZauberNerd commented Aug 26, 2021

This PR upgrades the dependency create-jest-runner to version 0.8.0 and also updates Jest to version 27.

Further: We've added a clean-up commit for the devDependencies, because version ranges only make sense in peerDependencies.
If there is however a reason for the version ranges in the devDependencies, feel free to drop the commit :)

Edit: For some reason we get ESLint errors locally, although we didn't change the code and the eslint version shouldn't have changed significantly (https://github.com/jest-community/jest-runner-eslint/pull/121/files#diff-51e4f558fae534656963876761c95b83b6ef5da5103c4adef6768219ed76c2deL2292)

Copy link
Collaborator

@ljharb ljharb left a comment

Choose a reason for hiding this comment

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

There’s no changelog inside this package, and no engines declaration; is there one in the repo that describes the breaking changes between v0.6 and v0.8? Does it support the same node versions as jest 25 - 27? Does it work with jest 25 and 26 as well as 27?

package.json Outdated Show resolved Hide resolved
package.json Outdated Show resolved Hide resolved
@ZauberNerd
Copy link
Author

There’s no changelog inside this package, and no engines declaration; is there one in the repo that describes the breaking changes between v0.6 and v0.8? Does it support the same node versions as jest 25 - 27? Does it work with jest 25 and 26 as well as 27?

I'm not sure, what you mean about the changelog, there is one here: https://github.com/jest-community/jest-runner-eslint/blob/main/CHANGELOG.md
Or do you mean, I should add my changes manually to it?

Regarding the engines: Good point. With the upgrade to Jest v27, we would need to drop Node.js 8 support, because it doesn't support optional catch binding which causes the tests to fail: https://github.com/jest-community/jest-runner-eslint/pull/121/checks?check_run_id=3433040464#step:5:7

Notable changes in create-jest-runner:
* 0.7.0: update dependencies and drop support for Node 8
* 0.8.0: Drop support for Node 15 and update `jest-worker` to v27

BREAKING CHANGE: Drop support for Node 8
Due to a breaking change in `create-jest-runner` we need to drop support
for Node 8 as well.

Co-authored-by: Robert Kowalski <robert.kowalski@new-work.se>
@ZauberNerd
Copy link
Author

@ljharb I've updated the commit message to include notable changes in create-jest-runner.
I've also updated engines to >=10.13.0, as that is the minimum version required for jest-worker and I've removed Node.js 8 from the GitHub Actions workflow.

@ljharb
Copy link
Collaborator

ljharb commented Aug 26, 2021

Just because jest 27 requires node 10 doesn’t mean we have to - jest can impose the higher requirement.

The main thing is if create-jest-runner is forcing that requirement - if so, we can’t update to it without a breaking change, and I’d prefer not to do that.

@robertkowalski
Copy link

robertkowalski commented Aug 27, 2021

hmmm... not sure if i understand correctly @ljharb

i think the latest version of create-jest-runner implicitly imposes a higher requirement, as it depends on jest-runner 27. before it was using jest-runner from jest 26 to spawn tests.

going forward, what are the options we have if we want to use jest 27 and keep using jest-runner-eslint? we are happy to help and further work on the PR, but to be honest not sure whats missing and how to proceed forward...

@ljharb
Copy link
Collaborator

ljharb commented Aug 27, 2021

In that case, there really aren't any options except:

  1. staying with the create-jest-runner we're using, for the duration
  2. doing a breaking change and upgrading to the latest create-jest-runner - but this isn't sustainable over time; adding new jest versions should be semver-minor
  3. create-jest-runner finds a way to support multiple jest versions such that we can use the latest version of it without a breaking change

@ZauberNerd
Copy link
Author

In that case, there really aren't any options except:

  1. staying with the create-jest-runner we're using, for the duration
  2. doing a breaking change and upgrading to the latest create-jest-runner - but this isn't sustainable over time; adding new jest versions should be semver-minor
  3. create-jest-runner finds a way to support multiple jest versions such that we can use the latest version of it without a breaking change
  1. How about releasing jest-runner-eslint (and also create-jest-runner) with the same major versions as the rest of the Jest packages?
  2. The only viable option I see there, would be to make jest-worker a peerDependency of create-jest-runner.

/cc @SimenB do you see any other solutions?

@ljharb
Copy link
Collaborator

ljharb commented Aug 30, 2021

Why force users to upgrade more things in sync??

@SimenB
Copy link
Member

SimenB commented Sep 17, 2021

I think we should drop Node 8 and Node 10 (but not any Jest or ESLint versions if we can). While I'm a fan of supporting older versions of node, at some point I don't think holding other upgrades back are worth it. And while Jest still supports node 10, I think we can just drop it while we're at it - running your linting on multiple versions of node isn't as useful as running your tests on multiple versions, so I don't think it's a huge loss of usability for this module (although running tests but not lint might require some config gymnastics, so maybe keeping 10 is a good idea for now).

@ljharb
Copy link
Collaborator

ljharb commented Sep 17, 2021

The real solution would be if we could change create-jest-runner to be more backwards-compatible.

@SimenB
Copy link
Member

SimenB commented Mar 5, 2023

@ZauberNerd sorry about the long delay - available in https://github.com/jest-community/jest-runner-eslint/releases/tag/v2.0.0

@ZauberNerd ZauberNerd deleted the jest-v27 branch March 7, 2023 14:51
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.

None yet

4 participants