(spec: string)
| 109 | } |
| 110 | |
| 111 | export function isAutoUpdatableSpec(spec: string) { |
| 112 | const value = spec.trim() |
| 113 | if (!value) return false |
| 114 | if (value === "latest" || value === "*") return true |
| 115 | if (/^[~^]/.test(value)) return true |
| 116 | if (/^(?:>=|>|<=|<)/.test(value)) return true |
| 117 | if (/\s+(?:\|\||-|[<>=])\s+/.test(value)) return true |
| 118 | return false |
| 119 | } |
| 120 | |
| 121 | async function readPackageJson(path: string): Promise<PackageJson | undefined> { |
| 122 | try { |
no outgoing calls
no test coverage detected