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

[site] Update customTypes docs #202

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 23 additions & 2 deletions site/src/partials/examples/_engines-node.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -35,10 +35,18 @@ syncpack fix-mismatches --types nodeEngine

<Hx level={props.level}>3. Track them in future</Hx>

Add your new custom type to your `dependencyTypes`.
Add your new custom type to your `dependencyTypes` at the root level.
It is included in the list of all possible dependency types.

```json title=".syncpackrc"
{
"customTypes": {
"nodeEngine": {
"path": "engines.node",
"strategy": "version"
}
},

"dependencyTypes": [
"dev"
"nodeEngine"
Expand All @@ -56,16 +64,29 @@ syncpack list

<Hx level={props.level}>4. Relax the rules (optional)</Hx>

If you don't want the Node.js version to be identical in every package but do want them all to be compatible with each other, you can use a [Same Range](/syncpack/config/version-groups/same-range) Version Group.
If you don't want the Node.js version to be identical in every package but do
want them all to be compatible with each other, you can use a
[Same Range](/syncpack/config/version-groups/same-range) Version Group.

Note that you do have to list your customType in `dependencyTypes` for it to
work within `versionGroups#dependencyTypes` or `semverGroups#dependencyTypes`.

```json title=".syncpackrc"
{
"customTypes": {
"nodeEngine": {
"path": "engines.node",
"strategy": "version"
}
},

"dependencyTypes": [
"dev"
"nodeEngine"
"peer"
"prod"
],

"versionGroups": [
{
"dependencyTypes": ["nodeEngine"],
Expand Down