Update file change parsing regex to also handle 'File addition: "<filename>"' format
[?]
Jan 15, 2021, 9:19 PM
5DKNE57725UBCU5Z325JA2T3VTMW6RTIQJKZTUQNCH7VTTES2LHQCDependencies
- [2]
WPIUUBJIUse URIs instead of string paths in changelog - [3]
7A3NMQ6QShow altered files instead of dependencies as children of changes in changelog - [*]
ZGMIJNFVCreate pijul.ts for executing commands using the Pijul CLI
Change contents
- replacement in src/pijul.ts at line 311
const changePattern = /\d\.\s([A-Za-z]+)\sin\s(.*):/g;// Big complicated regex needs to match both the 'Edit in src/repository.ts' format// and the 'File addition: "yarn.lock" format.const changePattern = /\d\.\s(?:(?:([A-Za-z]+)\sin\s)(.*):|(.*):\s"(\S+)")/g; - replacement in src/pijul.ts at line 318
const [, operation, path] = match;// Since their are two formats the operation and path can be in, there are four// capture groups for two properties. These two statements take whichever is defined.const operation = match[1] ?? match[3];const path = match[2] ?? match[4];