Skip to content

Commit 3c873d5

Browse files
committed
fix(cargo): update dependencies
1 parent b497399 commit 3c873d5

8 files changed

Lines changed: 76 additions & 81 deletions

File tree

Cargo.lock

Lines changed: 36 additions & 36 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ colored = "3.1.1"
2525
crossterm = "0.28.1"
2626
env_logger = "0.11.10"
2727
globset = "0.4.18"
28-
ignore = "0.4.23"
28+
ignore = "0.4.25"
2929
indicatif = "0.18.4"
3030
itertools = "0.14.0"
3131
log = "0.4.29"
@@ -39,11 +39,11 @@ detect-indent = "0.1.0"
3939
detect-newline-style = "0.1.2"
4040
serde = { version = "1.0.228", features = ["derive", "rc"] }
4141
serde_json = { version = "1.0.149", features = ["preserve_order"] }
42-
serde_yaml = "0.9.34"
4342
syncpack-specifier = { path = "crates/syncpack-specifier" }
4443
thiserror = "2.0.18"
45-
yamlpatch = "1.24"
46-
yamlpath = "1.24"
44+
yaml_serde = "0.10"
45+
yamlpatch = "1.25"
46+
yamlpath = "1.25"
4747
tokio = { version = "1", features = ["macros", "rt-multi-thread", "sync"] }
4848
unicode-width = "0.2"
4949

crates/syncpack-specifier/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ license = "MIT"
88

99
[dev-dependencies]
1010
criterion = { version = "0.8.2", features = ["html_reports"] }
11-
ctor = "1.0.4"
11+
ctor = "1.0.5"
1212

1313
[[bench]]
1414
name = "specifier_parsing"

src/catalogs.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,8 @@ use {
77
},
88
log::debug,
99
serde_json::Value as JsonValue,
10-
serde_yaml::Value as YamlValue,
1110
std::time::Instant,
11+
yaml_serde::Value as YamlValue,
1212
};
1313

1414
/// All catalog dep types implied by what's parsed onto Disk (pnpm + Bun).

src/disk.rs

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -3,26 +3,26 @@ use {
33
detect_indent::detect_indent,
44
detect_newline_style::LineEnding,
55
serde_json::Value as JsonValue,
6-
serde_yaml::{Mapping, Value as YamlValue},
76
std::{
87
fs,
98
path::{Path, PathBuf},
109
process::Command,
1110
rc::Rc,
1211
},
1312
thiserror::Error,
13+
yaml_serde::{Mapping, Value as YamlValue},
1414
};
1515

