Skip to content

Commit 755ac7c

Browse files
committed
Adds manifest_path
1 parent b75e4d5 commit 755ac7c

File tree

3 files changed

+9
-3
lines changed

3 files changed

+9
-3
lines changed

Cargo.lock

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "pnp"
3-
version = "0.4.3"
3+
version = "0.4.4"
44
edition = "2021"
55
license = "BSD-2-Clause"
66
description = "Resolution primitives for Yarn PnP"

src/lib.rs

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,10 @@ pub struct PackageInformation {
8585
#[serde(rename_all = "camelCase")]
8686
pub struct Manifest {
8787
#[serde(skip_deserializing)]
88-
manifest_dir: PathBuf,
88+
pub manifest_dir: PathBuf,
89+
90+
#[serde(skip_deserializing)]
91+
pub manifest_path: PathBuf,
8992

9093
#[serde(skip_deserializing)]
9194
location_trie: Trie<String, PackageLocator>,
@@ -189,6 +192,9 @@ pub fn load_pnp_manifest<P: AsRef<Path>>(p: P) -> Result<Manifest, Error> {
189192
}
190193

191194
pub fn init_pnp_manifest<P: AsRef<Path>>(manifest: &mut Manifest, p: P) {
195+
manifest.manifest_path = p.as_ref()
196+
.to_path_buf();
197+
192198
manifest.manifest_dir = p.as_ref().parent()
193199
.expect("Should have a parent directory")
194200
.to_owned();

0 commit comments

Comments
 (0)