-
-
Notifications
You must be signed in to change notification settings - Fork 43
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
docs(site): more progress adding documentation
- Loading branch information
1 parent
d8ab5da
commit 982cee4
Showing
43 changed files
with
625 additions
and
344 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,77 @@ | ||
--- | ||
id: dependency-types | ||
title: dependencyTypes | ||
--- | ||
|
||
import DefaultDependencyTypes from '@site/src/partials/default-dependency-types.mdx'; | ||
|
||
# `dependencyTypes` string[] | ||
|
||
All of the [default dependency types](#default-dependency-types) are enabled by | ||
default, but can be reduced to a smaller list via the `dependencyTypes` property | ||
of your config file. | ||
|
||
In this example, only dependencies found in the | ||
[`dependencies`](https://docs.npmjs.com/cli/v9/configuring-npm/package-json#dependencies) | ||
and | ||
[`devDependencies`](https://docs.npmjs.com/cli/v9/configuring-npm/package-json#devDependencies) | ||
properties of package.json files will be inspected by syncpack: | ||
|
||
```json | ||
{ | ||
"dependencyTypes": ["dev", "prod"] | ||
} | ||
``` | ||
|
||
:::tip | ||
|
||
The [default dependency types](#default-dependency-types) can be extended with | ||
your own [`customTypes`](./custom-types.mdx), so you can find and fix versions | ||
found in other parts of your package.json files. | ||
|
||
::: | ||
|
||
:::info | ||
|
||
Your `dependencyTypes` configuration in your [config file](../config-file.mdx) | ||
can be overridden on an ad hoc basis using the [`--types`](../option/types.mdx) | ||
option. | ||
|
||
::: | ||
|
||
## Default dependency types | ||
|
||
<DefaultDependencyTypes /> | ||
|
||
## The `workspace` type | ||
|
||
This option synchronises the versions of your dependencies with the | ||
[`version`](https://docs.npmjs.com/cli/v9/configuring-npm/package-json#version) | ||
properties of the package.json files developed in your own local | ||
workspace/project, when they relate to eachother. | ||
|
||
Take this example, `@your-repo/fetch` is developed in your repo: | ||
|
||
```jsonc | ||
{ | ||
"name": "@your-repo/fetch", | ||
"version": "1.0.2" | ||
// ...rest of the file | ||
} | ||
``` | ||
|
||
and another package developed in your repo depends on it: | ||
|
||
```jsonc | ||
{ | ||
"name": "@your-repo/ui", | ||
// ...other stuff | ||
"dependencies": { | ||
"@your-repo/fetch": "0.9.4" | ||
} | ||
// ...rest of the file | ||
} | ||
``` | ||
|
||
When `workspace` is enabled, syncpack will fix `@your-repo/ui` so it depends on | ||
version `1.0.2` of `@your-repo/fetch`. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.