Skip to content

docs(config): test and document version/semver group precedence #221

@ardelato

Description

@ardelato

Description

Note

I created a reproducible repo that includes more details -- https://github.com/ardelato/syncpack-config-ooo-repo/tree/main.


I've encountered unexpected behaviors with lint-semver-ranges and list-mismatches commands when using a configuration file with both versionGroup and semverGroup policies.

There seems to be an underlying behavior that is not communicated properly or the behavior itself is a bug.

Issues
  1. lint-semver-ranges Command:

    • Expected: The command should only consider semverGroup policies and flag any peerDependencies not using the ^ range as errors.
      image

    • Actual: Despite only semverGroup policies being logged, a PinnedMismatch type validation is taking into account and marks one of the prior react peerDependencies as valid.
      image

  2. list-mismatches Command:

    • Expected: The command should solely consider versionGroup policies for identifying mismatches. For instance, mismatches like the lodash peerDependency in packageB should not be flagged if they do not fall under any versionGroup range definition.
      image

    • Actual: The lodash peerDependency in packageB was flagged as an error when using withVersionGroup.mjs, indicating a possible unintended consideration of the semverGroup policies.
      image

I tried looking at the syncpack docs to see if there was any mention that could explain this behavior and only found this - https://jamiemason.github.io/syncpack/guide/getting-started/

image

From this callout, I would still have expected the relevant group's policies to take precedence given the output of the commands.



Overall, Syncpack is a very handy tool so if you need further information or help, please let me know!

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions