Skip to content

Commit 4fa948b

Browse files
committed
Optional packages in pnpm-workspace.yaml
1 parent e652ba0 commit 4fa948b

2 files changed

Lines changed: 8 additions & 8 deletions

File tree

Cargo.toml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ name = "pyn"
33
description = "A wrapper for the JavaScript package managers: npm, pnpm, and Yarn"
44
license = "MIT"
55
version = "0.6.0"
6-
authors = ["mitchellhamilton <mitchell@hamil.town>"]
6+
authors = ["emmatown <git@emmas.town>"]
77
homepage = "https://github.com/Thinkmill/pyn"
88
repository = "https://github.com/Thinkmill/pyn"
99
edition = "2021"
@@ -12,14 +12,14 @@ edition = "2021"
1212

1313
[dependencies]
1414

15-
serde_json = {version = "1.0.64", features=["preserve_order"]}
15+
serde_json = { version = "1.0.64", features = ["preserve_order"] }
1616
serde = { version = "1.0.125", features = ["derive"] }
17-
linked-hash-map = {version="0.5.4",features=["serde_impl"]}
18-
structopt = {version = "0.3"}
19-
reqwest = { version = "0.11.3", features=["blocking", "json"] }
17+
linked-hash-map = { version = "0.5.4", features = ["serde_impl"] }
18+
structopt = { version = "0.3" }
19+
reqwest = { version = "0.11.3", features = ["blocking", "json"] }
2020
serde_yaml = "0.8"
2121
ignore = "0.4.18"
2222
dialoguer = "0.9"
23-
tokio = {version = "1", features = ["full"]}
23+
tokio = { version = "1", features = ["full"] }
2424
futures = "0.3"
2525
anyhow = "1.0.53"

src/project.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ use std::{
1111

1212
#[derive(Debug, Deserialize)]
1313
struct PnpmWorkspaceConfig {
14-
packages: Vec<String>,
14+
packages: Option<Vec<String>>,
1515
}
1616

1717
#[derive(Debug, Deserialize)]
@@ -193,7 +193,7 @@ impl Project {
193193
match fs::read_to_string(&pnpm_workspace_path) {
194194
Ok(contents) => {
195195
let config: PnpmWorkspaceConfig = serde_yaml::from_str(&contents)?;
196-
Some(config.packages)
196+
config.packages
197197
}
198198
Err(err) if err.kind() == ErrorKind::NotFound => None,
199199
Err(err) => {

0 commit comments

Comments
 (0)