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

feat(update): update command can be fixed to a semver range #248

Open
oev-chrisbennett opened this issue Sep 17, 2024 · 2 comments
Open

Comments

@oev-chrisbennett
Copy link

Description

Currently syncpack update updates all packages to their latest version, regardless of semver range specified. I'd like to be able to use update to bump packages to their latest version, within the semver range they are defined with, i.e. "syncpack": "^12.0.0" would resolve to "^12.4.0", rather than "13.0.0".

This would allow me to use syncpack as a dependabot replacement in the CI for large monorepos whilst making use of the linting/formatting syncpack provides.

Suggested Solution

As above. Provide a flag to the update command to indicate we want to bind the updates to their current semver range.

If a dependency is defined with different ranges across the repo, throw an error.

For a real-world example see the bun update command in bun's CLI.

Help Needed

Happy to help out on this one if you think it's a good idea. Thanks for all the hard work you put in on syncpack. ❤️

@oev-chrisbennett oev-chrisbennett changed the title update command can be fixed to a semver range feat(update): update command can be fixed to a semver range Sep 17, 2024
@lynettelopez
Copy link

@oev-chrisbennett I didn't realize this wasn't possible until now. How have you been updating your ranged deps thus far?

@JamieMason
Copy link
Owner

Thanks both, the update command needs a bit of work:

As I mentioned, the update command is new and currently quite buggy. Every other command has lots of tests and good confidence they are working, but update and prompt do not.

In the meantime I would wait before using this command. A rewrite of syncpack is coming in the next month or so and the situation should improve then.
#210 (comment)

The challenge has been just getting the time, I'd love to get the rust port done and then come back and work on update.

But in short yes this feature is a good idea and should be included 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants