pub struct PackageExtension {
pub dependencies: Option<BTreeMap<String, String>>,
pub dev_dependencies: Option<BTreeMap<String, String>>,
pub optional_dependencies: Option<BTreeMap<String, String>>,
pub peer_dependencies: Option<BTreeMap<String, String>>,
pub peer_dependencies_meta: Option<BTreeMap<String, PeerDependencyMeta>>,
}Expand description
Package extensions offer a way to extend the existing package definitions with additional information. For example, if react-redux should have react-dom in its peerDependencies but it has not, it is possible to patch react-redux using packageExtensions. See more: https://pnpm.io/settings#packageextensions
Fields§
§dependencies: Option<BTreeMap<String, String>>Dependencies are specified with a simple hash of package name to version range. The version range is a string which has one or more space-separated descriptors. Dependencies can also be identified with a tarball or git URL.
dev_dependencies: Option<BTreeMap<String, String>>Specifies dependencies that are required for the development and testing of the project. These dependencies are not needed in the production environment.
optional_dependencies: Option<BTreeMap<String, String>>Specifies dependencies that are optional for your project. These dependencies are attempted to be installed during the npm install process, but if they fail to install, the installation process will not fail.
peer_dependencies: Option<BTreeMap<String, String>>Specifies dependencies that are required by the package but are expected to be provided by the consumer of the package.
peer_dependencies_meta: Option<BTreeMap<String, PeerDependencyMeta>>When a user installs your package, warnings are emitted if packages specified in “peerDependencies” are not already installed. The “peerDependenciesMeta” field serves to provide more information on how your peer dependencies are utilized. Most commonly, it allows peer dependencies to be marked as optional. Metadata for this field is specified with a simple hash of the package name to a metadata object.
Trait Implementations§
Source§impl Clone for PackageExtension
impl Clone for PackageExtension
Source§fn clone(&self) -> PackageExtension
fn clone(&self) -> PackageExtension
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for PackageExtension
impl Debug for PackageExtension
Source§impl Default for PackageExtension
impl Default for PackageExtension
Source§fn default() -> PackageExtension
fn default() -> PackageExtension
Source§impl<'de> Deserialize<'de> for PackageExtensionwhere
PackageExtension: Default,
impl<'de> Deserialize<'de> for PackageExtensionwhere
PackageExtension: Default,
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Source§impl PartialEq for PackageExtension
impl PartialEq for PackageExtension
Source§impl Serialize for PackageExtension
impl Serialize for PackageExtension
impl Eq for PackageExtension
impl StructuralPartialEq for PackageExtension
Auto Trait Implementations§
impl Freeze for PackageExtension
impl RefUnwindSafe for PackageExtension
impl Send for PackageExtension
impl Sync for PackageExtension
impl Unpin for PackageExtension
impl UnsafeUnpin for PackageExtension
impl UnwindSafe for PackageExtension
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.