synopkg
Version:
Consistent dependency versions in large JavaScript Monorepos
51 lines (34 loc) • 1.32 kB
text/mdx
---
title: Same Range
---
import { Badge } from "@astrojs/starlight/components";
import Packages from "@partials/group-config/packages.mdx";
import Dependencies from "@partials/group-config/dependencies.mdx";
import DependencyTypes from "@partials/group-config/dependency-types.mdx";
import SpecifierTypes from "@partials/group-config/specifier-types.mdx";
import Label from "@partials/group-config/label.mdx";
import Details from "@site/components/details.astro";
Relax synopkg to ensure that all versions have semver ranges which all satisfy each other, instead of having to be identical.
## Configuration
### policy <Badge text="Required" variant="danger" />
Currently the only custom policy in synopkg is "sameRange", which is what causes this behaviour to be applied to a Version Group.
```json title=".synopkgrc.json"
{
"versionGroups": [
{
"dependencies": ["prod", "dev", "peer"],
"policy": "sameRange"
}
]
}
```
### dependencies <Badge text="Optional" variant="note" />
<Dependencies />
### dependencyTypes <Badge text="Optional" variant="note" />
<DependencyTypes />
### specifierTypes <Badge text="Optional" variant="note" />
<SpecifierTypes />
### label <Badge text="Optional" variant="note" />
<Label />
### packages <Badge text="Optional" variant="note" />
<Packages />