Commit 6daa700
chore(deps): replace serde_yml with serde_norway (#357)
## Motivation
The Security Analysis job (which runs `cargo deny check` whenever
`Cargo.lock` changes) fails on every PR that touches `Cargo.lock`
because `serde_yml v0.0.12` trips
[RUSTSEC-2025-0068](https://rustsec.org/advisories/RUSTSEC-2025-0068):
the crate is unsound (`Serializer.emitter` can segfault), the upstream
project has been archived, and the advisory explicitly states "No safe
upgrade is available". The only fix is to move off `serde_yml`. Example
failure: [run 24874266956 on
#352](https://github.com/voidzero-dev/vite-task/actions/runs/24874266956/job/72827299235?pr=352).
## Summary
- Replace `serde_yml = "0.0.12"` with `serde_norway = "0.9.42"` in the
workspace `Cargo.toml` and in `crates/vite_workspace/Cargo.toml`.
- Update `vite_workspace::load_package_graph` to call
`serde_norway::from_slice` for `pnpm-workspace.yaml`.
- Rename the error variant `Error::SerdeYml { serde_yml_error:
serde_yml::Error }` → `Error::SerdeYaml { serde_yaml_error:
serde_norway::Error }` so the type stays generic over the backing crate.
- Regenerate `Cargo.lock` (adds `serde_norway`, `unsafe-libyaml-norway`;
drops `serde_yml`, `libyaml-safer`, and their exclusive transitive
deps).
## Why `serde_norway` over the other forks
`serde_yml`'s RUSTSEC advisory lists four alternatives; both maintained
`serde_yaml` forks (`serde_norway` and `serde_yaml_ng`) are drop-in
compatible. `serde_norway` is more actively maintained (last release Dec
2024 vs May 2024), dual-licensed MIT/Apache-2.0, and ships its own
`unsafe-libyaml-norway` fork of the C bindings so future advisories
against libyaml can be patched without waiting on upstream.
## Test plan
- [x] `cargo deny check --config <oxc security-action deny.toml>` →
`advisories ok, bans ok, licenses ok, sources ok` (was `unsound:
RUSTSEC-2025-0068` before)
- [x] `cargo test -p vite_workspace` → 79 passed
- [x] `cargo clippy -p vite_workspace --all-targets -- -D warnings` →
clean
---------
Co-authored-by: Claude <noreply@anthropic.com>1 parent 4b79cbe commit 6daa700
5 files changed
Lines changed: 26 additions & 32 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
116 | 116 | | |
117 | 117 | | |
118 | 118 | | |
119 | | - | |
| 119 | + | |
120 | 120 | | |
121 | 121 | | |
122 | 122 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
14 | 14 | | |
15 | 15 | | |
16 | 16 | | |
17 | | - | |
| 17 | + | |
18 | 18 | | |
19 | 19 | | |
20 | 20 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
43 | 43 | | |
44 | 44 | | |
45 | 45 | | |
46 | | - | |
| 46 | + | |
47 | 47 | | |
48 | 48 | | |
49 | | - | |
| 49 | + | |
50 | 50 | | |
51 | 51 | | |
52 | 52 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
248 | 248 | | |
249 | 249 | | |
250 | 250 | | |
251 | | - | |
252 | | - | |
| 251 | + | |
| 252 | + | |
253 | 253 | | |
254 | | - | |
| 254 | + | |
255 | 255 | | |
256 | 256 | | |
257 | 257 | | |
| |||
0 commit comments