1616
/// A YAML file held in memory alongside its raw text and a queue of
1717
/// pending edit operations. The dual model lets reads (`json_view`,
18-
/// `pnpm_catalog_names`, etc.) hit the parsed `serde_yaml::Value` while
18+
/// `pnpm_catalog_names`, etc.) hit the parsed `yaml_serde::Value` while
1919
/// writes replay `patches` against the original `raw` text via the
2020
/// `yamlpatch` crate so comments / blank lines / indent are preserved.
2121
#[derive(Debug)]
2222
pub struct YamlFile {
2323
pub filepath: PathBuf,
2424
pub formatting: DetectedFormatting,
25-
pub contents: serde_yaml::Value,
25+
pub contents: yaml_serde::Value,
2626
/// Original on-disk text. Empty for auto-created files.
2727
pub raw: String,
2828
/// Edit operations recorded since load (or since last write).
@@ -47,13 +47,13 @@ impl YamlFile {
4747
#[derive(Debug, Clone)]
4848
pub enum PendingYamlOp {
4949
/// Replace the value at `segments`.
50-
Replace { segments: Vec<String>, value: serde_yaml::Value },
50+
Replace { segments: Vec<String>, value: yaml_serde::Value },
5151
/// Add `key: value` at the mapping referenced by `segments`. Empty
5252
/// `segments` targets the document root.
5353
Add {
5454
segments: Vec<String>,
5555
key: String,
56-
value: serde_yaml::Value,
56+
value: yaml_serde::Value,
5757
},
5858
/// Remove the entry at `segments`.
5959
Remove { segments: Vec<String> },
@@ -86,9 +86,9 @@ pub enum DiskIoError {
8686
#[error("Failed to serialise JSON:\n\n{0}")]
8787
JsonSerialize(#[source] serde_json::Error),
8888
#[error("Failed to parse YAML:\n\n{0}")]
89-
YamlParse(#[source] serde_yaml::Error),
89+
YamlParse(#[source] yaml_serde::Error),
9090
#[error("Failed to serialise YAML:\n\n{0}")]
91-
YamlSerialize(#[source] serde_yaml::Error),
91+
YamlSerialize(#[source] yaml_serde::Error),
9292
#[error("Failed to parse YAML for format-preserving write:\n\n{0}")]
9393
YamlPatchParse(#[source] yamlpath::QueryError),
9494
#[error("Failed to apply YAML patch:\n\n{0}")]
@@ -313,7 +313,7 @@ pub trait DiskIo {
313313
fn write_json_file<V: serde::ser::Serialize>(&self, file: &File<V>) -> Result<(), DiskIoError>;
314314
/// Write a YAML file to disk. Format-preserving via `yamlpatch` when
315315
/// `file.raw` is non-empty and `file.patches` is non-empty; otherwise
316-
/// the in-memory `contents` is serialised fresh via `serde_yaml`.
316+
/// the in-memory `contents` is serialised fresh via `yaml_serde`.
317317
fn write_yaml_file(&self, file: &YamlFile) -> Result<(), DiskIoError>;
318318
/// Find every `package.json` under `root` that matches `patterns`,
319319
/// honouring `.gitignore` and skipping `node_modules`/`.git`. Patterns
@@ -411,7 +411,7 @@ impl DiskIo for LiveDiskIo {
411411
fn read_yaml_typed<V: serde::de::DeserializeOwned>(&self, filepath: &Path) -> Option<Result<File<V>, DiskIoError>> {
412412
self.read_textfile(filepath).map(|res| {
413413
res.and_then(|file| {
414-
serde_yaml::from_str::<V>(&file.contents)
414+
yaml_serde::from_str::<V>(&file.contents)
415415
.map_err(DiskIoError::YamlParse)
416416
.map(|parsed| File {
417417
filepath: file.filepath,
@@ -497,7 +497,7 @@ pub(crate) fn get_pretty_json_bytes<V: serde::ser::Serialize>(file: &File<V>) ->
497497
///
498498
/// Two paths:
499499
///
500-
/// - **Empty `raw` (auto-created file) OR no patches recorded**: serialize `contents` fresh via `serde_yaml::to_string`. Nothing exists to
500+
/// - **Empty `raw` (auto-created file) OR no patches recorded**: serialize `contents` fresh via `yaml_serde::to_string`. Nothing exists to
501501
/// preserve.
502502
/// - **Non-empty `raw` AND patches recorded**: build a `yamlpath::Document` from the original text, replay each `PendingYamlOp` as a
503503
/// `yamlpatch::Patch`, and return the resulting `.source()` text. Comments, blank lines, key order, and indent are preserved.
@@ -507,7 +507,7 @@ pub(crate) fn get_pretty_json_bytes<V: serde::ser::Serialize>(file: &File<V>) ->
507507
/// instead of silently degrading.
508508
pub fn render_yaml_bytes(file: &YamlFile) -> Result<Vec<u8>, DiskIoError> {
509509
if file.raw.is_empty() || file.patches.is_empty() {
510-
let yaml = serde_yaml::to_string(&file.contents).map_err(DiskIoError::YamlSerialize)?;
510+
let yaml = yaml_serde::to_string(&file.contents).map_err(DiskIoError::YamlSerialize)?;
511511
let mut bytes = yaml.into_bytes();
512512
bytes.extend(file.formatting.newline.as_bytes());
513513
return Ok(bytes);
@@ -550,11 +550,11 @@ fn route_from_segments(segments: &[String]) -> yamlpath::Route<'static> {
550550
/// starts with a reserved indicator (`@`, `` ` ``) or contains
551551
/// syntactically significant punctuation. yamlpatch's `Op::Add`
552552
/// inserts the key verbatim into the output text, so any quoting must
553-
/// be baked into the string we hand it. Defers to `serde_yaml` for the
553+
/// be baked into the string we hand it. Defers to `yaml_serde` for the
554554
/// quote decision so we match standard scalar emission rules.
555555
fn yaml_quote_key(key: &str) -> String {
556556
let value = YamlValue::String(key.to_string());
557-
let serialised = serde_yaml::to_string(&value).expect("string serialisation cannot fail");
557+
let serialised = yaml_serde::to_string(&value).expect("string serialisation cannot fail");
558558
serialised.trim_end().to_string()
559559
}
560560

@@ -576,7 +576,7 @@ pub fn parse_yaml_file(raw: String, filepath: PathBuf) -> Option<YamlFile> {
576576
/// where the I/O layer already wraps errors.
577577
fn parse_yaml_file_strict(raw: String, filepath: PathBuf) -> Result<YamlFile, DiskIoError> {
578578
let formatting = detect_formatting(&raw);
579-
let contents = serde_yaml::from_str::<YamlValue>(&raw).map_err(DiskIoError::YamlParse)?;
579+
let contents = yaml_serde::from_str::<YamlValue>(&raw).map_err(DiskIoError::YamlParse)?;
580580
Ok(YamlFile {
581581
filepath,
582582
formatting,
@@ -1004,7 +1004,7 @@ fn ensure_catalog_block<'a>(file: &'a mut YamlFile, catalog_name: &str) -> &'a m
10041004
}
10051005
}
10061006

1007-
/// Convert a `serde_yaml::Value` into a `serde_json::Value` for JSON pointer
1007+
/// Convert a `yaml_serde::Value` into a `serde_json::Value` for JSON pointer
10081008
/// access. Hand-rolled to avoid any reliance on the yaml crate's `Serialize`
10091009
/// quirks. Yaml mappings with non-string keys produce `null` for that entry.
10101010
pub(crate) fn yaml_to_json(yaml: &YamlValue) -> JsonValue {

0 commit comments

Comments
 (0)