JamieMason / syncpack

Consistent dependency versions in large JavaScript Monorepos.
https://jamiemason.github.io/syncpack/
MIT License
1.46k stars 51 forks source link

fix(engines): syncpack 12.x supports node >=18 not >=16 #215

Open 350str opened 6 months ago

350str commented 6 months ago

Description

Hello. I found a problem, syncpack v12 doesn't work with node v16, because packages globby v14+ and ora v8+ require node v18+

Suggested Solution

update engines field in package.json for correct node version (>18) or downgrade major version of this packages in deps

JamieMason commented 6 months ago

Thanks a lot @350str, I'll bump engines in the next release. By the way, if you are on Node 16 there are older versions of syncpack which work with that.

350str commented 6 months ago

sure, v11 works great for me, thanks!

lkraav commented 3 weeks ago

Yikes, and here I am on Node 16, needing --specs released in 12.2.0 :crying_cat_face:

JamieMason commented 3 weeks ago

https://github.com/JamieMason/syncpack/releases/tag/14.0.0-alpha.1 might work if you want to try it @lkraav

lkraav commented 3 weeks ago

https://github.com/JamieMason/syncpack/releases/tag/14.0.0-alpha.1 might work if you want to try it

Tyvm, that does seem to take care of the engine problem. But I see new syncpack does a lot of things very differently. I'd expect fix to take --dependencies arg, but it doesn't seem to anymore, and then does way more than I'd like it to.

JamieMason commented 3 weeks ago

Can you summarise what you were wanting to do please @lkraav? To find and fix something specific by the sound of it?

lkraav commented 3 weeks ago

Can you summarise what you were wanting to do please @lkraav? To find and fix something specific by the sound of it?

Certainly. I was looking to take control of very limited amount of package globs at a time.

It's unclear from alpha release notes if syncpack-14 even supports .syncpackrc anymore?

Beyond that, I would've wanted to run syncpack fix --filter "koa" like the good ol days, because I can't blow up the repo by upgrading all 100 packages at once.

JamieMason commented 3 weeks ago

Thanks this is helpful.

It's unclear from alpha release notes if syncpack-14 even supports .syncpackrc anymore?

Config file loading and filenames are the same as before, some config values have changed a little though - I need to write a lot of docs very soon.

--filter is replaced by --dependencies, you can see some examples here https://x.com/fold_left/status/1852349762596417967?t=HvGGFZdeHphFvcbpldXjtg&s=19 and also in the --help output

Beyond that, I would've wanted to run syncpack fix --filter "koa" like the good ol days, because I can't blow up the repo by upgrading all 100 packages at once.

I changed filtering to only apply to linting in 14-alpha but this has changed my mind, I'll put that back in the fix command so you can do this