jest-runner-eslint icon indicating copy to clipboard operation
jest-runner-eslint copied to clipboard

Upgrade to create-jest-runner 0.8.0

Open ZauberNerd opened this issue 4 years ago • 9 comments

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)

ZauberNerd avatar Aug 26 '21 12:08 ZauberNerd

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

ZauberNerd avatar Aug 26 '21 15:08 ZauberNerd

@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.

ZauberNerd avatar Aug 26 '21 15:08 ZauberNerd

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.

ljharb avatar Aug 26 '21 15:08 ljharb

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...

robertkowalski avatar Aug 27 '21 08:08 robertkowalski

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

ljharb avatar Aug 27 '21 16:08 ljharb

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?

ZauberNerd avatar Aug 30 '21 08:08 ZauberNerd

Why force users to upgrade more things in sync??

ljharb avatar Aug 30 '21 15:08 ljharb

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).

SimenB avatar Sep 17 '21 10:09 SimenB

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

ljharb avatar Sep 17 '21 15:09 ljharb

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

SimenB avatar Mar 05 '23 20:03 SimenB