pub struct Dependency {
pub specifier: String,
pub version: String,
}Expand description
A dependency represents a resolved dependency for a Importer (workspace package)
Fields§
§specifier: StringThe specifier from the package.json, e.g. “^1.2.3”, “workspace:^”, etc.
version: StringThe resolved version of the dependency.
This will be either a qualified version that together with the package name forms a key into the snapshots map, or a “link:” for workspace packages, e.g.:
...
importers:
packages/foo:
dependencies:
bar:
specifier: workspace:^
version: link:../bar
baz:
specifier: ^1.2.0
version: 1.2.3(peer@4.5.6)
packages/bar:
dependencies:
baz:
specifier: ^1.2.0
version: 1.2.3(peer@7.8.9)
...Trait Implementations§
Source§impl Debug for Dependency
impl Debug for Dependency
Source§impl<'de> Deserialize<'de> for Dependency
impl<'de> Deserialize<'de> for Dependency
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>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for Dependency
impl RefUnwindSafe for Dependency
impl Send for Dependency
impl Sync for Dependency
impl Unpin for Dependency
impl UnwindSafe for Dependency
Blanket Implementations§
§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more