Skip to content

Commit 7244a91

Browse files
fix(renovate): allow multiline directive parsing
Update renovate-config.json5 regexes to accept directive key=value fields separated by spaces or newlines (including commented line breaks). Both matchStrings now permit either whitespace or a CRLF+comment separator between optional fields, preserving currentValue and currentDigest captures so renovate metadata can be split across lines or include inline comments.
1 parent 95123bc commit 7244a91

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

renovate-config.json5

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -77,8 +77,8 @@
7777
"customType": "regex",
7878
"managerFilePatterns": ["/(^|\/)package-lock.cmake$/"],
7979
"matchStrings": [
80-
"# renovate: datasource=(?<datasource>[a-zA-Z0-9-._]+?) depName=(?<depName>[^\\s]+?)(?: packageName=(?<packageName>[^\\s]+?))?(?: versioning=(?<versioning>[^\\s]+?))?(?: extractVersion=(?<extractVersion>[^\\s]+?))?(?: registryUrl=(?<registryUrl>[^\\s]+?))?\\s+set\\([A-Za-z0-9_]+?_(?:VERSION|TAG)\\s+\\\"?(?<currentValue>[^\\\"\\s\\)]+)\\\"?\\s*\\)",
81-
"# renovate: datasource=(?<datasource>[a-zA-Z0-9-._]+?) depName=(?<depName>[^\\s]+?)(?: packageName=(?<packageName>[^\\s]+?))?(?: versioning=(?<versioning>[^\\s]+?))?(?: extractVersion=(?<extractVersion>[^\\s]+?))?(?: registryUrl=(?<registryUrl>[^\\s]+?))?\\s+set\\([A-Za-z0-9_]+?_(?:VERSION|TAG)\\s+\\\"?(?<currentValue>[^\\\"\\s\\)]+)\\\"?\\s*\\)\\s+set\\([A-Za-z0-9_]+?_SHA256\\s+(?<currentDigest>[a-fA-F0-9]{64})\\s*\\)",
80+
"# renovate: datasource=(?<datasource>[a-zA-Z0-9-._]+?) depName=(?<depName>[^\\s]+?)(?:(?:[ \\t]+|\\s*\\r?\\n#\\s*)packageName=(?<packageName>[^\\s]+?))?(?:(?:[ \\t]+|\\s*\\r?\\n#\\s*)versioning=(?<versioning>[^\\s]+?))?(?:(?:[ \\t]+|\\s*\\r?\\n#\\s*)extractVersion=(?<extractVersion>[^\\s]+?))?(?:(?:[ \\t]+|\\s*\\r?\\n#\\s*)registryUrl=(?<registryUrl>[^\\s]+?))?\\s+set\\([A-Za-z0-9_]+?_(?:VERSION|TAG)\\s+\\\"?(?<currentValue>[^\\\"\\s\\)]+)\\\"?\\s*\\)",
81+
"# renovate: datasource=(?<datasource>[a-zA-Z0-9-._]+?) depName=(?<depName>[^\\s]+?)(?:(?:[ \\t]+|\\s*\\r?\\n#\\s*)packageName=(?<packageName>[^\\s]+?))?(?:(?:[ \\t]+|\\s*\\r?\\n#\\s*)versioning=(?<versioning>[^\\s]+?))?(?:(?:[ \\t]+|\\s*\\r?\\n#\\s*)extractVersion=(?<extractVersion>[^\\s]+?))?(?:(?:[ \\t]+|\\s*\\r?\\n#\\s*)registryUrl=(?<registryUrl>[^\\s]+?))?\\s+set\\([A-Za-z0-9_]+?_(?:VERSION|TAG)\\s+\\\"?(?<currentValue>[^\\\"\\s\\)]+)\\\"?\\s*\\)\\s+set\\([A-Za-z0-9_]+?_SHA256\\s+(?<currentDigest>[a-fA-F0-9]{64})\\s*\\)",
8282
],
8383
"versioningTemplate": "{{#if versioning}}{{{versioning}}}{{/if}}"
8484
},

0 commit comments

Comments
 (0)