Downgrade write-file-atomic to v4 by andrewiggins · Pull Request #13853 · jestjs/jest (original) (raw)

Summary

Hello! When trying to install the latest version of Jest (v29.4.1) I'm getting the following error when using yarn: write-file-atomic@5.0.0: The engine "node" is incompatible with this module. Expected version "^14.17.0 || ^16.13.0 || >=18.0.0". Got "16.10.0". Unfortunately, upgrading my project's node version is a large undertaking that will take a lot of time and involve a couple different teams. So I wanted to pass by you the idea of downgrading write-file-atomic for the time being so I can take advantage of the latest Jest features before upgrading my Node version (and perhaps make upgrading easier for anyone else in a similar situation using Node < 16.13 + yarn). Though I understand if you'd rather not. Just thought I'd ask 😊

Some additional context:
In v29.4.0 in PR #13703, the write-file-atomic was upgraded from v4.0.1 to v5.0.0. Glancing at the changes from v4.0.2...v5.0.0 in write-file-atomic (changelog, commits), I don't see any code changes besides the engines bump. So I believe it is safe to downgrade.

Test plan

Tests pass locally for me.