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

Set specific "package.json" in the repo as main file #88

Closed
bombillazo opened this issue Jul 11, 2022 · 3 comments
Closed

Set specific "package.json" in the repo as main file #88

bombillazo opened this issue Jul 11, 2022 · 3 comments

Comments

@bombillazo
Copy link

bombillazo commented Jul 11, 2022

Description

It would be great to specify one package.json file within the monorepo to act as the "main" file, meaning this file is a version driver from which all other files are resolved to. Doing so will automatically limit all other packages from raising the versions if this package.json is lower than the rest while bringing the rest to the latest version specified in this main file.

Suggested Solution

Have a new option in the configuration/cli to specify this "main" package.json file.

@bombillazo bombillazo changed the title Set specific "package.json" as main file Set specific "package.json" in the repo as main file Jul 11, 2022
@JamieMason
Copy link
Owner

Hi Hector,
For the upcoming hoist feature there's the idea of a --target file and multiple --source files, but in the general case of syncing versions I think this idea in its current form could be unintuitive. Could you go into some more detail? Maybe a specific command for this use case would be clearer. Thanks.

@bombillazo
Copy link
Author

Yes, after using this library a bit, I could envision this new feature as another optionGroup type configuration where you specify a group of files and the "main" file from which the semver will be inherited. This is useful when one is required to keep specific versions stable but instead of creating versionGroups, one could use a specific package.json as the driver for the rest of the files. In my case with a monorepo, one app inside the repo is determining the versions for the rest of the apps, including the root deps.

@JamieMason
Copy link
Owner

Closing as duplicate of #87

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

2 participants