syncpack icon indicating copy to clipboard operation
syncpack copied to clipboard

feat(ranges): extend lint-semver-ranges to include specifier types

Open JamieMason opened this issue 1 year ago • 0 comments

Description

When inspecting semver ranges, syncpack only looks at ^, ~ etc. but it could also ensure that instances in a semver group are all file: or alias dependencies etc.

Use case (https://github.com/microsoft/FluidFramework/pull/19637)

// Testing file: dependencies for build-common across the repo. I wanted to at
// least guarantee that a file: dependency was being used, but syncpack doesn't
// seem to support that without the file path being the same everywhere, which
// doesn't work in our repo.
{
  label: 'build-common should be a file: dependency',
  dependencies: ['@fluidframework/build-common'],
  packages: ['**'],
  isIgnored: true,
}

Suggested Solution

All of the specifierTypes used to target instances could be used in place of the range property as additional allowed values.

JamieMason avatar Feb 15 '24 09:02 JamieMason