Commit 28a7042
fix(ci): harden upgrade-deps script for slash-escaping and mocker patch sync
- Switch `replace('/', '\\/')` to `replaceAll` in both regex builders so a
future vitest sub-key with multiple slashes can't silently produce a
broken pattern.
- Always persist `updateVitestMockerPatch`'s in-memory rewrite when the
content changed, not only when the key version moved — fixes a case
where the key already matches `vitestVersion` but the value's patch-file
suffix is stale, which would otherwise leak through and trigger
ERR_PNPM_PATCHED_PKG_DOES_NOT_MATCH on install.
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>1 parent e984440 commit 28a7042
1 file changed
Lines changed: 9 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
160 | 160 | | |
161 | 161 | | |
162 | 162 | | |
163 | | - | |
| 163 | + | |
164 | 164 | | |
165 | 165 | | |
166 | 166 | | |
| |||
311 | 311 | | |
312 | 312 | | |
313 | 313 | | |
314 | | - | |
| 314 | + | |
315 | 315 | | |
316 | 316 | | |
317 | 317 | | |
| |||
365 | 365 | | |
366 | 366 | | |
367 | 367 | | |
368 | | - | |
369 | 368 | | |
370 | 369 | | |
| 370 | + | |
| 371 | + | |
| 372 | + | |
| 373 | + | |
| 374 | + | |
| 375 | + | |
| 376 | + | |
371 | 377 | | |
372 | 378 | | |
373 | 379 | | |
| |||
0 commit comments