-
Notifications
You must be signed in to change notification settings - Fork 4.1k
docs: clarify what peerDependenciesMeta does #7433
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
Changes from 2 commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -818,11 +818,12 @@ to express this. If you depend on features introduced in 1.5.2, use | |
|
|
||
| ### peerDependenciesMeta | ||
|
|
||
| When a user installs your package, npm will emit warnings if packages | ||
| specified in `peerDependencies` are not already installed. The | ||
| `peerDependenciesMeta` field serves to provide npm more information on how | ||
| The `peerDependenciesMeta` field serves to provide npm more information on how | ||
| your peer dependencies are to be used. Specifically, it allows peer | ||
| dependencies to be marked as optional. | ||
| dependencies to be marked as optional. Npm would not automatically install | ||
| optional peer dependencies. This allows you to | ||
|
||
| integrate and interact with a variety of host packages without requiring | ||
| all of them to be installed. | ||
|
|
||
| For example: | ||
|
|
||
|
|
@@ -842,11 +843,6 @@ For example: | |
| } | ||
| ``` | ||
|
|
||
| Marking a peer dependency as optional ensures npm will not emit a warning | ||
| if the `soy-milk` package is not installed on the host. This allows you to | ||
| integrate and interact with a variety of host packages without requiring | ||
| all of them to be installed. | ||
|
|
||
| ### bundleDependencies | ||
|
|
||
| This defines an array of package names that will be bundled when publishing | ||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.