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(groups): support predicate function in .js config files #158

Open
AprilArcus opened this issue Sep 9, 2023 · 1 comment
Open

feat(groups): support predicate function in .js config files #158

AprilArcus opened this issue Sep 9, 2023 · 1 comment

Comments

@AprilArcus
Copy link

AprilArcus commented Sep 9, 2023

Description

I would like to be able to select packages for an entry in semverGroups based on the private: key in their package.json files. Specifically, I want require a ^ version pin for all prod dependencies in non-private packages, and an exact version pin for prod dependencies elsewhere.

Suggested Solution

A new field available to the object descriptor in https://jamiemason.github.io/syncpack/config/semver-groups, called private, which can take a boolean value and thereby only select workspaces with private set to the corresponding value in their respective package.json files.

@JamieMason
Copy link
Owner

Thanks @AprilArcus,
I'm thinking that maybe config files which are .js could be given support for a function which returns true if a given instance should be handled by that group. In your case you would return based on packageJsonFile.contents.private === true or something like that.

This will probably take a while as the backlog is pretty big, but yeah this could be quite nice.

@JamieMason JamieMason changed the title semverGroup for private / nonprivate packages feat(groups): support predicate function in .js config files Sep 10, 2023
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