(version)
| 7 | |
| 8 | // Parse semantic version (supports pre-release versions like 4.0.0-beta.0) |
| 9 | function parseVersion(version) { |
| 10 | const match = version.match(/^(\d+)\.(\d+)\.(\d+)(?:-[\w.]+)?$/); |
| 11 | if (!match) return null; |
| 12 | return { |
| 13 | major: parseInt(match[1]), |
| 14 | minor: parseInt(match[2]), |
| 15 | patch: parseInt(match[3]), |
| 16 | full: version |
| 17 | }; |
| 18 | } |
| 19 | |
| 20 | // Get git tag date for a version |
| 21 | function getVersionDate(version) { |
no outgoing calls
no test coverage detected