-
Notifications
You must be signed in to change notification settings - Fork 205
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
yarn link-cli doesn't work with old Node.js versions #661
Comments
Fixes #661 We avoid Promises to allow this script to run under older system versions of node.
Are we supporting old node versions? |
Same question. What versions are we talking about? We don't yet have post-alpha customers. Why compromise the quality of our code to run on anything but the latest? |
Just for the specific This code will never be in XS, either. |
This falls into the same category that certain tooling (such as eslint, prettier) needs to use CommonJS, and it will take a long time for them to support native ESM. Let's not force the world to migrate entirely to ESM and Node 13+ when just a few grungy tooling scripts (like link-cli) can live in the old world until the new world is fully here. If you disagree, I would be happy to write link-cli as a portable Bourne shell script and dodge that bullet in a different way. 😉 |
I actually like the non-promise script better, it reads more easily. I've always found async filesystem operations to be a bit silly (it's not like it's spawning a thread or using |
Actually, that's exactly what Node.js does |
Reported by @dtribble:
This is caused by root's Node.js version not implementing the
fs.promises
API. It should be straightforward to rewrite scripts/link-cli.js to be more portable.The text was updated successfully, but these errors were encountered: