(obj: unknown, kind: "dep" | "peer")
| 53 | } |
| 54 | |
| 55 | const editDeps = (obj: unknown, kind: "dep" | "peer") => { |
| 56 | if (!obj || typeof obj !== "object") return false |
| 57 | const map = obj as Record<string, unknown> |
| 58 | return keys |
| 59 | .map((key) => { |
| 60 | const cur = map[key] |
| 61 | if (typeof cur !== "string") return false |
| 62 | const next = setVersion(cur, kind) |
| 63 | if (next === cur) return false |
| 64 | map[key] = next |
| 65 | return true |
| 66 | }) |
| 67 | .some(Boolean) |
| 68 | } |
| 69 | |
| 70 | const editCatalog = (obj: unknown) => { |
| 71 | if (!obj || typeof obj !== "object") return false |
no test coverage detected