UNPKG

synopkg

Version:

Consistent dependency versions in large JavaScript Monorepos

52 lines (35 loc) 1.51 kB
--- title: Snapped To --- 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"; Pin the version of all dependencies in this group to follow the versions used by the other packages named within the `snapTo` array. ## Configuration ### snapTo <Badge text="Required" variant="danger" /> - The values refer to the `name` property of the package.json files developed in your monorepo. - Multiple values can be added to provide fallback packages to try in the event that the dependency is not present in the earlier packages in the array. ```json title="Ensure all packages use whatever version of react that mobile-app is using" { "versionGroups": [ { "dependencies": ["react", "react-native"], "snapTo": ["mobile-app"] } ] } ``` ### 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 />